|
||||||||||
| 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)
|
void |
addIsUserOrGroup(java.lang.String name,
java.lang.Boolean isValidUserOrGroup)
|
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)
|
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)
|
boolean |
containsGroupRelationships()
Returns true if the cache contains enough information to reliably compute parent group relationships. |
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()
Returns a List with all user names, or null if none are cached. |
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 is 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)
|
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)
|
void |
removeGroup(java.lang.String groupName)
Removes the group, if it exists |
void |
removeGroupFromUser(java.lang.String userName,
java.lang.String groupName)
|
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)
|
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 -
void cacheGroup(SOAPGroup group)
SOAPGroup instance.
group - void removeGroup(java.lang.String groupName)
groupName - java.util.List getAllGroupNames()
void cacheAllGroupNames(java.util.List groupNames)
groupNames - void 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 - groupName - isMember - true if the user is a member, false if not.
void removeMembership(java.lang.String userName,
java.lang.String groupName)
userName - groupName -
java.lang.Boolean isMember(java.lang.String userName,
java.lang.String groupName)
userName - groupName -
java.util.List getAllMemberships(java.lang.String userName)
userName belongs to, or null if they don't belong to any.
userName -
void cacheAllMemberships(java.lang.String userName,
java.util.List groupNames)
userName - groupNames - void removeAllMembershipsFromUserMembershipsCache(java.lang.String userName)
userName - java.util.List getAllMembers(java.lang.String groupName)
groupName belongs to, or null if there aren't any.
groupName -
void cacheAllMembers(java.lang.String groupName,
java.util.List userNames)
groupName - userNames - void removeAllMembers(java.lang.String groupName)
groupName - java.lang.Boolean isUserOrGroup(java.lang.String name)
void addIsUserOrGroup(java.lang.String name,
java.lang.Boolean isValidUserOrGroup)
void cacheUser(SOAPPrincipal user)
user - boolean removeUser(java.lang.String userName)
userName -
SOAPPrincipal getUser(java.lang.String userName)
SOAPPrincipal representing userName, or null if it's not in the
cache.
userName -
SOAPPrincipal getUserWithAttributes(java.lang.String userName)
SOAPPrincipal with Attributes representing userName, or null if it's not in the
cache.
userName -
java.util.List getAllUserNames()
void cacheAllUserNames(java.util.List userNames)
userNames -
java.lang.Boolean isMemberInGroupCache(java.lang.String userName,
java.lang.String groupName)
userName - groupName -
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)
void addUserToGroup(java.lang.String userName,
java.lang.String groupName)
void removeGroupFromUser(java.lang.String userName,
java.lang.String groupName)
void removeUserFromGroup(java.lang.String userName,
java.lang.String groupName)
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 - userNameArray -
void removeCachedGroupMembership(java.lang.String userName,
java.lang.String groupName)
userName - groupName - void 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 - void removeFromAllGroupNamesCache(java.lang.String groupName)
groupName - void addToAllGroupNamesCache(java.lang.String groupName)
groupName -
void removeCachedUser(java.lang.String userName,
java.lang.String groupName)
void 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 - void addToAllUsers(java.lang.String userName)
userName to the list of all users in the system.
userName - void removeFromAllUsers(java.lang.String userName)
java.lang.String getUserName(java.lang.String username)
username -
java.lang.String getGroupName(java.lang.String groupname)
groupname -
void cacheUserWithAttributes(SOAPPrincipal user)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||