Class ProfileTransformer


  • public class ProfileTransformer
    extends java.lang.Object
    • Method Detail

      • getProfileTransformerForRules

        public static ResultAndWarnings<ProfileTransformer> getProfileTransformerForRules​(@Nonnull
                                                                                          TransformationApi transformationApi,
                                                                                          @Nonnull
                                                                                          java.util.List<ProfileRule> transformationRules,
                                                                                          @Nonnull
                                                                                          java.util.List<ProfileTableCreationRule> creationRules)
        Creates a ProfileTransformer that applies a fixed set of transformations.
        Parameters:
        transformationApi - The instance of the TransformationApi that provided the rules
        transformationRules - The rules that will be used to apply transformations to profile data.
        creationRules - The rules that create new profile tables.
        Returns:
        a ResultAndWarnings object containing the ProfileTransformer, and any warnings issued during its creation.
      • transformProfileData

        public ResultAndWarnings<java.lang.Boolean> transformProfileData​(java.util.List<com.opencloud.slee.data.migration.ProfileTableData> profileTableDefinitions,
                                                                         java.util.List<org.w3c.dom.Document> profileTableExports)
        Applies all transformations specified by this ProfileTransformer's transformation rules to the provided ProfileTableData objects and export Documents. The profileTableDefinitions and profileTableExports lists, and their contained objects are mutated directly by the transformations, objects will be removed from the list if their corresponding profile is deleted. There should be a 1:1 relationship between objects in the profileTableDefinitions list and objects on the profileTableExports list, warnings will be recorded if this is found not to be the case, and the associated data will not be transformed.
        Parameters:
        profileTableDefinitions - A list of ProfileDataObjects describing the relationship between profile tables and profile specs
        profileTableExports - A list of DOM Documents containing exported profile table data.
        Returns:
        a ResultAndWarnings object containing a boolean result (which will be true if the transformation was completed without errors), and any warnings/errors issued during transformation.