Class PartialCrowdEntityXmlMapper<T,I extends T>
java.lang.Object
com.atlassian.bamboo.migration.BambooStAXMappingHelperAbstractImpl<T,I>
com.atlassian.bamboo.migration.BambooStAXMappingListHelperAbstractImpl<T,I>
com.atlassian.bamboo.migration.stream.crowd.CrowdEntityXmlMapper<T,I>
com.atlassian.bamboo.migration.stream.crowd.PartialCrowdEntityXmlMapper<T,I>
- All Implemented Interfaces:
BambooStAXMappingHelper<T,I>
- 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.bamboo.migration.stream.crowd.CrowdEntityXmlMapper
CrowdEntityXmlMapper.SingleValuedAttributesMapperNested classes/interfaces inherited from interface com.atlassian.bamboo.migration.BambooStAXMappingHelper
BambooStAXMappingHelper.None -
Field Summary
Fields inherited from class com.atlassian.bamboo.migration.stream.crowd.CrowdEntityXmlMapper
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, setActive, setId, setNameFields inherited from class com.atlassian.bamboo.migration.BambooStAXMappingHelperAbstractImpl
transactionOperations -
Constructor Summary
ConstructorsConstructorDescriptionPartialCrowdEntityXmlMapper(org.hibernate.SessionFactory sessionFactory, org.springframework.transaction.support.TransactionOperations ops, com.atlassian.crowd.manager.directory.DirectoryManager directoryManager, Set<com.atlassian.crowd.embedded.api.DirectoryType> includedDirectoryTypes) -
Method Summary
Modifier and TypeMethodDescriptionprotected List<com.atlassian.crowd.embedded.api.Directory> Finds all directories that have user/group/membership data that need to be exported (ie.protected booleanisExportOfNonLocalGroupsRequired(com.atlassian.crowd.embedded.api.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 booleanisImportableDirectory(com.atlassian.crowd.embedded.api.Directory directory) Methods inherited from class com.atlassian.bamboo.migration.stream.crowd.CrowdEntityXmlMapper
exportProperties, exportSingleValuedAttributes, importPropertiesMethods inherited from class com.atlassian.bamboo.migration.BambooStAXMappingListHelperAbstractImpl
afterImportListItem, beforeImportListItem, createListRootElement, createRootElement, eventEndElementOfListItemSaveObject, exportListXml, exportListXml, flushIfNeeded, getXmlElementNodeName, getXmlRootNodeName, importListXml, importListXml, importListXmlInTransactionMethods inherited from class com.atlassian.bamboo.migration.BambooStAXMappingHelperAbstractImpl
createItemInstance, exportXml, exportXml, getSession, getSessionFactory, importXml, importXml, isShouldExport, saveBambooObjectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.bamboo.migration.BambooStAXMappingHelper
exportXml, importXml
-
Constructor Details
-
PartialCrowdEntityXmlMapper
public PartialCrowdEntityXmlMapper(org.hibernate.SessionFactory sessionFactory, org.springframework.transaction.support.TransactionOperations ops, com.atlassian.crowd.manager.directory.DirectoryManager directoryManager, Set<com.atlassian.crowd.embedded.api.DirectoryType> includedDirectoryTypes)
-
-
Method Details
-
isImportableDirectory
protected boolean isImportableDirectory(com.atlassian.crowd.embedded.api.Directory directory) - 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).- Returns:
- list of directories that require exporting internal data.
-
isExportOfNonLocalGroupsRequired
protected boolean isExportOfNonLocalGroupsRequired(com.atlassian.crowd.embedded.api.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.- 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.
-