com.autonomy.aci.businessobjects
Class Privilege

java.lang.Object
  extended bycom.autonomy.aci.businessobjects.AciBusinessObject
      extended bycom.autonomy.aci.businessobjects.Privilege
All Implemented Interfaces:
java.io.Serializable

public class Privilege
extends AciBusinessObject

Represents a Privilege defined on IDOL.

See Also:
Serialized Form

Constructor Summary
Privilege()
          Create a privilege with no name and the SingleValue property set to false.
Privilege(java.lang.String sPrivilegeName)
          Create a privilege with the given name and the SingleValue property set to false.
Privilege(java.lang.String sPrivilegeName, boolean bSingleValued)
          Create a privilege with the given name and the SingleValue property set to whatever is specified.
 
Method Summary
 void addValue(java.lang.String sValue)
          Add a value to those set on this privilege.
 void clearValues()
          Remove all values set on this privilege.
 boolean equals(java.lang.Object o)
          Privileges are defined to be equal if their privilege names are the same (case insensitive).
 java.lang.String getPrivilegeName()
          Read the name of this privilege.
 java.util.ArrayList getValues()
          Read the values set on this privilege.
 boolean isSingleValued()
          Determine whether this privilege is single-valued or not.
 void removeValue(java.lang.String sValue)
          Remove a value from those set on this privilege.
 void setPrivilegeName(java.lang.String sPrivilegeName)
          Set the name of this privilege.
 void setSingleValued(boolean bSingleValued)
          Set whether this privilege is single-valued or not.
 void setValues(java.util.ArrayList alValues)
          Set all the values of this privilege.
 java.lang.String toString()
           
 
Methods inherited from class com.autonomy.aci.businessobjects.AciBusinessObject
getUID, setUID
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Privilege

public Privilege()
Create a privilege with no name and the SingleValue property set to false.


Privilege

public Privilege(java.lang.String sPrivilegeName)
Create a privilege with the given name and the SingleValue property set to false.

Parameters:
sPrivilegeName - the name of this privilege.

Privilege

public Privilege(java.lang.String sPrivilegeName,
                 boolean bSingleValued)
Create a privilege with the given name and the SingleValue property set to whatever is specified.

Parameters:
sPrivilegeName - the name of this privilege.
Method Detail

setPrivilegeName

public void setPrivilegeName(java.lang.String sPrivilegeName)
Set the name of this privilege.

Parameters:
sPrivilegeName - the name of the privilege.

setValues

public void setValues(java.util.ArrayList alValues)
Set all the values of this privilege.

Parameters:
alValues - a list of Strings giving the values for this privilege. If this privilege is set to be single-valued, only the first value in the list is used.

addValue

public void addValue(java.lang.String sValue)
Add a value to those set on this privilege. If this privilege is set to be single-valued and a value is already set, the current value will be overwritten by this one.

Parameters:
sValue - the value to add.

removeValue

public void removeValue(java.lang.String sValue)
Remove a value from those set on this privilege.

Parameters:
sValue - the value to remove.

clearValues

public void clearValues()
Remove all values set on this privilege.


getPrivilegeName

public java.lang.String getPrivilegeName()
Read the name of this privilege.


getValues

public java.util.ArrayList getValues()
Read the values set on this privilege.

Returns:
an ArrayList of Strings giving the values set on this privilege.

setSingleValued

public void setSingleValued(boolean bSingleValued)
Set whether this privilege is single-valued or not.

Parameters:
bSingleValued - whether this privilege is single-valued or not.

isSingleValued

public boolean isSingleValued()
Determine whether this privilege is single-valued or not.

Returns:
whether this privilege is single-valued or not.

equals

public boolean equals(java.lang.Object o)
Privileges are defined to be equal if their privilege names are the same (case insensitive).


toString

public java.lang.String toString()