Class ClientFormThemeImportConfig
java.lang.Object
de.xima.fc.importer.config.AEntityImportConfig<ClientFormTheme>
de.xima.fc.importer.config.ClientFormThemeImportConfig
- All Implemented Interfaces:
IEntityImportConfig<ClientFormTheme>, Serializable, Comparable<IEntityImportConfig<?>>
IEntityImportConfig implementation for ClientFormTheme.- Since:
- 8.3.0
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Field Summary
Fields inherited from class AEntityImportConfig
alternative, conflictResolveAction, context, entity, formcycleVersion, importJson, LOG, LOG_PREFIX, originalID, originalName, originalUUID, persisted, persistedName, unresolvedDependencies -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new entity import configuration for a client form theme, initialized with the given import data. -
Method Summary
Modifier and TypeMethodDescriptionfinalize(IEntityContext ec, String fcVersion, String exportVersion) Finish the import.protected ClientFormThemeprotected IGenericDao<ClientFormTheme> getDao()Class<?> booleanWhether importing this entity is actually relevant.Loads the alternative that should be used instead of the entity represented by this import config.protected voidprotected voidprotected voidvoidsetPreconditionImportConfigs(Collection<IEntityImportConfig<?>> preconditionImportConfigs) Sets the import configs that are preconditions for this theme.Methods inherited from class AEntityImportConfig
getAllChildrenFlat, getChildren, getConflictResolveAction, getDependencyUuid, getEntity, getEntityToOverride, getImportJson, getOriginal, getOriginalExportId, getOriginalID, getOriginalName, getOriginalUUID, getPersisted, getUnresolvedDependencies, getUuidEntityValue, isEntityExists, isImported, isUuidExisting, postCreate, postUpdate, resolveDependencies, setAlternative, setConflictResolveAction, setEntity, setEntityToOverride, setImported, setOriginal, setPersisted, stage, toString, updatePersisted, validateImportMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface IEntityImportConfig
compareTo, getDependencies, setAlternativeId
-
Constructor Details
-
ClientFormThemeImportConfig
Creates a new entity import configuration for a client form theme, initialized with the given import data.- Parameters:
data- The import data.
-
-
Method Details
-
finalize
public List<DependencyDescriptor> finalize(IEntityContext ec, String fcVersion, String exportVersion) throws Exception Description copied from interface:IEntityImportConfigFinish the import. Should be called after every import config has been staged for import and deprecated fields have been handled.- Specified by:
finalizein interfaceIEntityImportConfig<ClientFormTheme>- Overrides:
finalizein classAEntityImportConfig<ClientFormTheme>- Parameters:
ec-IEntityContextto be usedfcVersion- The current formcycle version where the entity is imported.exportVersion- The formcycle version that was used to create the export file with the entity.- Returns:
ListofDependencyDescriptors of missing dependencies- Throws:
Exception- When the entity import could not be finalized.
-
getEntityClass
- Specified by:
getEntityClassin interfaceIEntityImportConfig<ClientFormTheme>- Overrides:
getEntityClassin classAEntityImportConfig<ClientFormTheme>- Returns:
- the class of the entity
-
isRelevantForImport
public boolean isRelevantForImport()Description copied from interface:IEntityImportConfigWhether importing this entity is actually relevant. When false, this entity should not be suggested to the user and should be skipped. Note that entities may become relevant depending on whether other entities are imported or not.- Returns:
- Whether the entity wrapped by this import config is relevant for the import.
-
loadAlternative
Description copied from interface:IEntityImportConfigLoads the alternative that should be used instead of the entity represented by this import config. The alternative must have been set viaIEntityImportConfig.setAlternative(Object)before. If it was not set, this method should return null.- Specified by:
loadAlternativein interfaceIEntityImportConfig<ClientFormTheme>- Overrides:
loadAlternativein classAEntityImportConfig<ClientFormTheme>- Parameters:
ec- The entity context to use for accessing the database.- Returns:
- Alternative that should be used instead. Often, this will be an
IEntitywith the same type as the entity represented by this import config.
-
setPreconditionImportConfigs
public void setPreconditionImportConfigs(Collection<IEntityImportConfig<?>> preconditionImportConfigs) Sets the import configs that are preconditions for this theme. When any of the preconditions are created or updated, this theme will be relevant as well. Form themes that only exist in the export file as parents of other themes are not relevant and do not need to be imported unless the child theme is imported as well.- Parameters:
preconditionImportConfigs- The import configs that are preconditions for this theme.
-
findPersisted
- Overrides:
findPersistedin classAEntityImportConfig<ClientFormTheme>
-
getDao
- Specified by:
getDaoin classAEntityImportConfig<ClientFormTheme>
-
makeEntityUnique
- Specified by:
makeEntityUniquein classAEntityImportConfig<ClientFormTheme>
-
preCreate
- Overrides:
preCreatein classAEntityImportConfig<ClientFormTheme>
-
preUpdate
- Overrides:
preUpdatein classAEntityImportConfig<ClientFormTheme>
-