|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.theit.hudson.crowd.CrowdConfigurationService
public class CrowdConfigurationService
This class contains all objects that are necessary to access the REST services on the remote Crowd server. Additionally it contains some helper methods to check for group membership and availability.
| Constructor Summary | |
|---|---|
CrowdConfigurationService(String pGroupNames,
boolean pNestedGroups)
Creates a new Crowd configuration object. |
|
| Method Summary | |
|---|---|
Collection<org.acegisecurity.GrantedAuthority> |
getAuthoritiesForUser(String username)
Retrieves the list of all (nested) groups from the Crowd server that the user is a member of. |
boolean |
isGroupActive(String groupName)
Checks if the specified group name exists on the remote Crowd server and is active. |
boolean |
isGroupMember(String username)
Checks whether the user is a member of one of the Crowd groups whose members are allowed to login. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CrowdConfigurationService(String pGroupNames,
boolean pNestedGroups)
pGroupNames - The group names to use when authenticating Crowd users. May
not be null.pNestedGroups - Specifies whether nested groups should be used when validating
users against a group name.| Method Detail |
|---|
public boolean isGroupMember(String username)
username - The name of the user to check. May not be null or
empty.
true if and only if the group exists, is active and
the user is either a direct group member or, if nested groups may
be used, a nested group member. false else.
public boolean isGroupActive(String groupName)
throws com.atlassian.crowd.exception.InvalidAuthenticationException,
com.atlassian.crowd.exception.ApplicationPermissionException,
com.atlassian.crowd.exception.OperationFailedException
groupName - The name of the group to check. May not be null
or empty.
true if and only if the group name is not empty,
does exist on the remote Crowd server and is active.
false else.
com.atlassian.crowd.exception.InvalidAuthenticationException - If the application and password are not valid.
com.atlassian.crowd.exception.ApplicationPermissionException - If the application is not permitted to perform the requested
operation on the server
com.atlassian.crowd.exception.OperationFailedException - If the operation has failed for any other reason, including
invalid arguments and the operation not being supported on
the server.public Collection<org.acegisecurity.GrantedAuthority> getAuthoritiesForUser(String username)
username - The name of the user. May not be null.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||