Interface PriceEnablerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes price enablers. The data for create
and update is provided via the PriceEnablerForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasPriceEnabler(Id priceEnablerId, Id aliasId) Adds anIdto aPriceEnablerfor the purpose of creating compatibility.booleanTests if this user can create price enablers.booleancanCreatePriceEnablerWithRecordTypes(Type[] priceEnablerRecordTypes) Tests if this user can create a singlePriceEnablerusing the desired record types.booleanTests if this user can delete price enablers.booleanTests if this user can manageIdaliases for price enablers.booleanTests if this user can update price enablers.createPriceEnabler(PriceEnablerForm priceEnablerForm) Creates a newPriceEnabler.voiddeletePriceEnabler(Id priceEnablerId) Deletes aPriceEnabler.getPriceEnablerFormForCreate(Type[] priceEnablerRecordTypes) Gets the price enabler form for creating new price enablers.getPriceEnablerFormForUpdate(Id priceEnablerId) Gets the price enabler form for updating an existing price enabler.getStore()Gets theStoreassociated with this session.Gets theStoreIdassociated with this session.voidupdatePriceEnabler(PriceEnablerForm priceEnablerForm) Updates an existing price 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
-
getStoreId
Id getStoreId()Gets theStoreIdassociated with this session.- Returns:
- the
Store Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getStore
Gets theStoreassociated with this session.- Returns:
- the store
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreatePriceEnabler
boolean canCreatePriceEnabler()Tests if this user can create price enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aPriceEnablerwill 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:
falseifPriceEnablercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreatePriceEnablerWithRecordTypes
Tests if this user can create a singlePriceEnablerusing the desired record types. WhileOrderingRulesManager.getPriceEnablerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificPriceEnabler. Providing an empty array tests if aPriceEnablercan be created with no records.- Parameters:
priceEnablerRecordTypes- array of price enabler record types- Returns:
trueifPriceEnablercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-priceEnablerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getPriceEnablerFormForCreate
PriceEnablerForm getPriceEnablerFormForCreate(Type[] priceEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the price enabler form for creating new price enablers. A new form should be requested for each create transaction.- Parameters:
priceEnablerRecordTypes- array of price enabler record types- Returns:
- the price enabler form
- Throws:
NullArgumentException-priceEnablerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createPriceEnabler
PriceEnabler createPriceEnabler(PriceEnablerForm priceEnablerForm) throws OperationFailedException, PermissionDeniedException Creates a newPriceEnabler.- Parameters:
priceEnablerForm- the form for thisPriceEnabler- Returns:
- the new
PriceEnabler - Throws:
IllegalStateException-priceEnablerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-priceEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-priceEnablerFormdid not originate fromgetPriceEnablerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdatePriceEnablers
boolean canUpdatePriceEnablers()Tests if this user can update price enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aPriceEnablerwill 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:
falseifPriceEnablermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getPriceEnablerFormForUpdate
PriceEnablerForm getPriceEnablerFormForUpdate(Id priceEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the price enabler form for updating an existing price enabler. A new price enabler form should be requested for each update transaction.- Parameters:
priceEnablerId- theIdof thePriceEnabler- Returns:
- the price enabler form
- Throws:
NotFoundException-priceEnablerIdis not foundNullArgumentException-priceEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updatePriceEnabler
void updatePriceEnabler(PriceEnablerForm priceEnablerForm) throws OperationFailedException, PermissionDeniedException Updates an existing price enabler.- Parameters:
priceEnablerForm- the form containing the elements to be updated- Throws:
IllegalStateException-priceEnablerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-priceEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-priceEnablerFormdid not originate fromgetPriceEnablerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeletePriceEnablers
boolean canDeletePriceEnablers()Tests if this user can delete price enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aPriceEnablerwill 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:
falseifPriceEnablerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deletePriceEnabler
void deletePriceEnabler(Id priceEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aPriceEnabler.- Parameters:
priceEnablerId- theIdof thePriceEnablerto remove- Throws:
NotFoundException-priceEnablerIdnot foundNullArgumentException-priceEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManagePriceEnablerAliases
boolean canManagePriceEnablerAliases()Tests if this user can manageIdaliases for price enablers. A 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:
falseifPriceEnableraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasPriceEnabler
void aliasPriceEnabler(Id priceEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aPriceEnablerfor the purpose of creating compatibility. The primaryIdof thePriceEnableris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another price enabler. it is reassigned to the given price enablerId.- Parameters:
priceEnablerId- theIdof aPriceEnableraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-priceEnablerIdnot foundNullArgumentException-priceEnablerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-