|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gov.bnl.gums.userGroup.UserGroup gov.bnl.gums.userGroup.ManualUserGroup
public class ManualUserGroup
A user group that is defined by a list of users stored in some way, allowing to add and remove users. The persistance layer is implemented through an interface, allowing different storage frameworks (i.e. database, LDAP, file)
This class will provide also configurable data caching.
Field Summary | |
---|---|
protected int |
adminSecondsBetweenPatternRefresh
|
protected Date |
patternListLastUpdated
|
protected int |
secondsBetweenPatternRefresh
|
Fields inherited from class gov.bnl.gums.userGroup.UserGroup |
---|
accessIndex, accessTypes |
Constructor Summary | |
---|---|
ManualUserGroup()
Create a new manual user group. |
|
ManualUserGroup(Configuration configuration)
Create a new manual user group with a configuration. |
|
ManualUserGroup(Configuration configuration,
String name)
Create a new manual user group with a configuration and a name. |
Method Summary | |
---|---|
void |
addMember(GridUser user)
|
UserGroup |
clone(Configuration configuration)
Create a clone of itself |
List |
getMemberList()
Returns the list of user identities that are part of the group. |
String |
getMembersUri()
|
String |
getNonMembersUri()
|
String |
getPersistenceFactory()
Setter for property persistenceFactory. |
String |
getType()
Getter for property type. |
static String |
getTypeStatic()
|
boolean |
isInGroup(GridUser user)
Determines whether the given user identity is part of the group. |
boolean |
removeMember(GridUser user)
|
void |
setMembersUri(String membersUri)
|
void |
setNonMembersUri(String nonMembersUri)
|
void |
setPersistenceFactory(String persistenceFactory)
Setter for property persistenceFactory |
String |
toString()
|
String |
toString(String bgColor)
Get string representation of this object for displaying in the diagnostic summary web page |
String |
toXML()
Create a clone of itself |
void |
updateMembers()
Updates the local list of the users from the source of the group. |
Methods inherited from class gov.bnl.gums.userGroup.UserGroup |
---|
getAccess, getConfiguration, getDescription, getName, hasReadAllAccess, hasReadSelfAccess, hasWriteAccess, setAccess, setConfiguration, setDescription, setName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Date patternListLastUpdated
protected int secondsBetweenPatternRefresh
protected int adminSecondsBetweenPatternRefresh
Constructor Detail |
---|
public ManualUserGroup()
public ManualUserGroup(Configuration configuration)
public ManualUserGroup(Configuration configuration, String name)
Method Detail |
---|
public static String getTypeStatic()
public void addMember(GridUser user)
public UserGroup clone(Configuration configuration)
UserGroup
clone
in class UserGroup
public List getMemberList()
UserGroup
Some UserGroups, however, could be defined by a rule that doesn't allow listing. For example, a group could be 'all the users with a DOEGrids certificate'. Though one could argue whether or not is a good idea to have such a group, one can implement one and throw an UnsupportedOperationException. This will make it impossible for GUMS to create a grid-mapfile, but would still allow direct user to account mapping through a call-out.
getMemberList
in class UserGroup
public String getMembersUri()
public String getNonMembersUri()
public String getPersistenceFactory()
public String getType()
UserGroup
getType
in class UserGroup
public boolean isInGroup(GridUser user)
UserGroup
isInGroup
in class UserGroup
public boolean removeMember(GridUser user)
public void setPersistenceFactory(String persistenceFactory)
persistenceFactory
- public void setMembersUri(String membersUri)
public void setNonMembersUri(String nonMembersUri)
public String toString()
toString
in class Object
public String toString(String bgColor)
UserGroup
toString
in class UserGroup
bgColor
- back ground color
public String toXML()
UserGroup
toXML
in class UserGroup
public void updateMembers()
UserGroup
Most user groups will get the information from a separate database accessible via WAN. For that reason, the user group will maintain a local cache with the list of members, which can be updated through this method.
updateMembers
in class UserGroup
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |