com.elasticpath.domain.rules.impl
Class CategoryExceptionImpl
java.lang.Object
com.elasticpath.domain.impl.AbstractEpDomainImpl
com.elasticpath.domain.impl.AbstractPersistenceImpl
com.elasticpath.domain.impl.AbstractValueObjectImpl
com.elasticpath.domain.rules.impl.AbstractRuleExceptionImpl
com.elasticpath.domain.rules.impl.CategoryExceptionImpl
- All Implemented Interfaces:
- EpDomain, Persistence, RuleException, ValueObject, java.io.Serializable
public class CategoryExceptionImpl
- extends AbstractRuleExceptionImpl
- implements RuleException
Rule exception that excludes a category to be qualified for a rule condition or a rule action. Requires parameter with key
RuleParameter.CATEGORY_ID_KEY to specify the category.
- See Also:
- Serialized Form
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 condition. |
java.lang.String[] |
getParameterKeys()
Return the array of the required parameter keys for the rule. |
java.lang.String |
getRuleCode()
Dummy implementation here since a rule exception will be part of a rule condition or rule action. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
CategoryExceptionImpl
public CategoryExceptionImpl()
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 condition.
- 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.
getRuleCode
public java.lang.String getRuleCode()
throws EpDomainException
- Dummy implementation here since a rule exception will be part of a rule condition or rule action.
- Returns:
- the rule code.
- Throws:
EpDomainException
- if the object model is not well formed