|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl
public class CrowdDirectoryServiceImpl
| Constructor Summary | |
|---|---|
CrowdDirectoryServiceImpl(ApplicationFactory applicationFactory,
DirectoryInstanceLoader directoryInstanceLoader,
DirectoryManager directoryManager,
ApplicationManager applicationManager)
|
|
| Method Summary | |
|---|---|
Directory |
addDirectory(Directory directory)
Will add a new Directory into the local database. |
java.util.List<Directory> |
findAllDirectories()
Will return a List<Directory> ordered by the order specified by the application. |
Directory |
findDirectoryById(long directoryId)
Will return a Directory based on the given directoryId |
DirectorySynchronisationInformation |
getDirectorySynchronisationInformation(long directoryId)
Returns the synchronisation information for the directory. |
ConnectionPoolProperties |
getStoredConnectionPoolProperties()
Retrieves the stored LDAP connection pool properties which will be applied when the system restarts. |
ConnectionPoolProperties |
getSystemConnectionPoolProperties()
Retrieves the system LDAP connection pool properties (i.e. |
boolean |
isDirectorySynchronisable(long directoryId)
Returns true if the underlying directory implementation supports manual synchronisation of the directory's local cache. |
boolean |
isDirectorySynchronising(long directoryId)
Returns true if the given Directory is currently synchronising. |
boolean |
removeDirectory(long directoryId)
Will remove a directory from the Application, this will also remove all associated entities (users/groups/memberships). |
void |
setConnectionPoolProperties(ConnectionPoolProperties poolProperties)
Stores the provided LDAP connection pool properties so they can be applied when the system next restarts. |
void |
setDirectoryPosition(long directoryId,
int position)
Will place the directory with the given directoryId and the passed in position in the current list of directories configured for an application. |
boolean |
supportsNestedGroups(long directoryId)
Returns true if the underlying directory implementation supports nested groups. |
void |
synchroniseDirectory(long directoryId)
Requests that this directory should update its cache by synchronising with the remote server. |
void |
synchroniseDirectory(long directoryId,
boolean runInBackground)
Requests that this directory should update its cache by synchronising with the remote server. |
void |
testConnection(Directory directory)
Test if a connection to the directory server can be established. |
Directory |
updateDirectory(Directory directory)
Will update the Directory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CrowdDirectoryServiceImpl(ApplicationFactory applicationFactory,
DirectoryInstanceLoader directoryInstanceLoader,
DirectoryManager directoryManager,
ApplicationManager applicationManager)
| Method Detail |
|---|
public Directory addDirectory(Directory directory)
throws OperationFailedException
CrowdDirectoryServiceDirectory into the local database.
addDirectory in interface CrowdDirectoryServicedirectory - The directory to be saved
Directory
OperationFailedException - if the operation failed for any reason
public void testConnection(Directory directory)
throws OperationFailedException
CrowdDirectoryService
testConnection in interface CrowdDirectoryServicedirectory - Directory to test
OperationFailedException - underlying directory implementation failed to execute the operation.public java.util.List<Directory> findAllDirectories()
CrowdDirectoryServiceList<Directory> ordered by the order specified by the application.
findAllDirectories in interface CrowdDirectoryServiceList<Directory> or if there are no directories, an empty list (this should never happen)public Directory findDirectoryById(long directoryId)
CrowdDirectoryServiceDirectory based on the given directoryId
findDirectoryById in interface CrowdDirectoryServicedirectoryId - the id of the directory
null if the directory is not found
public Directory updateDirectory(Directory directory)
throws OperationFailedException
CrowdDirectoryServiceDirectory. The Directory must have at the bare minimum an Directory.getId(), Directory.getName(), Directory.getType() and Directory.getImplementationClass()}
updateDirectory in interface CrowdDirectoryServicedirectory - the directory to update
OperationFailedException - if the directory does not exist or the operation failed for any other reason.
public void setDirectoryPosition(long directoryId,
int position)
throws OperationFailedException
CrowdDirectoryServicedirectoryId and the passed in position in the current list of directories configured for an application.
setDirectoryPosition in interface CrowdDirectoryServicedirectoryId - the id of the directoryposition - the position in the list of directories where you would like this one to be
OperationFailedException - if the directory does not exist or the operation failed for any other reason
public boolean removeDirectory(long directoryId)
throws DirectoryCurrentlySynchronisingException,
OperationFailedException
CrowdDirectoryService
removeDirectory in interface CrowdDirectoryServicedirectoryId - the directory id of the Directory to remove.
true if the directory and associated entities were removed, or false otherwise
DirectoryCurrentlySynchronisingException - if the Directory is currently synchronising.
OperationFailedException - if the directory does not exist or the operation failed for any other reason
public boolean supportsNestedGroups(long directoryId)
throws OperationFailedException
CrowdDirectoryService
supportsNestedGroups in interface CrowdDirectoryServicedirectoryId - ID of directory.
OperationFailedException - if the operation failed for any reason
public boolean isDirectorySynchronisable(long directoryId)
throws OperationFailedException
CrowdDirectoryService
isDirectorySynchronisable in interface CrowdDirectoryServicedirectoryId - ID of directory.
OperationFailedException - if the operation failed for any reason
public void synchroniseDirectory(long directoryId)
throws OperationFailedException
CrowdDirectoryServiceIf a synchronisation is currently in progress when this method is called, then this method does nothing.
synchroniseDirectory in interface CrowdDirectoryServicedirectoryId - ID of directory.
OperationFailedException - if the operation failed for any reason
public void synchroniseDirectory(long directoryId,
boolean runInBackground)
throws OperationFailedException
CrowdDirectoryServiceIf a synchronisation is currently in progress when this method is called, then this method does nothing if runInBackGround is true, otherwise it will throw OperationFailedException.
synchroniseDirectory in interface CrowdDirectoryServicedirectoryId - ID of directory.runInBackground - If True the synchronise will happen asynchronously.
OperationFailedException - if the operation failed for any reason
public boolean isDirectorySynchronising(long directoryId)
throws OperationFailedException
CrowdDirectoryService
isDirectorySynchronising in interface CrowdDirectoryServicedirectoryId - ID of directory.
OperationFailedException - if the operation failed for any reason
public DirectorySynchronisationInformation getDirectorySynchronisationInformation(long directoryId)
throws OperationFailedException
CrowdDirectoryService
getDirectorySynchronisationInformation in interface CrowdDirectoryServicedirectoryId - ID of directory
OperationFailedException - if the operation failed for any reasonpublic void setConnectionPoolProperties(ConnectionPoolProperties poolProperties)
CrowdDirectoryService
setConnectionPoolProperties in interface CrowdDirectoryServicepoolProperties - the LDAP connection pool properties to be stored and applied on the next restartCrowdDirectoryService.getStoredConnectionPoolProperties(),
CrowdDirectoryService.getSystemConnectionPoolProperties()public ConnectionPoolProperties getStoredConnectionPoolProperties()
CrowdDirectoryService
getStoredConnectionPoolProperties in interface CrowdDirectoryServiceto retrieve the currently active settingspublic ConnectionPoolProperties getSystemConnectionPoolProperties()
CrowdDirectoryService
getSystemConnectionPoolProperties in interface CrowdDirectoryServiceto retrieve the stored configuration which will be applied
when the system next restarts
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||