Package com.cmobilecom.af.model.system
Class AccessControlItem
- java.lang.Object
-
- com.cmobilecom.af.model.system.AccessControlItem
-
public class AccessControlItem extends java.lang.Object
AccessControlItem is an item of accessControl. For example, AccessControlItem: Type{Permission1,Permission2,Permission3} The user must be of the Type, and have one of the permissions to access an entity.- Since:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ANONYMOUS
User type constant: All users who are not authenticatedstatic java.lang.String
NOBODY
User type constant: access denied to all usersstatic java.lang.String
OWNER
User type constant: entity data ownerstatic java.lang.String
PUBLIC
User type constant: All users regardless of whether they are authenticated or notstatic java.lang.String
SUSER
User type constant: All users with type User.SYSTEM who are authenticated.static java.lang.String
USER
User type constant: All users who are authenticated
-
Constructor Summary
Constructors Constructor Description AccessControlItem(java.lang.String defaultModule, java.lang.String accessControlItem)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<Permission>
getPermissions()
Get the set of permissions.java.lang.String
getType()
Get the type such as USER, SUSER, PUBLIC.void
setPermissions(java.util.Set<Permission> permissions)
Set the set of permissions.void
setType(java.lang.String type)
Set the type such as USER, SUSER, PUBLIC.
-
-
-
Field Detail
-
NOBODY
public static final java.lang.String NOBODY
User type constant: access denied to all users- See Also:
- Constant Field Values
-
PUBLIC
public static final java.lang.String PUBLIC
User type constant: All users regardless of whether they are authenticated or not- See Also:
- Constant Field Values
-
ANONYMOUS
public static final java.lang.String ANONYMOUS
User type constant: All users who are not authenticated- See Also:
- Constant Field Values
-
USER
public static final java.lang.String USER
User type constant: All users who are authenticated- See Also:
- Constant Field Values
-
SUSER
public static final java.lang.String SUSER
User type constant: All users with type User.SYSTEM who are authenticated.- See Also:
- Constant Field Values
-
OWNER
public static final java.lang.String OWNER
User type constant: entity data owner- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AccessControlItem
public AccessControlItem(java.lang.String defaultModule, java.lang.String accessControlItem) throws ParseException
Constructor. Parse the access control item string. AccessControlItem syntax: user type optionally followed by a list of permissions. For example, SUSER{Permission1,Permission2,Permission3}.- Parameters:
defaultModule
- the default module for those permissions without module prefix.accessControlItem
- access control item- Throws:
ParseException
- throw if an parsing error occurs
-
-
Method Detail
-
getType
public java.lang.String getType()
Get the type such as USER, SUSER, PUBLIC.- Returns:
- type
-
setType
public void setType(java.lang.String type)
Set the type such as USER, SUSER, PUBLIC.- Parameters:
type
- type name
-
getPermissions
public java.util.Set<Permission> getPermissions()
Get the set of permissions.- Returns:
- permissions
-
setPermissions
public void setPermissions(java.util.Set<Permission> permissions)
Set the set of permissions.- Parameters:
permissions
- a set of Permissions
-
-