org.openpermis.policy.bean.basic
Class BasicAuthority

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.BasicAuthority
All Implemented Interfaces:
Serializable, Authority, AuthorityBean, IdentifiableBean, PartBean, Identifiable, Part, Subject

public class BasicAuthority
extends BasicPartBean
implements AuthorityBean

Basic implementation of an authority bean.

See Also:
Serialized Form
Since:
0.1.0

Field Summary
private static long serialVersionUID
           
 
Constructor Summary
protected BasicAuthority(SerialNumber serialNumber, URI identity)
          Creates an authority with the specified URI.
 
Method Summary
protected  boolean comparablePart(BasicPart entity)
          Check if the part specified is comparable to this part.
 Set<Role> getAssignedRoles(TimeStamp timeStamp, Set<Role> roles)
          Returns a subset of all roles held by this subject at the current time.
 Set<Subject> getIssuersOf(Role roleRef)
          Returns the subjects who issued the role to this.
protected  String getSimpleClassName()
          Returns the simple implementation class name of this class.
 TimePeriod getValidityOf(Role role, Subject issuer)
          Returns the TimePeriod of the specific role assignment consisting of issuer and role.
 
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, appendPartDetails, equalPart, equals, getIdentity, getName, hashCode, hasPartIdentity, hasPartName, isChildCollectionValid, isChildNotNull, isChildNullOrValid, isChildValid, isIdentityValid, isNameValid, isPartValid, isValid, partHashCode, 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.Part
equals, hashCode, isValid, toString
 
Methods inherited from interface org.openpermis.policy.Identifiable
getIdentity
 
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
 
Methods inherited from interface org.openpermis.policy.bean.IdentifiableBean
setIdentity
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Constant Field Value:
299722778399378194L
Since:
0.1.0
Constructor Detail

BasicAuthority

protected BasicAuthority(SerialNumber serialNumber,
                         URI identity)
Creates an authority with the specified URI.

Parameters:
serialNumber - the serial number of this part.
identity - the URI that identifies this authority.
Since:
0.1.0
Method Detail

getAssignedRoles

public Set<Role> getAssignedRoles(TimeStamp timeStamp,
                                  Set<Role> roles)
Description copied from interface: Subject
Returns a subset of all roles held by this subject at the current time.

Specified by:
getAssignedRoles in interface Subject
Parameters:
timeStamp - the current time, a TimeStamp.
roles - a set of Roles.
Returns:
a subset of roles containing only those roles that have been assigned to this subject.
Since:
0.1.0

getIssuersOf

public Set<Subject> getIssuersOf(Role roleRef)
Description copied from interface: Subject
Returns the subjects who issued the role to this.

Specified by:
getIssuersOf in interface Subject
Parameters:
roleRef - a Role. The subject assumes that it previously confirmed with Subject.getAssignedRoles(TimeStamp, Set) to have this role.
Returns:
the subjects who issued the role to this.
Since:
0.1.0

getValidityOf

public TimePeriod getValidityOf(Role role,
                                Subject issuer)
Description copied from interface: Subject
Returns the TimePeriod of the specific role assignment consisting of issuer and role.

Specified by:
getValidityOf in interface Subject
Parameters:
role - a Role that was assigned.
issuer - a Subject that assigned the role.
Returns:
the TimePeriod of the specific role assignment consisting of issuer and role.
Since:
0.3.0

comparablePart

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

Specified by:
comparablePart in class BasicPart
Parameters:
entity - the part to check.
See Also:
BasicPart
Returns:
true if the part supplied is comparable to this part.
Since:
0.1.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.1.0


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