Interface PoolEnablerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates, updates, and deletes PoolEnablers . 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
PoolEnabler , a PoolEnablerForm is requested using
getPoolEnablerFormForCreate() specifying the desired record Types
or none if no record Types are needed. The returned
PoolEnablerForm 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 PoolEnablerForm is submiited to a create
operation, it cannot be reused with another create operation unless the
first operation was unsuccessful. Each PoolEnablerForm corresponds
to an attempted transaction.
For updates, PoolEnablerForms are requested to the
PoolEnabler Id that is to be updated using
getPoolEnablerFormForUpdate() . Similarly, the PoolEnablerForm
has metadata about the data that can be updated and it can perform
validation before submitting the update. The PoolEnablerForm can
only be used once for a successful update and cannot be reused.
The delete operations delete PoolEnablers . To unmap a
PoolEnabler from the current Distributor , the
PoolEnablerDistributorAssignmentSession should be used. These delete
operations attempt to remove the PoolEnabler 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 TypeMethodDescriptionvoidaliasPoolEnabler(Id poolEnablerId, Id aliasId) Adds anIdto aPoolEnablerfor the purpose of creating compatibility.booleanTests if this user can createPoolEnablers.booleancanCreatePoolEnablerWithRecordTypes(Type[] poolEnablerRecordTypes) Tests if this user can create a singlePoolEnablerusing the desired record types.booleanTests if this user can deletePoolEnablers.booleanTests if this user can manageIdaliases forPoolEnablersA return of true does not guarantee successful authorization.booleanTests if this user can updatePoolEnablers.createPoolEnabler(PoolEnablerForm poolEnablerForm) Creates a newPoolEnabler.voiddeletePoolEnabler(Id poolEnablerId) Deletes aPoolEnabler.Gets theDistributorassociated with this session.Gets theDistributorIdassociated with this session.getPoolEnablerFormForCreate(Type[] poolEnablerRecordTypes) Gets the pool enabler form for creating new pool enablers.getPoolEnablerFormForUpdate(Id poolEnablerId) Gets the pool enabler form for updating an existing pool enabler.voidupdatePoolEnabler(PoolEnablerForm poolEnablerForm) Updates an existing pool 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.
-
canCreatePoolEnablers
boolean canCreatePoolEnablers()Tests if this user can createPoolEnablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aPoolEnablerwill 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:
falseifPoolEnablercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreatePoolEnablerWithRecordTypes
Tests if this user can create a singlePoolEnablerusing the desired record types. WhileProvisioningRulesManager.getPoolEnablerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificPoolEnabler. Providing an empty array tests if aPoolEnabler can be created with no records.- Parameters:
poolEnablerRecordTypes- array of pool enabler record types- Returns:
trueifPoolEnablercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-poolEnablerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getPoolEnablerFormForCreate
PoolEnablerForm getPoolEnablerFormForCreate(Type[] poolEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the pool enabler form for creating new pool enablers. A new form should be requested for each create transaction.- Parameters:
poolEnablerRecordTypes- array of pool enabler record types- Returns:
- the pool enabler form
- Throws:
NullArgumentException-poolEnablerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createPoolEnabler
PoolEnabler createPoolEnabler(PoolEnablerForm poolEnablerForm) throws OperationFailedException, PermissionDeniedException Creates a newPoolEnabler.- Parameters:
poolEnablerForm- the form for thisPoolEnabler- Returns:
- the new
PoolEnabler - Throws:
IllegalStateException-poolEnablerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-poolEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-poolEnablerFormdid not originate fromgetPoolEnablerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdatePoolEnablers
boolean canUpdatePoolEnablers()Tests if this user can updatePoolEnablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aPoolEnablerwill 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:
falseifPoolEnablermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getPoolEnablerFormForUpdate
PoolEnablerForm getPoolEnablerFormForUpdate(Id poolEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the pool enabler form for updating an existing pool enabler. A new pool enabler form should be requested for each update transaction.- Parameters:
poolEnablerId- theIdof thePoolEnabler- Returns:
- the pool enabler form
- Throws:
NotFoundException-poolEnablerIdis not foundNullArgumentException-poolEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updatePoolEnabler
void updatePoolEnabler(PoolEnablerForm poolEnablerForm) throws OperationFailedException, PermissionDeniedException Updates an existing pool enabler.- Parameters:
poolEnablerForm- the form containing the elements to be updated- Throws:
IllegalStateException-poolEnablerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-poolEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-poolEnablerFormdid not originate fromgetPoolEnablerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeletePoolEnablers
boolean canDeletePoolEnablers()Tests if this user can deletePoolEnablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aPoolEnablerwill 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:
falseifPoolEnablerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deletePoolEnabler
void deletePoolEnabler(Id poolEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aPoolEnabler.- Parameters:
poolEnablerId- theIdof thePoolEnablerto remove- Throws:
NotFoundException-poolEnablerIdnot foundNullArgumentException-poolEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManagePoolEnablerAliases
boolean canManagePoolEnablerAliases()Tests if this user can manageIdaliases forPoolEnablersA 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:
falseifPoolEnableraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasPoolEnabler
void aliasPoolEnabler(Id poolEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aPoolEnablerfor the purpose of creating compatibility. The primaryIdof thePoolEnableris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another pool enabler, it is reassigned to the given pool enablerId.- Parameters:
poolEnablerId- theIdof aPoolEnableraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-poolEnablerIdnot foundNullArgumentException-poolEnablerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-