OSID Logo
OSID Specifications
provisioning package
Version 3.0.0
Release Candidate Preview
Interfaceosid.provisioning.BrokerAdminSession
Implementsosid.OsidSession
Description

This session creates, updates, and deletes Brokers. 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 Broker, a BrokerForm is requested using getBrokerFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned BrokerForm 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 BrokerForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each BrokerForm corresponds to an attempted transaction.

For updates, BrokerForms are requested to the Broker Id that is to be updated using getBrokerFormForUpdate(). Similarly, the BrokerForm has metadata about the data that can be updated and it can perform validation before submitting the update. The BrokerForm can only be used once for a successful update and cannot be reused.

The delete operations delete Brokers. To unmap a Broker from the current Distributor, the BrokerDistributorAssignmentSession should be used. These delete operations attempt to remove the Broker 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.

MethodgetDistributorId
Description

Gets the Distributor Id associated with this session.

Returnosid.id.Idthe Distributor Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetDistributor
Description

Gets the Distributor associated with this session.

Returnosid.provisioning.Distributorthe distributor
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateBrokers
Description

Tests if this user can create Brokers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Broker 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.

Returnboolean false if Broker creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateBrokerWithRecordTypes
Description

Tests if this user can create a single Broker using the desired record types. While ProvisioningManager.getBrokerRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific Broker. Providing an empty array tests if a Broker can be created with no records.

Parametersosid.type.Type[]brokerRecordTypesarray of broker record types
Returnboolean true if Broker creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT brokerRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetBrokerFormForCreate
Description

Gets the broker form for creating new brokers. A new form should be requested for each create transaction.

Parametersosid.type.Type[]brokerRecordTypesarray of broker record types
Returnosid.provisioning.BrokerFormthe broker form
ErrorsNULL_ARGUMENT brokerRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateBroker
Description

Creates a new Broker.

Parametersosid.provisioning.BrokerFormbrokerFormthe form for this Broker
Returnosid.provisioning.Brokerthe new Broker
ErrorsILLEGAL_STATE brokerForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT brokerForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED brokerForm did not originate from getBrokerFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateBrokers
Description

Tests if this user can update Brokers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Broker 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.

Returnboolean false if Broker modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetBrokerFormForUpdate
Description

Gets the broker form for updating an existing broker. A new broker form should be requested for each update transaction.

Parametersosid.id.IdbrokerIdthe Id of the Broker
Returnosid.provisioning.BrokerFormthe broker form
ErrorsNOT_FOUND brokerId is not found
NULL_ARGUMENT brokerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateBroker
Description

Updates an existing broker.

Parametersosid.provisioning.BrokerFormbrokerFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE brokerForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT brokerForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED brokerForm did not originate from getBrokerFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteBrokers
Description

Tests if this user can delete Brokers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a Broker 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.

Returnboolean false if Broker deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteBroker
Description

Deletes a Broker.

Parametersosid.id.IdbrokerIdthe Id of the Broker to remove
ErrorsNOT_FOUND brokerId not found
NULL_ARGUMENT brokerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageBrokerAliases
Description

Tests if this user can manage Id aliases for Brokers. 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.

Returnboolean false if Broker aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasBroker
Description

Adds an Id to a Broker for the purpose of creating compatibility. The primary Id of the Broker is determined by the provider. The new Id performs as an alias to the primary Id. If the alias is a pointer to another broker, it is reassigned to the given broker Id.

Parametersosid.id.IdbrokerIdthe Id of a Broker
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND brokerId not found
NULL_ARGUMENT brokerId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanAssignQueues
Description

Tests if this user can assign queues to brokers. A return of true does not guarantee successful authorization. A return of false indicates that it is known assigning a queue will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer queue operations to an unauthorized user.

Returnboolean false if queue assignment is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaddQueue
Description

Adds a queue to a broker.

Parametersosid.id.IdbrokerIdthe brokerId Id
osid.id.IdqueueIdthe queue Id
ErrorsALREADY_EXISTSqueue already part of work
NOT_FOUND queueId or brokerId is not found
NULL_ARGUMENT queueId or brokerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodremoveQueue
Description

Removes a queue from a broker.

Parametersosid.id.IdbrokerIdthe broker Id
osid.id.IdqueueIdthe queue Id
ErrorsNOT_FOUNDqueue is not part of broker
NULL_ARGUMENT brokerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.