|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ServicePolicy
A ServicePolicy is given the list of process roles which a user has, the action they want to perform, and the current state of the resource on which they wish it to act. It decides whether the action should be allowed. It also enforces the state model, as a check for programming errors in the services that use it. There is one ServicePolicy for each type of resource.
| Method Summary | |
|---|---|
void |
checkAuthorised(Set<String> processRoles,
String action,
String state)
Decides whether a user with the given roles may perform the requested operation for a resource in the given state. |
void |
checkRoleValid(String processRole)
Checks if the process role specified is valid for this resource type. |
Set<String> |
getAvailableSignals(String state)
Get the signals available in the given state. |
String |
getNextState(String oldState,
String event)
Gets the next state given the current state and the event. |
String[] |
getValidProcessRoles()
List the valid process roles for this model. |
void |
undeployPolicy()
Removes a policy from the persistent store. |
| Method Detail |
|---|
String getNextState(String oldState,
String event)
throws EventCurrentlyUnavailableException,
InvalidStateException,
InvalidEventException
oldState - the current stateevent - the event name
EventCurrentlyUnavailableException - if the event is valid but
not allowed in this state
InvalidStateException - if the oldState is not in the model
InvalidEventException - if the event is not in the model
void checkAuthorised(Set<String> processRoles,
String action,
String state)
throws InvalidActionException,
InvalidStateException,
NotAuthorisedException,
ActionCurrentlyUnavailableException
processRoles - the roles to which the user belongsaction - the requested SOAP operationstate - the current process state of the resource
InvalidActionException - the action isn't valid for this model
InvalidStateException - the state isn't valid for this model
NotAuthorisedException - if the operation is not possible in any state given the set of process roles
ActionCurrentlyUnavailableException - if the operation is valid for at
least one of roles sepcified, but not in the current state
void checkRoleValid(String processRole)
throws InvalidProcessRoleException
processRole -
InvalidProcessRoleException - the role isn't valid for this modelvoid undeployPolicy()
String[] getValidProcessRoles()
Set<String> getAvailableSignals(String state)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||