|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CrowdService
Method Summary | ||
---|---|---|
User |
authenticate(java.lang.String name,
java.lang.String credential)
Authenticates a user with the given credential |
|
Group |
getGroup(java.lang.String name)
Finds the group that matches the supplied name . |
|
GroupWithAttributes |
getGroupWithAttributes(java.lang.String name)
Finds the group that matches the supplied name . |
|
User |
getUser(java.lang.String name)
Returns the user that matches the supplied name . |
|
UserWithAttributes |
getUserWithAttributes(java.lang.String name)
Returns the user that matches the supplied name . |
|
boolean |
isGroupMemberOfGroup(Group childGroup,
Group parentGroup)
Returns true if the childGroup is a direct or indirect (nested) member of the parentGroup . |
|
boolean |
isUserMemberOfGroup(java.lang.String userName,
java.lang.String groupName)
Returns true if the user is a direct or indirect (nested) member of the group. |
|
boolean |
isUserMemberOfGroup(User user,
Group group)
Returns true if the user is a direct or indirect (nested) member of the group. |
|
|
search(Query<T> query)
Searches for entities (e.g. |
Method Detail |
---|
User authenticate(java.lang.String name, java.lang.String credential) throws UserNotFoundException, InactiveAccountException, FailedAuthenticationException, ExpiredCredentialException, OperationFailedException
user
with the given credential
name
- The name of the user (username).credential
- The supplied credential to authenticate with
InactiveAccountException
- The supplied user is inactive.
FailedAuthenticationException
- Authentication with the provided credentials failed.
UserNotFoundException
- thrown if the name didn't resolve to a User
ExpiredCredentialException
- The user's credentials have expired. The user must change their credentials in order to successfully authenticate.
OperationFailedException
- underlying directory implementation failed to execute the operation.User getUser(java.lang.String name)
user
that matches the supplied name
.
name
- the name of the user (username). Does not allow null, blank or empty strings.
null
if the user is not foundUserWithAttributes getUserWithAttributes(java.lang.String name)
user
that matches the supplied name
.
name
- the name of the user (username).
null
if the user is not foundGroup getGroup(java.lang.String name)
group
that matches the supplied name
.
name
- the name of the group.
null
if not found.GroupWithAttributes getGroupWithAttributes(java.lang.String name)
group
that matches the supplied name
.
name
- the name of the group.
null
if not found.<T> java.lang.Iterable<T> search(Query<T> query)
Group
or User
) of type <T>
that match the supplied search query.
Search return types must be either String
, User
or Group
.
query
- Query for a given entity (e.g. Group
or User
)
T
matching the search query. An Iterable
containing no results will be
returned if there are no matches for the query.boolean isUserMemberOfGroup(java.lang.String userName, java.lang.String groupName) throws UserNotFoundException, GroupNotFoundException
true
if the user is a direct or indirect (nested) member of the group.
userName
- user to inspect.groupName
- group to inspect.
true
if and only if the user is a direct or indirect (nested) member of the group.
UserNotFoundException
- if the userName doesn't resolve to an existing user.
GroupNotFoundException
- if the groupName doesn't resolve to an existing group.isUserMemberOfGroup(User, Group)
boolean isUserMemberOfGroup(User user, Group group) throws UserNotFoundException, GroupNotFoundException
true
if the user is a direct or indirect (nested) member of the group.
user
- user to inspect.group
- group to inspect.
true
if and only if the user is a direct or indirect (nested) member of the group.
UserNotFoundException
- if the userName doesn't resolve to an existing user.
GroupNotFoundException
- if the groupName doesn't resolve to an existing group.isUserMemberOfGroup(String, String)
boolean isGroupMemberOfGroup(Group childGroup, Group parentGroup) throws GroupNotFoundException
true
if the childGroup
is a direct or indirect (nested) member of the parentGroup
.
childGroup
- group to inspect.parentGroup
- group to inspect.
true
if and only if the childGroup
is a direct or indirect (nested) member of the parentGroup
.
GroupNotFoundException
- if either groupd (childGroup
or parentGroup
) doesn't resolve to an existing group.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |