net.sourceforge.sconman
Class Role

java.lang.Object
  extended by net.sourceforge.sconman.PermissionAggregator
      extended by net.sourceforge.sconman.Role

public class Role
extends PermissionAggregator

Roles group users according to the way they must use and access to the Category and ContentType defined in the Project, defining the set of permissions that User with that role will have.

Author:
mikeshadow

Field Summary
(package private)  java.lang.String id
          The role id
 
Fields inherited from class net.sourceforge.sconman.PermissionAggregator
permissions, sctx
 
Constructor Summary
Role(SecurityContext sctx, java.lang.String id)
          Main constructor
 
Method Summary
 java.lang.String getId()
          Returns the role id
 boolean hasAddNewPermission(ContentType ctype)
          Checks whether the aggregator can create new contents of the given type
 boolean hasAdminProjectPermission()
          Checks that the user can manage the project (Manage Roles and Users)
 boolean hasDeletePermission(Category cat)
          Checks whether the aggregator can remove a category
 boolean hasDeletePermission(ContentType ctype)
          Checks whether the aggregator can delete that content type
 boolean hasModifyPermission(Category cat)
          Checks whether the aggregator can modify a category
 boolean hasModifyPermission(ContentType ctype)
          Checks whether the aggregator can modify that content type
 boolean hasViewPermission(Category cat)
          Checks whether the aggregator can view a category
 boolean hasViewPermission(ContentType ctype)
          Checks whether the aggregator can view that content type
 java.lang.String toString()
           
 
Methods inherited from class net.sourceforge.sconman.PermissionAggregator
addAddNewPermission, addAdminProjectPermission, addDeletePermission, addModifyPermission, addModifyPermission, addPermission, addPermission, addPermissions, addViewPermission, addViewPermission, getPermissions, getPermissionsAsString, hasPermission, hasPermission, removeAddNewPermission, removeAdminProjectPermission, removeAllPermissions, removeAllPermissions, removeDeletePermission, removeModifyPermission, removeModifyPermission, removePermission, removePermission, removeViewPermission, removeViewPermission
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

java.lang.String id
The role id

Constructor Detail

Role

Role(SecurityContext sctx,
     java.lang.String id)
Main constructor

Parameters:
sctx -
id -
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getId

public java.lang.String getId()
Returns the role id

Returns:
The role id

hasAddNewPermission

public boolean hasAddNewPermission(ContentType ctype)
Description copied from class: PermissionAggregator
Checks whether the aggregator can create new contents of the given type

Overrides:
hasAddNewPermission in class PermissionAggregator

hasAdminProjectPermission

public boolean hasAdminProjectPermission()
Description copied from class: PermissionAggregator
Checks that the user can manage the project (Manage Roles and Users)

Overrides:
hasAdminProjectPermission in class PermissionAggregator
Returns:

hasDeletePermission

public boolean hasDeletePermission(Category cat)
Description copied from class: PermissionAggregator
Checks whether the aggregator can remove a category

Overrides:
hasDeletePermission in class PermissionAggregator
Returns:

hasDeletePermission

public boolean hasDeletePermission(ContentType ctype)
Description copied from class: PermissionAggregator
Checks whether the aggregator can delete that content type

Overrides:
hasDeletePermission in class PermissionAggregator

hasModifyPermission

public boolean hasModifyPermission(Category cat)
Description copied from class: PermissionAggregator
Checks whether the aggregator can modify a category

Overrides:
hasModifyPermission in class PermissionAggregator
Returns:

hasModifyPermission

public boolean hasModifyPermission(ContentType ctype)
Description copied from class: PermissionAggregator
Checks whether the aggregator can modify that content type

Overrides:
hasModifyPermission in class PermissionAggregator

hasViewPermission

public boolean hasViewPermission(ContentType ctype)
Description copied from class: PermissionAggregator
Checks whether the aggregator can view that content type

Overrides:
hasViewPermission in class PermissionAggregator

hasViewPermission

public boolean hasViewPermission(Category cat)
Description copied from class: PermissionAggregator
Checks whether the aggregator can view a category

Overrides:
hasViewPermission in class PermissionAggregator
Returns:


Copyright null null. All Rights Reserved.