org.openpermis.policy.bean.basic
Class BasicObligation

java.lang.Object
  extended by org.openpermis.policy.bean.basic.BasicPart
      extended by org.openpermis.policy.bean.basic.BasicPartBean
          extended by org.openpermis.policy.bean.basic.BasicObligation
All Implemented Interfaces:
Serializable, ObligationBean, PartBean, Obligation, Part

public class BasicObligation
extends BasicPartBean
implements ObligationBean

A basic implementation of ObligationBean.

See Also:
Serialized Form
Since:
0.3.0

Constructor Summary
protected BasicObligation(SerialNumber serialNumber, String text)
          Creates a new obligation containing text, that is returned for a granted decision.
 
Method Summary
protected  void appendPartDetails(StringBuilder sb)
          Appends the details of this extended part for the string representation of this part.
protected  boolean comparablePart(BasicPart part)
          Check if the part specified is comparable to this part.
protected  boolean equalPart(BasicPart part)
          Compares another part to this part.
protected  String getSimpleClassName()
          Returns the simple implementation class name of this class.
 String getText()
          Returns the text of this obligation.
protected  int partHashCode()
          Returns the hash code of the extended part state.
 void setText(String text)
          Sets the text of this obligation.
 
Methods inherited from class org.openpermis.policy.bean.basic.BasicPartBean
addPropertyChangeListener, equalSerialNumber, findBySerialNumber, firePropertyChange, getPartBeanType, getSerialNumber, getSerialNumberString, notifyIdentityChange, notifyNameChange, removePropertyChangeListener, toShortString
 
Methods inherited from class org.openpermis.policy.bean.basic.BasicPart
appendDetails, equals, getIdentity, getName, hashCode, hasPartIdentity, hasPartName, isChildCollectionValid, isChildNotNull, isChildNullOrValid, isChildValid, isIdentityValid, isNameValid, isPartValid, isValid, reportProblem, setIdentity, setName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.openpermis.policy.bean.PartBean
addPropertyChangeListener, equalSerialNumber, findBySerialNumber, getPartBeanType, getSerialNumber, removePropertyChangeListener, toShortString
 
Methods inherited from interface org.openpermis.policy.Part
equals, hashCode, isValid, toString
 

Constructor Detail

BasicObligation

protected BasicObligation(SerialNumber serialNumber,
                          String text)
Creates a new obligation containing text, that is returned for a granted decision.

Parameters:
serialNumber - the serial number of this part.
text - a String.
Since:
0.3.0
Method Detail

getText

public String getText()
Description copied from interface: ObligationBean
Returns the text of this obligation.

Specified by:
getText in interface ObligationBean
Specified by:
getText in interface Obligation
Returns:
the text of this obligation.
Since:
0.3.0

setText

public void setText(String text)
Description copied from interface: ObligationBean
Sets the text of this obligation.

Specified by:
setText in interface ObligationBean
Parameters:
text - a String.
Since:
0.3.0

comparablePart

protected boolean comparablePart(BasicPart part)
Description copied from class: BasicPart
Check if the part specified is comparable to this part.

Specified by:
comparablePart in class BasicPart
Parameters:
part - the part to check.
See Also:
BasicPart
Returns:
true if the part supplied is comparable to this part.
Since:
0.3.0

equalPart

protected boolean equalPart(BasicPart part)
Description copied from class: BasicPart
Compares another part to this part.

Overrides:
equalPart in class BasicPart
Parameters:
part - the part to compare to this part.
See Also:
BasicUtilities.equalObjects(Object, Object), BasicPart
Returns:
true if the part supplied is considered equivalent to this part.
Since:
0.3.0

partHashCode

protected int partHashCode()
Description copied from class: BasicPart
Returns the hash code of the extended part state.

Overrides:
partHashCode in class BasicPart
See Also:
BasicPart, BasicUtilities.multiHashCode(int...)
Returns:
the hash code of the extended part state.
Since:
0.3.0

getSimpleClassName

protected String getSimpleClassName()
Description copied from class: BasicPart
Returns the simple implementation class name of this class.

If your implementation represents an interface implementation return the interface simple class name here. In short: return the instance you are checking against in BasicPart.comparablePart(BasicPart).

Overrides:
getSimpleClassName in class BasicPart
Returns:
the simple implementation class name of this class.
Since:
0.3.0

appendPartDetails

protected void appendPartDetails(StringBuilder sb)
Description copied from class: BasicPart
Appends the details of this extended part for the string representation of this part.

Overrides:
appendPartDetails in class BasicPart
Parameters:
sb - the string builder to add the details to.
See Also:
BasicPart, BasicPart.appendDetails(StringBuilder, String, Object)
Since:
0.3.0


PERMIS Role Based Access Control 0.3.0 (Build 14)
2009/05/08 09:06:10
Copyright (c) 2002-2007 Ergon Informatik AG