public interface GroupService extends DSpaceObjectService<Group>, DSpaceObjectLegacySupportService<Group>
| Modifier and Type | Field and Description |
|---|---|
static int |
NAME |
| Modifier and Type | Method and Description |
|---|---|
void |
addMember(Context context,
Group group,
EPerson e)
add an eperson member
|
void |
addMember(Context context,
Group groupParent,
Group groupChild)
add group to this group
|
List<Group> |
allMemberGroups(Context context,
EPerson ePerson)
Get all of the groups that an eperson is a member of.
|
Set<Group> |
allMemberGroupsSet(Context context,
EPerson ePerson) |
List<EPerson> |
allMembers(Context context,
Group group)
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.
|
int |
countTotal(Context context)
Count the total number of groups in DSpace
|
Group |
create(Context context)
Create a new group
|
List<Group> |
findAll(Context context,
int sortField)
Deprecated.
|
List<Group> |
findAll(Context context,
List<MetadataField> metadataSortFields)
Finds all groups in the site
|
List<Group> |
findByMetadataField(Context context,
String searchValue,
MetadataField metadataField)
Look up groups based on their value for a certain metadata field (NOTE: name is not stored as metadata)
|
Group |
findByName(Context context,
String name)
Find the group by its name - assumes name is unique
|
List<Group> |
getEmptyGroups(Context context)
Find all empty groups in DSpace
|
void |
initDefaultGroupNames(Context context)
Initializes the group names for anonymous & administrator, and marks them
"permanent".
|
boolean |
isDirectMember(Group group,
EPerson ePerson)
check to see if an eperson is a direct member.
|
boolean |
isEmpty(Group group)
Return true if group has no direct or indirect members
|
boolean |
isMember(Context context,
EPerson eperson,
Group group)
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(Context context,
EPerson epersonToCheck,
String groupName)
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(Context context,
Group group)
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(Context context,
String groupName)
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(Group owningGroup,
Group childGroup)
Check to see if childGroup is a direct group member of owningGroup.
|
boolean |
isParentOf(Context context,
Group parentGroup,
Group childGroup)
Check to see if parentGroup is a direct or in-direct parent of a childGroup.
|
void |
removeMember(Context context,
Group group,
EPerson ePerson)
remove an eperson from a group
|
void |
removeMember(Context context,
Group groupParent,
Group childGroup)
remove group from this group
|
List<Group> |
search(Context context,
String groupIdentifier)
Find the groups that match the search query across eperson_group_id or name
|
List<Group> |
search(Context context,
String groupIdentifier,
int offset,
int limit)
Find the groups that match the search query across eperson_group_id or name
|
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(Group group,
String name)
set name of group
|
addMetadata, addMetadata, addMetadata, addMetadata, addMetadata, addMetadata, addMetadata, addMetadata, clearMetadata, delete, find, getAdminObject, getIdentifiers, getMetadata, getMetadata, getMetadata, getMetadata, getMetadataByMetadataString, getMetadataFirstValue, getName, getParentObject, getSupportsTypeConstant, getTypeText, removeMetadataValues, setMetadataSingleValue, update, updateLastModifiedfindByIdOrLegacyId, findByLegacyId, getSupportsTypeConstantstatic final int NAME
Group create(Context context) throws SQLException, AuthorizeException
context - DSpace context objectSQLException - if database errorAuthorizeException - if authorization errorvoid setName(Group group, String name) throws SQLException
group - DSpace groupname - new group nameSQLException - if database errorvoid addMember(Context context, Group group, EPerson e)
context - DSpace context objectgroup - DSpace groupe - epersonvoid addMember(Context context, Group groupParent, Group groupChild) throws SQLException
context - DSpace context objectgroupParent - parent groupgroupChild - child groupSQLException - if database errorvoid removeMember(Context context, Group group, EPerson ePerson)
context - DSpace context objectgroup - DSpace groupePerson - epersonvoid removeMember(Context context, Group groupParent, Group childGroup) throws SQLException
context - DSpace context objectgroupParent - parent groupchildGroup - child groupSQLException - if database errorboolean isDirectMember(Group group, EPerson ePerson)
falsegroup - DSpace groupePerson - eperson to check membershipboolean isMember(Group owningGroup, Group childGroup)
falseowningGroup - parent groupchildGroup - child groupboolean isParentOf(Context context, Group parentGroup, Group childGroup) throws SQLException
parentGroup - parent groupchildGroup - child groupSQLExceptionboolean isMember(Context context, Group group) throws SQLException
context - contextgroup - group to checkSQLException - if database errorboolean isMember(Context context, String groupName) throws SQLException
context - contextgroupName - the name of the group to checkSQLException - if database errorboolean isMember(Context context, EPerson epersonToCheck, String groupName) throws SQLException
context - contextgroupName - the name of the group to checkSQLException - if database errorboolean isMember(Context context, EPerson eperson, Group group) throws SQLException
context - DSpace context object.eperson - EPerson whos membership should be checked.group - The group to check against.SQLException - if database errorList<Group> allMemberGroups(Context context, EPerson ePerson) throws SQLException
context - DSpace contenxtePerson - ePerson objectSQLException - if database errorSet<Group> allMemberGroupsSet(Context context, EPerson ePerson) throws SQLException
SQLExceptionList<EPerson> allMembers(Context context, Group group) throws SQLException
context - DSpace contextgroup - Group objectSQLException - if errorGroup findByName(Context context, String name) throws SQLException
context - name - SQLException - if errorList<Group> findAll(Context context, List<MetadataField> metadataSortFields) throws SQLException
context - DSpace contextmetadataSortFields - metadata fields to sort by, leave empty to sort by NameSQLException - if error@Deprecated List<Group> findAll(Context context, int sortField) throws SQLException
findAll(Context context, List<MetadataField> metadataFieldsSort) insteadcontext - DSpace contextsortField - sort field indexSQLException - if errorList<Group> search(Context context, String groupIdentifier) throws SQLException
context - DSpace contextgroupIdentifier - The group name or group IDSQLException - if errorList<Group> search(Context context, String groupIdentifier, int offset, int limit) throws SQLException
context - DSpace contextgroupIdentifier - The group name or group IDoffset - Inclusive offsetlimit - Maximum number of matches returnedSQLException - if errorint searchResultCount(Context context, String query) throws SQLException
context - DSpace contextquery - The search stringSQLException - if errorboolean isEmpty(Group group)
group - DSpace groupvoid initDefaultGroupNames(Context context) throws SQLException, AuthorizeException
context - the DSpace contextSQLException - database exceptionAuthorizeException - authorization errorList<Group> getEmptyGroups(Context context) throws SQLException
context - The DSpace contextSQLException - database exceptionint countTotal(Context context) throws SQLException
context - The DSpace contextSQLException - database exceptionList<Group> findByMetadataField(Context context, String searchValue, MetadataField metadataField) throws SQLException
context - The DSpace contextsearchValue - The value to matchmetadataField - The metadata field to search inSQLException - database exceptionCopyright © 2017 DuraSpace. All rights reserved.