Interface ProcessProcessorAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates, updates, and deletes ProcessProcessors .
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
ProcessProcessor , a ProcessProcessorForm is requested using
getProcessProcessorFormForCreate() specifying the desired record
Types or none if no record Types are needed. The returned
ProcessProcessorForm 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 ProcessProcessorForm is submiited to a
create operation, it cannot be reused with another create operation unless
the first operation was unsuccessful. Each ProcessProcessorForm
corresponds to an attempted transaction.
For updates, ProcessProcessorForms are requested to the
ProcessProcessor Id that is to be updated using
getProcessProcessorFormForUpdate() . Similarly, the
ProcessProcessorForm has metadata about the data that can be updated and
it can perform validation before submitting the update. The
ProcessProcessorForm can only be used once for a successful update and
cannot be reused.
The delete operations delete ProcessProcessors . To unmap a
ProcessProcessor from the current Office , the
ProcessProcessorOfficeAssignmentSession should be used. These delete
operations attempt to remove the ProcessProcessor 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 TypeMethodDescriptionvoidaliasProcessProcessor(Id processProcessorId, Id aliasId) Adds anIdto aProcessProcessorfor the purpose of creating compatibility.booleanTests if this user can createProcessProcessors.booleancanCreateProcessProcessorWithRecordTypes(Type[] processProcessorRecordTypes) Tests if this user can create a singleProcessProcessorusing the desired record types.booleanTests if this user can deleteProcessProcessors.booleanTests if this user can manageIdaliases forProcessProcessorsA return of true does not guarantee successful authorization.booleanTests if this user can updateProcessProcessors.createProcessProcessor(ProcessProcessorForm processProcessorForm) Creates a newProcessProcessor.voiddeleteProcessProcessor(Id processProcessorId) Deletes aProcessProcessor.Gets theOfficeassociated with this session.Gets theOfficeIdassociated with this session.getProcessProcessorFormForCreate(Type[] processProcessorRecordTypes) Gets the process processor form for creating new process processors.getProcessProcessorFormForUpdate(Id processProcessorId) Gets the process processor form for updating an existing process processor.voidupdateProcessProcessor(ProcessProcessorForm processProcessorForm) Updates an existing process processor.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.
-
canCreateProcessProcessors
boolean canCreateProcessProcessors()Tests if this user can createProcessProcessors. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aProcessProcessorwill 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:
falseifProcessProcessorcreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateProcessProcessorWithRecordTypes
Tests if this user can create a singleProcessProcessorusing the desired record types. WhileWorkflowRulesManager.getProcessProcessorRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificProcessProcessor. Providing an empty array tests if aProcessProcessor can becreated with no records.- Parameters:
processProcessorRecordTypes- array of process processor record types- Returns:
trueifProcessProcessorcreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-processProcessorRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getProcessProcessorFormForCreate
ProcessProcessorForm getProcessProcessorFormForCreate(Type[] processProcessorRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the process processor form for creating new process processors. A new form should be requested for each create transaction.- Parameters:
processProcessorRecordTypes- array of process processor record types- Returns:
- the process processor form
- Throws:
NullArgumentException-processProcessorRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createProcessProcessor
ProcessProcessor createProcessProcessor(ProcessProcessorForm processProcessorForm) throws OperationFailedException, PermissionDeniedException Creates a newProcessProcessor.- Parameters:
processProcessorForm- the form for thisProcessProcessor- Returns:
- the new
ProcessProcessor - Throws:
IllegalStateException-processProcessorFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-processProcessorFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-processProcessorFormdid not originate fromgetProcessProcessorFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateProcessProcessors
boolean canUpdateProcessProcessors()Tests if this user can updateProcessProcessors. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aProcessProcessorwill 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:
falseifProcessProcessormodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getProcessProcessorFormForUpdate
ProcessProcessorForm getProcessProcessorFormForUpdate(Id processProcessorId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the process processor form for updating an existing process processor. A new process processor form should be requested for each update transaction.- Parameters:
processProcessorId- theIdof theProcessProcessor- Returns:
- the process processor form
- Throws:
NotFoundException-processProcessorIdis not foundNullArgumentException-processProcessorIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateProcessProcessor
void updateProcessProcessor(ProcessProcessorForm processProcessorForm) throws OperationFailedException, PermissionDeniedException Updates an existing process processor.- Parameters:
processProcessorForm- the form containing the elements to be updated- Throws:
IllegalStateException-processProcessorFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-processProcessorFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-processProcessorFormdid not originate fromgetProcessProcessorFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteProcessProcessors
boolean canDeleteProcessProcessors()Tests if this user can deleteProcessProcessors. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aProcessProcessorwill 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:
falseifProcessProcessordeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteProcessProcessor
void deleteProcessProcessor(Id processProcessorId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aProcessProcessor.- Parameters:
processProcessorId- theIdof theProcessProcessorto remove- Throws:
NotFoundException-processProcessorIdnot foundNullArgumentException-processProcessorIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageProcessProcessorAliases
boolean canManageProcessProcessorAliases()Tests if this user can manageIdaliases forProcessProcessorsA 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:
falseifProcessProcessoraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasProcessProcessor
void aliasProcessProcessor(Id processProcessorId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aProcessProcessorfor the purpose of creating compatibility. The primaryIdof theProcessProcessoris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another process processor, it is reassigned to the given process processorId.- Parameters:
processProcessorId- theIdof aProcessProcessoraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-processProcessorIdnot foundNullArgumentException-processProcessorIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-