com.atlassian.crowd.migration.legacy.database
Class RoleMapper

java.lang.Object
  extended by com.atlassian.crowd.migration.GenericMapper
      extended by com.atlassian.crowd.migration.legacy.database.DatabaseMapper
          extended by com.atlassian.crowd.migration.legacy.database.RoleMapper
All Implemented Interfaces:
DatabaseImporter

public class RoleMapper
extends DatabaseMapper
implements DatabaseImporter


Nested Class Summary
 
Nested classes/interfaces inherited from class com.atlassian.crowd.migration.legacy.database.DatabaseMapper
DatabaseMapper.AttributeMapper, DatabaseMapper.EntityIdentifier
 
Field Summary
 
Fields inherited from class com.atlassian.crowd.migration.legacy.database.DatabaseMapper
jdbcTemplate, legacyTableQueries
 
Fields inherited from class com.atlassian.crowd.migration.GenericMapper
DATABASE_DATE_FORMAT, logger, PLUGIN_KEY_PREFIX, XML_DATE_FORMAT
 
Constructor Summary
RoleMapper(org.hibernate.SessionFactory sessionFactory, BatchProcessor batchProcessor, org.springframework.jdbc.core.JdbcOperations jdbcTemplate, GroupDAOHibernate groupDAO, MembershipDAOHibernate membershipDAO, DirectoryDAOHibernate directoryDAO)
           
 
Method Summary
 void importFromDatabase(LegacyImportDataHolder importData)
          Migrates data from legacy Crowd database (pre 2.0) to current database (Crowd 2.0+) schema.
protected  Set<InternalMembership> importMembershipsFromDatabase(LegacyImportDataHolder importData, BatchResultWithIdReferences<Group> roleImportResults)
           
protected  List<InternalGroupWithAttributes> importRolesFromDatabase(Map<Long,Long> oldToNewDirectoryIds)
           
 
Methods inherited from class com.atlassian.crowd.migration.legacy.database.DatabaseMapper
attributeListToMap, attributeListToMultiAttributeMap, createInternalEntityTemplate, setJdbcTemplate, setLegacyTableQueries
 
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
 
Methods inherited from interface com.atlassian.crowd.migration.legacy.database.DatabaseImporter
setLegacyTableQueries
 

Constructor Detail

RoleMapper

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

importFromDatabase

public void importFromDatabase(LegacyImportDataHolder importData)
                        throws ImportException
Description copied from interface: DatabaseImporter
Migrates data from legacy Crowd database (pre 2.0) to current database (Crowd 2.0+) schema.

Specified by:
importFromDatabase in interface DatabaseImporter
Parameters:
importData - stores significant import results
Throws:
ImportException

importRolesFromDatabase

protected List<InternalGroupWithAttributes> importRolesFromDatabase(Map<Long,Long> oldToNewDirectoryIds)

importMembershipsFromDatabase

protected Set<InternalMembership> importMembershipsFromDatabase(LegacyImportDataHolder importData,
                                                                BatchResultWithIdReferences<Group> roleImportResults)


Copyright © 2013 Atlassian. All Rights Reserved.