| java.lang.Object com.flexive.shared.content.FxPermissionUtils
FxPermissionUtils | public class FxPermissionUtils (Code) | | Permission Utilities
author: Markus Plesser (markus.plesser@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at) |
Method Summary | |
public static void | checkMandatorExistance(long id) Check if the mandator with the requested id exists and is active. | public static boolean | checkPermission(UserTicket ticket, long ownerId, ACL.Permission permission, FxType type, long stepACL, long contentACL, boolean throwException) | public static boolean | checkPermission(UserTicket ticket, ACL.Permission permission, FxContentSecurityInfo si, boolean throwException) | public static void | checkPropertyPermissions(FxContent content, ACL.Permission perm) Check if the calling user has the requested permission for all properties in this content. | public static void | checkRole(UserTicket ticket, Role... roles) | public static void | checkTypeAvailable(long typeId, boolean allowLocked) Check if the requested FxType is available. | public static byte | encodeTypePermissions(boolean useInstancePermissions, boolean usePropertyPermissions, boolean useStepPermissions, boolean useTypePermissions) | public static boolean[] | getPermissions(long acl, FxType type, long stepACL, long createdBy, long mandator) | public static String | toString(byte bitCodedPermissions) | public static void | unwrapNoAccessValues(FxContent content) Unwrap all FxNoAccess values to their original values. | public static void | wrapNoAccessValues(UserTicket ticket, FxContentSecurityInfo securityInfo, FxContent content, FxType type, FxEnvironment env) |
PERM_MASK_INSTANCE | final public static byte PERM_MASK_INSTANCE(Code) | | |
PERM_MASK_PROPERTY | final public static byte PERM_MASK_PROPERTY(Code) | | |
PERM_MASK_STEP | final public static byte PERM_MASK_STEP(Code) | | |
PERM_MASK_TYPE | final public static byte PERM_MASK_TYPE(Code) | | |
checkMandatorExistance | public static void checkMandatorExistance(long id) throws FxNotFoundException(Code) | | Check if the mandator with the requested id exists and is active.
Will throw a FxNotFoundException if inactive or not existant.
Parameters: id - requested mandator id throws: FxNotFoundException - if inactive or not existant |
checkPermission | public static boolean checkPermission(UserTicket ticket, long ownerId, ACL.Permission permission, FxType type, long stepACL, long contentACL, boolean throwException) throws FxNoAccessException(Code) | | Permission check for (new) contents
Parameters: ticket - calling users ticket Parameters: ownerId - owner of the content to check Parameters: permission - permission to check Parameters: type - used type Parameters: stepACL - step ACL Parameters: contentACL - content ACL Parameters: throwException - should exception be thrown access granted throws: FxNoAccessException - if not accessible for calling user |
checkPermission | public static boolean checkPermission(UserTicket ticket, ACL.Permission permission, FxContentSecurityInfo si, boolean throwException) throws FxNoAccessException(Code) | | Permission check for existing contents
Parameters: ticket - calling users ticket Parameters: permission - permission to check Parameters: si - security info of the content to check Parameters: throwException - should exception be thrown access granted throws: FxNoAccessException - if access denied and exception should be thrown |
checkTypeAvailable | public static void checkTypeAvailable(long typeId, boolean allowLocked) throws FxApplicationException(Code) | | Check if the requested FxType is available. A FxNotFoundException will be thrown if the FxType's state is
TypeState.Unavailable , if allowLocked is true and the FxType's state is
TypeState.Locked a FxNoAccessException will be thrown.
Parameters: typeId - requested type id to check Parameters: allowLocked - allow a locked state? throws: FxApplicationException - on errors See Also: com.flexive.shared.structure.TypeState |
encodeTypePermissions | public static byte encodeTypePermissions(boolean useInstancePermissions, boolean usePropertyPermissions, boolean useStepPermissions, boolean useTypePermissions)(Code) | | Encode permissions for use in FxType
Parameters: useInstancePermissions - instance Parameters: usePropertyPermissions - property Parameters: useStepPermissions - (workflow)step Parameters: useTypePermissions - type encoded permissions |
getPermissions | public static boolean[] getPermissions(long acl, FxType type, long stepACL, long createdBy, long mandator) throws FxNoAccessException(Code) | | Get a users permission for a given instance ACL
Parameters: acl - instance ACL Parameters: type - used type Parameters: stepACL - step ACL Parameters: createdBy - owner Parameters: mandator - mandator array of permissions in the order edit, relate, delete, export and create throws: com.flexive.shared.exceptions.FxNoAccessException - if no read access if permitted |
toString | public static String toString(byte bitCodedPermissions)(Code) | | Get a human readable form of bit coded permissions
Parameters: bitCodedPermissions - permissions human readable form |
|
|