com.elasticpath.domain.rules.impl
Class EveryoneEligibilityImpl

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.AbstractRuleElementImpl
                  extended by com.elasticpath.domain.rules.impl.EveryoneEligibilityImpl
All Implemented Interfaces:
EpDomain, Persistence, RuleElement, RuleEligibility, ValueObject, java.io.Serializable

public class EveryoneEligibilityImpl
extends AbstractRuleElementImpl
implements RuleEligibility

Dummy rule eligibility that always evaluate to be true.

See Also:
Serialized Form

Field Summary
static long serialVersionUID
          Serial version id.
 
Fields inherited from interface com.elasticpath.domain.rules.RuleEligibility
ELIGIBILITY_KIND
 
Constructor Summary
EveryoneEligibilityImpl()
           
 
Method Summary
 boolean appliesInScenario(int scenarioId)
          Check if this rule element is valid in the specified scenario.
 java.lang.String[] getAllowedExceptions()
          Return the array of the allowed RuleException types for the rule.
 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()
          Returns the Drools code corresponding to this rule condition.
 
Methods inherited from class com.elasticpath.domain.rules.impl.AbstractRuleElementImpl
addParameter, getExceptions, getKind, getParameters, getType, setDefaultValues, setExceptions, setKind, setParameters, setRuleId, 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.RuleElement
addParameter, getExceptions, getKind, getParameters, getType, setExceptions, setKind, setParameters, setRuleId, 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

serialVersionUID

public static final long serialVersionUID
Serial version id.

See Also:
Constant Field Values
Constructor Detail

EveryoneEligibilityImpl

public EveryoneEligibilityImpl()
Method Detail

appliesInScenario

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

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

getAllowedExceptions

public java.lang.String[] getAllowedExceptions()
Return the array of the allowed RuleException types for the rule.

Specified by:
getAllowedExceptions in interface RuleElement
Returns:
an array of String of the allowed RuleException types for the rule.

getDisplayText

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

Specified by:
getDisplayText in interface RuleElement
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 RuleElement
Returns:
an array of String of the required parameter keys for the rule.

getRuleCode

public java.lang.String getRuleCode()
                             throws EpDomainException
Returns the Drools code corresponding to this rule condition.

Specified by:
getRuleCode in interface RuleElement
Returns:
the rule code.
Throws:
EpDomainException - if the rule is not well formed