|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.content.DSpaceObject
org.dspace.eperson.Group
public class Group
Class representing a group of e-people.
| Field Summary | |
|---|---|
static int |
ID
|
static int |
NAME
|
| Method Summary | |
|---|---|
void |
addMember(EPerson e)
add an eperson member |
void |
addMember(Group g)
add group to this group |
static Set<Integer> |
allMemberGroupIDs(Context c,
EPerson e)
get Set of Integers all of the group memberships for an eperson |
static Group[] |
allMemberGroups(Context c,
EPerson e)
Get all of the groups that an eperson is a member of |
static Set<Integer> |
allMemberIDs(Context c,
Group g)
Get Set of all Integers all of the epeople members for a group |
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. |
static Group |
create(Context context)
Create a new group |
void |
delete()
Delete a group |
boolean |
equals(Object other)
Return true if other is the same Group as
this object, false otherwise |
static Group |
find(Context context,
int id)
find the group by its ID |
static Group[] |
findAll(Context context,
int sortField)
Finds all groups in the site |
static Group |
findByName(Context context,
String name)
Find the group by its name - assumes name is unique |
String |
getHandle()
Get the Handle of the object. |
int |
getID()
get the ID of the group object |
Group[] |
getMemberGroups()
Return Group members of a Group |
EPerson[] |
getMembers()
Return EPerson members of a Group |
String |
getName()
get name of group |
int |
getType()
Get the type of this object, found in Constants |
boolean |
isEmpty()
Return true if group has no members |
static boolean |
isMember(Context c,
int groupid)
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 |
boolean |
isMember(EPerson e)
check to see if an eperson is a member |
boolean |
isMember(Group g)
check to see if group is a member |
void |
loadData()
Populate Group with eperson and group objects |
void |
removeMember(EPerson e)
remove an eperson from a group |
void |
removeMember(Group g)
remove group from this group |
static Group[] |
search(Context context,
String query)
Find the groups that match the search query across eperson_group_id or name |
static Group[] |
search(Context context,
String query,
int offset,
int limit)
Find the groups that match the search query across eperson_group_id or name |
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. |
void |
setName(String name)
set name of group |
void |
update()
Update the group - writing out group object and EPerson list if necessary |
| Methods inherited from class org.dspace.content.DSpaceObject |
|---|
addDetails, clearDetails, find, getDetails |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ID
public static final int NAME
| Method Detail |
|---|
public void loadData()
context -
SQLException
public static Group create(Context context)
throws SQLException,
AuthorizeException
context - DSpace context object
SQLException
AuthorizeExceptionpublic int getID()
getID in class DSpaceObjectpublic String getName()
getName in class DSpaceObjectpublic void setName(String name)
name - new group namepublic void addMember(EPerson e)
e - epersonpublic void addMember(Group g)
g - public void removeMember(EPerson e)
e - epersonpublic void removeMember(Group g)
g - public boolean isMember(EPerson e)
e - eperson to check membershippublic boolean isMember(Group g)
g - group to check
public static boolean isMember(Context c,
int groupid)
throws SQLException
c - contextgroupid - group ID to check
SQLException
public static Group[] allMemberGroups(Context c,
EPerson e)
throws SQLException
c - e -
SQLException
public static Set<Integer> allMemberGroupIDs(Context c,
EPerson e)
throws SQLException
c - e -
SQLException
public static EPerson[] allMembers(Context c,
Group g)
throws SQLException
c - DSpace contextg - Group object
SQLException
public static Set<Integer> allMemberIDs(Context c,
Group g)
throws SQLException
c - DSpace contextg - Group object
SQLException
public static Group find(Context context,
int id)
throws SQLException
context - id -
SQLException
public static Group findByName(Context context,
String name)
throws SQLException
context - name -
SQLException
public static Group[] findAll(Context context,
int sortField)
throws SQLException
context - DSpace contextsortField - field to sort by -- Group.ID or Group.NAME
SQLException
public static Group[] search(Context context,
String query)
throws SQLException
context - DSpace contextquery - The search string
SQLException
public static Group[] search(Context context,
String query,
int offset,
int limit)
throws SQLException
context - DSpace contextquery - The search stringoffset - Inclusive offsetlimit - Maximum number of matches returned
SQLException
public static int searchResultCount(Context context,
String query)
throws SQLException
context - DSpace contextquery - The search string
SQLException
public void delete()
throws SQLException
SQLExceptionpublic EPerson[] getMembers()
public Group[] getMemberGroups()
public boolean isEmpty()
public void update()
throws SQLException,
AuthorizeException
SQLException
AuthorizeExceptionpublic boolean equals(Object other)
true if other is the same Group as
this object, false otherwise
equals in class Objectother - object to compare to
true if object passed in represents the same group
as this objectpublic int getType()
DSpaceObject
getType in class DSpaceObjectpublic String getHandle()
DSpaceObjectnull
getHandle in class DSpaceObjectnull if it doesn't have
one
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||