Interface ProvisionEnablerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates, updates, and deletes ProvisionEnablers .
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
ProvisionEnabler , a ProvisionEnablerForm is requested using
getProvisionEnablerFormForCreate() specifying the desired record
Types or none if no record Types are needed. The returned
ProvisionEnablerForm 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 ProvisionEnablerForm is submiited to a
create operation, it cannot be reused with another create operation unless
the first operation was unsuccessful. Each ProvisionEnablerForm
corresponds to an attempted transaction.
For updates, ProvisionEnablerForms are requested to the
ProvisionEnabler Id that is to be updated using
getProvisionEnablerFormForUpdate() . Similarly, the
ProvisionEnablerForm has metadata about the data that can be updated and
it can perform validation before submitting the update. The
ProvisionEnablerForm can only be used once for a successful update and
cannot be reused.
The delete operations delete ProvisionEnablers . To unmap a
ProvisionEnabler from the current Distributor , the
ProvisionEnablerDistributorAssignmentSession should be used. These delete
operations attempt to remove the ProvisionEnabler 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 .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasProvisionEnabler(Id provisionEnablerId, Id aliasId) Adds anIdto aProvisionEnablerfor the purpose of creating compatibility.booleanTests if this user can createProvisionEnablers.booleancanCreateProvisionEnablerWithRecordTypes(Type[] provisionEnablerRecordTypes) Tests if this user can create a singleProvisionEnablerusing the desired record types.booleanTests if this user can deleteProvisionEnablers.booleanTests if this user can manageIdaliases forProvisionEnablersA return of true does not guarantee successful authorization.booleanTests if this user can updateProvisionEnablers.createProvisionEnabler(ProvisionEnablerForm provisionEnablerForm) Creates a newProvisionEnabler.voiddeleteProvisionEnabler(Id provisionEnablerId) Deletes aProvisionEnabler.Gets theDistributorassociated with this session.Gets theDistributorIdassociated with this session.getProvisionEnablerFormForCreate(Type[] provisionEnablerRecordTypes) Gets the provision enabler form for creating new provision enablers.getProvisionEnablerFormForUpdate(Id provisionEnablerId) Gets the provision enabler form for updating an existing provision enabler.voidupdateProvisionEnabler(ProvisionEnablerForm provisionEnablerForm) Updates an existing provision enabler.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
-
getDistributorId
Id getDistributorId()Gets theDistributorIdassociated with this session.- Returns:
- the
Distributor Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getDistributor
Gets theDistributorassociated with this session.- Returns:
- the distributor
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateProvisionEnablers
boolean canCreateProvisionEnablers()Tests if this user can createProvisionEnablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aProvisionEnablerwill 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:
falseifProvisionEnablercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateProvisionEnablerWithRecordTypes
Tests if this user can create a singleProvisionEnablerusing the desired record types. WhileProvisioningRulesManager.getProvisionEnablerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificProvisionEnabler. Providing an empty array tests if aProvisionEnablercan be created with no records.- Parameters:
provisionEnablerRecordTypes- array of provision enabler record types- Returns:
trueifProvisionEnablercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-provisionEnablerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getProvisionEnablerFormForCreate
ProvisionEnablerForm getProvisionEnablerFormForCreate(Type[] provisionEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the provision enabler form for creating new provision enablers. A new form should be requested for each create transaction.- Parameters:
provisionEnablerRecordTypes- array of provision enabler record types- Returns:
- the provision enabler form
- Throws:
NullArgumentException-provisionEnablerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createProvisionEnabler
ProvisionEnabler createProvisionEnabler(ProvisionEnablerForm provisionEnablerForm) throws OperationFailedException, PermissionDeniedException Creates a newProvisionEnabler.- Parameters:
provisionEnablerForm- the form for thisProvisionEnabler- Returns:
- the new
ProvisionEnabler - Throws:
IllegalStateException-provisionEnablerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-provisionEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-provisionEnablerFormdid not originate fromgetProvisionEnablerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateProvisionEnablers
boolean canUpdateProvisionEnablers()Tests if this user can updateProvisionEnablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aProvisionEnablerwill 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:
falseifProvisionEnablermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getProvisionEnablerFormForUpdate
ProvisionEnablerForm getProvisionEnablerFormForUpdate(Id provisionEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the provision enabler form for updating an existing provision enabler. A new provision enabler form should be requested for each update transaction.- Parameters:
provisionEnablerId- theIdof theProvisionEnabler- Returns:
- the provision enabler form
- Throws:
NotFoundException-provisionEnablerIdis not foundNullArgumentException-provisionEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateProvisionEnabler
void updateProvisionEnabler(ProvisionEnablerForm provisionEnablerForm) throws OperationFailedException, PermissionDeniedException Updates an existing provision enabler.- Parameters:
provisionEnablerForm- the form containing the elements to be updated- Throws:
IllegalStateException-provisionEnablerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-provisionEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-provisionEnablerFormdid not originate fromgetProvisionEnablerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteProvisionEnablers
boolean canDeleteProvisionEnablers()Tests if this user can deleteProvisionEnablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aProvisionEnablerwill 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:
falseifProvisionEnablerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteProvisionEnabler
void deleteProvisionEnabler(Id provisionEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aProvisionEnabler.- Parameters:
provisionEnablerId- theIdof theProvisionEnablerto remove- Throws:
NotFoundException-provisionEnablerIdnot foundNullArgumentException-provisionEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageProvisionEnablerAliases
boolean canManageProvisionEnablerAliases()Tests if this user can manageIdaliases forProvisionEnablersA 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:
falseifProvisionEnableraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasProvisionEnabler
void aliasProvisionEnabler(Id provisionEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aProvisionEnablerfor the purpose of creating compatibility. The primaryIdof theProvisionEnableris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another provision enabler, it is reassigned to the given provision enablerId.- Parameters:
provisionEnablerId- theIdof aProvisionEnableraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-provisionEnablerIdnot foundNullArgumentException-provisionEnablerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-