Interface MTImportConfig
public interface MTImportConfig
Configuration for a silent MT import.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the languages from the export file.Returns the layer types from the export file.booleanbooleanbooleanbooleanbooleanvoidsetAlwaysOverwrite(boolean value) voidsetCreateRevisions(boolean createRevisions) voidsetImportCopies(boolean value) voidsetKeepUsersFromImportFile(boolean value) voidSets the language mapping to use.voidSets the layer type mapping to use.voidsetNewTimestampName(String name) default voidValidates all XML files in the selected import archive against their schemas.voidvalidateXMLFiles(Consumer<Integer> progress)
-
Method Details
-
isCompatibleVersion
boolean isCompatibleVersion() -
isAlwaysOverwrite
boolean isAlwaysOverwrite() -
setAlwaysOverwrite
void setAlwaysOverwrite(boolean value) -
isImportCopies
boolean isImportCopies() -
setImportCopies
void setImportCopies(boolean value) -
isCreateRevisions
boolean isCreateRevisions() -
setCreateRevisions
void setCreateRevisions(boolean createRevisions) -
isKeepUsersFromImportFile
boolean isKeepUsersFromImportFile() -
setKeepUsersFromImportFile
void setKeepUsersFromImportFile(boolean value) -
getNewTimestampName
String getNewTimestampName() -
setNewTimestampName
-
getDefaultColorSchemeTitle
String getDefaultColorSchemeTitle() -
getImportFileLanguages
List<MTLanguage> getImportFileLanguages()Returns the languages from the export file. These languages can not be used in the language mapping. If you want to create new languages in the language mapping you have to create them manually and copy the values from these languages.- Returns:
- the languages from the export file.
-
setLanguageMapping
Sets the language mapping to use. The keys should be the UUID:s of the languages in the import file. Any newly created languages will be created given that the user has the privileges to do so.- Parameters:
map- The language mapping to use.
-
getImportFileLayerTypes
Returns the layer types from the export file. NOTE: You have to set a valid language mapping to use before calling this method, since the titles of the imported layer types are dependent on the language mapping.- Returns:
- the layer types from the export file.
- Throws:
XMLStreamException- If an XML error occurs.IOException- If an IOException occurs.
-
setLayerTypeMapping
Sets the layer type mapping to use. The keys should be the UUID:s of the layer types in the import file. The values can be repository layer types or newly created layer types. Any newly created layer types will be created given that the user has the privileges to do so.- Parameters:
map- The layer type mapping to use.
-
validateXMLFiles
Validates all XML files in the selected import archive against their schemas.- Throws:
SAXException- If an xml error occurs.XMLStreamException- If an xml error occurs.IOException- If an IOException occurs.
-
validateXMLFiles
void validateXMLFiles(Consumer<Integer> progress) throws SAXException, XMLStreamException, IOException -
getModelCount
-