com.elasticpath.domain.rules.impl
Class SkuExceptionImpl

java.lang.Object
  extended by com.elasticpath.domain.impl.AbstractEpDomainImpl
      extended by com.elasticpath.domain.impl.AbstractPersistenceImpl
          extended by com.elasticpath.domain.impl.AbstractValueObjectImpl
              extended by com.elasticpath.domain.rules.impl.AbstractRuleExceptionImpl
                  extended by com.elasticpath.domain.rules.impl.SkuExceptionImpl
All Implemented Interfaces:
EpDomain, Persistence, RuleException, ValueObject, java.io.Serializable

public class SkuExceptionImpl
extends AbstractRuleExceptionImpl
implements RuleException

Rule exception that excludes a product sku to be qualified for a rule condition or a rule action. Requires parameter with key RuleParameter.SKU_CODE_KEY to specify the sku code.

See Also:
Serialized Form

Field Summary
static java.lang.String EXCEPTION_TYPE
          The Exception type of this RuleException.
static long serialVersionUID
          Serial version id.
 
Constructor Summary
SkuExceptionImpl()
           
 
Method Summary
 boolean appliesInScenario(int scenarioId)
          Check if this RuleException is valid in the specified scenario.
 java.lang.String getDisplayText()
          Returns the text representation of this exception.
 java.lang.String[] getParameterKeys()
          Return the array of the required parameter keys for the rule.
 
Methods inherited from class com.elasticpath.domain.rules.impl.AbstractRuleExceptionImpl
addParameter, getParameters, getParamValue, getType, setDefaultValues, setParameters, setType, validate
 
Methods inherited from class com.elasticpath.domain.impl.AbstractPersistenceImpl
executeBeforePersistAction, getUidPk, isPersistent, setUidPk
 
Methods inherited from class com.elasticpath.domain.impl.AbstractEpDomainImpl
getElasticPath, setElasticPath
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.elasticpath.domain.rules.RuleException
addParameter, getParameters, getParamValue, getType, setParameters, setType, validate
 
Methods inherited from interface com.elasticpath.domain.Persistence
executeBeforePersistAction, getUidPk, isPersistent, setDefaultValues, setUidPk
 
Methods inherited from interface com.elasticpath.domain.EpDomain
getElasticPath, setElasticPath
 

Field Detail

EXCEPTION_TYPE

public static final java.lang.String EXCEPTION_TYPE
The Exception type of this RuleException.

See Also:
Constant Field Values

serialVersionUID

public static final long serialVersionUID
Serial version id.

See Also:
Constant Field Values
Constructor Detail

SkuExceptionImpl

public SkuExceptionImpl()
Method Detail

appliesInScenario

public boolean appliesInScenario(int scenarioId)
Check if this RuleException is valid in the specified scenario.

Specified by:
appliesInScenario in interface RuleException
Parameters:
scenarioId - the Id of the scenario to check (defined in RuleScenarios)
Returns:
true if the RuleException is applicable in the given scenario

getDisplayText

public java.lang.String getDisplayText()
Returns the text representation of this exception.

Specified by:
getDisplayText in interface RuleException
Returns:
the display text

getParameterKeys

public java.lang.String[] getParameterKeys()
Return the array of the required parameter keys for the rule.

Specified by:
getParameterKeys in interface RuleException
Returns:
an array of String of the required parameter keys for the rule.