urbanairship-core/src/main/java/com/urbanairship/push/PendingTagGroupMutationStore.java
void migrateTagGroups(String pendingAddTagsKey, String pendingRemoveTagsKey) {
        JsonValue pendingAddTags = dataStore.getJsonValue(pendingAddTagsKey);
        JsonValue pendingRemoveTags = dataStore.getJsonValue(pendingRemoveTagsKey);

        if (pendingAddTags.isNull() && pendingRemoveTags.isNull()) {
            return;
        }

        Map<String, Set<String>> addTags = TagUtils.convertToTagsMap(pendingAddTags);
        Map<String, Set<String>> removeTags = TagUtils.convertToTagsMap(pendingRemoveTags);

        TagGroupsMutation mutation = TagGroupsMutation.newAddRemoveMutation(addTags, removeTags);
        List<TagGroupsMutation> mutations = Collections.singletonList(mutation);
        mutations = TagGroupsMutation.collapseMutations(mutations);

        dataStore.put(storeKey, JsonValue.wrapOpt(mutations));

        dataStore.remove(pendingAddTagsKey);
        dataStore.remove(pendingRemoveTagsKey);
    }
/**
     * Converts the old tag group store to tag mutations.
     *
     * @param pendingAddTagsKey The old pending addPending tags key.
     * @param pendingRemoveTagsKey The old pending remove tags key.
     */
Converts the old tag group store to tag mutations.
@param pendingAddTagsKey The old pending addPending tags key.
@param pendingRemoveTagsKey The old pending remove tags key.
Converts the old tag group store to tag mutations . @param pendingAddTagsKey The old pending addPending tags key . @param pendingRemoveTagsKey The old pending remove tags key .
void migrateTagGroups(String pendingAddTagsKey, String pendingRemoveTagsKey) {
        JsonValue pendingAddTags = dataStore.getJsonValue(pendingAddTagsKey);
        JsonValue pendingRemoveTags = dataStore.getJsonValue(pendingRemoveTagsKey);
        if (pendingAddTags.isNull() && pendingRemoveTags.isNull()) {
            return;
        }
        Map<String, Set<String>> addTags = TagUtils.convertToTagsMap(pendingAddTags);
        Map<String, Set<String>> removeTags = TagUtils.convertToTagsMap(pendingRemoveTags);
        TagGroupsMutation mutation = TagGroupsMutation.newAddRemoveMutation(addTags, removeTags);
        List<TagGroupsMutation> mutations = Collections.singletonList(mutation);
        mutations = TagGroupsMutation.collapseMutations(mutations);
        dataStore.put(storeKey, JsonValue.wrapOpt(mutations));
        dataStore.remove(pendingAddTagsKey);
        dataStore.remove(pendingRemoveTagsKey);
    }
void migrateTagGroups ( String pendingAddTagsKey , String pendingRemoveTagsKey ) { JsonValue pendingAddTags = dataStore . getJsonValue ( pendingAddTagsKey ) ; JsonValue pendingRemoveTags = dataStore . getJsonValue ( pendingRemoveTagsKey ) ; if ( pendingAddTags . isNull ( ) && pendingRemoveTags . isNull ( ) ) { return ; } Map < String , Set < String > > addTags = TagUtils . convertToTagsMap ( pendingAddTags ) ; Map < String , Set < String > > removeTags = TagUtils . convertToTagsMap ( pendingRemoveTags ) ; TagGroupsMutation mutation = TagGroupsMutation . newAddRemoveMutation ( addTags , removeTags ) ; List < TagGroupsMutation > mutations = Collections . singletonList ( mutation ) ; mutations = TagGroupsMutation . collapseMutations ( mutations ) ; dataStore . put ( storeKey , JsonValue . wrapOpt ( mutations ) ) ; dataStore . remove ( pendingAddTagsKey ) ; dataStore . remove ( pendingRemoveTagsKey ) ; }
Converts the old tag group store to tag mutations.
Converts the old tag group store to tag mutations .