com.atlassian.crowd.importer.importers
Class JiraImporter

java.lang.Object
  extended by com.atlassian.crowd.importer.importers.JiraImporter
All Implemented Interfaces:
Importer

public class JiraImporter
extends Object


Field Summary
protected  DirectoryManager directoryManager
           
protected  org.springframework.jdbc.core.JdbcOperations jdbcTemplate
           
protected  PasswordHelper passwordHelper
           
 
Constructor Summary
JiraImporter(DirectoryManager directoryManager, PasswordHelper passwordHelper)
           
 
Method Summary
 Importer determineImporter(Configuration configuration)
          Determines the appropriate importer to delegate the import operation to.
 Class getConfigurationType()
          The type of configuration being used for this Import.
 Result importUsersGroupsAndMemberships(Configuration configuration)
          This method will handle the importing of Users, Groups and Memberships from Confluence.
 void init(Configuration configuration)
          Initialise anything required for the import process.
 Set<Directory> retrieveRemoteSourceDirectory(Configuration configuration)
          The retrieve the set of remote source directories.
 void setJdbcTemplate(JdbcConfiguration configuration)
           
 boolean supportsMultipleDirectories(Configuration configuration)
          Some sources might be capable of handling more than one directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jdbcTemplate

protected org.springframework.jdbc.core.JdbcOperations jdbcTemplate

directoryManager

protected DirectoryManager directoryManager

passwordHelper

protected PasswordHelper passwordHelper
Constructor Detail

JiraImporter

public JiraImporter(DirectoryManager directoryManager,
                    PasswordHelper passwordHelper)
Method Detail

determineImporter

public Importer determineImporter(Configuration configuration)
                           throws ImporterException
Determines the appropriate importer to delegate the import operation to.

Parameters:
configuration - the configuration required for the import.
Returns:
appropriate importer implementation.
Throws:
ImporterException - if anything happened during the import.

init

public void init(Configuration configuration)
Description copied from interface: Importer
Initialise anything required for the import process.

Specified by:
init in interface Importer
Parameters:
configuration - can contain any setup params such as database settings that need init'ing

getConfigurationType

public Class getConfigurationType()
Description copied from interface: Importer
The type of configuration being used for this Import.

Specified by:
getConfigurationType in interface Importer
Returns:
Class that should be a subclass of Configuration

setJdbcTemplate

public void setJdbcTemplate(JdbcConfiguration configuration)

importUsersGroupsAndMemberships

public Result importUsersGroupsAndMemberships(Configuration configuration)
                                       throws ImporterException
This method will handle the importing of Users, Groups and Memberships from Confluence.

Specified by:
importUsersGroupsAndMemberships in interface Importer
Parameters:
configuration - the configuration required for the import
Returns:
success or failure for the import.
Throws:
ImporterException - general exception if anything happened during the import

supportsMultipleDirectories

public boolean supportsMultipleDirectories(Configuration configuration)
                                    throws ImporterException
Description copied from interface: Importer
Some sources might be capable of handling more than one directory.

Specified by:
supportsMultipleDirectories in interface Importer
Parameters:
configuration - the Importer Configuration
Returns:
true if the source can have multiple directories.
Throws:
ImporterException - if there is an error figuring out source directories.

retrieveRemoteSourceDirectory

public Set<Directory> retrieveRemoteSourceDirectory(Configuration configuration)
                                             throws ImporterException
Description copied from interface: Importer
The retrieve the set of remote source directories.

Specified by:
retrieveRemoteSourceDirectory in interface Importer
Parameters:
configuration - the import configuration.
Returns:
the set of source directories.
Throws:
ImporterException - will be thrown if an error occurs connecting, or if the provided configuration is invalid.


Copyright © 2013 Atlassian. All Rights Reserved.