public interface RequestTransactionAdminSession extends OsidSession
This session creates, updates, and deletes RequestTransactions.
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. Once a Request is created, it
has not been submitted. submitRequestTransaction submits a
RequesTransactiont for processing. Constraints on update
and delete may vary between creation and submission.
Create and update operations differ in their usage. To create a
RequestTransaction, a RequestTransactionForm is
requested using getRequestTransactionFormForCreate()
specifying the desired record Types or none if no record
Types are needed. The returned
RequestTransactionForm 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 RequestTransactionForm is submiited
to a create operation, it cannot be reused with another create operation
unless the first operation was unsuccessful. Each
RequestTransactionForm corresponds to an attempted transaction.
For updates, RequestTransactionForms are requested to
the RequestTransaction Id that is to be
updated using getRequestTransactionFormForUpdate().
Similarly, the RequestTransactionForm has metadata about
the data that can be updated and it can perform validation before
submitting the update. The RequestTransactionForm can only
be used once for a successful update and cannot be reused.
The delete operations delete RequestTransactions. To
unmap a RequestTransaction from the current
Distributor, the
RequestTransactionDistributorAssignmentSession should be used.
These delete operations attempt to remove the ReqeustTransaction
itself thus removing it from all known Distributor
catalogs.
This session includes an Id aliasing mechanism to
assign an external Id to an internally assigned Id.
| Modifier and Type | Method and Description |
|---|---|
void |
aliasRequestTransaction(Id requestTransactionId,
Id aliasId)
Adds an
Id to a RequestTransaction for
the purpose of creating compatibility. |
boolean |
canCancelRequestTransactions()
Tests if this user can cancel
RequestTransactions. |
void |
cancelRequestTransaction(Id requestTransactionId)
Cancels a
RequestTransaction and the related requests. |
boolean |
canCreateRequestTransactions()
Tests if this user can create
RequestTransactions. |
boolean |
canCreateRequestTransactionsWithRecordTypes(Type[] requestTransactionRecordTypes)
Tests if this user can create a single
RequestTransaction
using the desired record types. |
boolean |
canDeleteRequestTransactions()
Tests if this user can delete
RequestTransactions. |
boolean |
canManageRequestTransactionAliases()
Tests if this user can manage
Id aliases for
RequestTransactionss. |
boolean |
canUpdateRequestTransactions()
Tests if this user can update
RequestTransactions. |
RequestTransaction |
createRequestTransaction(RequestTransactionForm requestTransactionForm)
Creates a new
RequestTransaction. |
void |
deleteRequestTransaction(Id requestTransactionId)
Deletes a
RequestTransaction and the related requests. |
Distributor |
getDistributor()
Gets the
Distributor associated with this session. |
Id |
getDistributorId()
Gets the
Distributor Id associated with
this session. |
RequestTransactionForm |
getRequestTransactionFormForCreate(Id brokerId,
Id resourceId,
Type[] requestTransactionRecordTypes)
Gets the request transaction form for creating new request
transactionss.
|
RequestTransactionForm |
getRequestTransactionFormForUpdate(Id requestTransactionId)
Gets the request transaction form for updating an existing request.
|
void |
submitRequestTransaction(Id requestTransactionId)
Submits a
RequestTransaction and the related requests. |
void |
updateRequestTransaction(RequestTransactionForm requestTransactionForm)
Updates an existing request transaction.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getDistributorId()
Distributor Id associated with
this session. Distributor Id associated with this sessionmandatory - This method must be implemented. Distributor getDistributor() throws OperationFailedException, PermissionDeniedException
Distributor associated with this session.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canCreateRequestTransactions()
RequestTransactions. A
return of true does not guarantee successful authorization. A return
of false indicates that it is known creating a Request
will result in a PERMISSION_DENIED. This is intended as
a hint to an application that may opt not to offer transaction
operations to an unauthorized user. false if RequestTransaction
creation is not authorized, true otherwisemandatory - This method must be implemented. boolean canCreateRequestTransactionsWithRecordTypes(Type[] requestTransactionRecordTypes)
RequestTransaction
using the desired record types. While
ProvisioningManager.getRequestTransactionRecordTypes() can be
used to examine which records are supported, this method tests which
record(s) are required for creating a specific
RequestTransaction. Providing an empty array tests if a
RequestTransaction can be created with no records.requestTransactionRecordTypes - array of request transaction
record types true if RequestTransaction
creation using the specified record Types is
supported, false otherwiseNullArgumentException -
requestTransactionRecordTypes is null mandatory - This method must be implemented. RequestTransactionForm getRequestTransactionFormForCreate(Id brokerId, Id resourceId, Type[] requestTransactionRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
brokerId - a broker Id resourceId - a resource Id requestTransactionRecordTypes - array of request transaction
record typesNotFoundException - brokerId or
resourceId is not foundNullArgumentException - brokerId, resourceId,
or requestTransactionRecordTypes is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to get form for requested
record typesmandatory - This method must be implemented. RequestTransaction createRequestTransaction(RequestTransactionForm requestTransactionForm) throws OperationFailedException, PermissionDeniedException
RequestTransaction. requestTransactionForm - the form for this
RequestTransaction RequestTransaction IllegalStateException - requestTransactionForm
already used in a create transactionInvalidArgumentException - one or more of the form
elements is invalidNullArgumentException - requestTransactionForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - requestForm did
not originate from getRequestTransactionFormForCreate()
mandatory - This method must be implemented. boolean canUpdateRequestTransactions()
RequestTransactions. A
return of true does not guarantee successful authorization. A return
of false indicates that it is known updating a
RequestTransaction 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. false if RequestTransaction
modification is not authorized, true otherwisemandatory - This method must be implemented. RequestTransactionForm getRequestTransactionFormForUpdate(Id requestTransactionId) throws NotFoundException, OperationFailedException, PermissionDeniedException
requestTransactionId - the Id of the
RequestTransaction NotFoundException - requestTransactionId
is not foundNullArgumentException - requestTransactionId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void updateRequestTransaction(RequestTransactionForm requestTransactionForm) throws OperationFailedException, PermissionDeniedException
requestTransactionForm - the form containing the elements to be
updatedIllegalStateException - requestTransactionForm
already used in an update transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - requestTransactionForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - requestForm did
not originate from getRequestTransactionFormForUpdate()
mandatory - This method must be implemented. void submitRequestTransaction(Id requestTransactionId) throws NotFoundException, OperationFailedException, PermissionDeniedException
RequestTransaction and the related requests.requestTransactionId - the Id of the request
transaction to submitNotFoundException - requestTransactionId
is not foundNullArgumentException - requestTransactionId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canCancelRequestTransactions()
RequestTransactions. A
return of true does not guarantee successful authorization. A return
of false indicates that it is known canceling a
RequestTransaction will result in a PERMISSION_DENIED.
This is intended as a hint to an application that may opt not
to offer cancel operations to an unauthorized user. false if RequestTransaction
cancelation is not authorized, true otherwisemandatory - This method must be implemented. void cancelRequestTransaction(Id requestTransactionId) throws NotFoundException, OperationFailedException, PermissionDeniedException
RequestTransaction and the related requests.requestTransactionId - the Id of the request
transaction to cancelNotFoundException - requestTransactionId
is not foundNullArgumentException - requestTransactionId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canDeleteRequestTransactions()
RequestTransactions. A
return of true does not guarantee successful authorization. A return
of false indicates that it is known deleting a
RequestTransaction will result in a PERMISSION_DENIED.
This is intended as a hint to an application that may opt not
to offer delete operations to an unauthorized user. false if RequestTransaction
deletion is not authorized, true otherwisemandatory - This method must be implemented. void deleteRequestTransaction(Id requestTransactionId) throws NotFoundException, OperationFailedException, PermissionDeniedException
RequestTransaction and the related requests.requestTransactionId - the Id of the request
transaction to deleteNotFoundException - requestTransactionId
is not foundNullArgumentException - requestTransactionId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canManageRequestTransactionAliases()
Id aliases for
RequestTransactionss. A return of true does not guarantee
successful authorization. A return of false indicates that it is known
changing an alias will result in a PERMISSION_DENIED.
This is intended as a hint to an application that may opt not to offer
alias operations to an unauthorized user. false if RequestTransaction
aliasing is not authorized, true otherwisemandatory - This method must be implemented. void aliasRequestTransaction(Id requestTransactionId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id to a RequestTransaction for
the purpose of creating compatibility. The primary Id
of the RequestTransaction is determined by the
provider. The new Id performs as an alias to the
primary Id. If the alias is a pointer to another
request, it is reassigned to the given request Id. requestTransactionId - the Id of a
RequestTransaction aliasId - the alias Id AlreadyExistsException - aliasId is
already assignedNotFoundException - requestTransactionId
not foundNullArgumentException - requestTransactionId
or aliasId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.