| com.flexive.shared.interfaces.UserGroupEngine
All known Subclasses: com.flexive.ejb.beans.UserGroupEngineBean,
UserGroupEngine | public interface UserGroupEngine (Code) | | Interface to the user group engine.
author: Gregor Schober (gregor.schober@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at) |
Method Summary | |
int | create(String name, String color, long mandatorId) Creates a new group for a specific mandator. | RoleList | getRoles(long groupId) Gets all roles that are assigned to a group. | UserGroup | load(long groupId) Loads a group defined by its unique id. | UserGroupList | loadAll(long mandatorId) Loads all groups belonging to a specific mandator, plus GROUP_EVERYONE and GROUP_OWNER. | public UserGroup | loadMandatorGroup(long mandatorId) | public void | rebuildMandatorGroups() | void | remove(long groupId) Removes a group defined by its unique id. | void | setRoles(long groupId, long[] roles) Sets the roles a group is in. | void | setRoles(long groupId, List<Role> roles) Sets the roles a group is in. | void | update(long groupId, String name, String color) Updates a group defined by its unique id.
Users may only update groups of the mandator they belong to if they are in role
ROLE_GROUP_MANAGEMENT.
Global supervisors may update the groups of all mandators.
Parameters: groupId - The group that should be updated Parameters: color - the color of the group as 6 digit RGB value (eg 'FF0000' for pure red), or null to keep the old value Parameters: name - the new name of the group, or null to keep the old value throws: FxApplicationException - TODO throws: FxNotFoundException - if the group to update does not exist throws: FxNoAccessException - if the user lacks the permissions to update the group throws: FxUpdateException - if the update failed throws: FxEntryExistsException - if a group with the desired new name does already exist throws: FxInvalidParameterException - if a parameter was invalid (eg. |
getRoles | RoleList getRoles(long groupId) throws FxApplicationException(Code) | | Gets all roles that are assigned to a group.
The caller may see the role assignments for all groups belonging to his mandator.
GLOBAL_SUPERVISOR may see the role assignments of all groups.
Parameters: groupId - the group to get the assigned roles for a list of the roles that ate assigned to the group throws: FxApplicationException - TODO throws: FxNoAccessException - if the caller lacks the permissions to get the roles throws: FxNotFoundException - if the group does not exist throws: FxLoadException - if the function failed to load the data |
loadAll | UserGroupList loadAll(long mandatorId) throws FxApplicationException(Code) | | Loads all groups belonging to a specific mandator, plus GROUP_EVERYONE and GROUP_OWNER.
Specify -1 t load all groups within the system (all mandators).
Parameters: mandatorId - the mandator id to load the groups for, or -1 to load all groups all groups belonging to the mandator throws: FxApplicationException - TODO throws: FxNoAccessException - If the calling user may not access the groups of the given mandator throws: FxLoadException - if the load failed |
remove | void remove(long groupId) throws FxApplicationException(Code) | | Removes a group defined by its unique id.
Users may only remove groups belonging to their mandator, and only if they are in
ROLE_GROUP_MANAGEMENT.
Global supervisors may remove groups of all mandators.
The groups GROUP_EVERYONE and GROUP_OWNER may not be removed in any case.
Parameters: groupId - the unqiue id of the group to remove throws: FxApplicationException - TODO throws: FxNoAccessException - if the user lacks the permissions to remove the group throws: FxNotFoundException - if the group does not exist throws: FxRemoveException - if the remove failed |
setRoles | void setRoles(long groupId, long[] roles) throws FxApplicationException(Code) | | Sets the roles a group is in.
To set roles the caller must be in role ROLE_ROLE_MANAGEMENT, and may only update groups belonging
to his mandator.
GROUP_GLOBAL_SUPERVISOR may set the roles for groups of all users.
Parameters: groupId - the group to set the roles for Parameters: roles - the roles to set throws: FxApplicationException - TODO throws: FxNoAccessException - if the calling user lacks the permissions to set the roles for the given group throws: FxNotFoundException - if the group does not exist throws: FxUpdateException - if setting the roles failed |
setRoles | void setRoles(long groupId, List<Role> roles) throws FxApplicationException(Code) | | Sets the roles a group is in.
To set roles the caller must be in role ROLE_ROLE_MANAGEMENT, and may only update groups belonging
to his mandator.
GROUP_GLOBAL_SUPERVISOR may set the roles for groups of all users.
Parameters: groupId - the group to set the roles for Parameters: roles - the roles to set throws: FxApplicationException - TODO throws: FxNoAccessException - if the calling user lacks the permissions to set the roles for the given group throws: FxNotFoundException - if the group does not exist throws: FxUpdateException - if setting the roles failed |
update | void update(long groupId, String name, String color) throws FxApplicationException(Code) | | Updates a group defined by its unique id.
Users may only update groups of the mandator they belong to if they are in role
ROLE_GROUP_MANAGEMENT.
Global supervisors may update the groups of all mandators.
Parameters: groupId - The group that should be updated Parameters: color - the color of the group as 6 digit RGB value (eg 'FF0000' for pure red), or null to keep the old value Parameters: name - the new name of the group, or null to keep the old value throws: FxApplicationException - TODO throws: FxNotFoundException - if the group to update does not exist throws: FxNoAccessException - if the user lacks the permissions to update the group throws: FxUpdateException - if the update failed throws: FxEntryExistsException - if a group with the desired new name does already exist throws: FxInvalidParameterException - if a parameter was invalid (eg. the color format) |
|
|