Interface PriceScheduleStoreAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign PriceSchedules to
Stores . A Price may map to multiple Stores and
removing the last reference to a PriceSchedule 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 PriceSchedule to another Store
is not a copy operation (eg: does not change its Id ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignPriceScheduleToStore(Id pricScheduleeId, Id storeId) Adds an existingPriceScheduleto aStore.booleanTests if this user can alter price schedule/store mappings.booleancanAssignPriceSchedulesToStore(Id storeId) Tests if this user can alter price schedule/store mappings.getAssignableStoreIds(Id storeId) Gets a list of stores including and under the given store node in which any price schedule can be assigned.getAssignableStoreIdsForPriceSchedule(Id storeId, Id priceScheduleId) Gets a list of stores including and under the given store node in which a specific price schedule can be assigned.voidreassignPriceScheduleToStore(Id priceScheduleId, Id fromStoreId, Id toStoreId) Moves aPriceSchedulefrom oneStoreto another.voidunassignPriceScheduleFromStore(Id priceScheduleId, Id storeId) Removes aPriceSchedulefrom 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
-
canAssignPriceSchedules
boolean canAssignPriceSchedules()Tests if this user can alter price schedule/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 assignment operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignPriceSchedulesToStore
Tests if this user can alter price schedule/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 assignment 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 schedule 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.
-
getAssignableStoreIdsForPriceSchedule
IdList getAssignableStoreIdsForPriceSchedule(Id storeId, Id priceScheduleId) throws OperationFailedException Gets a list of stores including and under the given store node in which a specific price schedule can be assigned.- Parameters:
storeId- theIdof theStorepriceScheduleId- theIdof thePriceSchedule- Returns:
- list of assignable store
Ids - Throws:
NullArgumentException-storeIdorpriceScheduleIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignPriceScheduleToStore
void assignPriceScheduleToStore(Id pricScheduleeId, Id storeId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingPriceScheduleto aStore.- Parameters:
pricScheduleeId- theIdof thePriceSchedulestoreId- theIdof theStore- Throws:
AlreadyExistsException-priceScheduleIdis already assigned tostoreIdNotFoundException-priceScheduleIdorstoreIdnot foundNullArgumentException-priceScheduleIdorstoreIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignPriceScheduleFromStore
void unassignPriceScheduleFromStore(Id priceScheduleId, Id storeId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aPriceSchedulefrom aStore.- Parameters:
priceScheduleId- theIdof thePriceSchedulestoreId- theIdof theStore- Throws:
NotFoundException-priceScheduleIdorstoreIdnot found orpriceScheduleIdnot assigned tostoreIdNullArgumentException-priceScheduleIdorstoreIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignPriceScheduleToStore
void reassignPriceScheduleToStore(Id priceScheduleId, Id fromStoreId, Id toStoreId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aPriceSchedulefrom oneStoreto another. Mappings to otherStoresare unaffected.- Parameters:
priceScheduleId- theIdof thePriceSchedulefromStoreId- theIdof the currentStoretoStoreId- theIdof the destinationStore- Throws:
AlreadyExistsException-priceScheduleIdalready assigned tostoreIdNotFoundException-priceScheduleId, fromStoreId, ortoStoreIdnot found orpriceScheduleIdnot mapped tofromStoreIdNullArgumentException-priceScheduleId, fromStoreId, ortoStoreIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-