Class PartialXmlMapper
java.lang.Object
com.atlassian.crowd.migration.GenericMapper
com.atlassian.crowd.migration.legacy.XmlMapper
com.atlassian.crowd.migration.legacy.PartialXmlMapper
- Direct Known Subclasses:
GroupMapper
,MembershipMapper
,UserMapper
Specialises XmlMapper for mappers that take into account just a subset of the directory types. Subclasses
may override getFullBackupDirectoryTypes to specify which directory types participate in the backup, otherwise
a default Set is used containing internal and delegating directory types.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.crowd.migration.GenericMapper
GenericMapper.Exporter<T>, GenericMapper.Importer<T>
-
Field Summary
Fields inherited from class com.atlassian.crowd.migration.legacy.XmlMapper
GENERIC_XML_ACTIVE, GENERIC_XML_ATTRIBUTE, GENERIC_XML_ATTRIBUTE_NAME, GENERIC_XML_ATTRIBUTE_VALUE, GENERIC_XML_ATTRIBUTES, GENERIC_XML_CREATED_DATE, GENERIC_XML_ID, GENERIC_XML_NAME, GENERIC_XML_UPDATED_DATE
Fields inherited from class com.atlassian.crowd.migration.GenericMapper
DATABASE_DATE_FORMAT, DATE_CONVERTER_FOR_EXPORT, LEGACY_XML_DATE_FORMAT, logger, PLUGIN_KEY_PREFIX
-
Constructor Summary
ConstructorsConstructorDescriptionPartialXmlMapper
(org.hibernate.SessionFactory sessionFactory, BatchProcessor batchProcessor, DirectoryManager directoryManager, Set<DirectoryType> includedDirectoryTypes) -
Method Summary
Modifier and TypeMethodDescriptionFinds all directories that have user/group/membership data that need to be exported (ie.findAllExportableDirectories
(boolean includeConnectors) Finds all directories that have user/group/membership data that need to be exported (ie.protected boolean
isExportOfNonLocalGroupsRequired
(DirectoryType directoryType) Determines whether the backup for a directory type includes all groups (both local and non-local), or just local groups, excluding non-local (remote) groups.protected boolean
isImportableDirectory
(Directory directory) Methods inherited from class com.atlassian.crowd.migration.legacy.XmlMapper
exportInternalEntity, exportSingleValuedAttributes, getInternalEntityTemplateFromXml, getSingleValuedAttributesMapFromXml
Methods inherited from class com.atlassian.crowd.migration.GenericMapper
addEntities, addEntitiesViaMerge, addEntitiesViaReplicate, addEntity, addEntity, addEntityViaMerge, addEntityViaSave, clearSession, exportXml, getAttributeValue, getBoolean, getBoolean, getDateConverterForXml, getDateFromTimestamp, getDirectoryTypeFromLegacyCode, getLong, getNameFromLegacyCode, getOperationTypeFromLegacyPermissionName, getOptionalValue, getSessionFactory, getString, getValue, importXml, setCDATA, setText, setTimestamp
-
Constructor Details
-
PartialXmlMapper
public PartialXmlMapper(org.hibernate.SessionFactory sessionFactory, BatchProcessor batchProcessor, DirectoryManager directoryManager, Set<DirectoryType> includedDirectoryTypes)
-
-
Method Details
-
isImportableDirectory
- Parameters:
directory
- the directory to be imported- Returns:
- true if the directory data is importable
-
findAllExportableDirectories
Finds all directories that have user/group/membership data that need to be exported (ie. Internal + Delegating).- Parameters:
includeConnectors
- flag if connectors should be returned or not- Returns:
- list of directories that require exporting internal data.
-
findAllExportableDirectories
Finds all directories that have user/group/membership data that need to be exported (ie. Internal + Delegating).- Returns:
- list of directories that require exporting internal data.
-
isExportOfNonLocalGroupsRequired
Determines whether the backup for a directory type includes all groups (both local and non-local), or just local groups, excluding non-local (remote) groups.- Parameters:
directoryType
- a directory type- Returns:
- false if backups must be limited to just local groups for this directory type, or true if backups must include all groups, local and non-local as well.
-