|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.soton.itinnovation.grid.pbac2.pdp.staticpolicy.ITInnovationServicePolicyImpl
public class ITInnovationServicePolicyImpl
IT Innovation version of the static service policy inside the PDP. This determines the behaviour of the service: allowable states, transitions, process roles, operations, etc.
| Constructor Summary | |
|---|---|
ITInnovationServicePolicyImpl(String resourceTypeID,
String modelData)
Constructor that creates this policy implementation for a particular resourceType. |
|
| Method Summary | |
|---|---|
void |
checkAuthorised(Set<String> myProcessRoles,
String action,
String stateName)
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 stateName)
Get the signals available in the given state. |
String |
getNextState(String oldStateName,
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ITInnovationServicePolicyImpl(String resourceTypeID,
String modelData)
throws SAXException,
InvalidResourceTypeException
resourceTypeID - the ID of the resourceType we want a policy for.modelData - a Stream representing the xml state model
SAXExcoption - if the xml state model is badly formed.
InvalidResourceTypeException - if the modelData is in error.
SAXException| Method Detail |
|---|
public void undeployPolicy()
ServicePolicy
undeployPolicy in interface ServicePolicy
public String getNextState(String oldStateName,
String event)
throws EventCurrentlyUnavailableException,
InvalidStateException,
InvalidEventException
ServicePolicy
getNextState in interface ServicePolicyoldStateName - 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
public Set<String> getAvailableSignals(String stateName)
throws InvalidStateException
ServicePolicy
getAvailableSignals in interface ServicePolicyInvalidStateException
public void checkAuthorised(Set<String> myProcessRoles,
String action,
String stateName)
throws InvalidActionException,
InvalidStateException,
NotAuthorisedException,
ActionCurrentlyUnavailableException
ServicePolicy
checkAuthorised in interface ServicePolicymyProcessRoles - the roles to which the user belongsaction - the requested SOAP operationstateName - 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
public void checkRoleValid(String processRole)
throws InvalidProcessRoleException
ServicePolicy
checkRoleValid in interface ServicePolicyInvalidProcessRoleException - the role isn't valid for this modelpublic String[] getValidProcessRoles()
ServicePolicy
getValidProcessRoles in interface ServicePolicy
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||