Class EntityDependencyUpdater


  • public class EntityDependencyUpdater
    extends Object
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • updateImportConfigs

        public static void updateImportConfigs​(IEntityContext ec,
                                               List<IEntityImportConfig<?>> configsToUpdate,
                                               de.xima.cmn.dao.interfaces.IEntity<Long> entityToAdd)
                                        throws Exception
        Adds the given entity to the appropriate entity fields of the import configs
        Parameters:
        ec - Entity context to use for accessing the database
        configsToUpdate - List of import configs to update
        entityToAdd - IEntity that should be added/set for the import configs
        Throws:
        Exception - When the configurations could not be updated for any reason.
      • updateDependencies

        public static <T extends de.xima.cmn.dao.interfaces.IEntity<Long>> void updateDependencies​(List<IEntityImportConfig<?>> importConfigs,
                                                                                                   IEntityImportConfig<?> updateConfig,
                                                                                                   com.vdurmont.semver4j.Semver fcVersion)
                                                                                            throws Exception
        Updates the references to an entity
        Type Parameters:
        T - Type of the entity.
        Parameters:
        importConfigs - IEntityImportConfigs for which the dependencies should be updated
        updateConfig - IEntityImportConfig whose references should be updated
        fcVersion - Formcycle version that was used to create the export.
        Throws:
        Exception - on errors while updating the dependencies
      • updateDependencies

        public static void updateDependencies​(List<IEntityImportConfig<?>> importConfigs,
                                              Object newAlternative,
                                              UUID originalUuid,
                                              String originalName,
                                              Long originalId,
                                              Object original,
                                              com.vdurmont.semver4j.Semver fcVersion)
        Updates the references to an entity
        Parameters:
        importConfigs - All import configs for which the dependencies should be updated.
        newAlternative - New alternative that should be referenced
        originalUuid - UUID of the dependency that should be updated
        originalName - Name of the dependency that should be updated
        originalId - ID of the dependency that should be updated
        original - Reference to the original object that was replaced by the new alternative
        fcVersion - Formcycle version that was used to create the export.
      • updateDependencies

        @Deprecated
        public static void updateDependencies​(List<IEntityImportConfig<?>> importConfigs,
                                              de.xima.cmn.dao.interfaces.IEntity<Long> newEntity,
                                              UUID oldUuid)
                                       throws Exception
        Deprecated.
        Updates the references to an entity
        Parameters:
        importConfigs - IEntityImportConfigs for which the dependencies should be updated
        newEntity - IEntity new entity that should be referenced
        oldUuid - UUID UUID of the dependency that should be updated
        Throws:
        Exception - on errors while updating the dependencies
      • updateDependencies

        @Deprecated
        public static void updateDependencies​(List<IEntityImportConfig<?>> importConfigs,
                                              Object newAlternative,
                                              UUID originalUuid,
                                              String originalName,
                                              Long originalId,
                                              com.vdurmont.semver4j.Semver fcVersion)
                                       throws Exception
        Updates the references to an entity
        Parameters:
        importConfigs - All import configs for which the dependencies should be updated.
        newAlternative - New alternative that should be referenced
        originalUuid - UUID of the dependency that should be updated
        originalName - Name of the dependency that should be updated
        originalId - ID of the dependency that should be updated
        fcVersion - Formcycle version that was used to create the export.
        Throws:
        Exception - on errors while updating the dependencies