com.atlassian.crowd.importer.importers
Interface Importer

All Known Implementing Classes:
BambooImporter, BaseImporter, ConfluenceHibernateImporter, ConfluenceImporter, ConfluenceOSUserImporter, CsvImporter, DirectoryImporter, JdbcImporter, JiraImporter

public interface Importer

Classes that extend this interface will manage the import of users, groups and their memberships from a given application (or file) into Crowd


Method Summary
 java.util.Collection<GroupMembership> findGroupMemberships(Configuration configuration)
          Will locate and build a collection of GroupMembership objects based on the passed in Configuration
 java.util.Collection<RemoteGroup> findGroups(Configuration configuration)
          Will locate and build a collection of RemoteGroup objects based on the passed in Configuration
 java.util.Collection<RoleMembership> findRoleMemberships(Configuration configuration)
          Will locate and build a collection of RoleMembership objects based on the passed in Configuration
 java.util.Collection<RemoteRole> findRoles(Configuration configuration)
          Will locate and build a collection of RemoteRole objects based on the passed in Configuration
 java.util.Collection<RemotePrincipal> findUsers(Configuration configuration)
          Will locate and build a collection of RemotePrincipal objects based on the passed in Configuration
 java.lang.Class getConfigurationType()
          The type of configuration being used for this Import.
 Result importUsersGroupsAndRoles(Configuration configuration)
          Responsible for the import of both users and groups into Crowd using the given Configuration
 void init(Configuration configuration)
          Initialise anything required for the import process.
 

Method Detail

importUsersGroupsAndRoles

Result importUsersGroupsAndRoles(Configuration configuration)
                                 throws ImporterException
Responsible for the import of both users and groups into Crowd using the given Configuration

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

findGroupMemberships

java.util.Collection<GroupMembership> findGroupMemberships(Configuration configuration)
                                                           throws ImporterException
Will locate and build a collection of GroupMembership objects based on the passed in Configuration

Parameters:
configuration - the Importer Configuration
Returns:
a collection of GroupMemberships to be imported or Collections.EMPTY_LIST
Throws:
ImporterException - if there is an error finding group memberships

findRoleMemberships

java.util.Collection<RoleMembership> findRoleMemberships(Configuration configuration)
                                                         throws ImporterException
Will locate and build a collection of RoleMembership objects based on the passed in Configuration

Parameters:
configuration - the Importer Configuration
Returns:
a collection of RoleMembership's to be imported or Collections.EMPTY_LIST
Throws:
ImporterException - if there is an error finding role memberships

findGroups

java.util.Collection<RemoteGroup> findGroups(Configuration configuration)
                                             throws ImporterException
Will locate and build a collection of RemoteGroup objects based on the passed in Configuration

Parameters:
configuration - the Importer Configuration
Returns:
a collection of RemoteGroups to be imported or Collections.EMPTY_LIST
Throws:
ImporterException - if there is an error finding the RemoteGroups

findRoles

java.util.Collection<RemoteRole> findRoles(Configuration configuration)
                                           throws ImporterException
Will locate and build a collection of RemoteRole objects based on the passed in Configuration

Parameters:
configuration - the Importer Configuration
Returns:
a collection of RemoteRoles to be imported or Collections.EMPTY_LIST
Throws:
ImporterException - if there is an error finding the RemoteRoles

findUsers

java.util.Collection<RemotePrincipal> findUsers(Configuration configuration)
                                                throws ImporterException
Will locate and build a collection of RemotePrincipal objects based on the passed in Configuration

Parameters:
configuration - the Importer Configuration
Returns:
a collection of RemotePrincipals to be imported or Collections.EMPTY_LIST
Throws:
ImporterException - if there is an error finding the RemotePrincipal

init

void init(Configuration configuration)
Initialise anything required for the import process.

Parameters:
configuration - can contain any setup params such as database settings that need init'ing

getConfigurationType

java.lang.Class getConfigurationType()
The type of configuration being used for this Import.

Returns:
Class that should be a subclass of Configuration


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.