|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.policy.bean.basic.BasicPart
org.openpermis.policy.bean.basic.BasicPartBean
org.openpermis.policy.bean.basic.BasicTarget
public class BasicTarget
A target combines a resource or a set of resources to be protected with a set of actions that are possible on these resources.
Constructor Summary | |
---|---|
protected |
BasicTarget(SerialNumber serialNumber,
DomainBean resourceDomain,
ActionBeanCollection actions)
Creates a new target. |
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. |
Action |
findAction(URI resourceUri,
String actionName,
List<?> arguments)
Returns the action which matches the given resource/action combination of this target, null if no such action exists. |
PartBean |
findBySerialNumber(SerialNumber partSerialNumber)
Returns the part bean corresponding to the specified serial number. The basic implementation returns this bean if its serial number matches the one passed in or null if not. |
ActionBeanCollection |
getActions()
Returns an ActionBeanCollection . |
DomainBean |
getResourceDomain()
Returns the resource domain of the resources protected by this target. |
protected String |
getSimpleClassName()
Returns the simple implementation class name of this class. |
boolean |
isPartValid(PartProblemReporter reporter)
Checks if the extended state of this part is valid. |
protected int |
partHashCode()
Returns the hash code of the extended part state. |
void |
removeChild(ActionBean part)
Deprecated. |
void |
setActions(ActionBeanCollection actions)
Sets the action collection of actions which can be performed on this target. |
void |
setResourceDomain(DomainBean resourceDomain)
Sets the resource domain of the resources protected by this target. |
Methods inherited from class org.openpermis.policy.bean.basic.BasicPartBean |
---|
addPropertyChangeListener, equalSerialNumber, 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, 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.Part |
---|
equals, hashCode, isValid, toString |
Methods inherited from interface org.openpermis.policy.bean.PartBean |
---|
addPropertyChangeListener, equalSerialNumber, getPartBeanType, getSerialNumber, removePropertyChangeListener, toShortString |
Methods inherited from interface org.openpermis.policy.Part |
---|
equals, hashCode, isValid, toString |
Constructor Detail |
---|
protected BasicTarget(SerialNumber serialNumber, DomainBean resourceDomain, ActionBeanCollection actions)
serialNumber
- the serial number of this part.resourceDomain
- the resource domain of the resources protected by this target.actions
- the action collection containing the actions which can be performed on the
target.Method Detail |
---|
public Action findAction(URI resourceUri, String actionName, List<?> arguments)
Target
null
if no such action exists.
findAction
in interface Target
resourceUri
- the URI
of the resource for which look in the resource domain.actionName
- the name of the action for which to look in this target.arguments
- an optional map of arguments to the action.
Action
if exists, null
otherwise.public DomainBean getResourceDomain()
TargetBean
getResourceDomain
in interface TargetBean
public void setResourceDomain(DomainBean resourceDomain)
TargetBean
setResourceDomain
in interface TargetBean
resourceDomain
- the resource domain of the resources protected by this target.public ActionBeanCollection getActions()
TargetBean
ActionBeanCollection
.
getActions
in interface TargetBean
ActionBeanCollection
.public void setActions(ActionBeanCollection actions)
TargetBean
setActions
in interface TargetBean
actions
- the action collection of actions which can be performed on this target.@Deprecated public void removeChild(ActionBean part)
removeChild
in interface TargetBean
public boolean isPartValid(PartProblemReporter reporter)
BasicPart
isPartValid
in class BasicPart
reporter
- the problem reporter to use, may be null
.BasicPart
,
Part.isValid(PartProblemReporter)
,
BasicPart.reportProblem(org.openpermis.policy.PartProblemReporter, org.openpermis.policy.PartProblemReporter.ProblemMessage, java.lang.Object...)
protected boolean comparablePart(BasicPart part)
BasicPart
comparablePart
in class BasicPart
part
- the part to check.BasicPart
true
if the part supplied is comparable to this part.protected boolean equalPart(BasicPart part)
BasicPart
equalPart
in class BasicPart
part
- the part to compare to this part.BasicUtilities.equalObjects(Object, Object)
,
BasicPart
true
if the part supplied is considered equivalent to this part.protected int partHashCode()
BasicPart
partHashCode
in class BasicPart
BasicPart
,
BasicUtilities.multiHashCode(int...)
protected String getSimpleClassName()
BasicPart
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)
.
getSimpleClassName
in class BasicPart
protected void appendPartDetails(StringBuilder sb)
BasicPart
appendPartDetails
in class BasicPart
sb
- the string builder to add the details to.BasicPart
,
BasicPart.appendDetails(StringBuilder, String, Object)
public PartBean findBySerialNumber(SerialNumber partSerialNumber)
BasicPartBean
If the part bean contains other part beans, it searches its child beans recursively.
The basic implementation returns this bean if its serial number matches
the one passed in or null
if not. Subclasses that contain other
parts must traverse their children.
findBySerialNumber
in interface PartBean
findBySerialNumber
in class BasicPartBean
partSerialNumber
- the SerialNumber
of the part bean to return.
PartBean
or null
if no
matching part bean is found.
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
PERMIS Role Based Access Control 0.3.0 (Build 14)
2009/05/08 09:06:10
Copyright (c) 2002-2007 Ergon Informatik AG