com.atlassian.crowd.migration.legacy
Class RoleMapper

java.lang.Object
  extended by com.atlassian.crowd.migration.GenericMapper
      extended by com.atlassian.crowd.migration.legacy.GenericLegacyImporter
          extended by com.atlassian.crowd.migration.legacy.RoleMapper
All Implemented Interfaces:
LegacyImporter

public class RoleMapper
extends GenericLegacyImporter
implements LegacyImporter


Field Summary
static String REMOTE_ROLE_XML_DESCRIPTION
           
static String REMOTE_ROLE_XML_DIRECTORY_ID
           
static String REMOTE_ROLE_XML_PRINCIPAL
           
static String REMOTE_ROLE_XML_PRINCIPAL_DIRECTORY_ID
           
static String REMOTE_ROLE_XML_PRINCIPAL_NODE
           
static String REMOTE_ROLE_XML_ROOT
           
 
Fields inherited from class com.atlassian.crowd.migration.legacy.GenericLegacyImporter
DATE_FORMAT, GENERIC_XML_ACTIVE, GENERIC_XML_ATTRIBUTE, GENERIC_XML_ATTRIBUTE_ID, GENERIC_XML_ATTRIBUTE_KEY, GENERIC_XML_ATTRIBUTE_VALUE, GENERIC_XML_ATTRIBUTE_VALUES, GENERIC_XML_ATTRIBUTES_NODE, GENERIC_XML_CONCEPTION, GENERIC_XML_ID, GENERIC_XML_LASTMODIFIED, GENERIC_XML_NAME, logger
 
Fields inherited from class com.atlassian.crowd.migration.GenericMapper
DATABASE_DATE_FORMAT, PLUGIN_KEY_PREFIX, XML_DATE_FORMAT
 
Constructor Summary
RoleMapper(org.hibernate.SessionFactory sessionFactory, BatchProcessor batchProcessor, GroupDAOHibernate groupDAO, MembershipDAOHibernate membershipDAO, DirectoryDAOHibernate directoryDAO)
           
 
Method Summary
protected  Set<InternalMembership> getMemberships(org.dom4j.Element roleElement, LegacyImportDataHolder importData, BatchResultWithIdReferences<Group> roleImportResults)
           
protected  InternalGroupWithAttributes getRoleAndAttributesFromXml(org.dom4j.Element roleElement, Map<Long,Long> oldToNewDirectoryIds)
           
 void importXml(org.dom4j.Element root, LegacyImportDataHolder importData)
          Imports V1 (legacy Crowd 0.x.x and 1.x.x) XML.
 
Methods inherited from class com.atlassian.crowd.migration.legacy.GenericLegacyImporter
getDirectoryManager, getInternalEntityTemplateFromLegacyXml, getMultiValuedAttributesMapFromXml, getPasswordCredentialFromXml, 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

REMOTE_ROLE_XML_ROOT

public static final String REMOTE_ROLE_XML_ROOT
See Also:
Constant Field Values

REMOTE_ROLE_XML_PRINCIPAL_DIRECTORY_ID

public static final String REMOTE_ROLE_XML_PRINCIPAL_DIRECTORY_ID
See Also:
Constant Field Values

REMOTE_ROLE_XML_DIRECTORY_ID

public static final String REMOTE_ROLE_XML_DIRECTORY_ID
See Also:
Constant Field Values

REMOTE_ROLE_XML_DESCRIPTION

public static final String REMOTE_ROLE_XML_DESCRIPTION
See Also:
Constant Field Values

REMOTE_ROLE_XML_PRINCIPAL_NODE

public static final String REMOTE_ROLE_XML_PRINCIPAL_NODE
See Also:
Constant Field Values

REMOTE_ROLE_XML_PRINCIPAL

public static final String REMOTE_ROLE_XML_PRINCIPAL
See Also:
Constant Field Values
Constructor Detail

RoleMapper

public RoleMapper(org.hibernate.SessionFactory sessionFactory,
                  BatchProcessor batchProcessor,
                  GroupDAOHibernate groupDAO,
                  MembershipDAOHibernate membershipDAO,
                  DirectoryDAOHibernate directoryDAO)
Method Detail

importXml

public void importXml(org.dom4j.Element root,
                      LegacyImportDataHolder importData)
               throws ImportException
Description copied from interface: LegacyImporter
Imports V1 (legacy Crowd 0.x.x and 1.x.x) XML.

Specified by:
importXml in interface LegacyImporter
Parameters:
root - root XML element.
importData - stores significant import results.
Throws:
ImportException

getRoleAndAttributesFromXml

protected InternalGroupWithAttributes getRoleAndAttributesFromXml(org.dom4j.Element roleElement,
                                                                  Map<Long,Long> oldToNewDirectoryIds)

getMemberships

protected Set<InternalMembership> getMemberships(org.dom4j.Element roleElement,
                                                 LegacyImportDataHolder importData,
                                                 BatchResultWithIdReferences<Group> roleImportResults)


Copyright © 2013 Atlassian. All Rights Reserved.