Interface WorkflowEventAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates, updates, and deletes WorkflowEvents . The
data for create and update is provided by the consumer via the form
object. OsidForms are requested for each create or update and may
not be reused.
Create and update operations differ in their usage. To create a
WorkflowEvent , a WorkflowEventForm is requested using
getWorkflowEventFormForCreate() specifying the desired record
Types or none if no record Types are needed. The returned
WorkflowEventForm will indicate that it is to be used with a create
operation and can be used to examine metdata or validate data prior to
creation. Once the WorkflowEventForm is submiited to a create
operation, it cannot be reused with another create operation unless the
first operation was unsuccessful. Each WorkflowEventForm
corresponds to an attempted transaction.
For updates, WorkflowEventForms are requested to the
WorkflowEvent Id that is to be updated using
getWorkflowEventFormForUpdate() . Similarly, the
WorkflowEventForm has metadata about the data that can be updated and it
can perform validation before submitting the update. The
WorkflowEventForm can only be used once for a successful update and
cannot be reused.
The delete operations delete WorkflowEvents . To unmap a
WorkflowEvent from the current Office , the
WorkflowEventOfficeAssignmentSession should be used. These delete
operations attempt to remove the WorkflowEvent itself thus
removing it from all known Office catalogs.
This session includes an Id aliasing mechanism to assign an
external Id to an internally assigned Id .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasWorkflowEvent(Id workflowEventId, Id aliasId) Adds anIdto aWorkflowEventfor the purpose of creating compatibility.booleanTests if this user can createWorkflowEvents.booleancanCreateWorkflowEventWithRecordTypes(Type[] workflowEventRecordTypes) Tests if this user can create a singleWorkflowEventusing the desired record types.booleanTests if this user can deleteWorkflowEvents.booleanTests if this user can manageIdaliases forWorkflowEventsA return of true does not guarantee successful authorization.booleanTests if this user can update WorkflowEvents.createWorkflowEvent(WorkflowEventForm workflowEventForm) Creates a newWorkflowEvent.voiddeleteWorkflowEvent(Id workflowEventId) Deletes aWorkflowEvent.Gets theOfficeassociated with this session.Gets theOfficeIdassociated with this session.getWorkflowEventFormForCreate(Type[] workflowEventRecordTypes) Gets the workflow event form for creating new workflow events.getWorkflowEventFormForUpdate(Id workflowEventId) Gets the workflow event form for updating an existing workflow event.voidupdateWorkflowEvent(WorkflowEventForm workflowEventForm) Updates an existing workflow event.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getOfficeId
Id getOfficeId()Gets theOfficeIdassociated with this session.- Returns:
- the
Office Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getOffice
Gets theOfficeassociated with this session.- Returns:
- the office
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateWorkflowEvents
boolean canCreateWorkflowEvents()Tests if this user can createWorkflowEvents. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aWorkflowEventwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.- Returns:
falseifWorkflowEventcreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateWorkflowEventWithRecordTypes
Tests if this user can create a singleWorkflowEventusing the desired record types. WhileWorkflowEventManager.getWorkflowEventRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificWorkflowEvent. Providing an empty array tests if aWorkflowEvent can be created with no records.- Parameters:
workflowEventRecordTypes- array of workflow event record types- Returns:
trueifWorkflowEventcreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-workflowEventRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getWorkflowEventFormForCreate
WorkflowEventForm getWorkflowEventFormForCreate(Type[] workflowEventRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the workflow event form for creating new workflow events. A new form should be requested for each create transaction.- Parameters:
workflowEventRecordTypes- array of workflow event record types- Returns:
- the workflow event form
- Throws:
NullArgumentException-workflowEventRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createWorkflowEvent
WorkflowEvent createWorkflowEvent(WorkflowEventForm workflowEventForm) throws OperationFailedException, PermissionDeniedException Creates a newWorkflowEvent.- Parameters:
workflowEventForm- the form for thisWorkflowEvent- Returns:
- the new
WorkflowEvent - Throws:
IllegalStateException-workflowEventFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-workflowEventFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-workflowEventFormdid not originate fromgetWorkflowEventFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateWorkflowEvents
boolean canUpdateWorkflowEvents()Tests if this user can update WorkflowEvents. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a WorkflowEvent will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.- Returns:
falseifWorkflowEventmodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getWorkflowEventFormForUpdate
WorkflowEventForm getWorkflowEventFormForUpdate(Id workflowEventId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the workflow event form for updating an existing workflow event. A new workflow event form should be requested for each update transaction.- Parameters:
workflowEventId- theIdof theWorkflowEvent- Returns:
- the workflow event form
- Throws:
NotFoundException-workflowEventIdis not foundNullArgumentException-workflowEventIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateWorkflowEvent
void updateWorkflowEvent(WorkflowEventForm workflowEventForm) throws OperationFailedException, PermissionDeniedException Updates an existing workflow event.- Parameters:
workflowEventForm- the form containing the elements to be updated- Throws:
IllegalStateException-workflowEventFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-workflowEventFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-workflowEventFormdid not originate fromgetWorkflowEventFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteWorkflowEvents
boolean canDeleteWorkflowEvents()Tests if this user can deleteWorkflowEvents. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aWorkflowEventwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.- Returns:
falseifWorkflowEventdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteWorkflowEvent
void deleteWorkflowEvent(Id workflowEventId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aWorkflowEvent.- Parameters:
workflowEventId- theIdof theWorkflowEventto remove- Throws:
NotFoundException-workflowEventIdnot foundNullArgumentException-workflowEventIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageWorkflowEventAliases
boolean canManageWorkflowEventAliases()Tests if this user can manageIdaliases forWorkflowEventsA return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in aPERMISSION_DENIED.This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.- Returns:
falseifWorkflowEventaliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasWorkflowEvent
void aliasWorkflowEvent(Id workflowEventId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aWorkflowEventfor the purpose of creating compatibility. The primaryIdof theWorkflowEventis determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another workflow event, it is reassigned to the given workflow event Id.- Parameters:
workflowEventId- theIdof aWorkflowEventaliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-workflowEventIdnot foundNullArgumentException-workflowEventIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-