Class ImportParameters
java.lang.Object
de.espirit.firstspirit.access.export.ImportParameters
- All Implemented Interfaces:
Serializable
Configuration class used as parameter for
project imports
- Since:
- 4.0.17
- See Also:
-
Constructor Summary
ConstructorDescriptionImportParameters
(ExportFile exportFile, ProjectInfo projectInfo, String projectName, String projectDescription, @NotNull Map<String, String> layerMapping, @NotNull Map<Long, Long> scheduleTaskTemplateMapping) Creates a new ImportParameters object.ImportParameters
(ExportFile exportFile, ProjectInfo projectInfo, String projectName, String projectDescription, Map<String, String> layerMapping, @NotNull Map<Long, Long> scheduleTaskTemplateMapping, @NotNull Map<Long, String> layerIDMapping) Creates a new ImportParameters object. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whetherschedule entries
imported during theproject import
will be activated (default) or not.boolean
Indicates whether the imported project will be activated after theproject import
(default) or not.boolean
Returns true if this import is a project backup restore.boolean
Returns true if a check for sufficient free disk space is performed on the server before the import process is started to make sure the import completes successfully.boolean
Indicates whether theproject import
will create new ids (true
, default) or keeps the ids existing in theexport file
.Returns the belongingexport file
.Is used in addition to getLayerMapping().Is used in addition to getLayerIDMapping().Gets the description of the new project which will be created during the project import.Returns the belonging project info.Gets the name of the new project which will be created during the project import.long
Restore project mode.void
setActivateDeployments
(boolean activateDeployments) Define whetherschedule entries
imported during theproject import
should be activated (default) or not.void
setActivateProject
(boolean activateProject) Define whether the imported project should be activated afterproject import
or not.void
setBackupRestore
(boolean backupRestore) Set to true if this import is a project backup restore.void
setCheckFreeSpace
(boolean checkFreeSpace) Set to true if a check for sufficient free disk space on the server should be performed before the import process is started.void
setCreateNewIds
(boolean createNewIds) Define whether theproject import
should create new ids (default) or keep the ids existing in theexport file
.void
setRestoreProjectId
(long restoreProjectId) toString()
-
Constructor Details
-
ImportParameters
public ImportParameters(ExportFile exportFile, ProjectInfo projectInfo, String projectName, String projectDescription, @NotNull @NotNull Map<String, String> layerMapping, @NotNull @NotNull Map<Long, Long> scheduleTaskTemplateMapping) Creates a new ImportParameters object.- Parameters:
exportFile
- the ExportFile which has to beuploaded
to the FirstSpirit serverprojectInfo
- the project info belonging to the given export file. UseProjectStorage.getProjectInfo(ExportFile)
to get the project infoprojectName
- the new name for the project which will be created during the project importprojectDescription
- the new description for the project which will be created during the project importlayerMapping
- the mapping of layers from source layer name in the export file to the target layer for the new project- Since:
- 4.0.17
- See Also:
-
ImportParameters
public ImportParameters(ExportFile exportFile, ProjectInfo projectInfo, String projectName, String projectDescription, Map<String, String> layerMapping, @NotNull @NotNull Map<Long, Long> scheduleTaskTemplateMapping, @NotNull @NotNull Map<Long, String> layerIDMapping) Creates a new ImportParameters object.- Parameters:
exportFile
- the ExportFile which has to beuploaded
to the FirstSpirit serverprojectInfo
- the project info belonging to the given export file. UseProjectStorage.getProjectInfo(ExportFile)
to get the project infoprojectName
- the new name for the project which will be created during the project importprojectDescription
- the new description for the project which will be created during the project importlayerMapping
- the mapping of layers from source layer name in the export file to the target layer for the new project- Since:
- 4.2.9
- See Also:
-
-
Method Details
-
getExportFile
Returns the belongingexport file
.- Since:
- 4.0.17
-
getProjectInfo
Returns the belonging project info.- Since:
- 4.0.17
-
getProjectName
Gets the name of the new project which will be created during the project import.- Since:
- 4.0.17
-
getProjectDescription
Gets the description of the new project which will be created during the project import.- Since:
- 4.0.17
-
getLayerMapping
Is used in addition to getLayerIDMapping().- Returns:
- map of old layername to new layername
- Since:
- 4.0.17
-
getLayerIDMapping
Is used in addition to getLayerMapping().- Returns:
- map of old schema id to new layername
- Since:
- 4.2.9
-
getCreateNewIds
public boolean getCreateNewIds()Indicates whether theproject import
will create new ids (true
, default) or keeps the ids existing in theexport file
.- Since:
- 4.0.17
- See Also:
-
setCreateNewIds
public void setCreateNewIds(boolean createNewIds) Define whether theproject import
should create new ids (default) or keep the ids existing in theexport file
.- Since:
- 4.0.17
- See Also:
-
getActivateDeployments
public boolean getActivateDeployments()Indicates whetherschedule entries
imported during theproject import
will be activated (default) or not.- Returns:
true
(default) if schedule entries will be activated during project import,false
otherwise- Since:
- 4.0.17
- See Also:
-
setActivateDeployments
public void setActivateDeployments(boolean activateDeployments) Define whetherschedule entries
imported during theproject import
should be activated (default) or not.- Parameters:
activateDeployments
-true
to activateschedule entries
during import- Since:
- 4.0.17
- See Also:
-
getScheduleTaskTemplateMapping
- Returns:
- returns a map containing the mapping for server depending schedule task templates to import.
the keyrepresents the id of the template to import, the value is the template id schedule tasks should reference after import.
if the schedule task template should be imported the value is set to-1
. - Since:
- 4.0.17
-
getActivateProject
public boolean getActivateProject()Indicates whether the imported project will be activated after theproject import
(default) or not.- Returns:
true
(default) if the project will be activated after the import,false
otherwise- Since:
- 4.1.22
- See Also:
-
setActivateProject
public void setActivateProject(boolean activateProject) Define whether the imported project should be activated afterproject import
or not.- Parameters:
activateProject
- usetrue
if the new created/imported project should be active after import,false
otherwise- Since:
- 4.1.22
- See Also:
-
getRestoreProjectId
public long getRestoreProjectId()Restore project mode. Keep project id an import old ProjectDTO. Useful for restoring a project on the same server. -1 means normal import mode (create new project with new id).- Since:
- 4.2.9
-
setRestoreProjectId
public void setRestoreProjectId(long restoreProjectId) - Since:
- 4.2.9
-
getBackupRestore
public boolean getBackupRestore()Returns true if this import is a project backup restore. A project backup restore has some limitations, for example a change of the database layer type is not possible.- Returns:
- true if this is a project backup restore
- Since:
- 5.0.107
-
setBackupRestore
public void setBackupRestore(boolean backupRestore) Set to true if this import is a project backup restore. A project backup restore has some limitations, for example a change of the database layer type is not possible.- Parameters:
backupRestore
- set to true if this is a project backup restore- Since:
- 5.0.107
-
getCheckFreeSpace
public boolean getCheckFreeSpace()Returns true if a check for sufficient free disk space is performed on the server before the import process is started to make sure the import completes successfully. This is a best effort check and there are multiple factors which make it difficult to exactly calculate the disk space needed by a project, therefore it is possible to deactivate the check completely.- Returns:
- true if a check for sufficient free disk space on the server should be performed before the import process is started.
- Since:
- 5.2.220606
-
setCheckFreeSpace
public void setCheckFreeSpace(boolean checkFreeSpace) Set to true if a check for sufficient free disk space on the server should be performed before the import process is started. There are multiple factors which make it difficult to exactly calculate the disk space needed by a project, therefore it is possible to deactivate the check completely.- Parameters:
checkFreeSpace
- set to true if a check for sufficient free disk space on the server should be performed before the import process is started.- Since:
- 5.2.220606
-
toString
-