com.atlassian.crowd.migration
Class UserMapper

java.lang.Object
  extended by com.atlassian.crowd.migration.GenericMapper
      extended by com.atlassian.crowd.migration.legacy.XmlMapper
          extended by com.atlassian.crowd.migration.UserMapper
All Implemented Interfaces:
Mapper

public class UserMapper
extends XmlMapper
implements Mapper

This mapper will handle the mapping of a User.


Field Summary
protected static java.lang.String USER_XML_NODE
           
protected static java.lang.String USER_XML_ROOT
           
 
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, LEGACY_GENERIC_XML_ATTRIBUTE_ID, LEGACY_GENERIC_XML_ATTRIBUTE_KEY, LEGACY_GENERIC_XML_ATTRIBUTE_VALUE, LEGACY_GENERIC_XML_ATTRIBUTE_VALUES, LEGACY_GENERIC_XML_CONCEPTION, LEGACY_GENERIC_XML_LASTMODIFIED
 
Fields inherited from class com.atlassian.crowd.migration.GenericMapper
DATABASE_DATE_FORMAT, logger, PLUGIN_KEY_PREFIX, XML_DATE_FORMAT
 
Constructor Summary
UserMapper(org.hibernate.SessionFactory sessionFactory, BatchProcessor batchProcessor, DirectoryDAOHibernate directoryDAO, UserDAOHibernate userDAO)
           
 
Method Summary
protected  void addUserToXml(InternalUser user, java.util.Collection<InternalUserAttribute> attributes, org.dom4j.Element userRoot)
           
 org.dom4j.Element exportXml(java.util.Map options)
          Exports to V2 XML.
protected  java.util.List<InternalUserAttribute> getUserAttributesFromXml(org.dom4j.Element userElement, InternalUser userReference)
           
protected  InternalUser getUserFromXml(org.dom4j.Element userElement)
           
 void importXml(org.dom4j.Element root)
          Imports V2 XML.
 
Methods inherited from class com.atlassian.crowd.migration.legacy.XmlMapper
exportInternalEntity, exportSingleValuedAttributes, findAllExportableDirectories, getDirectoryManager, getInternalEntityTemplateFromXml, getSingleValuedAttributesMapFromXml, setDirectoryManager
 
Methods inherited from class com.atlassian.crowd.migration.GenericMapper
addEntities, addEntity, addEntityViaMerge, addEntityViaSave, getAttributeValue, getDateAsFormattedString, getDateFromDatabase, getDateFromXml, getDirectoryTypeFromLegacyCode, getNameFromLegacyCode, getOperationTypeFromLegacyPermissionName, getSessionFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USER_XML_ROOT

protected static final java.lang.String USER_XML_ROOT
See Also:
Constant Field Values

USER_XML_NODE

protected static final java.lang.String USER_XML_NODE
See Also:
Constant Field Values
Constructor Detail

UserMapper

public UserMapper(org.hibernate.SessionFactory sessionFactory,
                  BatchProcessor batchProcessor,
                  DirectoryDAOHibernate directoryDAO,
                  UserDAOHibernate userDAO)
Method Detail

exportXml

public org.dom4j.Element exportXml(java.util.Map options)
                            throws ExportException
Description copied from interface: Mapper
Exports to V2 XML.

Specified by:
exportXml in interface Mapper
Parameters:
options - map of arbitrarty options.
Returns:
XML element, or null if you are not mapping
Throws:
ExportException - error producing XML.

addUserToXml

protected void addUserToXml(InternalUser user,
                            java.util.Collection<InternalUserAttribute> attributes,
                            org.dom4j.Element userRoot)

importXml

public void importXml(org.dom4j.Element root)
               throws ImportException
Description copied from interface: Mapper
Imports V2 XML.

Specified by:
importXml in interface Mapper
Parameters:
root - root XML element.
Throws:
ImportException - error importing data.

getUserFromXml

protected InternalUser getUserFromXml(org.dom4j.Element userElement)

getUserAttributesFromXml

protected java.util.List<InternalUserAttribute> getUserAttributesFromXml(org.dom4j.Element userElement,
                                                                         InternalUser userReference)


Copyright © 2010 Atlassian. All Rights Reserved.