gov.nih.nci.caarray.domain.permissions
Class Privileges
java.lang.Object
gov.nih.nci.caarray.domain.permissions.Privileges
public class Privileges
- extends java.lang.Object
A simple class to hold the privileges a user may have for a Protectable object. Has methods
to make it convenient to use in the view layer
- Author:
- dkokotov
Constructor Summary |
Privileges()
Create a new Privileges with no privilege names. |
Privileges(java.util.List<java.lang.String> privilegeNames)
Create a new Privileges with given privilege names. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Privileges
public Privileges(java.util.List<java.lang.String> privilegeNames)
- Create a new Privileges with given privilege names.
- Parameters:
privilegeNames
- privilege names
Privileges
public Privileges()
- Create a new Privileges with no privilege names.
getPrivilegeNames
public java.util.List<java.lang.String> getPrivilegeNames()
- Returns:
- the names of the privileges in this object
isRead
public boolean isRead()
- Returns:
- whether this includes the READ privilege
isBrowse
public boolean isBrowse()
- Returns:
- whether this includes the BROWSE privilege
isWrite
public boolean isWrite()
- Returns:
- whether this includes the WRITE privilege
isPermissions
public boolean isPermissions()
- Returns:
- whether this includes the PERMISSIONS privilege
isPartialRead
public boolean isPartialRead()
- Returns:
- whether this includes the PARTIAL_READ privilege
isPartialWrite
public boolean isPartialWrite()
- Returns:
- whether this includes the PARTIAL_WRITE privilege