|
||||||||||
| 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 java.lang.String |
APPLICATION_NAME
Directory attribute key for application name |
static java.lang.String |
APPLICATION_PASSWORD
Directory attribute key for application password |
protected AttributeValuesHolder |
attributes
|
static java.lang.String |
CROWD_HTTP_MAX_CONNECTIONS
Directory attribute key for max connections. |
static java.lang.String |
CROWD_HTTP_PROXY_HOST
Directory attribute key for http proxy host. |
static java.lang.String |
CROWD_HTTP_PROXY_PASSWORD
Directory attribute key for http proxy password. |
static java.lang.String |
CROWD_HTTP_PROXY_PORT
Directory attribute key for http proxy port. |
static java.lang.String |
CROWD_HTTP_PROXY_USERNAME
Directory attribute key for http proxy username. |
static java.lang.String |
CROWD_HTTP_TIMEOUT
Directory attribute key for http timeout. |
static java.lang.String |
CROWD_SERVER_URL
Directory attribute key for remote Crowd server URL |
static java.lang.String |
DESCRIPTIVE_NAME
|
| Constructor Summary | |
|---|---|
RemoteCrowdDirectory(CrowdClientFactory crowdClientFactory)
Creates a new RemoteCrowdDirectory using the given CrowdClientFactory. |
|
| Method Summary | ||
|---|---|---|
Group |
addGroup(GroupTemplate group)
|
|
void |
addGroupToGroup(java.lang.String childGroup,
java.lang.String parentGroup)
|
|
User |
addUser(UserTemplate user,
PasswordCredential credential)
|
|
void |
addUserToGroup(java.lang.String username,
java.lang.String groupName)
|
|
User |
authenticate(java.lang.String username,
PasswordCredential credential)
|
|
Group |
findGroupByName(java.lang.String name)
|
|
GroupWithAttributes |
findGroupWithAttributesByName(java.lang.String name)
|
|
User |
findUserByName(java.lang.String name)
|
|
UserWithAttributes |
findUserWithAttributesByName(java.lang.String name)
|
|
RemoteDirectory |
getAuthoritativeDirectory()
|
|
protected ClientProperties |
getClientProperties()
|
|
java.lang.String |
getCurrentEventToken()
Returns a token that can be used for querying events that have happened after the token was generated. |
|
java.lang.String |
getDescriptiveName()
|
|
long |
getDirectoryId()
|
|
java.util.Set<java.lang.String> |
getKeys()
|
|
java.lang.Iterable<Membership> |
getMemberships()
|
|
Events |
getNewEvents(java.lang.String eventToken)
Returns an events object which contains a new eventToken and events that happened after the given eventToken was generated. |
|
java.lang.String |
getValue(java.lang.String name)
|
|
java.util.Set<java.lang.String> |
getValues(java.lang.String name)
|
|
boolean |
isEmpty()
|
|
boolean |
isGroupDirectGroupMember(java.lang.String childGroup,
java.lang.String parentGroup)
|
|
boolean |
isRolesDisabled()
|
|
boolean |
isUserDirectGroupMember(java.lang.String username,
java.lang.String groupName)
|
|
void |
removeGroup(java.lang.String groupname)
|
|
void |
removeGroupAttributes(java.lang.String groupName,
java.lang.String attributeName)
|
|
void |
removeGroupFromGroup(java.lang.String childGroup,
java.lang.String parentGroup)
|
|
void |
removeUser(java.lang.String username)
|
|
void |
removeUserAttributes(java.lang.String username,
java.lang.String attributeName)
|
|
void |
removeUserFromGroup(java.lang.String username,
java.lang.String groupName)
|
|
Group |
renameGroup(java.lang.String oldName,
java.lang.String newName)
|
|
User |
renameUser(java.lang.String oldName,
java.lang.String newName)
|
|
|
searchGroupRelationships(MembershipQuery<T> query)
|
|
|
searchGroups(EntityQuery<T> query)
|
|
|
searchUsers(EntityQuery<T> query)
|
|
void |
setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
Called by the DirectoryInstanceLoader after
constructing an InternalDirectory. |
|
void |
setDirectoryId(long directoryId)
|
|
void |
storeGroupAttributes(java.lang.String groupName,
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> attributes)
|
|
void |
storeUserAttributes(java.lang.String username,
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> attributes)
|
|
boolean |
supportsInactiveAccounts()
Remote crowd directories always support inactive accounts. |
|
boolean |
supportsNestedGroups()
|
|
void |
testConnection()
|
|
Group |
updateGroup(GroupTemplate group)
|
|
User |
updateUser(UserTemplate user)
|
|
void |
updateUserCredential(java.lang.String username,
PasswordCredential credential)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DESCRIPTIVE_NAME
public static final java.lang.String APPLICATION_NAME
public static final java.lang.String APPLICATION_PASSWORD
public static final java.lang.String CROWD_SERVER_URL
public static final java.lang.String CROWD_HTTP_TIMEOUT
public static final java.lang.String CROWD_HTTP_MAX_CONNECTIONS
public static final java.lang.String CROWD_HTTP_PROXY_HOST
public static final java.lang.String CROWD_HTTP_PROXY_PORT
public static final java.lang.String CROWD_HTTP_PROXY_USERNAME
public static final java.lang.String CROWD_HTTP_PROXY_PASSWORD
protected AttributeValuesHolder attributes
| Constructor Detail |
|---|
public RemoteCrowdDirectory(CrowdClientFactory crowdClientFactory)
crowdClientFactory - factory for creating a CrowdClient| Method Detail |
|---|
public long getDirectoryId()
getDirectoryId in interface RemoteDirectorypublic void setDirectoryId(long directoryId)
setDirectoryId in interface RemoteDirectory
public User findUserByName(java.lang.String name)
throws UserNotFoundException,
OperationFailedException
findUserByName in interface RemoteDirectoryUserNotFoundException
OperationFailedException
public UserWithAttributes findUserWithAttributesByName(java.lang.String name)
throws UserNotFoundException,
OperationFailedException
findUserWithAttributesByName in interface RemoteDirectoryUserNotFoundException
OperationFailedException
public User authenticate(java.lang.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 User updateUser(UserTemplate user)
throws InvalidUserException,
UserNotFoundException,
OperationFailedException
updateUser in interface RemoteDirectoryInvalidUserException
UserNotFoundException
OperationFailedException
public void updateUserCredential(java.lang.String username,
PasswordCredential credential)
throws UserNotFoundException,
InvalidCredentialException,
OperationFailedException
updateUserCredential in interface RemoteDirectoryUserNotFoundException
InvalidCredentialException
OperationFailedException
public User renameUser(java.lang.String oldName,
java.lang.String newName)
throws UserNotFoundException,
InvalidUserException
renameUser in interface RemoteDirectoryUserNotFoundException
InvalidUserException
public void storeUserAttributes(java.lang.String username,
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> attributes)
throws UserNotFoundException,
OperationFailedException
storeUserAttributes in interface RemoteDirectoryUserNotFoundException
OperationFailedException
public void removeUserAttributes(java.lang.String username,
java.lang.String attributeName)
throws UserNotFoundException,
OperationFailedException
removeUserAttributes in interface RemoteDirectoryUserNotFoundException
OperationFailedException
public void removeUser(java.lang.String username)
throws UserNotFoundException,
OperationFailedException
removeUser in interface RemoteDirectoryUserNotFoundException
OperationFailedException
public <T> java.util.List<T> searchUsers(EntityQuery<T> query)
throws OperationFailedException
searchUsers in interface RemoteDirectoryOperationFailedException
public Group findGroupByName(java.lang.String name)
throws GroupNotFoundException,
OperationFailedException
findGroupByName in interface RemoteDirectoryGroupNotFoundException
OperationFailedException
public GroupWithAttributes findGroupWithAttributesByName(java.lang.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(java.lang.String oldName,
java.lang.String newName)
throws GroupNotFoundException,
InvalidGroupException,
OperationFailedException
renameGroup in interface RemoteDirectoryGroupNotFoundException
InvalidGroupException
OperationFailedException
public void storeGroupAttributes(java.lang.String groupName,
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> attributes)
throws GroupNotFoundException,
OperationFailedException
storeGroupAttributes in interface RemoteDirectoryGroupNotFoundException
OperationFailedException
public void removeGroupAttributes(java.lang.String groupName,
java.lang.String attributeName)
throws GroupNotFoundException,
OperationFailedException
removeGroupAttributes in interface RemoteDirectoryGroupNotFoundException
OperationFailedException
public void removeGroup(java.lang.String groupname)
throws GroupNotFoundException,
OperationFailedException
removeGroup in interface RemoteDirectoryGroupNotFoundException
OperationFailedException
public <T> java.util.List<T> searchGroups(EntityQuery<T> query)
throws OperationFailedException
searchGroups in interface RemoteDirectoryOperationFailedException
public boolean isUserDirectGroupMember(java.lang.String username,
java.lang.String groupName)
throws OperationFailedException
isUserDirectGroupMember in interface RemoteDirectoryOperationFailedException
public boolean isGroupDirectGroupMember(java.lang.String childGroup,
java.lang.String parentGroup)
throws OperationFailedException
isGroupDirectGroupMember in interface RemoteDirectoryOperationFailedException
public void addUserToGroup(java.lang.String username,
java.lang.String groupName)
throws GroupNotFoundException,
UserNotFoundException,
OperationFailedException
addUserToGroup in interface RemoteDirectoryGroupNotFoundException
UserNotFoundException
OperationFailedException
public void addGroupToGroup(java.lang.String childGroup,
java.lang.String parentGroup)
throws GroupNotFoundException,
InvalidMembershipException,
OperationFailedException
addGroupToGroup in interface RemoteDirectoryGroupNotFoundException
InvalidMembershipException
OperationFailedException
public void removeUserFromGroup(java.lang.String username,
java.lang.String groupName)
throws GroupNotFoundException,
UserNotFoundException,
MembershipNotFoundException,
OperationFailedException
removeUserFromGroup in interface RemoteDirectoryGroupNotFoundException
UserNotFoundException
MembershipNotFoundException
OperationFailedException
public void removeGroupFromGroup(java.lang.String childGroup,
java.lang.String parentGroup)
throws GroupNotFoundException,
InvalidMembershipException,
MembershipNotFoundException,
OperationFailedException
removeGroupFromGroup in interface RemoteDirectoryGroupNotFoundException
InvalidMembershipException
MembershipNotFoundException
OperationFailedException
public <T> java.util.List<T> searchGroupRelationships(MembershipQuery<T> query)
throws OperationFailedException
searchGroupRelationships in interface RemoteDirectoryOperationFailedException
public java.lang.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(java.lang.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 isRolesDisabled()
isRolesDisabled in interface RemoteDirectorypublic java.lang.String getDescriptiveName()
getDescriptiveName in interface RemoteDirectorypublic void setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
DirectoryInstanceLoader after
constructing an InternalDirectory.
setAttributes in interface RemoteDirectoryattributes - attributes map.public java.util.Set<java.lang.String> getValues(java.lang.String name)
getValues in interface Attributespublic java.lang.String getValue(java.lang.String name)
getValue in interface Attributespublic java.util.Set<java.lang.String> getKeys()
getKeys in interface Attributespublic boolean isEmpty()
isEmpty in interface Attributespublic RemoteDirectory getAuthoritativeDirectory()
getAuthoritativeDirectory in interface RemoteDirectoryprotected ClientProperties getClientProperties()
public java.lang.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 | |||||||||