public class ChangePromotionMediator extends AbstractChangeBusinessObjectMediatorImpl
Constructor and Description |
---|
ChangePromotionMediator() |
Modifier and Type | Method and Description |
---|---|
void |
change(java.lang.Object aNoun)
This method is called when activate or deactivate promotion service is
called.
|
void |
create(java.lang.Object aNoun)
Creates the physical entity corresponding to the logical noun
|
void |
delete(java.lang.Object aNoun)
Deletes the logical noun.
|
java.lang.Object |
findPhysicalEntity(java.lang.Object aNoun)
Find physical entity in the physical data container
|
java.lang.Object |
findPhysicalEntityWithSameAdminName(java.lang.Object aNoun)
Find a physical entity in the physical data container which has the same
administrative name as the passed logical noun.
|
java.util.List |
validateChange(java.lang.Object aNoun)
Checks if the object to be changed is present in the physical data
container.
|
java.util.List |
validateCreate(java.lang.Object aNoun)
Checks if the object to be created is present in the physical data
container.
|
java.util.List |
validateDelete(java.lang.Object aNoun)
Checks if the object to be removed is present in the physical data
container.
|
void |
validationForActivePromotionsWithSameCode(Px_promotion promotion)
This method is used to check that for the passed
promotion
parameter, its public promotion codes (manually entered by the business user)
are not currently being used in any other active promotions in the store path. |
void |
validationForActivePromotionsWithSamePriority(Px_promotion promotion)
This method is used to check that for the passed
promotion
parameter, its priority is not currently being used in any other active
promotions in the store path belonging to the same promotion group. |
applyChanges, getChangeNounPartMediator, getNouns, getPhysicalDataContainer, initialize
getUpdateAccessProfile, setUpdateAccessProfile
initializeConfig
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getUpdateAccessProfile, setUpdateAccessProfile
initializeConfig
public void create(java.lang.Object aNoun) throws AbstractApplicationException
aNoun
- The logical business object for which the physical entity
needs to be createdAbstractApplicationException
- When error happens.public void change(java.lang.Object aNoun) throws AbstractApplicationException
change
in interface ChangeBusinessObjectMediator
change
in class AbstractChangeBusinessObjectMediatorImpl
aNoun
- (PromotionType) The logical noun with updated fieldsAbstractApplicationException
- When error happens.public void validationForActivePromotionsWithSameCode(Px_promotion promotion) throws AbstractApplicationException
promotion
parameter, its public promotion codes (manually entered by the business user)
are not currently being used in any other active promotions in the store path.
If the store is an asset store, then the check is also performed on the child stores.
If an active promotion using the same public promotion code is found in the store, an exception is
thrown with a message indicating the promotion code being re-used and the
administrative name of the active promotion using it at the time.promotion
- The promotion whose codes are to be checked for re-use in
active promotions.AbstractApplicationException
- This exception is thrown when an error is encountered on
returning the promotion objects that have the same promotion
code.public void validationForActivePromotionsWithSamePriority(Px_promotion promotion) throws AbstractApplicationException
promotion
parameter, its priority is not currently being used in any other active
promotions in the store path belonging to the same promotion group. If
the store is an asset store, then the check is also performed on the
child stores. If an active promotion of the same group using the same
priority is found in the store, an exception is thrown with a message
indicating the priority being re-used and the administrative name of the
active promotion using it at the time.promotion
- The promotion whose priority is to be checked for re-use in
active promotions.AbstractApplicationException
- This exception is thrown when an error is encountered on
returning the promotion objects that have the same promotion
priority.public void delete(java.lang.Object aNoun) throws AbstractApplicationException
aNoun
- The logical noun that should be deletedAbstractApplicationException
- When error happenspublic java.lang.Object findPhysicalEntityWithSameAdminName(java.lang.Object aNoun) throws DataMediatorException
aNoun
- The logical SDO.
Promotion
object if it is
found, otherwise it returns null.DataMediatorException
- when an error is encountered during the process.public java.lang.Object findPhysicalEntity(java.lang.Object aNoun) throws DataMediatorException
aNoun
- The logical SDO.
Promotion
object if it is
found, otherwise it returns null.DataMediatorException
- When error happens.public java.util.List validateCreate(java.lang.Object aNoun) throws AbstractApplicationException
aNoun
- The noun that is being requested to be changedAbstractApplicationException
- When error happens.ChangeBusinessObjectMediator.validateCreate(java.lang.Object)
public java.util.List validateChange(java.lang.Object aNoun) throws DataMediatorException
aNoun
- The noun that is being requested to be changedDataMediatorException
- When error happens.ChangeBusinessObjectMediator.validateChange(java.lang.Object)
public java.util.List validateDelete(java.lang.Object aNoun) throws DataMediatorException
aNoun
- The noun that is being requested to be deletedDataMediatorException
- When error happens.ChangeBusinessObjectMediator.validateDelete(java.lang.Object)