Interface ProcessEnablerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes process enablers. The data for create
and update is provided via the ProcessEnablerForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasProcessEnabler(Id processEnablerId, Id aliasId) Adds anIdto aProcessEnablerfor the purpose of creating compatibility.booleanTests if this user can create process enablers.booleancanCreateProcessEnablerWithRecordTypes(Type[] processEnablerRecordTypes) Tests if this user can create a singleProcessEnablerusing the desired record types.booleanTests if this user can delete process enablers.booleanTests if this user can manageIdaliases for process enablers.booleanTests if this user can update process enablers.createProcessEnabler(ProcessEnablerForm processEnablerForm) Creates a newProcessEnabler.voiddeleteProcessEnabler(Id processEnablerId) Deletes aProcessEnabler.Gets theOfficeassociated with this session.Gets theOfficeIdassociated with this session.getProcessEnablerFormForCreate(Type[] processEnablerRecordTypes) Gets the process enabler form for creating new process enablers.getProcessEnablerFormForUpdate(Id processEnablerId) Gets the process enabler form for updating an existing process enabler.voidupdateProcessEnabler(ProcessEnablerForm processEnablerForm) Updates an existing process enabler.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.
-
canCreateProcessEnabler
boolean canCreateProcessEnabler()Tests if this user can create process enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aProcessEnablerwill 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:
falseifProcessEnablercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateProcessEnablerWithRecordTypes
Tests if this user can create a singleProcessEnablerusing the desired record types. WhileWorkflowRulesManager.getProcessEnablerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificProcessEnabler. Providing an empty array tests if aProcessEnablercan be created with no records.- Parameters:
processEnablerRecordTypes- array of process enabler record types- Returns:
trueifProcessEnablercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-processEnablerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getProcessEnablerFormForCreate
ProcessEnablerForm getProcessEnablerFormForCreate(Type[] processEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the process enabler form for creating new process enablers. A new form should be requested for each create transaction.- Parameters:
processEnablerRecordTypes- array of process enabler record types- Returns:
- the process enabler form
- Throws:
NullArgumentException-processEnablerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createProcessEnabler
ProcessEnabler createProcessEnabler(ProcessEnablerForm processEnablerForm) throws OperationFailedException, PermissionDeniedException Creates a newProcessEnabler.- Parameters:
processEnablerForm- the form for thisProcessEnabler- Returns:
- the new
ProcessEnabler - Throws:
IllegalStateException-processEnablerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-processEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-processEnablerFormdid not originate fromgetProcessEnablerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateProcessEnablers
boolean canUpdateProcessEnablers()Tests if this user can update process enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aProcessEnablerwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.- Returns:
falseifProcessEnablermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getProcessEnablerFormForUpdate
ProcessEnablerForm getProcessEnablerFormForUpdate(Id processEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the process enabler form for updating an existing process enabler. A new process enabler form should be requested for each update transaction.- Parameters:
processEnablerId- theIdof theProcessEnabler- Returns:
- the process enabler form
- Throws:
NotFoundException-processEnablerIdis not foundNullArgumentException-processEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateProcessEnabler
void updateProcessEnabler(ProcessEnablerForm processEnablerForm) throws OperationFailedException, PermissionDeniedException Updates an existing process enabler.- Parameters:
processEnablerForm- the form containing the elements to be updated- Throws:
IllegalStateException-processEnablerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-processEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-processEnablerFormdid not originate fromgetProcessEnablerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteProcessEnablers
boolean canDeleteProcessEnablers()Tests if this user can delete process enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aProcessEnablerwill 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:
falseifProcessEnablerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteProcessEnabler
void deleteProcessEnabler(Id processEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aProcessEnabler.- Parameters:
processEnablerId- theIdof theProcessEnablerto remove- Throws:
NotFoundException-processEnablerIdnot foundNullArgumentException-processEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageProcessEnablerAliases
boolean canManageProcessEnablerAliases()Tests if this user can manageIdaliases for process enablers. A 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:
falseifProcessEnableraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasProcessEnabler
void aliasProcessEnabler(Id processEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aProcessEnablerfor the purpose of creating compatibility. The primaryIdof theProcessEnableris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another process enabler. it is reassigned to the given process enablerId.- Parameters:
processEnablerId- theIdof aProcessEnableraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-processEnablerIdnot foundNullArgumentException-processEnablerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-