|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Assertion is an interface which all constructs of policy must implement. It defines three policy operations that all policy constructs must support. Sanka Samaranayake (sanka@apache.org)
| Field Summary | |
static short |
COMPOSITE_AND_TYPE
Defines the short value for ANDCompositeAssertion |
static short |
COMPOSITE_POLICY_TYPE
Defines the short value for Policy Assertion |
static short |
COMPOSITE_XOR_TYPE
Defines the short value for XORCompositeAssertion |
static short |
POLIY_REFERCE_TYPE
Defines the short value for PolicyReferece Assertion |
static short |
PRIMITIVE_TYPE
Defines the short value for Primitive Assertions |
| Method Summary | |
void |
addTerm(Assertion assertion)
Adds an assertion as a term of this assertion. |
void |
addTerms(java.util.List assertions)
Adds a list of assertions as terms of this assertion. |
int |
getLineNo()
Returns the line no of the assertion which is line no of the assertion in the file where the assertion is first read. |
Assertion |
getParent()
Returns the parent of self or null if a parent non-exists |
java.lang.String |
getSource()
Returns a string which describes the source of the assertion. |
java.util.List |
getTerms()
Returns the list of terms of this assertion. |
short |
getType()
Returns a short type which describes the type of the assertion. |
boolean |
hasParent()
Returns ture if the assertion has a parent |
Assertion |
intersect(Assertion assertion)
Returns an assertion which is the equivalent of intersect of self and argument. |
Assertion |
intersect(Assertion assertion,
PolicyRegistry reg)
Returns an assertion which is equivalent of intersect of self and argument. |
boolean |
isEmpty()
Returns true if there are no terms in this assertion. |
boolean |
isNormalized()
Returns true if the assertion is in normalized form. |
Assertion |
merge(Assertion assertion)
Returns the equivalent of merge of self and argument. |
Assertion |
merge(Assertion assertion,
PolicyRegistry reg)
Returns the equivalent of merge of self and argument. |
Assertion |
normalize()
Returns a new assertion which is the normalized form of this assertion. |
Assertion |
normalize(PolicyRegistry reg)
Returns a new assertion which is the normalized form of this assertion. |
boolean |
remove(Assertion assertion)
Removes the specified assertion from the terms list. |
void |
setLineNo(int lineNo)
Sets the line no of the assertion which should be the line no of the assertion in the file where the assertion is first read. |
void |
setNormalized(boolean flag)
Marks this assertion as in normalized form. |
void |
setParent(Assertion parent)
Sets the parent to argument |
void |
setSource(java.lang.String source)
Sets specified string as the source of the assertion. |
int |
size()
Returns the number of terms of this assertion. |
| Field Detail |
public static final short PRIMITIVE_TYPE
public static final short COMPOSITE_AND_TYPE
public static final short COMPOSITE_XOR_TYPE
public static final short COMPOSITE_POLICY_TYPE
public static final short POLIY_REFERCE_TYPE
| Method Detail |
public Assertion normalize()
throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
public Assertion normalize(PolicyRegistry reg)
throws java.lang.UnsupportedOperationException
reg - the registry which is used to resolve any policy references in
the process of normalization.
java.lang.UnsupportedOperationException - if an assertion does not support this operation.
public Assertion intersect(Assertion assertion)
throws java.lang.UnsupportedOperationException
assertion - the assertion to intersect with
java.lang.UnsupportedOperationException
public Assertion intersect(Assertion assertion,
PolicyRegistry reg)
throws java.lang.UnsupportedOperationException
assertion - the assertion to intersect with
java.lang.UnsupportedOperationException - if the operation is not meaningful
public Assertion merge(Assertion assertion)
throws java.lang.UnsupportedOperationException
assertion - the argument to merge with
java.lang.UnsupportedOperationException
public Assertion merge(Assertion assertion,
PolicyRegistry reg)
throws java.lang.UnsupportedOperationException
assertion - the assertion to merge withreg - the policy registry that should be used to resolve external
policy references
java.lang.UnsupportedOperationException - if the merge is not meaningfulpublic boolean isNormalized()
public void setNormalized(boolean flag)
flag - public boolean hasParent()
public Assertion getParent()
public void setParent(Assertion parent)
parent - the parent that should be parent of selfpublic void addTerm(Assertion assertion)
assertion - the assertion to add as a termpublic void addTerms(java.util.List assertions)
assertions - the list of assertions to add as termspublic java.util.List getTerms()
public boolean isEmpty()
public boolean remove(Assertion assertion)
assertion - the assertion to remove from the terms list.
public int size()
public short getType()
public java.lang.String getSource()
public void setSource(java.lang.String source)
source - the string which describe the source of the origin of the
assertionpublic int getLineNo()
public void setLineNo(int lineNo)
lineNo -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||