Package de.xima.fc.importer.config
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<?>>
public class ClientFormThemeImportConfig extends AEntityImportConfig<ClientFormTheme>
IEntityImportConfig
implementation forClientFormTheme
.- Since:
- 8.3.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class de.xima.fc.importer.config.AEntityImportConfig
alternative, conflictResolveAction, context, entity, formcycleVersion, importJson, LOG, LOG_PREFIX, originalID, originalName, originalUUID, persisted, persistedName, unresolvedDependencies
-
-
Constructor Summary
Constructors Constructor Description ClientFormThemeImportConfig(IEntityImportConfigData<ClientFormTheme> data)
Creates a new entity import configuration for a client form theme, initialized with the given import data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<DependencyDescriptor>
finalize(IEntityContext ec, String fcVersion, String exportVersion)
Finish the import.protected ClientFormTheme
findPersisted(IEntityContext ec)
protected IGenericDao<ClientFormTheme>
getDao()
Class<?>
getEntityClass()
boolean
isRelevantForImport()
Whether importing this entity is actually relevant.Object
loadAlternative(IEntityContext ec)
Loads the alternative that should be used instead of the entity represented by this import config.protected void
makeEntityUnique(IEntityContext ec)
protected void
preCreate(IEntityContext ec)
protected void
preUpdate(IEntityContext ec)
void
setPreconditionImportConfigs(Collection<IEntityImportConfig<?>> preconditionImportConfigs)
Sets the import configs that are preconditions for this theme.-
Methods inherited from class de.xima.fc.importer.config.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, validateImport
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.xima.fc.importer.interfaces.IEntityImportConfig
compareTo, getDependencies, setAlternativeId
-
-
-
-
Constructor Detail
-
ClientFormThemeImportConfig
public ClientFormThemeImportConfig(IEntityImportConfigData<ClientFormTheme> data)
Creates a new entity import configuration for a client form theme, initialized with the given import data.- Parameters:
data
- The import data.
-
-
Method Detail
-
finalize
public List<DependencyDescriptor> finalize(IEntityContext ec, String fcVersion, String exportVersion) throws Exception
Description copied from interface:IEntityImportConfig
Finish the import. Should be called after every import config has been staged for import and deprecated fields have been handled.- Specified by:
finalize
in interfaceIEntityImportConfig<ClientFormTheme>
- Overrides:
finalize
in classAEntityImportConfig<ClientFormTheme>
- Parameters:
ec
-IEntityContext
to 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:
List
ofDependencyDescriptor
s of missing dependencies- Throws:
Exception
- When the entity import could not be finalized.
-
getEntityClass
public Class<?> getEntityClass()
- Specified by:
getEntityClass
in interfaceIEntityImportConfig<ClientFormTheme>
- Overrides:
getEntityClass
in classAEntityImportConfig<ClientFormTheme>
- Returns:
- the class of the entity
-
isRelevantForImport
public boolean isRelevantForImport()
Description copied from interface:IEntityImportConfig
Whether 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
public Object loadAlternative(IEntityContext ec)
Description copied from interface:IEntityImportConfig
Loads 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:
loadAlternative
in interfaceIEntityImportConfig<ClientFormTheme>
- Overrides:
loadAlternative
in 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
IEntity
with 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
protected ClientFormTheme findPersisted(IEntityContext ec)
- Overrides:
findPersisted
in classAEntityImportConfig<ClientFormTheme>
-
getDao
protected IGenericDao<ClientFormTheme> getDao()
- Specified by:
getDao
in classAEntityImportConfig<ClientFormTheme>
-
makeEntityUnique
protected void makeEntityUnique(IEntityContext ec)
- Specified by:
makeEntityUnique
in classAEntityImportConfig<ClientFormTheme>
-
preCreate
protected void preCreate(IEntityContext ec)
- Overrides:
preCreate
in classAEntityImportConfig<ClientFormTheme>
-
preUpdate
protected void preUpdate(IEntityContext ec)
- Overrides:
preUpdate
in classAEntityImportConfig<ClientFormTheme>
-
-