|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.wordhoard.swing.calculator.modelutils.UserGroupPermissionUtils
public class UserGroupPermissionUtils
Work set utilities.
Constructor Summary | |
---|---|
protected |
UserGroupPermissionUtils()
Don't allow instantiation but do allow overrides. |
Method Summary | |
---|---|
static void |
addReadPermission(AuthoredTextAnnotation annotation,
UserGroup userGroup)
Add read permission for group to indicated item. |
static UserGroupPermission |
createUserGroupPermission(UserGroupPermission userGroupPermission)
Create a new UserGroupPermission. |
static void |
deletePermission(AuthoredTextAnnotation annotation,
UserGroup userGroup)
delete permission for group on indicated item. |
static boolean |
deleteUserGroupPermission(UserGroupPermission userGroupPermission)
Delete a UserGroupPermission. |
static java.util.Map |
getPermissionsForItem(AuthoredTextAnnotation annotation)
Get all usergroups associated with a specific annotation. |
static void |
setPermission(AuthoredTextAnnotation annotation,
UserGroup userGroup,
java.lang.String permission)
set permission for group on indicated item. |
static boolean |
updateUserGroupPermission(UserGroupPermission userGroupPermission,
java.lang.String permission)
Update UserGroupPermission. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected UserGroupPermissionUtils()
Method Detail |
---|
public static UserGroupPermission createUserGroupPermission(UserGroupPermission userGroupPermission) throws BadOwnerException
userGroupPermission
- The user group permission.
BadOwnerException
- if the owner is null or empty. public static boolean updateUserGroupPermission(UserGroupPermission userGroupPermission, java.lang.String permission) throws BadOwnerException
BadOwnerException
- if the owner is null or empty or not admin. public static boolean deleteUserGroupPermission(UserGroupPermission userGroupPermission)
userGroupPermission
- The UserGroupPermission to delete.
The currently logged in user must be the owner to delete an UserGroupPermission.
public static java.util.Map getPermissionsForItem(AuthoredTextAnnotation annotation)
annotation
- The annotation.
public static void addReadPermission(AuthoredTextAnnotation annotation, UserGroup userGroup)
annotation
- The AuthoredTextAnnotation made readableuserGroup
- The UserGroup allowed to read the item public static void setPermission(AuthoredTextAnnotation annotation, UserGroup userGroup, java.lang.String permission)
annotation
- The AuthoredTextAnnotationuserGroup
- The UserGroup allowed given permissionpermission
- The permission public static void deletePermission(AuthoredTextAnnotation annotation, UserGroup userGroup)
annotation
- The AuthoredTextAnnotationuserGroup
- The UserGroup allowed given permission
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |