|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.ponder2.policy.Policy
net.ponder2.policy.AuthorisationPolicy
public class AuthorisationPolicy
This is an Authorisation Policy. See http://ponder2.net/cgi-bin/moin.cgi/BasicScenario for more information on using authorisation policies.
Field Summary |
---|
Fields inherited from class net.ponder2.policy.Policy |
---|
defaultDomain |
Constructor Summary | |
---|---|
AuthorisationPolicy(P2Object subject,
java.lang.String action,
P2Object target,
java.lang.String focus)
Creates a new authorisation policy between subject and target managed objects. |
Method Summary | |
---|---|
protected void |
attach(P2Object aManagedObject)
attaches this policy to aManagedObject. |
protected boolean |
checkCondition(P2Object subject,
P2Object target,
java.lang.String conditionType,
P2Object... argAttribute)
|
boolean |
checkRequestCondition(P2Object subject,
P2Object target,
P2Object... argAttribute)
|
boolean |
checkReturnCondition(P2Object subject,
P2Object target,
P2Object... argAttribute)
|
protected P2Object |
operation_in_condition(P2Block aBlock)
sets the condition of the policy for the request part of an action. |
protected P2Object |
operation_out_condition(P2Block aBlock)
sets the condition of the policy for the reply part of an action. |
protected void |
operation_set_final()
Sets the policy as a final one. |
protected void |
operation_set_inneg()
sets the policy as a negative authorisation for the request |
protected void |
operation_set_outneg()
sets the policy as a negative authorisation for the reply |
java.lang.String |
toString()
|
Methods inherited from class net.ponder2.policy.Policy |
---|
getDefaultDomain, isActive, isAttached, operation_active, setActive, setAttached |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AuthorisationPolicy(P2Object subject, java.lang.String action, P2Object target, java.lang.String focus)
subject
- the subject domain or managed objectaction
- the PonderTalk action to be regulatedtarget
- the target domain or managed objectfocus
- the focus 't' or 's' for target or subject authorisationMethod Detail |
---|
protected void attach(P2Object aManagedObject)
Policy
attach
in class Policy
aManagedObject
- the managed object that the policy should be attached toprotected void operation_set_final()
protected void operation_set_inneg()
protected void operation_set_outneg()
protected P2Object operation_in_condition(P2Block aBlock)
"at:put:"the condition block might be
[ :at :put | at == "accounts" ]the argument names do not matter, you could also have
[ :name | name == "accounts" ]You can also use the global variables p_subject and p_target in the block's PonderTalk, they refer to the source and target objects associated with the action in question.
aBlock
- the condition for this policy
protected P2Object operation_out_condition(P2Block aBlock)
"at:"the reply condition block might be
[ :name | name == "accounts" ]You can also use the global variables p_subject and p_target in the block's PonderTalk, they refer to the source and target objects associated with the action in question.
aBlock
- the condition for this policy
public java.lang.String toString()
toString
in class java.lang.Object
public boolean checkRequestCondition(P2Object subject, P2Object target, P2Object... argAttribute)
public boolean checkReturnCondition(P2Object subject, P2Object target, P2Object... argAttribute)
protected boolean checkCondition(P2Object subject, P2Object target, java.lang.String conditionType, P2Object... argAttribute) throws Ponder2Exception
Ponder2Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |