| java.lang.Object org.dspace.app.xmlui.aspect.administrative.FlowGroupUtils
FlowGroupUtils | public class FlowGroupUtils (Code) | | Utility methods to processes actions on Groups. These methods are used
exclusivly from the administrative flow scripts.
author: scott phillips |
Method Summary | |
public static String[] | addMember(String[] list, String id) Add the given id to the list and return a new list. | public static int | getCollectionId(String groupName) Extracts the collection id that may be immbedded in the given group name. | public static String[] | getEPeopleMembers(Context context, int groupID) Return the list of current epeople ID's that are a member of this group.
Parameters: context - The current DSpace context Parameters: groupID - The group's id. | public static String[] | getGroupMembers(Context context, int groupID) Return the list of current group id's that are a member of this group.
Parameters: context - The current DSpace context Parameters: groupID - The group's id. | public static String | getName(Context context, int groupID) Return the current name for the given group ID.
Parameters: context - The current DSpace context. Parameters: groupID - The group id. | public static FlowResult | processDeleteGroups(Context context, String[] groupIDs) Remove the specified groups. | public static FlowResult | processSaveGroup(Context context, int groupID, String newName, String[] newEPeopleIDsArray, String[] newGroupIDsArray) Save the group. | public static String[] | removeMember(String[] list, String id) Remove all instances of the given id from the member list. |
addMember | public static String[] addMember(String[] list, String id)(Code) | | Add the given id to the list and return a new list.
Parameters: list - The current array Parameters: id - The new element A new combined array. |
getCollectionId | public static int getCollectionId(String groupName)(Code) | | Extracts the collection id that may be immbedded in the given group name.
Parameters: groupName - - the name of a group (ie group.getName()) the integer collection id or -1 if the group is not that of a collection |
getEPeopleMembers | public static String[] getEPeopleMembers(Context context, int groupID) throws SQLException(Code) | | Return the list of current epeople ID's that are a member of this group.
Parameters: context - The current DSpace context Parameters: groupID - The group's id. An array of ids. |
getGroupMembers | public static String[] getGroupMembers(Context context, int groupID) throws SQLException(Code) | | Return the list of current group id's that are a member of this group.
Parameters: context - The current DSpace context Parameters: groupID - The group's id. An array of ids. |
getName | public static String getName(Context context, int groupID) throws SQLException(Code) | | Return the current name for the given group ID.
Parameters: context - The current DSpace context. Parameters: groupID - The group id. The group's name. |
processDeleteGroups | public static FlowResult processDeleteGroups(Context context, String[] groupIDs) throws SQLException(Code) | | Remove the specified groups. It is assumed that the user has allready confirm this selection.
Parameters: context - The current DSpace context Parameters: groupIDs - A list of groups to be removed. A results object. |
processSaveGroup | public static FlowResult processSaveGroup(Context context, int groupID, String newName, String[] newEPeopleIDsArray, String[] newGroupIDsArray) throws SQLException, AuthorizeException, UIException(Code) | | Save the group. If the name has been changed then it will be updated, if any
members have been added or removed then they are updated.
If the groupID is -1 then a new group is created.
Parameters: context - The current dspace context Parameters: groupID - The group id, or -1 for a new group. Parameters: newName - The group's new name. Parameters: newEPeopleIDsArray - All epeople members Parameters: newGroupIDsArray - All group members. A result |
removeMember | public static String[] removeMember(String[] list, String id)(Code) | | Remove all instances of the given id from the member list.
Parameters: list - The current array Parameters: id - The id to remove A new combined array. |
|
|