com.ohrasys.cad.gds
Class GDSAccessControl

java.lang.Object
  extended by com.ohrasys.cad.gds.GDSAccessControl

public class GDSAccessControl
extends java.lang.Object

Represents an access control specifier. Each access control specifier consists of a group number, a user number and access rights.

Since:
1.5

Constructor Summary
GDSAccessControl(GDSAccessControl data)
          Creates a copy of an existing GDSAccessControl object.
GDSAccessControl(short group, short user, short access)
          Creates a new GDSAccessControl object.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Determines if one access control list is equivalent to another.
 short getAccess()
          Gets the access control permissions.
 short getGroup()
          Gets the group number.
 short getUser()
          Gets the user number.
 int hashCode()
          Generates a hashing code for the access control.
 void setAccess(short access)
          Sets the access control permissions.
 void setGroup(short group)
          Sets the group number.
 void setUser(short user)
          Sets the user number.
 java.lang.String toString()
          Returns description of the access control.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GDSAccessControl

public GDSAccessControl(GDSAccessControl data)
Creates a copy of an existing GDSAccessControl object.

Parameters:
data - The GDSAccessControl object to copy.

GDSAccessControl

public GDSAccessControl(short group,
                        short user,
                        short access)
Creates a new GDSAccessControl object.

Parameters:
group - Group number.
user - User number.
access - Access rights.
Method Detail

equals

public boolean equals(java.lang.Object obj)
Determines if one access control list is equivalent to another.

Overrides:
equals in class java.lang.Object
Parameters:
obj - The object to compare to.
Returns:
true if the objects contain the same data.

getAccess

public short getAccess()
Gets the access control permissions.

Returns:
The current access control permissions.

getGroup

public short getGroup()
Gets the group number.

Returns:
The current group number.

getUser

public short getUser()
Gets the user number.

Returns:
The current user number.

hashCode

public int hashCode()
Generates a hashing code for the access control.

Overrides:
hashCode in class java.lang.Object
Returns:
A hashcode for the access control.

setAccess

public void setAccess(short access)
Sets the access control permissions.

Parameters:
access - The new access control permissions.

setGroup

public void setGroup(short group)
Sets the group number.

Parameters:
group - The new group number.

setUser

public void setUser(short user)
Sets the user number.

Parameters:
user - The new user number.

toString

public java.lang.String toString()
Returns description of the access control.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of the access control.