Interface PoolConstrainerEnablerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates, updates, and deletes
PoolConstrainerEnablers . 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
PoolConstrainerEnabler , a PoolConstrainerEnablerForm is
requested using getPoolConstrainerEnablerFormForCreate()
specifying the desired record Types or none if no record
Types are needed. The returned PoolConstrainerEnablerForm 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
PoolConstrainerEnablerForm is submiited to a create operation, it cannot
be reused with another create operation unless the first operation was
unsuccessful. Each PoolConstrainerEnablerForm corresponds to an
attempted transaction.
For updates, PoolConstrainerEnablerForms are requested to the
PoolConstrainerEnabler Id that is to be updated using
getPoolConstrainerEnablerFormForUpdate() . Similarly, the
PoolConstrainerEnablerForm has metadata about the data that can be
updated and it can perform validation before submitting the update. The
PoolConstrainerEnablerForm can only be used once for a successful
update and cannot be reused.
The delete operations delete PoolConstrainerEnablers . To
unmap a PoolConstrainerEnabler from the current
Distributor , the
PoolConstrainerEnablerDistributorAssignmentSession should be used. These
delete operations attempt to remove the PoolConstrainerEnabler
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 I d.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasPoolConstrainerEnabler(Id poolConstrainerEnablerId, Id aliasId) Adds anIdto aPoolConstrainerEnablerfor the purpose of creating compatibility.booleanTests if this user can createPoolConstrainerEnablers.booleancanCreatePoolConstrainerEnablerWithRecordTypes(Type[] poolConstrainerEnablerRecordTypes) Tests if this user can create a singlePoolConstrainerEnablerusing the desired record types.booleanTests if this user can deletePoolConstrainerEnablers.booleanTests if this user can manageIdaliases forPoolConstrainerEnablersA return of true does not guarantee successful authorization.booleanTests if this user can updatePoolConstrainerEnablers.createPoolConstrainerEnabler(PoolConstrainerEnablerForm poolConstrainerEnablerForm) Creates a newPoolConstrainerEnabler.voiddeletePoolConstrainerEnabler(Id poolConstrainerEnablerId) Deletes aPoolConstrainerEnabler.Gets theDistributorassociated with this session.Gets theDistributorIdassociated with this session.getPoolConstrainerEnablerFormForCreate(Type[] poolConstrainerEnablerRecordTypes) Gets the pool constrainer enabler form for creating new pool constrainer enablers.getPoolConstrainerEnablerFormForUpdate(Id poolConstrainerEnablerId) Gets the pool constrainer enabler form for updating an existing pool constrainer enabler.voidupdatePoolConstrainerEnabler(PoolConstrainerEnablerForm poolConstrainerEnablerForm) Updates an existing pool constrainer 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.
-
canCreatePoolConstrainerEnablers
boolean canCreatePoolConstrainerEnablers()Tests if this user can createPoolConstrainerEnablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aPoolConstrainerEnablerwill 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:
falseifPoolConstrainerEnablercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreatePoolConstrainerEnablerWithRecordTypes
Tests if this user can create a singlePoolConstrainerEnablerusing the desired record types. WhileProvisioningRulesManager.getPoolConstrainerEnablerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificPoolConstrainerEnabler. Providing an empty array tests if aPoolConstrainerEnabler can be created with no records.- Parameters:
poolConstrainerEnablerRecordTypes- array of pool constrainer enabler record types- Returns:
trueifPoolConstrainerEnablercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-poolConstrainerEnablerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getPoolConstrainerEnablerFormForCreate
PoolConstrainerEnablerForm getPoolConstrainerEnablerFormForCreate(Type[] poolConstrainerEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the pool constrainer enabler form for creating new pool constrainer enablers. A new form should be requested for each create transaction.- Parameters:
poolConstrainerEnablerRecordTypes- array of pool constrainer enabler record types- Returns:
- the pool constrainer enabler form
- Throws:
NullArgumentException-poolConstrainerEnablerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createPoolConstrainerEnabler
PoolConstrainerEnabler createPoolConstrainerEnabler(PoolConstrainerEnablerForm poolConstrainerEnablerForm) throws OperationFailedException, PermissionDeniedException Creates a newPoolConstrainerEnabler.- Parameters:
poolConstrainerEnablerForm- the form for thisPoolConstrainerEnabler- Returns:
- the new
PoolConstrainerEnabler - Throws:
IllegalStateException-poolConstrainerEnablerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-poolConstrainerEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-poolConstrainerEnablerFormdid not originate fromgetPoolConstrainerEnablerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdatePoolConstrainerEnablers
boolean canUpdatePoolConstrainerEnablers()Tests if this user can updatePoolConstrainerEnablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aPoolConstrainerEnablerwill 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:
falseifPoolConstrainerEnablermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getPoolConstrainerEnablerFormForUpdate
PoolConstrainerEnablerForm getPoolConstrainerEnablerFormForUpdate(Id poolConstrainerEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the pool constrainer enabler form for updating an existing pool constrainer enabler. A new pool constrainer enabler form should be requested for each update transaction.- Parameters:
poolConstrainerEnablerId- theIdof thePoolConstrainerEnabler- Returns:
- the pool constrainer enabler form
- Throws:
NotFoundException-poolConstrainerEnablerIdis not foundNullArgumentException-poolConstrainerEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updatePoolConstrainerEnabler
void updatePoolConstrainerEnabler(PoolConstrainerEnablerForm poolConstrainerEnablerForm) throws OperationFailedException, PermissionDeniedException Updates an existing pool constrainer enabler.- Parameters:
poolConstrainerEnablerForm- the form containing the elements to be updated- Throws:
IllegalStateException-poolConstrainerEnablerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-poolConstrainerEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-poolConstrainerEnablerFormdid not originate fromgetPoolConstrainerEnablerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeletePoolConstrainerEnablers
boolean canDeletePoolConstrainerEnablers()Tests if this user can deletePoolConstrainerEnablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aPoolConstrainerEnablerwill 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:
falseifPoolConstrainerEnablerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deletePoolConstrainerEnabler
void deletePoolConstrainerEnabler(Id poolConstrainerEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aPoolConstrainerEnabler.- Parameters:
poolConstrainerEnablerId- theIdof thePoolConstrainerEnablerto remove- Throws:
NotFoundException-poolConstrainerEnablerIdnot foundNullArgumentException-poolConstrainerEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManagePoolConstrainerEnablerAliases
boolean canManagePoolConstrainerEnablerAliases()Tests if this user can manageIdaliases forPoolConstrainerEnablersA 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:
falseifPoolConstrainerEnableraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasPoolConstrainerEnabler
void aliasPoolConstrainerEnabler(Id poolConstrainerEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aPoolConstrainerEnablerfor the purpose of creating compatibility. The primaryIdof thePoolConstrainerEnableris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another pool constrainer enabler, it is reassigned to the given pool constrainer enablerId.- Parameters:
poolConstrainerEnablerId- theIdof aPoolConstrainerEnableraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-poolConstrainerEnablerIdnot foundNullArgumentException-poolConstrainerEnablerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-