com.atlassian.crowd.importer.importers
Class BaseImporter

java.lang.Object
  extended by com.atlassian.crowd.importer.importers.BaseImporter
All Implemented Interfaces:
Importer
Direct Known Subclasses:
CsvImporter, DirectoryImporter, JdbcImporter

public abstract class BaseImporter
extends java.lang.Object
implements Importer

Importer that manages the basic import process for users, groups and memberships into Crowd.


Field Summary
protected  DirectoryManager directoryManager
           
protected  org.apache.log4j.Logger logger
           
 
Constructor Summary
BaseImporter(DirectoryManager directoryManager)
           
 
Method Summary
protected  Result importGroupMemberships(java.util.Collection<GroupMembership> memberships, Configuration configuration)
           
protected  Result importGroups(java.util.Collection<GroupTemplate> groups, Configuration configuration)
           
protected  Result importUsers(java.util.Collection<UserTemplateWithCredentialAndAttributes> users, Configuration configuration)
           
 Result importUsersGroupsAndMemberships(Configuration configuration)
          Responsible for the import of both users and groups into Crowd using the given Configuration
 
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.importer.importers.Importer
findGroupMemberships, findGroups, findUsers, getConfigurationType, init
 

Field Detail

logger

protected final org.apache.log4j.Logger logger

directoryManager

protected final DirectoryManager directoryManager
Constructor Detail

BaseImporter

public BaseImporter(DirectoryManager directoryManager)
Method Detail

importGroups

protected Result importGroups(java.util.Collection<GroupTemplate> groups,
                              Configuration configuration)
                       throws ImporterException
Throws:
ImporterException

importUsers

protected Result importUsers(java.util.Collection<UserTemplateWithCredentialAndAttributes> users,
                             Configuration configuration)
                      throws ImporterException
Throws:
ImporterException

importGroupMemberships

protected Result importGroupMemberships(java.util.Collection<GroupMembership> memberships,
                                        Configuration configuration)
                                 throws ImporterException
Throws:
ImporterException

importUsersGroupsAndMemberships

public Result importUsersGroupsAndMemberships(Configuration configuration)
                                       throws ImporterException
Description copied from interface: Importer
Responsible for the import of both users and groups into Crowd using the given Configuration

Specified by:
importUsersGroupsAndMemberships in interface Importer
Parameters:
configuration - the Configuration, this could be a JDBC configuration or a CSVConfiguration
Returns:
the result of the import
Throws:
ImporterException - general exception if anything happened during the import


Copyright © 2010 Atlassian. All Rights Reserved.