|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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. |
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
CrowdDirectoryService
Directory
into the local database.
addDirectory
in interface CrowdDirectoryService
directory
- The directory to be saved
Directory
OperationFailedException
- if the operation failed for any reasonpublic void testConnection(Directory directory) throws OperationFailedException
CrowdDirectoryService
testConnection
in interface CrowdDirectoryService
directory
- Directory to test
OperationFailedException
- underlying directory implementation failed to execute the operation.public List<Directory> findAllDirectories()
CrowdDirectoryService
List<Directory>
ordered by the order specified by the application.
findAllDirectories
in interface CrowdDirectoryService
List<Directory>
or if there are no directories, an empty list (this should never happen)public Directory findDirectoryById(long directoryId)
CrowdDirectoryService
Directory
based on the given directoryId
findDirectoryById
in interface CrowdDirectoryService
directoryId
- the id of the directory
null
if the directory is not foundpublic Directory updateDirectory(Directory directory) throws OperationFailedException
CrowdDirectoryService
Directory
. The Directory must have at the bare minimum an Directory.getId()
, Directory.getName()
, Directory.getType()
and Directory.getImplementationClass()
}
updateDirectory
in interface CrowdDirectoryService
directory
- 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
CrowdDirectoryService
directoryId
and the passed in position
in the current list of directories configured for an application.
setDirectoryPosition
in interface CrowdDirectoryService
directoryId
- 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 reasonpublic boolean removeDirectory(long directoryId) throws DirectoryCurrentlySynchronisingException, OperationFailedException
CrowdDirectoryService
removeDirectory
in interface CrowdDirectoryService
directoryId
- 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 reasonpublic boolean supportsNestedGroups(long directoryId) throws OperationFailedException
CrowdDirectoryService
supportsNestedGroups
in interface CrowdDirectoryService
directoryId
- ID of directory.
OperationFailedException
- if the operation failed for any reasonpublic boolean isDirectorySynchronisable(long directoryId) throws OperationFailedException
CrowdDirectoryService
isDirectorySynchronisable
in interface CrowdDirectoryService
directoryId
- ID of directory.
OperationFailedException
- if the operation failed for any reasonpublic void synchroniseDirectory(long directoryId) throws OperationFailedException
CrowdDirectoryService
If a synchronisation is currently in progress when this method is called, then this method does nothing.
synchroniseDirectory
in interface CrowdDirectoryService
directoryId
- ID of directory.
OperationFailedException
- if the operation failed for any reasonpublic void synchroniseDirectory(long directoryId, boolean runInBackground) throws OperationFailedException
CrowdDirectoryService
If 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 CrowdDirectoryService
directoryId
- ID of directory.runInBackground
- If True the synchronise will happen asynchronously.
OperationFailedException
- if the operation failed for any reasonpublic boolean isDirectorySynchronising(long directoryId) throws OperationFailedException
CrowdDirectoryService
isDirectorySynchronising
in interface CrowdDirectoryService
directoryId
- ID of directory.
OperationFailedException
- if the operation failed for any reasonpublic DirectorySynchronisationInformation getDirectorySynchronisationInformation(long directoryId) throws OperationFailedException
CrowdDirectoryService
getDirectorySynchronisationInformation
in interface CrowdDirectoryService
directoryId
- ID of directory
OperationFailedException
- if the operation failed for any reasonpublic void setConnectionPoolProperties(ConnectionPoolProperties poolProperties)
CrowdDirectoryService
setConnectionPoolProperties
in interface CrowdDirectoryService
poolProperties
- the LDAP connection pool properties to be stored and applied on the next restartCrowdDirectoryService.getStoredConnectionPoolProperties()
,
CrowdDirectoryService.getSystemConnectionPoolProperties()
public ConnectionPoolProperties getStoredConnectionPoolProperties()
CrowdDirectoryService
getStoredConnectionPoolProperties
in interface CrowdDirectoryService
to retrieve the currently active settings
public ConnectionPoolProperties getSystemConnectionPoolProperties()
CrowdDirectoryService
getSystemConnectionPoolProperties
in interface CrowdDirectoryService
to 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 |