public class OnlyOnePromotionGovernedByThisPoliceAppliesPolicy extends java.lang.Object implements PromotionPolicy
XML Snippet:
<PromotionPolicy impl="com.ibm.commerce.marketing.promotion.policy.OnlyOnePromotionGovernedByThisPoliceAppliesPolicy"> <PromotionPolicyKey> <PolicyName>Unique Name for the policy</PolicyName> <StoreKey> <DN>o=root organization</DN> <Identifier>BlueStore 202</Identifier> </StoreKey> </PromotionPolicyKey> <!-- Active, Inactive or Deleted --> <Status>Active</Status> </PromotionPolicy>
Constructor and Description |
---|
OnlyOnePromotionGovernedByThisPoliceAppliesPolicy()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean | apply(PromotionContext context, PromotionExecutionRecord record)
This method enforces the promotion policy.
|
void | fromXML(org.w3c.dom.Node anXMLNode)
Transforms the XML node into its corresponding real Object.
|
java.lang.String | getDescription(java.util.Locale locale, int type)
Returns the description of the promotion policy based on its type and locale.
|
PromotionPolicyKey | getKey()
Returns the key of this promotion policy
|
int | getStatus()
Returns the status of this promotion policy
|
protected boolean | isStackble()
A true or false value indicates whether a promotion with its exclusiveness value as 4 is treated as exception of this policy.
|
void | setKey(PromotionPolicyKey akey)
Sets the key of this promotion policy
|
protected void | setStackble(boolean aStackble)
Sets a true or false value to indicates whether a promotion with its exclusiveness value as 4 is treated as exception of this policy.
|
void | setStatus(int newStatus)
Sets the status of a promotion policy.
|
java.lang.String | toXML()
Converts the object into its corresponding XML format representation.
|
public OnlyOnePromotionGovernedByThisPoliceAppliesPolicy()
public PromotionPolicyKey getKey()
public java.lang.String getDescription(java.util.Locale locale, int type)
public boolean apply(PromotionContext context, PromotionExecutionRecord record) throws PromotionPolicyApplicationException
public int getStatus()
public void setStatus(int newStatus)
public void setKey(PromotionPolicyKey akey)
public java.lang.String toXML() throws XMLizationException
public void fromXML(org.w3c.dom.Node anXMLNode) throws DeXMLizationException
protected boolean isStackble()
protected void setStackble(boolean aStackble)