|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.crowd.directory.RemoteCrowdDirectory
public class RemoteCrowdDirectory
A RemoteDirectory that allows integration with a remote Crowd server.
| Field Summary | |
|---|---|
static String |
APPLICATION_NAME
Directory attribute key for application name |
static String |
APPLICATION_PASSWORD
Directory attribute key for application password |
protected AttributeValuesHolder |
attributes
|
static String |
CROWD_HTTP_MAX_CONNECTIONS
Directory attribute key for max connections. |
static String |
CROWD_HTTP_PROXY_HOST
Directory attribute key for http proxy host. |
static String |
CROWD_HTTP_PROXY_PASSWORD
Directory attribute key for http proxy password. |
static String |
CROWD_HTTP_PROXY_PORT
Directory attribute key for http proxy port. |
static String |
CROWD_HTTP_PROXY_USERNAME
Directory attribute key for http proxy username. |
static String |
CROWD_HTTP_TIMEOUT
Directory attribute key for http timeout. |
static String |
CROWD_SERVER_URL
Directory attribute key for remote Crowd server URL |
static String |
DESCRIPTIVE_NAME
|
| Constructor Summary | |
|---|---|
RemoteCrowdDirectory(com.atlassian.crowd.service.factory.CrowdClientFactory crowdClientFactory,
PasswordHelper passwordHelper)
Creates a new RemoteCrowdDirectory using the given CrowdClientFactory. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DESCRIPTIVE_NAME
public static final String APPLICATION_NAME
public static final String APPLICATION_PASSWORD
public static final String CROWD_SERVER_URL
public static final String CROWD_HTTP_TIMEOUT
public static final String CROWD_HTTP_MAX_CONNECTIONS
public static final String CROWD_HTTP_PROXY_HOST
public static final String CROWD_HTTP_PROXY_PORT
public static final String CROWD_HTTP_PROXY_USERNAME
public static final String CROWD_HTTP_PROXY_PASSWORD
protected AttributeValuesHolder attributes
| Constructor Detail |
|---|
public RemoteCrowdDirectory(com.atlassian.crowd.service.factory.CrowdClientFactory crowdClientFactory,
PasswordHelper passwordHelper)
crowdClientFactory - factory for creating a CrowdClientpasswordHelper - password helper, which must not be null| Method Detail |
|---|
public long getDirectoryId()
getDirectoryId in interface RemoteDirectorypublic void setDirectoryId(long directoryId)
setDirectoryId in interface RemoteDirectory
public User findUserByName(String name)
throws UserNotFoundException,
OperationFailedException
findUserByName in interface RemoteDirectoryUserNotFoundException
OperationFailedException
public UserWithAttributes findUserWithAttributesByName(String name)
throws UserNotFoundException,
OperationFailedException
findUserWithAttributesByName in interface RemoteDirectoryUserNotFoundException
OperationFailedException
public User findUserByExternalId(String externalId)
throws UserNotFoundException,
OperationFailedException
findUserByExternalId in interface RemoteDirectoryUserNotFoundException
OperationFailedException
public User authenticate(String username,
PasswordCredential credential)
throws UserNotFoundException,
InactiveAccountException,
InvalidAuthenticationException,
ExpiredCredentialException,
OperationFailedException
authenticate in interface RemoteDirectoryUserNotFoundException
InactiveAccountException
InvalidAuthenticationException
ExpiredCredentialException
OperationFailedException
public User addUser(UserTemplate user,
PasswordCredential credential)
throws InvalidUserException,
InvalidCredentialException,
OperationFailedException
addUser in interface RemoteDirectoryInvalidUserException
InvalidCredentialException
OperationFailedException
public void expireAllPasswords()
throws OperationFailedException
expireAllPasswords in interface RemoteDirectoryOperationFailedException
public User updateUser(UserTemplate user)
throws InvalidUserException,
UserNotFoundException,
OperationFailedException
updateUser in interface RemoteDirectoryInvalidUserException
UserNotFoundException
OperationFailedException
public void updateUserCredential(String username,
PasswordCredential credential)
throws UserNotFoundException,
InvalidCredentialException,
OperationFailedException
updateUserCredential in interface RemoteDirectoryUserNotFoundException
InvalidCredentialException
OperationFailedException
public User renameUser(String oldName,
String newName)
throws UserNotFoundException,
InvalidUserException,
OperationFailedException
renameUser in interface RemoteDirectoryUserNotFoundException
InvalidUserException
OperationFailedException
public void storeUserAttributes(String username,
Map<String,Set<String>> attributes)
throws UserNotFoundException,
OperationFailedException
storeUserAttributes in interface RemoteDirectoryUserNotFoundException
OperationFailedException
public void removeUserAttributes(String username,
String attributeName)
throws UserNotFoundException,
OperationFailedException
removeUserAttributes in interface RemoteDirectoryUserNotFoundException
OperationFailedException
public void removeUser(String username)
throws UserNotFoundException,
OperationFailedException
removeUser in interface RemoteDirectoryUserNotFoundException
OperationFailedException
public <T> List<T> searchUsers(EntityQuery<T> query)
throws OperationFailedException
searchUsers in interface RemoteDirectoryOperationFailedException
public Group findGroupByName(String name)
throws GroupNotFoundException,
OperationFailedException
findGroupByName in interface RemoteDirectoryGroupNotFoundException
OperationFailedException
public GroupWithAttributes findGroupWithAttributesByName(String name)
throws GroupNotFoundException,
OperationFailedException
findGroupWithAttributesByName in interface RemoteDirectoryGroupNotFoundException
OperationFailedException
public Group addGroup(GroupTemplate group)
throws InvalidGroupException,
OperationFailedException
addGroup in interface RemoteDirectoryInvalidGroupException
OperationFailedException
public Group updateGroup(GroupTemplate group)
throws InvalidGroupException,
GroupNotFoundException,
OperationFailedException
updateGroup in interface RemoteDirectoryInvalidGroupException
GroupNotFoundException
OperationFailedException
public Group renameGroup(String oldName,
String newName)
throws GroupNotFoundException,
InvalidGroupException,
OperationFailedException
renameGroup in interface RemoteDirectoryGroupNotFoundException
InvalidGroupException
OperationFailedException
public void storeGroupAttributes(String groupName,
Map<String,Set<String>> attributes)
throws GroupNotFoundException,
OperationFailedException
storeGroupAttributes in interface RemoteDirectoryGroupNotFoundException
OperationFailedException
public void removeGroupAttributes(String groupName,
String attributeName)
throws GroupNotFoundException,
OperationFailedException
removeGroupAttributes in interface RemoteDirectoryGroupNotFoundException
OperationFailedException
public void removeGroup(String groupname)
throws GroupNotFoundException,
OperationFailedException
removeGroup in interface RemoteDirectoryGroupNotFoundException
OperationFailedException
public <T> List<T> searchGroups(EntityQuery<T> query)
throws OperationFailedException
searchGroups in interface RemoteDirectoryOperationFailedException
public boolean isUserDirectGroupMember(String username,
String groupName)
throws OperationFailedException
isUserDirectGroupMember in interface RemoteDirectoryOperationFailedException
public boolean isGroupDirectGroupMember(String childGroup,
String parentGroup)
throws OperationFailedException
isGroupDirectGroupMember in interface RemoteDirectoryOperationFailedException
public BoundedCount countDirectMembersOfGroup(String groupName,
int querySizeHint)
throws OperationFailedException
countDirectMembersOfGroup in interface RemoteDirectoryOperationFailedException
public void addUserToGroup(String username,
String groupName)
throws GroupNotFoundException,
UserNotFoundException,
OperationFailedException,
MembershipAlreadyExistsException
addUserToGroup in interface RemoteDirectoryGroupNotFoundException
UserNotFoundException
OperationFailedException
MembershipAlreadyExistsException
public void addGroupToGroup(String childGroup,
String parentGroup)
throws GroupNotFoundException,
InvalidMembershipException,
OperationFailedException,
MembershipAlreadyExistsException
addGroupToGroup in interface RemoteDirectoryGroupNotFoundException
InvalidMembershipException
OperationFailedException
MembershipAlreadyExistsException
public void removeUserFromGroup(String username,
String groupName)
throws GroupNotFoundException,
UserNotFoundException,
MembershipNotFoundException,
OperationFailedException
removeUserFromGroup in interface RemoteDirectoryGroupNotFoundException
UserNotFoundException
MembershipNotFoundException
OperationFailedException
public void removeGroupFromGroup(String childGroup,
String parentGroup)
throws GroupNotFoundException,
InvalidMembershipException,
MembershipNotFoundException,
OperationFailedException
removeGroupFromGroup in interface RemoteDirectoryGroupNotFoundException
InvalidMembershipException
MembershipNotFoundException
OperationFailedException
public <T> List<T> searchGroupRelationships(MembershipQuery<T> query)
throws OperationFailedException
searchGroupRelationships in interface RemoteDirectoryOperationFailedException
public String getCurrentEventToken()
throws OperationFailedException,
IncrementalSynchronisationNotAvailableException
UnsupportedCrowdApiException - if the remote server does not support this operation
OperationFailedException - if the operation has failed for any other reason, including invalid arguments
IncrementalSynchronisationNotAvailableException - if the application cannot provide incremental synchronisation
public Events getNewEvents(String eventToken)
throws EventTokenExpiredException,
OperationFailedException
eventToken was generated.
If for any reason event store is unable to retrieve events that happened
after the event token was generated, an
EventTokenExpiredException will be thrown. The caller is then
expected to call getCurrentEventToken() again before asking for
new events.
eventToken - event token that was retrieved by a call to getCurrentEventToken() or getNewEvents(String)
eventToken was generated
EventTokenExpiredException - if events that happened after the event token was generated can not be retrieved
UnsupportedCrowdApiException - if the remote server does not support this operation
OperationFailedException - if the operation has failed for any other reason, including invalid arguments
public void testConnection()
throws OperationFailedException
testConnection in interface RemoteDirectoryOperationFailedExceptionpublic boolean supportsInactiveAccounts()
supportsInactiveAccounts in interface RemoteDirectorypublic boolean supportsNestedGroups()
supportsNestedGroups in interface RemoteDirectorypublic boolean supportsPasswordExpiration()
supportsPasswordExpiration in interface RemoteDirectorypublic boolean supportsSettingEncryptedCredential()
supportsSettingEncryptedCredential in interface RemoteDirectorypublic boolean isRolesDisabled()
isRolesDisabled in interface RemoteDirectorypublic String getDescriptiveName()
getDescriptiveName in interface RemoteDirectorypublic void setAttributes(Map<String,String> attributes)
DirectoryInstanceLoader after
constructing an InternalDirectory.
setAttributes in interface RemoteDirectoryattributes - attributes map.public Set<String> getValues(String name)
getValues in interface Attributespublic String getValue(String name)
getValue in interface Attributespublic Set<String> getKeys()
getKeys in interface Attributespublic boolean isEmpty()
isEmpty in interface Attributespublic RemoteDirectory getAuthoritativeDirectory()
getAuthoritativeDirectory in interface RemoteDirectoryprotected com.atlassian.crowd.service.client.ClientProperties getClientProperties()
public Iterable<Membership> getMemberships()
throws OperationFailedException
getMemberships in interface RemoteDirectoryOperationFailedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||