|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface ConstraintStrategy
Constraint manager classes need to implement this interface
for enforcing domain specific rules. If a constraint manager is
assigned via Actor.setConstraintStrategy method,
it will be invoked before each addRole, resign, suspend
and resume command to approve the operation.
If the manager does not approve the operation, the operation is
cancelled.
ConstraintStrategy
interface also implements the java.io.Serializable
interface in order to preserving the state of the
persistence manager of a role hierarchy after the hierarchy
is saved to secondary storage.
The following rules are hard-coded into JAWIRO so that the users do not need to worry about these:
The domain specific rules and the above precautions taken by JAWIRO prevent the role binding anomalies together.
| Method Summary | |
|---|---|
boolean |
approveAddRole(java.lang.String parentClassName,
java.lang.String childClassName)
Allows user to allow or disallow a role adding operation, e.g. the RoleInterface.addRole command. |
boolean |
approveResign(java.lang.String parentClassName,
java.lang.String childClassName)
Allows user to allow or disallow a role resigning operation, e.g. the Role.resign command. |
boolean |
approveResume(java.lang.String parentClassName,
java.lang.String childClassName)
Allows user to allow or disallow a role resuming operation, e.g. the Role.resume command. |
boolean |
approveSuspend(java.lang.String parentClassName,
java.lang.String childClassName)
Allows user to allow or disallow a role suspending operation, e.g. the Role.suspend command. |
void |
setActor(jawiro.Actor anActor)
Allows a user to provide a reference to the root of the role hierarchy which is to be managed. |
| Method Detail |
|---|
boolean approveAddRole(java.lang.String parentClassName,
java.lang.String childClassName)
RoleInterface.addRole command.
parentClassName - Type name of the object
which will play the role instance to be added.childClassName - Type name of the role instance
which is to be played by an owner.
true if the operation is allowed,
false if otherwise.
boolean approveResign(java.lang.String parentClassName,
java.lang.String childClassName)
Role.resign command.
parentClassName - Type name of the object which plays
the role to be resigned.childClassName - Type name of the role instance which
is to be resigned.
true if the operation is allowed,
false if otherwise.
boolean approveSuspend(java.lang.String parentClassName,
java.lang.String childClassName)
Role.suspend command.
parentClassName - Type name of the object which plays
the role to be suspended.childClassName - Type name of the role instance which
is to be suspended.
true if the operation is allowed,
false if otherwise.
boolean approveResume(java.lang.String parentClassName,
java.lang.String childClassName)
Role.resume command.
parentClassName - Type name of the object which was
playing the role to be resumed.childClassName - Type name of the role instance which
is to be resumed.
true if the operation is allowed,
false if otherwise.void setActor(jawiro.Actor anActor)
anActor - The root of the hierarchy be managed.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||