Interface ProcessConstrainerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates, updates, and deletes ProcessConstrainers
. 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
ProcessConstrainer , a ProcessConstrainerForm is requested using
getProcessConstrainerFormForCreate() specifying the desired record
Types or none if no record Types are needed. The returned
ProcessConstrainerForm 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 ProcessConstrainerForm is submiited to a
create operation, it cannot be reused with another create operation unless
the first operation was unsuccessful. Each ProcessConstrainerForm
corresponds to an attempted transaction.
For updates, ProcessConstrainerForms are requested to the
ProcessConstrainer Id that is to be updated using
getProcessConstrainerFormForUpdate() . Similarly, the
ProcessConstrainerForm has metadata about the data that can be updated
and it can perform validation before submitting the update. The
ProcessConstrainerForm can only be used once for a successful update and
cannot be reused.
The delete operations delete ProcessConstrainers . To unmap a
ProcessConstrainer from the current Office , the
ProcessConstrainerOfficeAssignmentSession should be used. These delete
operations attempt to remove the ProcessConstrainer 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 TypeMethodDescriptionvoidaliasProcessConstrainer(Id processConstrainerId, Id aliasId) Adds anIdto aProcessConstrainerfor the purpose of creating compatibility.booleanTests if this user can createProcessConstrainers.booleancanCreateProcessConstrainerWithRecordTypes(Type[] processConstrainerRecordTypes) Tests if this user can create a singleProcessConstrainerusing the desired record types.booleanTests if this user can deleteProcessConstrainers.booleanTests if this user can manageIdaliases forProcessConstrainersA return of true does not guarantee successful authorization.booleanTests if this user can updateProcessConstrainers.createProcessConstrainer(ProcessConstrainerForm processConstrainerForm) Creates a newProcessConstrainer.voiddeleteProcessConstrainer(Id processConstrainerId) Deletes aProcessConstrainer.Gets theOfficeassociated with this session.Gets theOfficeIdassociated with this session.getProcessConstrainerFormForCreate(Type[] processConstrainerRecordTypes) Gets the process constrainer form for creating new process constrainers.getProcessConstrainerFormForUpdate(Id processConstrainerId) Gets the process constrainer form for updating an existing process constrainer.voidupdateProcessConstrainer(ProcessConstrainerForm processConstrainerForm) Updates an existing process constrainer.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.
-
canCreateProcessConstrainers
boolean canCreateProcessConstrainers()Tests if this user can createProcessConstrainers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aProcessConstrainerwill 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:
falseifProcessConstrainercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateProcessConstrainerWithRecordTypes
Tests if this user can create a singleProcessConstrainerusing the desired record types. WhileWorkflowRulesManager.getProcessConstrainerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificProcessConstrainer. Providing an empty array tests if aProcessConstrainer can becreated with no records.- Parameters:
processConstrainerRecordTypes- array of process constrainer record types- Returns:
trueifProcessConstrainercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-processConstrainerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getProcessConstrainerFormForCreate
ProcessConstrainerForm getProcessConstrainerFormForCreate(Type[] processConstrainerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the process constrainer form for creating new process constrainers. A new form should be requested for each create transaction.- Parameters:
processConstrainerRecordTypes- array of process constrainer record types- Returns:
- the process constrainer form
- Throws:
NullArgumentException-processConstrainerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createProcessConstrainer
ProcessConstrainer createProcessConstrainer(ProcessConstrainerForm processConstrainerForm) throws OperationFailedException, PermissionDeniedException Creates a newProcessConstrainer.- Parameters:
processConstrainerForm- the form for thisProcessConstrainer- Returns:
- the new
ProcessConstrainer - Throws:
IllegalStateException-processConstrainerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-processConstrainerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-processConstrainerFormdid not originate fromgetProcessConstrainerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateProcessConstrainers
boolean canUpdateProcessConstrainers()Tests if this user can updateProcessConstrainers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aProcessConstrainerwill 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:
falseifProcessConstrainermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getProcessConstrainerFormForUpdate
ProcessConstrainerForm getProcessConstrainerFormForUpdate(Id processConstrainerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the process constrainer form for updating an existing process constrainer. A new process constrainer form should be requested for each update transaction.- Parameters:
processConstrainerId- theIdof theProcessConstrainer- Returns:
- the process form
- Throws:
NotFoundException-processConstrainerIdis not foundNullArgumentException-processConstrainerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateProcessConstrainer
void updateProcessConstrainer(ProcessConstrainerForm processConstrainerForm) throws OperationFailedException, PermissionDeniedException Updates an existing process constrainer.- Parameters:
processConstrainerForm- the form containing the elements to be updated- Throws:
IllegalStateException-processConstrainerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-processConstrainerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-processConstrainerFormdid not originate fromgetProcessConstrainerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteProcessConstrainers
boolean canDeleteProcessConstrainers()Tests if this user can deleteProcessConstrainers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aProcessConstrainerwill 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:
falseifProcessConstrainerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteProcessConstrainer
void deleteProcessConstrainer(Id processConstrainerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aProcessConstrainer.- Parameters:
processConstrainerId- theIdof theProcessConstrainerto remove- Throws:
NotFoundException-processConstrainerIdnot foundNullArgumentException-processConstrainerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageProcessConstrainerAliases
boolean canManageProcessConstrainerAliases()Tests if this user can manageIdaliases forProcessConstrainersA 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:
falseifProcessConstraineraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasProcessConstrainer
void aliasProcessConstrainer(Id processConstrainerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aProcessConstrainerfor the purpose of creating compatibility. The primaryIdof theProcessConstraineris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another process constrainer, it is reassigned to the given process constrainer Id.- Parameters:
processConstrainerId- theIdof aProcessConstraineraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-processConstrainerIdnot foundNullArgumentException-processConstrainerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-