|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BasicCache
Non-domain-specific methods
| Method Summary | |
|---|---|
void |
addGroupToUser(java.lang.String userName,
java.lang.String groupName)
Adds the group to the user/group membership in cache |
void |
addIsUserOrGroup(java.lang.String name,
java.lang.Boolean isValidUserOrGroup)
Updates the cache with information if the specified name is a valid user or group |
void |
addToAllGroupNamesCache(java.lang.String groupName)
If we have a list of all groups, when we add one we should update the list. |
void |
addToAllUsers(java.lang.String userName)
Adds userName to the list of all users in the system. |
void |
addUserToGroup(java.lang.String userName,
java.lang.String groupName)
Adds the user to the user/group membership in cache |
void |
cacheAllGroupNames(java.util.List groupNames)
Adds, or if it already exists, replaces the list of all group names. |
void |
cacheAllMembers(java.lang.String groupName,
java.util.List userNames)
Cache a list of all users in this group. |
void |
cacheAllMemberships(java.lang.String userName,
java.util.List groupNames)
Cache a list of all groups this user belongs to. |
void |
cacheAllUserNames(java.util.List userNames)
Adds a list of all users, or if one already exists, replaces it. |
void |
cacheAncestorsForGroups(java.util.Map<java.lang.String,java.util.Set<java.lang.String>> ancestorsByGroup)
Cache a map of group name -> ancestor group names. |
void |
cacheGroup(SOAPGroup group)
Adds a group, or if it exists, replaces the old SOAPGroup instance. |
void |
cacheUser(SOAPPrincipal user)
Adds, or if they exist, replaces an existing user. |
void |
cacheUserWithAttributes(SOAPPrincipal user)
Caches the specified user and it's properties |
boolean |
containsGroupRelationships()
|
void |
flush()
Clears the underlying cache. |
java.util.List |
getAllGroupNames()
Returns a List of Strings containing all group names, or null if the list is not cached. |
java.util.List |
getAllMembers(java.lang.String groupName)
Returns a list of users that belong to groupName belongs to, or null if there aren't any. |
java.util.List |
getAllMemberships(java.lang.String userName)
Returns a list of groups that userName belongs to, or null if they don't belong to any. |
java.util.List |
getAllUserNames()
|
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
getAncestorsForGroups()
Returns a map of group name -> ancestor group names, or null if the map is not cached. |
SOAPGroup |
getGroup(java.lang.String groupName)
Returns the group, or null if it's not in the cache. |
java.lang.String |
getGroupName(java.lang.String groupname)
Returns the groupname in correct case if it exists in the cache, null otherwise. |
SOAPPrincipal |
getUser(java.lang.String userName)
Returns the SOAPPrincipal representing userName, or null if it's not in the
cache. |
java.lang.String |
getUserName(java.lang.String username)
Returns the username in correct case if it exists in the cache, null otherwise. |
SOAPPrincipal |
getUserWithAttributes(java.lang.String userName)
Returns the SOAPPrincipal with Attributes representing userName, or null if it's not in the
cache. |
java.lang.Boolean |
isMember(java.lang.String userName,
java.lang.String groupName)
Maintains a list of true/false for "is this user a member of this group". |
java.lang.Boolean |
isMemberInGroupCache(java.lang.String userName,
java.lang.String groupName)
Checks the group->user cache to see if the user is a member. |
java.lang.Boolean |
isUserOrGroup(java.lang.String name)
Will return true if there is enough information in the cache to determine if the string represents a user or group |
void |
removeAllMembers(java.lang.String groupName)
Removes the list of users in the group. |
void |
removeAllMemberships(java.lang.String userName)
Called by CachingUserManager.removeUser(String) to ensure the users details are removed from any and
all user->groups and (user+group)->[yes,no] caches. |
void |
removeAllMembershipsFromUserMembershipsCache(java.lang.String userName)
Removes the list of groups the user belongs to. |
void |
removeCachedGroupMembership(java.lang.String userName,
java.lang.String groupName)
Removes all the membership details for this specific userName, groupName pair, when a group is being removed. |
void |
removeCachedGroupMemberships(java.lang.String groupName)
Called by CachingGroupManager.removeGroup(String) to ensure the group details are removed from any and
all user->groups and (user+group)->[yes,no] caches. |
void |
removeCachedUser(java.lang.String userName,
java.lang.String groupName)
Removes membership details for the specified user/group |
void |
removeFromAllGroupNamesCache(java.lang.String groupName)
When we remove a group, if we have already cached the list of all available groups, we need to remove this group. |
void |
removeFromAllUsers(java.lang.String userName)
Removes the user from the cache |
void |
removeGroup(java.lang.String groupName)
Removes the group, if it exists |
void |
removeGroupFromUser(java.lang.String userName,
java.lang.String groupName)
Removes the group from the user/group membership in the cache |
void |
removeMembership(java.lang.String userName,
java.lang.String groupName)
Remove any stored [yes,no] membership relationship for a userName & groupName combination. |
boolean |
removeUser(java.lang.String userName)
Removes the user from the cache. |
void |
removeUserFromGroup(java.lang.String userName,
java.lang.String groupName)
Removes the user from the user/group membership in the cache |
java.util.List |
setMembers(java.lang.String groupName,
java.lang.String[] userNameArray)
Caches the member list for a group called groupName. |
void |
setMembership(java.lang.String userName,
java.lang.String groupName,
java.lang.Boolean isMember)
Adds or replaces a membership relationship between the user and the group. |
| Method Detail |
|---|
void flush()
SOAPGroup getGroup(java.lang.String groupName)
groupName - the group to retrieve
void cacheGroup(SOAPGroup group)
SOAPGroup instance.
group - the group to add/replace in cachevoid removeGroup(java.lang.String groupName)
groupName - the group to remove in cachejava.util.List getAllGroupNames()
void cacheAllGroupNames(java.util.List groupNames)
groupNames - list of group names to add/replacevoid cacheAncestorsForGroups(java.util.Map<java.lang.String,java.util.Set<java.lang.String>> ancestorsByGroup)
ancestorsByGroup - map containing ancestor group names by group namejava.util.Map<java.lang.String,java.util.Set<java.lang.String>> getAncestorsForGroups()
boolean containsGroupRelationships()
void setMembership(java.lang.String userName,
java.lang.String groupName,
java.lang.Boolean isMember)
getAllMemberships() to keep them in sync.
userName - the username associated to the membership to cachegroupName - the group name associated to the membership to cacheisMember - true if the user is a member, false if not.
void removeMembership(java.lang.String userName,
java.lang.String groupName)
userName - the username associated to the membership to cachegroupName - the group name associated to the membership to cache
java.lang.Boolean isMember(java.lang.String userName,
java.lang.String groupName)
userName - the username associated to the membership to updategroupName - the group name associated to the membership to update
java.util.List getAllMemberships(java.lang.String userName)
userName belongs to, or null if they don't belong to any.
userName - the user
void cacheAllMemberships(java.lang.String userName,
java.util.List groupNames)
userName - the username associated to the membership to cachegroupNames - list of group names associated to the membership to cachevoid removeAllMembershipsFromUserMembershipsCache(java.lang.String userName)
userName - the username for which the memberships will be removedjava.util.List getAllMembers(java.lang.String groupName)
groupName belongs to, or null if there aren't any.
groupName - the group
void cacheAllMembers(java.lang.String groupName,
java.util.List userNames)
groupName - the group name to cacheuserNames - the list of usersnames to cachevoid removeAllMembers(java.lang.String groupName)
groupName - the group name for which the memberships will be removedjava.lang.Boolean isUserOrGroup(java.lang.String name)
name - the name to check
void addIsUserOrGroup(java.lang.String name,
java.lang.Boolean isValidUserOrGroup)
name - the name to add to cacheisValidUserOrGroup - boolean to signify if the specified name is a valid user or groupvoid cacheUser(SOAPPrincipal user)
user - the user to add/replaceboolean removeUser(java.lang.String userName)
userName - the user to remove
SOAPPrincipal getUser(java.lang.String userName)
SOAPPrincipal representing userName, or null if it's not in the
cache.
userName - the user to retrieve
SOAPPrincipal getUserWithAttributes(java.lang.String userName)
SOAPPrincipal with Attributes representing userName, or null if it's not in the
cache.
userName - the user to retrieve
java.util.List getAllUserNames()
void cacheAllUserNames(java.util.List userNames)
userNames - the list of usernames to add
java.lang.Boolean isMemberInGroupCache(java.lang.String userName,
java.lang.String groupName)
userName - the user to checkgroupName - the group to check
Boolean.TRUE if the user is a member. Boolean.FALSE if not. null if we don't
have enough information to tell.
void addGroupToUser(java.lang.String userName,
java.lang.String groupName)
userName - the user to updategroupName - the group to add
void addUserToGroup(java.lang.String userName,
java.lang.String groupName)
userName - the user to addgroupName - the group to update
void removeGroupFromUser(java.lang.String userName,
java.lang.String groupName)
userName - the user to updategroupName - the group to remove
void removeUserFromGroup(java.lang.String userName,
java.lang.String groupName)
userName - the user to removegroupName - the group to update
java.util.List setMembers(java.lang.String groupName,
java.lang.String[] userNameArray)
groupName. Since group member information arrives when
the group is fetched from the Crowd server, this is also called from CachingGroupManager.getGroup(String).
groupName - the groupuserNameArray - the list of user names
List of all members of the group.
void removeCachedGroupMembership(java.lang.String userName,
java.lang.String groupName)
userName - the user associated with the membershipgroupName - the group associate with the membershipvoid removeCachedGroupMemberships(java.lang.String groupName)
CachingGroupManager.removeGroup(String) to ensure the group details are removed from any and
all user->groups and (user+group)->[yes,no] caches.
groupName - the group to clean upvoid removeFromAllGroupNamesCache(java.lang.String groupName)
groupName - the group to remove form cachevoid addToAllGroupNamesCache(java.lang.String groupName)
groupName - the group to add to cache
void removeCachedUser(java.lang.String userName,
java.lang.String groupName)
userName - the user to updategroupName - the group to updatevoid removeAllMemberships(java.lang.String userName)
CachingUserManager.removeUser(String) to ensure the users details are removed from any and
all user->groups and (user+group)->[yes,no] caches.
userName - the user to cleanupvoid addToAllUsers(java.lang.String userName)
userName to the list of all users in the system.
userName - the user to add to cachevoid removeFromAllUsers(java.lang.String userName)
userName - the user to removejava.lang.String getUserName(java.lang.String username)
username - the username
java.lang.String getGroupName(java.lang.String groupname)
groupname - the group
void cacheUserWithAttributes(SOAPPrincipal user)
user - SOAPPrincipal to cache
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||