Package de.xima.fc.importer.config
Class ProjectImportConfig
- java.lang.Object
-
- de.xima.fc.importer.config.AEntityImportConfig<Projekt>
-
- de.xima.fc.importer.config.ProjectImportConfig
-
- All Implemented Interfaces:
IEntityImportConfig<Projekt>,Serializable,Comparable<IEntityImportConfig<?>>
public class ProjectImportConfig extends AEntityImportConfig<Projekt>
Import config forProjekts- Since:
- 6.6.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 ProjectImportConfig(IEntityContext ec, Mandant client, Projekt entity, Projekt override, Set<IEntityDependency> dependencies, String importJson, List<DeserializedEntity> deserializedEntities)Deprecated.
-
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.FormVersionImportConfiggetActiveVersion()WorkflowVersiongetActiveWorkflowVersion()List<IEntityImportConfig<?>>getChildren()protected IGenericDao<Projekt>getDao()Returns the data access object of the entity to be imported.List<DatatableImportConfig>getDatatables()List<StateMapperModel>getStateMapping()List<StateImportConfig>getStates()voidignore(IEntityImportConfig<?> config)Keeps track of import configs which should be ignored, defaults to no-op, implemented in project import config.booleanisIgnored(DatatableImportConfig config)Checks, whether the given datatable is not being imported, because a config it depends on is ignored.protected voidmakeEntityUnique(IEntityContext ec)Makes the entity to be imported unique with respect to database constraints.protected voidpostCreate(IEntityContext ec)Is called after creating the entity to be imported.protected voidpostUpdate(IEntityContext ec)Is called after overriding the entity to be imported.protected voidpreCreate(IEntityContext ec)Is called before the entity to be imported is created.protected voidpreUpdate(IEntityContext ec)Is called before the entity to be imported is overridden.protected voidvalidateImport(IEntityContext ec)ProjectImportConfigwithAlias(String alias)ProjectImportConfigwithImportAsTemplate(boolean importAsTemplate)ProjectImportConfigwithOverrideActiveVersions(IEntityContext ec, boolean overrideActiveVersions)ProjectImportConfigwithScope(String scope)ProjectImportConfigwithTitle(String title)-
Methods inherited from class de.xima.fc.importer.config.AEntityImportConfig
findPersisted, getAllChildrenFlat, getConflictResolveAction, getDependencyUuid, getEntity, getEntityClass, getEntityToOverride, getImportJson, getOriginal, getOriginalExportId, getOriginalID, getOriginalName, getOriginalUUID, getPersisted, getUnresolvedDependencies, getUuidEntityValue, isEntityExists, isImported, isUuidExisting, loadAlternative, resolveDependencies, setAlternative, setConflictResolveAction, setEntity, setEntityToOverride, setImported, setOriginal, setPersisted, stage, toString, updatePersisted
-
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, isRelevantForImport, setAlternativeId, shouldAlsoBeIgnored
-
-
-
-
Constructor Detail
-
ProjectImportConfig
@Deprecated public ProjectImportConfig(IEntityContext ec, Mandant client, Projekt entity, Projekt override, Set<IEntityDependency> dependencies, String importJson, List<DeserializedEntity> deserializedEntities)
Deprecated.
-
-
Method Detail
-
getActiveVersion
public FormVersionImportConfig getActiveVersion()
-
getActiveWorkflowVersion
public WorkflowVersion getActiveWorkflowVersion()
-
getStates
public List<StateImportConfig> getStates()
-
getDatatables
public List<DatatableImportConfig> getDatatables()
-
isIgnored
public boolean isIgnored(DatatableImportConfig config)
Checks, whether the given datatable is not being imported, because a config it depends on is ignored.- Parameters:
config- datatable import config- Returns:
- true, if the datatable is being ignored
-
getStateMapping
public List<StateMapperModel> getStateMapping()
-
getChildren
public List<IEntityImportConfig<?>> getChildren()
- Specified by:
getChildrenin interfaceIEntityImportConfig<Projekt>- Overrides:
getChildrenin classAEntityImportConfig<Projekt>- Returns:
- all child importConfigs
-
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<Projekt>- Overrides:
finalizein classAEntityImportConfig<Projekt>- 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.
-
getDao
protected IGenericDao<Projekt> getDao()
Description copied from class:AEntityImportConfigReturns the data access object of the entity to be imported.- Specified by:
getDaoin classAEntityImportConfig<Projekt>- Returns:
- data access object
-
makeEntityUnique
protected void makeEntityUnique(IEntityContext ec) throws Exception
Description copied from class:AEntityImportConfigMakes the entity to be imported unique with respect to database constraints. If the name is unique, this method should make the entity's name unique.- Specified by:
makeEntityUniquein classAEntityImportConfig<Projekt>- Parameters:
ec- entity context- Throws:
Exception- if an error occurs
-
postCreate
protected void postCreate(IEntityContext ec) throws Exception
Description copied from class:AEntityImportConfigIs called after creating the entity to be imported.- Overrides:
postCreatein classAEntityImportConfig<Projekt>- Parameters:
ec- entity context- Throws:
Exception- if an error occurs
-
postUpdate
protected void postUpdate(IEntityContext ec) throws Exception
Description copied from class:AEntityImportConfigIs called after overriding the entity to be imported. If the existing entity is overridden, it is being updated.- Overrides:
postUpdatein classAEntityImportConfig<Projekt>- Parameters:
ec- entity context- Throws:
Exception- if an error occurs
-
preCreate
protected void preCreate(IEntityContext ec) throws Exception
Description copied from class:AEntityImportConfigIs called before the entity to be imported is created.- Overrides:
preCreatein classAEntityImportConfig<Projekt>- Parameters:
ec- entity context- Throws:
Exception- if an error occurs
-
preUpdate
protected void preUpdate(IEntityContext ec) throws Exception
Description copied from class:AEntityImportConfigIs called before the entity to be imported is overridden.- Overrides:
preUpdatein classAEntityImportConfig<Projekt>- Parameters:
ec- entity context- Throws:
Exception- if an error occurs
-
validateImport
protected void validateImport(IEntityContext ec) throws Exception
- Overrides:
validateImportin classAEntityImportConfig<Projekt>- Throws:
Exception
-
withTitle
@CanIgnoreReturnValue public ProjectImportConfig withTitle(String title)
-
withAlias
@CanIgnoreReturnValue public ProjectImportConfig withAlias(String alias)
-
withScope
@CanIgnoreReturnValue public ProjectImportConfig withScope(String scope)
-
withImportAsTemplate
@CanIgnoreReturnValue public ProjectImportConfig withImportAsTemplate(boolean importAsTemplate)
-
withOverrideActiveVersions
@CanIgnoreReturnValue public ProjectImportConfig withOverrideActiveVersions(IEntityContext ec, boolean overrideActiveVersions)
-
ignore
public void ignore(IEntityImportConfig<?> config)
Description copied from interface:IEntityImportConfigKeeps track of import configs which should be ignored, defaults to no-op, implemented in project import config.- Parameters:
config- config to be ignored
-
-