Blue Mind
Release 1.0

net.bluemind.core.api.acl
Class Rights

java.lang.Object
  extended by net.bluemind.core.api.acl.Rights
All Implemented Interfaces:
java.io.Serializable

public class Rights
extends java.lang.Object
implements java.io.Serializable

Rights represent an ACL rigth

See Also:
Serialized Form

Constructor Summary
Rights()
          Instantiate a new Rights with no access
Rights(int access, int read, int write, int admin)
          Instantiate a new Rights with access as specified
 
Method Summary
 int getAccess()
          Get access access right
 int getAdmin()
          Get admin access right
 int getRead()
          Get read access right
 int getWrite()
          Get write access right
 void merge(Rights r)
          Merge current right with another Rights.
 void setAccess(int access)
          Set access access right
 void setAdmin(int admin)
          Set admin access right
 void setRead(int read)
          Set read access right
 void setWrite(int write)
          Set write access right
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Rights

public Rights()
Instantiate a new Rights with no access


Rights

public Rights(int access,
              int read,
              int write,
              int admin)
Instantiate a new Rights with access as specified

Parameters:
access - set access access
read - set read access
write - set write access
admin - set admin access
Method Detail

setAccess

public void setAccess(int access)
Set access access right

Parameters:
access - 0, no access. 1 set access.

getAccess

public int getAccess()
Get access access right

Returns:
0, no access. 1 set access.

setRead

public void setRead(int read)
Set read access right

Parameters:
read - 0, no access. 1 set access.

getRead

public int getRead()
Get read access right

Returns:
0, no access. 1 set access.

setWrite

public void setWrite(int write)
Set write access right

Parameters:
write - 0, no access. 1 set access.

getWrite

public int getWrite()
Get write access right

Returns:
0, no access. 1 set access.

setAdmin

public void setAdmin(int admin)
Set admin access right

Parameters:
write - 0, no access. 1 set access.

getAdmin

public int getAdmin()
Get admin access right

Returns:
0, no access. 1 set access.

merge

public void merge(Rights r)
Merge current right with another Rights. Doing an 'OR' on access values

Parameters:
r - Rights to merge

toString

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

Blue Mind
Release 1.0