Package com.atlassian.crowd.migration
Class GroupMapper
java.lang.Object
com.atlassian.crowd.migration.GenericMapper
com.atlassian.crowd.migration.legacy.XmlMapper
com.atlassian.crowd.migration.legacy.PartialXmlMapper
com.atlassian.crowd.migration.GroupMapper
- All Implemented Interfaces:
Mapper
This mapper will handle the mapping of a
Group
.-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.crowd.migration.GenericMapper
GenericMapper.Exporter<T>, GenericMapper.Importer<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
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
ConstructorsConstructorDescriptionGroupMapper
(org.hibernate.SessionFactory sessionFactory, BatchProcessor batchProcessor, GroupDAOHibernate groupDao, DirectoryDAOHibernate directoryDao, DirectoryManager directoryManager) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addGroupToXml
(InternalGroup group, Set<InternalGroupAttribute> attributes, org.dom4j.Element groupRoot) org.dom4j.Element
Exports to V2 XML.protected Set
<InternalGroupAttribute> getGroupAttributesFromXml
(org.dom4j.Element groupElement, InternalGroup groupReference) protected InternalGroup
getGroupFromXml
(org.dom4j.Element groupElement, CrowdBackupDateConverter dateConverter) void
importXml
(org.dom4j.Element root) Imports V2 XML.Methods inherited from class com.atlassian.crowd.migration.legacy.PartialXmlMapper
findAllExportableDirectories, findAllExportableDirectories, isExportOfNonLocalGroupsRequired, isImportableDirectory
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
-
Field Details
-
GROUP_XML_ROOT
- See Also:
-
REMOTE_GROUP_XML_ROOT
- See Also:
-
REMOTE_GROUP_XML_NODE
- See Also:
-
REMOTE_GROUP_XML_PRINCIPAL_NAME
- See Also:
-
REMOTE_GROUP_XML_NAME
- See Also:
-
REMOTE_GROUP_XML_PRINCIPAL_DIRECTORY_ID
- See Also:
-
REMOTE_GROUP_XML_DIRECTORY_ID
- See Also:
-
REMOTE_GROUP_XML_ACTIVE
- See Also:
-
REMOTE_GROUP_XML_DESCRIPTION
- See Also:
-
REMOTE_GROUP_XML_PRINCIPAL_NODE
- See Also:
-
REMOTE_GROUP_XML_PRINCIPAL
- See Also:
-
-
Constructor Details
-
GroupMapper
public GroupMapper(org.hibernate.SessionFactory sessionFactory, BatchProcessor batchProcessor, GroupDAOHibernate groupDao, DirectoryDAOHibernate directoryDao, DirectoryManager directoryManager)
-
-
Method Details
-
exportXml
Description copied from interface:Mapper
Exports to V2 XML.- Specified by:
exportXml
in interfaceMapper
- Parameters:
options
- map of arbitrarty options.- Returns:
- XML element, or null if you are not mapping
- Throws:
ExportException
- error producing XML.
-
addGroupToXml
protected void addGroupToXml(InternalGroup group, Set<InternalGroupAttribute> attributes, org.dom4j.Element groupRoot) -
importXml
Description copied from interface:Mapper
Imports V2 XML.- Specified by:
importXml
in interfaceMapper
- Parameters:
root
- root XML element.- Throws:
ImportException
- error importing data.
-
getGroupFromXml
protected InternalGroup getGroupFromXml(org.dom4j.Element groupElement, CrowdBackupDateConverter dateConverter) -
getGroupAttributesFromXml
protected Set<InternalGroupAttribute> getGroupAttributesFromXml(org.dom4j.Element groupElement, InternalGroup groupReference)
-