|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.n52.security.decision.Obligation
public class Obligation
This class represents an obligation. An obligation could be set in an PDPResponse by an PDPProxy. Each obligation HAS to be fulfilled.
Field Summary | |
---|---|
static int |
FULLFILL_ON_DENY
Field FULLFILL_ON_DENY represents the 'deny' state of an obligation. |
static int |
FULLFILL_ON_PERMIT
Field FULLFILL_ON_PERMIT represents the 'permit' state of an obligation. |
protected Attributes |
m_attributes
Field attributes carries a collection of attributes with type Attribute . |
protected int |
m_fullFillOn
Field fullFillOn olds the fullfill on state. |
protected java.lang.String |
m_id
Field id carries the id of this obligation. |
Constructor Summary | |
---|---|
Obligation(int fullFillOn,
java.lang.String id,
java.util.Collection attributes)
Creates an obligation. |
Method Summary | |
---|---|
protected void |
checkFullFillOn(int fullFillOn)
Checks the fullfill on parameter in the constructor. |
boolean |
containsAttribute(java.lang.String key)
Returns true if an attribute with the given key is present. |
boolean |
equals(java.lang.Object o)
Method equals checks for value equality of two obligation objects. |
Attribute |
getAttribute(java.lang.String key)
Gets an Attribute for a given key. |
java.util.Collection |
getAttributes()
Gets the attributes. |
int |
getFullFillOn()
|
java.lang.String |
getId()
|
int |
hashCode()
Method hashCode generates a hashcode for this obligation. |
boolean |
isFullFillOnDeny()
Method gets the fullFillOnDeny. |
boolean |
isFullFillOnPermit()
Method gets the fullFillOnPermit. |
java.lang.String |
toString()
Method toString generates a simple object info string, used only for logging purpose. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int FULLFILL_ON_PERMIT
public static final int FULLFILL_ON_DENY
protected int m_fullFillOn
FULLFILL_ON_PERMIT
or FULLFILL_ON_DENY
protected java.lang.String m_id
protected Attributes m_attributes
Attribute
.
Constructor Detail |
---|
public Obligation(int fullFillOn, java.lang.String id, java.util.Collection attributes) throws java.lang.NullPointerException, java.lang.IllegalArgumentException
Attribute
.
fullFillOn
- the decision on which the obligation has to be fulfilled.id
- the id of the obligation.attributes
- a collection of attributes.
java.lang.IllegalArgumentException
- if fullFillOn is out of range,
or the attributes are not subclasses of Attribute
java.lang.NullPointerException
- if id or attributes is null.Method Detail |
---|
protected void checkFullFillOn(int fullFillOn) throws java.lang.IllegalArgumentException
fullFillOn
- the full fill on parameter
java.lang.IllegalArgumentException
- if fullFillOn is out of range.Obligation(int,String,java.util.Collection)
public int getFullFillOn()
FULLFILL_ON_DENY
,
FULLFILL_ON_PERMIT
public java.lang.String getId()
public boolean isFullFillOnPermit()
public boolean isFullFillOnDeny()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- of type Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Collection getAttributes()
public boolean containsAttribute(java.lang.String key)
key
- a key, asserted to be not null.
public Attribute getAttribute(java.lang.String key)
key
- the key of the attribute.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |