|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mycore.user.MCRUserObject
org.mycore.user.MCRGroup
public class MCRGroup
Instances of this class represent MyCoRe groups.
The main duty of a group object is to define exactly which members it will have.
MCRUserMgr,
MCRUserObject| Field Summary |
|---|
| Fields inherited from class org.mycore.user.MCRUserObject |
|---|
config, creationDate, creator, description, description_len, ID, id_len, logger, modifiedDate, password_len, privilege_len |
| Constructor Summary | |
|---|---|
MCRGroup()
Default constructor. |
|
MCRGroup(Element elm)
This constructor creates the data of this object from a given JDOM Element. |
|
MCRGroup(MCRGroup other)
|
|
MCRGroup(String id)
This minimal constructor only takes the group ID as a parameter. |
|
MCRGroup(String ID,
String creator,
Timestamp creationDate,
Timestamp modifiedDate,
String description,
ArrayList<String> admUserIDs,
ArrayList<String> admGroupIDs,
ArrayList<String> mbrUserIDs)
This constructor takes a subset of attributes of this class as single variables and calls the main constructor (taking all attributes) with default values for the remaining attribute (parameter 'create'). |
|
| Method Summary | |
|---|---|
void |
addAdminGroupID(String groupID)
This method adds a group to the list of groups with administrative privileges for the group. |
void |
addAdminUserID(String userID)
This method adds a user (ID) to the administrators list of the group |
void |
addMemberUserID(String userID)
This method adds a user (ID) to the users list of the group |
void |
debug()
This method writes debug data to the logger (for the debug mode). |
ArrayList<String> |
getAdminGroupIDs()
|
ArrayList<String> |
getAdminUserIDs()
|
String |
getID()
This method must be implemented by a subclass and returns the the ID of the object. |
ArrayList<String> |
getMemberUserIDs()
|
boolean |
hasUserMember(MCRUser user)
This method checks if a user is a member of this group. |
boolean |
hasUserMember(String user)
This method checks if a user is a member of this group. |
boolean |
isValid()
This method checks if all required fields have been provided. |
void |
removeAdminGroupID(String groupID)
This method removes a group from the list of groups with administrative privileges for this group. |
void |
removeAdminUserID(String userID)
This method removes a user from the list of administrators of the group. |
void |
removeAllAdminGroupID()
This method remove all administrator group IDs. |
void |
removeAllAdminUserID()
This method remove all administrator group IDs. |
void |
removeAllMemberUserID()
This method remove all administrator group IDs. |
void |
removeMemberUserID(String userID)
This method removes a user from the users list (members) of the group. |
void |
setAdminGroupIDs(ArrayList<String> array)
This method set the list of administrator groups as a ArrayList of Strings. |
void |
setAdminUserIDs(ArrayList<String> array)
This method set the list of administrator users as a ArrayList of Strings. |
void |
setID(String value)
|
Document |
toJDOMDocument()
This method must be implemented by a subclass and then returns the user or group object as a JDOM document. |
Element |
toJDOMElement()
This method must be implemented by a subclass and then returns the user or group object as a JDOM element. |
| Methods inherited from class org.mycore.user.MCRUserObject |
|---|
debugDefault, getCreationDate, getCreator, getDescription, getModifiedDate, setCreationDate, setCreationDate, setCreator, setDescription, setModifiedDate, setModifiedDate, toString, trim, trim |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MCRGroup()
public MCRGroup(MCRGroup other)
public MCRGroup(String id)
public MCRGroup(String ID,
String creator,
Timestamp creationDate,
Timestamp modifiedDate,
String description,
ArrayList<String> admUserIDs,
ArrayList<String> admGroupIDs,
ArrayList<String> mbrUserIDs)
throws MCRException,
Exception
ID - the group IDcreator - the user ID who created this groupcreationDate - timestamp of the creation of this group, if null the current
date will be usedmodifiedDate - timestamp of the last modification of this groupdescription - description of the groupadmUserIDs - ArrayList of user IDs which have administrative rights for the
groupadmGroupIDs - ArrayList of groups which members have administrative rights
for the groupmbrUserIDs - ArrayList of user IDs this group has as members
MCRException
Exceptionpublic MCRGroup(Element elm)
elm - the JDOM Element| Method Detail |
|---|
public void addAdminGroupID(String groupID)
throws MCRException
groupID - ID of the group added to the group administrator list
MCRException
public void addAdminUserID(String userID)
throws MCRException
userID - ID of the administrative user added to the group
MCRException
public void addMemberUserID(String userID)
throws MCRException
userID - ID of the user added to the group
MCRExceptionpublic final ArrayList<String> getAdminGroupIDs()
public final void setAdminGroupIDs(ArrayList<String> array)
public final ArrayList<String> getAdminUserIDs()
public final void setAdminUserIDs(ArrayList<String> array)
public final ArrayList<String> getMemberUserIDs()
public final String getID()
MCRUserObject
getID in interface MCRPrincipalgetID in class MCRUserObjectpublic final void setID(String value)
public boolean hasUserMember(MCRUser user)
user - Is this user a member of the group?
public boolean hasUserMember(String user)
user - Is this user a member of the group?
public boolean isValid()
throws MCRException
isValid in class MCRUserObjectMCRException
public void removeAdminGroupID(String groupID)
throws MCRException
groupID - ID of the administrative group removed from the group
MCRExceptionpublic void removeAllAdminGroupID()
public void removeAdminUserID(String userID)
throws MCRException
userID - ID of the administrative user removed from the group
MCRExceptionpublic void removeAllAdminUserID()
public void removeMemberUserID(String userID)
throws MCRException
userID - ID of the user removed from the group
MCRExceptionpublic void removeAllMemberUserID()
public Document toJDOMDocument()
throws MCRException
MCRUserObject
toJDOMDocument in class MCRUserObjectMCRExceptionpublic Element toJDOMElement()
MCRUserObject
toJDOMElement in class MCRUserObjectpublic final void debug()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||