org.mftech.dawn.server.projects.impl
Class RoleImpl
java.lang.Object
org.mftech.dawn.server.projects.impl.RoleImpl
- All Implemented Interfaces:
- java.io.Serializable, Role
public class RoleImpl
- extends java.lang.Object
- implements Role, java.io.Serializable
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RoleImpl
public RoleImpl()
RoleImpl
public RoleImpl(java.lang.String name,
int id)
getName
public java.lang.String getName()
- Specified by:
getName in interface Role
setName
public void setName(java.lang.String name)
- Specified by:
setName in interface Role
getOperations
public java.util.Map<java.lang.Integer,java.lang.Boolean> getOperations()
- Specified by:
getOperations in interface Role
setOperations
public void setOperations(java.util.Map<java.lang.Integer,java.lang.Boolean> rights)
isAllowed
public boolean isAllowed(int operation)
- returns the right for the operation
- Specified by:
isAllowed in interface Role
- Parameters:
operation - the id of the operation
- Returns:
- true if operation is allowed, false otherwise
addOperation
public void addOperation(int operation,
boolean allowed)
- Specified by:
addOperation in interface Role
setRoleId
public void setRoleId(int roleId)
- Specified by:
setRoleId in interface Role
getRoleId
public int getRoleId()
- Specified by:
getRoleId in interface Role
getName
public java.lang.String getName(int id)
- Specified by:
getName in interface Role