org.opengts.db
Class AclEntry

java.lang.Object
  extended by org.opengts.db.AclEntry
All Implemented Interfaces:
java.lang.Cloneable

public class AclEntry
extends java.lang.Object
implements java.lang.Cloneable


Nested Class Summary
static class AclEntry.AccessLevel
           
 
Field Summary
static java.lang.String ACL_DCS_
           
static java.lang.String ACL_DCS_DESC
           
static java.lang.String ACL_SERVICE_
           
static java.lang.String SUBACL_SEPARATOR
           
 
Constructor Summary
AclEntry(AclEntry aclEntry)
          Copy Constructor
AclEntry(java.lang.String name, I18N.Text desc, AclEntry.AccessLevel[] values, AclEntry.AccessLevel dftLvl)
          Constructor
AclEntry(java.lang.String name, I18N.Text desc, AclEntry.AccessLevel maxLvl, AclEntry.AccessLevel dftLvl)
          Constructor
 
Method Summary
 java.lang.Object clone()
          Returns a clone of this AclEntry
static java.lang.String CreateAclName(java.lang.String aclName, java.lang.String subAcl)
           
 boolean equals(java.lang.Object other)
          Returns true if the specified Object is equal to this AclEntry
static AclEntry.AccessLevel getAccessLevel(int accessLevel)
           
static AclEntry.AccessLevel getAccessLevel(java.lang.String accessLevel, java.util.Locale locale)
           
 AclEntry.AccessLevel[] getAccessLevelValues()
          Gets the access level values for this AclEntry
 AclEntry.AccessLevel getDefaultAccessLevel()
          Gets the default access level for this AclEntry
 java.lang.String getDescription(java.util.Locale loc)
          Gets the description of this AclEntry
 AclEntry.AccessLevel getMaximumAccessLevel()
          Gets the maximum access level for this AclEntry
 java.lang.String getName()
          Gets the name of this AclEntry
static AclEntry.AccessLevel[] GetValueListForMaximumAccessLevel(AclEntry.AccessLevel maxAcc)
           
 boolean isHidden()
          Returns the 'hidden' state of this AclEntry
static boolean okAll(AclEntry.AccessLevel level)
           
static boolean okAll(int level)
           
static boolean okRead(AclEntry.AccessLevel level)
           
static boolean okRead(int level)
           
static boolean okWrite(AclEntry.AccessLevel level)
           
static boolean okWrite(int level)
           
static AclEntry.AccessLevel parseAccessLevel(java.lang.String accStr, AclEntry.AccessLevel dft)
           
static java.lang.String[] ParseAclName(java.lang.String aclName)
           
 void setDefaultAccessLevel(AclEntry.AccessLevel dft)
          Sets the default access level for this AclEntry
 void setHidden(boolean hidden)
          Sets the 'hidden' state of this AclEntry
 java.lang.String toString()
          Returns a String representation of this AclEntry
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ACL_DCS_

public static final java.lang.String ACL_DCS_
See Also:
Constant Field Values

ACL_DCS_DESC

public static final java.lang.String ACL_DCS_DESC
See Also:
Constant Field Values

ACL_SERVICE_

public static final java.lang.String ACL_SERVICE_
See Also:
Constant Field Values

SUBACL_SEPARATOR

public static final java.lang.String SUBACL_SEPARATOR
See Also:
Constant Field Values
Constructor Detail

AclEntry

public AclEntry(java.lang.String name,
                I18N.Text desc,
                AclEntry.AccessLevel[] values,
                AclEntry.AccessLevel dftLvl)
Constructor

Parameters:
name - The name associated with the AclEntry
desc - The description of the AclEntry
values - The valid access level values

AclEntry

public AclEntry(java.lang.String name,
                I18N.Text desc,
                AclEntry.AccessLevel maxLvl,
                AclEntry.AccessLevel dftLvl)
Constructor

Parameters:
name - The name associated with the AclEntry
desc - The description of the AclEntry
maxLvl - The maximum access level

AclEntry

public AclEntry(AclEntry aclEntry)
Copy Constructor

Parameters:
aclEntry - The other AclEntry instance to copy
Method Detail

getAccessLevel

public static AclEntry.AccessLevel getAccessLevel(int accessLevel)

getAccessLevel

public static AclEntry.AccessLevel getAccessLevel(java.lang.String accessLevel,
                                                  java.util.Locale locale)

parseAccessLevel

public static AclEntry.AccessLevel parseAccessLevel(java.lang.String accStr,
                                                    AclEntry.AccessLevel dft)

GetValueListForMaximumAccessLevel

public static AclEntry.AccessLevel[] GetValueListForMaximumAccessLevel(AclEntry.AccessLevel maxAcc)

okRead

public static boolean okRead(AclEntry.AccessLevel level)

okRead

public static boolean okRead(int level)

okWrite

public static boolean okWrite(AclEntry.AccessLevel level)

okWrite

public static boolean okWrite(int level)

okAll

public static boolean okAll(AclEntry.AccessLevel level)

okAll

public static boolean okAll(int level)

CreateAclName

public static java.lang.String CreateAclName(java.lang.String aclName,
                                             java.lang.String subAcl)

ParseAclName

public static java.lang.String[] ParseAclName(java.lang.String aclName)

getName

public java.lang.String getName()
Gets the name of this AclEntry

Returns:
The name of this AclEntry

getDescription

public java.lang.String getDescription(java.util.Locale loc)
Gets the description of this AclEntry

Returns:
The description of this AclEntry

setHidden

public void setHidden(boolean hidden)
Sets the 'hidden' state of this AclEntry

Parameters:
hidden - True to set this AclEntry hidden

isHidden

public boolean isHidden()
Returns the 'hidden' state of this AclEntry

Returns:
The 'hidden' state of this AclEntry

getAccessLevelValues

public AclEntry.AccessLevel[] getAccessLevelValues()
Gets the access level values for this AclEntry

Returns:
The access level values for this AclEntry (does not return null)

getMaximumAccessLevel

public AclEntry.AccessLevel getMaximumAccessLevel()
Gets the maximum access level for this AclEntry

Returns:
The maximum access level for this AclEntry (does not return null)

setDefaultAccessLevel

public void setDefaultAccessLevel(AclEntry.AccessLevel dft)
Sets the default access level for this AclEntry

Parameters:
dft - The default access level for this AclEntry

getDefaultAccessLevel

public AclEntry.AccessLevel getDefaultAccessLevel()
Gets the default access level for this AclEntry

Returns:
The default access level for this AclEntry (does not return null)

toString

public java.lang.String toString()
Returns a String representation of this AclEntry

Overrides:
toString in class java.lang.Object
Returns:
A String representation of this AclEntry

equals

public boolean equals(java.lang.Object other)
Returns true if the specified Object is equal to this AclEntry

Overrides:
equals in class java.lang.Object
Parameters:
other - The other Object to compare for equals
Returns:
True if the Objects are equivalent, false otherwise

clone

public java.lang.Object clone()
Returns a clone of this AclEntry

Overrides:
clone in class java.lang.Object
Returns:
A clone of this AclEntry