Interface PriceEnablerStoreAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign PriceEnabler to
Store mappings. A PriceEnabler may appear in multiple
Store objects and removing the last reference to a
PriceEnabler is the equivalent of deleting it. Each Store may
have its own authorizations governing who is allowed to operate on it.
Adding a reference of a PriceEnabler to another Store
is not a copy operation (eg: does not change its Id ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignPriceEnablerToStore(Id priceEnablerId, Id storeId) Adds an existingPriceEnablerto aStore.booleanTests if this user can alter price enabler/store mappings.booleancanAssignPriceEnablersToStore(Id storeId) Tests if this user can alter price enabler/store mappings.getAssignableStoreIds(Id storeId) Gets a list of stores including and under the given store node in which any price enabler can be assigned.getAssignableStoreIdsForPriceEnabler(Id storeId, Id priceEnablerId) Gets a list of stores including and under the given store node in which a specific price enabler can be assigned.voidreassignPriceEnablerToStore(Id priceEnablerId, Id fromStoreId, Id toStoreId) Moves aPriceEnablerfrom oneStoreto another.voidunassignPriceEnablerFromStore(Id priceEnablerId, Id storeId) Removes aPriceEnablerfrom aStore.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
-
canAssignPriceEnablers
boolean canAssignPriceEnablers()Tests if this user can alter price enabler/store mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignPriceEnablersToStore
Tests if this user can alter price enabler/store mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Parameters:
storeId- theIdof theStore- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-storeIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableStoreIds
Gets a list of stores including and under the given store node in which any price enabler can be assigned.- Parameters:
storeId- theIdof theStore- Returns:
- list of assignable store
Ids - Throws:
NullArgumentException-storeIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignableStoreIdsForPriceEnabler
IdList getAssignableStoreIdsForPriceEnabler(Id storeId, Id priceEnablerId) throws OperationFailedException Gets a list of stores including and under the given store node in which a specific price enabler can be assigned.- Parameters:
storeId- theIdof theStorepriceEnablerId- theIdof thePriceEnabler- Returns:
- list of assignable store
Ids - Throws:
NullArgumentException-storeIdorpriceEnablerIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignPriceEnablerToStore
void assignPriceEnablerToStore(Id priceEnablerId, Id storeId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingPriceEnablerto aStore.- Parameters:
priceEnablerId- theIdof thePriceEnablerstoreId- theIdof theStore- Throws:
AlreadyExistsException-priceEnablerIdis already assigned tostoreIdNotFoundException-priceEnablerIdorstoreIdnot foundNullArgumentException-priceEnablerIdorstoreIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignPriceEnablerFromStore
void unassignPriceEnablerFromStore(Id priceEnablerId, Id storeId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aPriceEnablerfrom aStore.- Parameters:
priceEnablerId- theIdof thePriceEnablerstoreId- theIdof theStore- Throws:
NotFoundException-priceEnablerIdorstoreIdnot found orpriceEnablerIdis not assigned tostoreIdNullArgumentException-priceEnablerIdorstoreIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignPriceEnablerToStore
void reassignPriceEnablerToStore(Id priceEnablerId, Id fromStoreId, Id toStoreId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aPriceEnablerfrom oneStoreto another. Mappings to otherStoresare unaffected.- Parameters:
priceEnablerId- theIdof thePriceEnablerfromStoreId- theIdof the currentStoretoStoreId- theIdof the destinationStore- Throws:
AlreadyExistsException-priceEnablerIdalready assigned totoStoreIdNotFoundException-priceEnabelrId, fromStoreId, ortoStoreIdnot found orpriceEnablerIdnot mapped tofromStoreIdNullArgumentException-priceEnabelrId, fromStoreId, ortoStoreIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-