Package com.atlassian.crowd.migration
Class UserMapper
java.lang.Object
com.atlassian.crowd.migration.GenericMapper
com.atlassian.crowd.migration.legacy.XmlMapper
com.atlassian.crowd.migration.legacy.PartialXmlMapper
com.atlassian.crowd.migration.UserMapper
- All Implemented Interfaces:
Mapper
This mapper will handle the mapping of a
User.-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.crowd.migration.GenericMapper
GenericMapper.Exporter<T>, GenericMapper.Importer<T> -
Field Summary
FieldsFields 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_DATEFields 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
ConstructorsConstructorDescriptionUserMapper(org.hibernate.SessionFactory sessionFactory, BatchProcessor batchProcessor, DirectoryDAOHibernate directoryDAO, UserDAOHibernate userDAO, DirectoryManager directoryManager, PropertyManager propertyManager) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddUserToXml(InternalUser user, Collection<InternalUserAttribute> attributes, org.dom4j.Element userRoot) org.dom4j.ElementExports to V2 XML.protected List<InternalUserAttribute>getUserAttributesFromXml(org.dom4j.Element userElement, InternalUser userReference) protected InternalUsergetUserFromXml(org.dom4j.Element userElement, CrowdBackupDateConverter dateConverter) voidimportXml(org.dom4j.Element root) Imports V2 XML.Methods inherited from class com.atlassian.crowd.migration.legacy.PartialXmlMapper
findAllExportableDirectories, findAllExportableDirectories, isExportOfNonLocalGroupsRequired, isImportableDirectoryMethods inherited from class com.atlassian.crowd.migration.legacy.XmlMapper
exportInternalEntity, exportSingleValuedAttributes, getInternalEntityTemplateFromXml, getSingleValuedAttributesMapFromXmlMethods 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
-
USER_XML_ROOT
- See Also:
-
USER_XML_NODE
- See Also:
-
-
Constructor Details
-
UserMapper
public UserMapper(org.hibernate.SessionFactory sessionFactory, BatchProcessor batchProcessor, DirectoryDAOHibernate directoryDAO, UserDAOHibernate userDAO, DirectoryManager directoryManager, PropertyManager propertyManager)
-
-
Method Details
-
exportXml
Description copied from interface:MapperExports to V2 XML. -
addUserToXml
protected void addUserToXml(InternalUser user, Collection<InternalUserAttribute> attributes, org.dom4j.Element userRoot) -
importXml
Description copied from interface:MapperImports V2 XML.- Specified by:
importXmlin interfaceMapper- Parameters:
root- root XML element.- Throws:
ImportException- error importing data.
-
getUserFromXml
protected InternalUser getUserFromXml(org.dom4j.Element userElement, CrowdBackupDateConverter dateConverter) -
getUserAttributesFromXml
protected List<InternalUserAttribute> getUserAttributesFromXml(org.dom4j.Element userElement, InternalUser userReference)
-