|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ace.moab.api.acl.ACLRule
public class ACLRule
This class represents a rule that can be in Moab's access control list (ACL) mechanism.
The basic ACLRule information is the object's name and type. The type
directly maps to a CredentialType
value. The default mechanism Moab
uses to check the ACL for a particular item is if the user or object coming
in has ANY of the values in the ACL, then the user or object is given access.
If no values match the user or object in question, the user or object is
rejected access.
More advanced features are included such as affinity and advanced ACL checking.
Affinity can be positive, neutral or negative. This is useful for attracting
(positive affinity) or repelling (negative affinity) access to something with
an ACL. This information is represented as an ACLAffinity
enum value.
Advanced ACL checking is dependent upon ACL modifiers that cause Moab to
check access based on more advanced features. These features include denying
service based on ACLRules' specifications, requiring ACLRules,
exclusively ORing ACLRules in an ACL, and others. This information is
represented as a Set
of ACLModifier
enum values.
Constructor Summary | |
---|---|
ACLRule(com.moab.api.scheduler.MoabObject object)
Creates a new ACLRule describing the MoabObject with a default comparison operator of ComparisonOperator.LEXIGRAPHIC_EQUAL . |
|
ACLRule(com.moab.api.scheduler.MoabObject object,
com.moab.api.util.ComparisonOperator operator)
Creates a new ACLRule describing the MoabObject being compared by the ComparisonOperator. |
Method Summary | |
---|---|
int |
compareTo(ACLRule o)
|
boolean |
equals(java.lang.Object o)
|
ACLAffinity |
getAffinity()
Returns the affinity of the ACL object. |
com.moab.api.util.ComparisonOperator |
getComparisonOperator()
Returns the type of comparison to make against the ACL object. |
java.util.Set<ACLModifier> |
getModifiers()
Returns the set of advanced modifiers for this particular ACLRule description. |
java.lang.String |
getName()
Returns the name of the object that this ACL object describes. |
com.moab.api.scheduler.MoabObject |
getObject()
Returns the object to compare against. |
com.moab.api.scheduler.MoabObjectType |
getType()
Returns the type of the object that this ACL object describes. |
double |
getValue()
Returns the numerical value that is used in conjunction with the comparison operator and MoabObject. |
boolean |
hasModifier(ACLModifier modifier)
Returns true if this ACLRule has the modifier the is passed as an argument. |
boolean |
matchesCredential(Credential cred)
Returns true if the access control rule represents the specified credential. |
void |
setAffinity(ACLAffinity affinity)
Sets the affinity of the ACL object. |
void |
setComparisonOperator(com.moab.api.util.ComparisonOperator comparisonOperator)
Sets the type of comparison to make against the ACL object. |
void |
setModifiers(java.util.Set<ACLModifier> modifiers)
Sets the set of advanced modifiers for this particular ACLRule description. |
void |
setObject(com.moab.api.scheduler.MoabObject object)
Sets the object to compare against. |
void |
setValue(double value)
Sets the numerical value that is used in conjunction with the comparison operator and MoabObject. |
java.lang.String |
toCondensedString()
Creates a human readable representation of this ACL object for use in GUI components. |
java.lang.String |
toMoabVPCCommandString()
Builds a string representation of the VPC ACL object for use in Moab commands. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ACLRule(com.moab.api.scheduler.MoabObject object) throws InvalidMoabArgumentException
ComparisonOperator.LEXIGRAPHIC_EQUAL
.
object
- the object to compare against.
InvalidMoabArgumentException
- thrown if the object is null.public ACLRule(com.moab.api.scheduler.MoabObject object, com.moab.api.util.ComparisonOperator operator) throws InvalidMoabArgumentException
object
- the object to compare against.operator
- the type of comparison to make against the object.
InvalidMoabArgumentException
- thrown if either parameter is null.Method Detail |
---|
public int compareTo(ACLRule o)
compareTo
in interface java.lang.Comparable<ACLRule>
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public ACLAffinity getAffinity()
public com.moab.api.util.ComparisonOperator getComparisonOperator()
public java.util.Set<ACLModifier> getModifiers()
public java.lang.String getName()
public com.moab.api.scheduler.MoabObject getObject()
public com.moab.api.scheduler.MoabObjectType getType()
public double getValue()
Returns the numerical value that is used in conjunction with the comparison operator and MoabObject.
The comparison operator should not be a lexigraphic comparison.
public boolean hasModifier(ACLModifier modifier)
modifier
-
public boolean matchesCredential(Credential cred)
cred
- the credential in question.
public void setAffinity(ACLAffinity affinity)
affinity
- the affinity of the ACL object.public void setComparisonOperator(com.moab.api.util.ComparisonOperator comparisonOperator) throws InvalidMoabArgumentException
comparisonOperator
- the type of comparison to make against the ACL object.
InvalidMoabArgumentException
- thrown if the comparison operator is null.public void setModifiers(java.util.Set<ACLModifier> modifiers)
Sets the set of advanced modifiers for this particular ACLRule description.
The set can be null.
modifiers
- the set of advanced modifiers for this particular ACLRule
description.public void setObject(com.moab.api.scheduler.MoabObject object) throws InvalidMoabArgumentException
object
- the object to compare against.
InvalidMoabArgumentException
- thrown if the object is null.public void setValue(double value)
value
- the numerical value that is used in conjunction with the
comparison operator and MoabObject.public java.lang.String toCondensedString()
public java.lang.String toMoabVPCCommandString()
Builds a string representation of the VPC ACL object for use in Moab commands.
Returns the ACL object in a simple format of <object_type>:<object_id>
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |