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
public abstract class PartialCrowdEntityXmlMapper<T,I extends T> extends CrowdEntityXmlMapper<T,I>
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.SingleValuedAttributesMapper
-
Nested 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, setName
-
Fields inherited from class com.atlassian.bamboo.migration.BambooStAXMappingHelperAbstractImpl
transactionOperations
-
-
Constructor Summary
Constructors Constructor Description 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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<com.atlassian.crowd.embedded.api.Directory>
findAllExportableDirectories()
Finds all directories that have user/group/membership data that need to be exported (ie.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.protected boolean
isImportableDirectory(com.atlassian.crowd.embedded.api.Directory directory)
-
Methods inherited from class com.atlassian.bamboo.migration.stream.crowd.CrowdEntityXmlMapper
exportProperties, exportSingleValuedAttributes, importProperties
-
Methods inherited from class com.atlassian.bamboo.migration.BambooStAXMappingListHelperAbstractImpl
afterImportListItem, beforeImportListItem, createListRootElement, createRootElement, eventEndElementOfListItemSaveObject, exportListXml, exportListXml, flushIfNeeded, getXmlElementNodeName, getXmlRootNodeName, importListXml, importListXml, importListXmlInTransaction
-
Methods inherited from class com.atlassian.bamboo.migration.BambooStAXMappingHelperAbstractImpl
createItemInstance, exportXml, exportXml, getSession, getSessionFactory, importXml, importXml, isShouldExport, saveBambooObject
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.migration.BambooStAXMappingHelper
exportXml, importXml
-
-
-
-
Constructor Detail
-
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 Detail
-
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
protected List<com.atlassian.crowd.embedded.api.Directory> 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.
-
-