| java.lang.Object org.dspace.content.DSpaceObject org.dspace.eperson.Group
Group | public class Group extends DSpaceObject (Code) | | Class representing a group of e-people.
author: David Stuve version: $Revision: 2074 $ |
Field Summary | |
final public static int | ID | final public static int | NAME |
Method Summary | |
public void | addMember(EPerson e) | public void | addMember(Group g) | public static Set<Integer> | allMemberGroupIDs(Context c, EPerson e) | public static Group[] | allMemberGroups(Context c, EPerson e) | public static Set<Integer> | allMemberIDs(Context c, Group g) | public static EPerson[] | allMembers(Context c, Group g) Get all of the epeople who are a member of the
specified group, or a member of a sub-group of the
specified group, etc. | public static Group | create(Context context) | public void | delete() | public boolean | equals(Object other) | public static Group | find(Context context, int id) | public static Group[] | findAll(Context context, int sortField) | public static Group | findByName(Context context, String name) | public String | getHandle() | public int | getID() | public Group[] | getMemberGroups() | public EPerson[] | getMembers() | public String | getName() | public int | getType() | public boolean | isEmpty() | public boolean | isMember(EPerson e) | public boolean | isMember(Group g) | public static boolean | isMember(Context c, int groupid) | public void | loadData() | public void | removeMember(EPerson e) | public void | removeMember(Group g) | public static Group[] | search(Context context, String query) | public static Group[] | search(Context context, String query, int offset, int limit) | public static int | searchResultCount(Context context, String query) Returns the total number of groups returned by a specific query, without the overhead
of creating the Group objects to store the results. | public void | setName(String name) | public void | update() |
ID | final public static int ID(Code) | | |
NAME | final public static int NAME(Code) | | |
addMember | public void addMember(EPerson e)(Code) | | add an eperson member
Parameters: e - eperson |
addMember | public void addMember(Group g)(Code) | | add group to this group
Parameters: g - |
allMemberIDs | public static Set<Integer> allMemberIDs(Context c, Group g) throws SQLException(Code) | | Get Set of all Integers all of the epeople
members for a group
Parameters: c - DSpace context Parameters: g - Group object Set of Integer epersonIDs throws: SQLException - |
allMembers | public static EPerson[] allMembers(Context c, Group g) throws SQLException(Code) | | Get all of the epeople who are a member of the
specified group, or a member of a sub-group of the
specified group, etc.
Parameters: c - DSpace context Parameters: g - Group object Array of EPerson objects throws: SQLException - |
equals | public boolean equals(Object other)(Code) | | Return true if other is the same Group as
this object, false otherwise
Parameters: other - object to compare to true if object passed in represents the same groupas this object |
findAll | public static Group[] findAll(Context context, int sortField) throws SQLException(Code) | | Finds all groups in the site
Parameters: context - DSpace context Parameters: sortField - field to sort by -- Group.ID or Group.NAME array of all groups in the site |
findByName | public static Group findByName(Context context, String name) throws SQLException(Code) | | Find the group by its name - assumes name is unique
Parameters: context - Parameters: name - Group |
getID | public int getID()(Code) | | get the ID of the group object
id |
getMemberGroups | public Group[] getMemberGroups()(Code) | | Return Group members of a Group
|
getMembers | public EPerson[] getMembers()(Code) | | Return EPerson members of a Group
|
getType | public int getType()(Code) | | |
isEmpty | public boolean isEmpty()(Code) | | Return true if group has no members
|
isMember | public boolean isMember(EPerson e)(Code) | | check to see if an eperson is a member
Parameters: e - eperson to check membership |
isMember | public boolean isMember(Group g)(Code) | | check to see if group is a member
Parameters: g - group to check |
isMember | public static boolean isMember(Context c, int groupid) throws SQLException(Code) | | fast check to see if an eperson is a member called with eperson id, does
database lookup without instantiating all of the epeople objects and is
thus a static method
Parameters: c - context Parameters: groupid - group ID to check |
loadData | public void loadData()(Code) | | Populate Group with eperson and group objects
Parameters: context - throws: SQLException - |
removeMember | public void removeMember(EPerson e)(Code) | | remove an eperson from a group
Parameters: e - eperson |
removeMember | public void removeMember(Group g)(Code) | | remove group from this group
Parameters: g - |
search | public static Group[] search(Context context, String query) throws SQLException(Code) | | Find the groups that match the search query across eperson_group_id or name
Parameters: context - DSpace context Parameters: query - The search string array of Group objects |
search | public static Group[] search(Context context, String query, int offset, int limit) throws SQLException(Code) | | Find the groups that match the search query across eperson_group_id or name
Parameters: context - DSpace context Parameters: query - The search string Parameters: offset - Inclusive offset Parameters: limit - Maximum number of matches returned array of Group objects |
searchResultCount | public static int searchResultCount(Context context, String query) throws SQLException(Code) | | Returns the total number of groups returned by a specific query, without the overhead
of creating the Group objects to store the results.
Parameters: context - DSpace context Parameters: query - The search string the number of groups mathching the query |
setName | public void setName(String name)(Code) | | set name of group
Parameters: name - new group name |
|
|