public interface Policy
Modifier and Type | Method and Description |
---|---|
int |
getMaxRuns() |
Integer |
getMaxRuns(UsernamePrincipal user)
Get the limit on the number of runs for this user.
|
int |
getOperatingLimit() |
List<URI> |
listPermittedWorkflowURIs(UsernamePrincipal user)
Get the URIs of the workflows that the given user may execute.
|
boolean |
permitAccess(UsernamePrincipal user,
TavernaRun run)
Return whether the user has access to a particular workflow run.
|
void |
permitCreate(UsernamePrincipal user,
Workflow workflow)
Test whether the user can create an instance of the given workflow.
|
void |
permitDestroy(UsernamePrincipal user,
TavernaRun run)
Test whether the user can destroy a workflow instance run or manipulate
its expiry date.
|
void |
permitUpdate(UsernamePrincipal user,
TavernaRun run)
Test whether the user can modify a workflow run (other than for its
expiry date).
|
void |
setPermittedWorkflowURIs(UsernamePrincipal user,
List<URI> permitted)
Set the URIs of the workflows that the given user may execute.
|
int getMaxRuns()
Integer getMaxRuns(UsernamePrincipal user)
user
- Who to get the limit forvoid permitCreate(UsernamePrincipal user, Workflow workflow) throws NoCreateException
user
- Who wants to do the creation.workflow
- The workflow they wish to instantiate.NoCreateException
- If they may not instantiate it.void permitDestroy(UsernamePrincipal user, TavernaRun run) throws NoDestroyException
user
- Who wants to do the deletion.run
- What they want to delete.NoDestroyException
- If they may not destroy it.boolean permitAccess(UsernamePrincipal user, TavernaRun run)
user
- Who wants to read the workflow's state.run
- What do they want to read from.void permitUpdate(UsernamePrincipal user, TavernaRun run) throws NoUpdateException
user
- Who wants to do the modification.run
- What they want to modify.NoUpdateException
- If they may not modify it.List<URI> listPermittedWorkflowURIs(UsernamePrincipal user)
user
- Who are we finding out on behalf of.int getOperatingLimit()
void setPermittedWorkflowURIs(UsernamePrincipal user, List<URI> permitted)
user
- Who are we finding out on behalf of.permitted
- A list of workflow URIs that they may instantiate.Copyright © 2015–2018 The Apache Software Foundation. All rights reserved.