public interface QueueAdminSession extends OsidSession
This session creates, updates, and deletes Queues. 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
Queue, a QueueForm is requested using
getQueueFormForCreate() specifying the desired record Types
or none if no record Types are needed. The returned
QueueForm 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 QueueForm is submiited to a create
operation, it cannot be reused with another create operation unless the
first operation was unsuccessful. Each QueueForm
corresponds to an attempted transaction.
For updates, QueueForms are requested to the
Queue Id that is to be updated using
getQueueFormForUpdate(). Similarly, the QueueForm
has metadata about the data that can be updated and it can perform
validation before submitting the update. The QueueForm can
only be used once for a successful update and cannot be reused.
The delete operations delete Queues. To unmap a
Queue from the current FrontOffice, the
QueueFrontOfficeAssignmentSession should be used. These delete
operations attempt to remove the Queue itself thus removing
it from all known FrontOffice 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 |
aliasQueue(Id queueId,
Id aliasId)
Adds an
Id to a Queue for the purpose of
creating compatibility. |
boolean |
canCreateQueues()
Tests if this user can create
Queues. |
boolean |
canCreateQueueWithRecordTypes(Type[] queueRecordTypes)
Tests if this user can create a single
Queue using the
desired record types. |
boolean |
canDeleteQueues()
Tests if this user can delete
Queues. |
boolean |
canManageQueueAliases()
Tests if this user can manage
Id aliases for
Queues. |
boolean |
canUpdateQueues()
Tests if this user can update
Queues. |
Queue |
createQueue(QueueForm queueForm)
Creates a new
Queue. |
void |
deleteQueue(Id queueId)
Deletes a
Queue. |
FrontOffice |
getFrontOffice()
Gets the
FrontOffice associated with this session. |
Id |
getFrontOfficeId()
Gets the
FrontOffice Id associated with
this session. |
QueueForm |
getQueueFormForCreate(Type[] queueRecordTypes)
Gets the queue form for creating new queues.
|
QueueForm |
getQueueFormForUpdate(Id queueId)
Gets the queue form for updating an existing queue.
|
void |
updateQueue(QueueForm queueForm)
Updates an existing queue.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getFrontOfficeId()
FrontOffice Id associated with
this session. FrontOffice Id associated with this sessionmandatory - This method must be implemented. FrontOffice getFrontOffice() throws OperationFailedException, PermissionDeniedException
FrontOffice associated with this session.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canCreateQueues()
Queues. A return of true
does not guarantee successful authorization. A return of false
indicates that it is known creating a Queue will result
in a PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer create operations to an
unauthorized user. false if Queue creation is not
authorized, true otherwisemandatory - This method must be implemented. boolean canCreateQueueWithRecordTypes(Type[] queueRecordTypes)
Queue using the
desired record types. While
TrackingManager.getQueueRecordTypes() can be used to examine
which records are supported, this method tests which record(s) are
required for creating a specific Queue. Providing an
empty array tests if a Queue can be created with no
records.queueRecordTypes - array of queue record types true if Queue creation using the
specified record Types is supported,
false otherwiseNullArgumentException - queueRecordTypes
is null mandatory - This method must be implemented. QueueForm getQueueFormForCreate(Type[] queueRecordTypes) throws OperationFailedException, PermissionDeniedException
queueRecordTypes - array of queue record typesNullArgumentException - queueRecordTypes
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to get form for requested
record typesmandatory - This method must be implemented. Queue createQueue(QueueForm queueForm) throws OperationFailedException, PermissionDeniedException
Queue. queueForm - the form for this Queue Queue IllegalStateException - queueForm
already used in a create transactionInvalidArgumentException - one or more of the form
elements is invalidNullArgumentException - queueForm is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - queueForm did not
originate from getQueueFormForCreate() mandatory - This method must be implemented. boolean canUpdateQueues()
Queues. A return of true
does not guarantee successful authorization. A return of false
indicates that it is known updating a Queue 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 Queue modification is
not authorized, true otherwisemandatory - This method must be implemented. QueueForm getQueueFormForUpdate(Id queueId) throws NotFoundException, OperationFailedException, PermissionDeniedException
queueId - the Id of the Queue NotFoundException - queueId is not foundNullArgumentException - queueId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void updateQueue(QueueForm queueForm) throws OperationFailedException, PermissionDeniedException
queueForm - the form containing the elements to be updatedIllegalStateException - queueForm
already used in an update transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - queueForm is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - queueForm did not
originate from getQueueFormForUpdate() mandatory - This method must be implemented. boolean canDeleteQueues()
Queues. A return of true
does not guarantee successful authorization. A return of false
indicates that it is known deleting a Queue 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 Queue deletion is not
authorized, true otherwisemandatory - This method must be implemented. void deleteQueue(Id queueId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Queue. queueId - the Id of the Queue to
removeNotFoundException - queueId not foundNullArgumentException - queueId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canManageQueueAliases()
Id aliases for
Queues. 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 Queue aliasing is not
authorized, true otherwisemandatory - This method must be implemented. void aliasQueue(Id queueId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id to a Queue for the purpose of
creating compatibility. The primary Id of the
Queue is determined by the provider. The new Id
performs as an alias to the primary Id. If the alias is
a pointer to another queue, it is reassigned to the given queue
Id. queueId - the Id of a Queue aliasId - the alias Id AlreadyExistsException - aliasId is
already assignedNotFoundException - queueId not foundNullArgumentException - queueId or
aliasId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.