com.elasticpath.service.rules
Interface RuleActionService

All Superinterfaces:
EpPersistenceService, EpService
All Known Implementing Classes:
RuleActionServiceImpl

public interface RuleActionService
extends EpPersistenceService

Provides rule action component related services.


Method Summary
 RuleAction add(RuleAction ruleAction)
          Adds the given ruleAction.
 RuleAction get(long ruleActionUid)
          Get the ruleAction with the given UID.
 RuleAction get(long ruleActionUid, java.lang.String ruleActionType)
          Get the ruleAction with the given UID if it is greater than 0; otherwise get new instance of the ruleAction of the given ruleActionType from the spring beanFactory (assuming bean id is the same as the ruleActionType).
 RuleAction load(long ruleActionUid)
          Load the ruleAction with the given UID.
 RuleAction load(long ruleActionUid, java.lang.String ruleActionType)
          Load the ruleAction with the given UID if it is greater than 0; otherwise get new instance of the ruleAction of the given ruleActionType from the spring beanFactory (assuming bean id is the same as the ruleActionType).
 void remove(RuleAction ruleAction)
          Delete the ruleAction.
 void update(RuleAction ruleAction)
          Updates the given ruleActionle.
 
Methods inherited from interface com.elasticpath.service.EpPersistenceService
getObject, getPersistenceEngine, setPersistenceEngine
 
Methods inherited from interface com.elasticpath.service.EpService
getElasticPath, setElasticPath
 

Method Detail

add

RuleAction add(RuleAction ruleAction)
               throws EpServiceException
Adds the given ruleAction.

Parameters:
ruleAction - the ruleAction to add
Returns:
the persisted instance of ruleAction
Throws:
EpServiceException - - in case of any errors

get

RuleAction get(long ruleActionUid)
               throws EpServiceException
Get the ruleAction with the given UID. Return null if no matching record exists.

Parameters:
ruleActionUid - the ruleAction UID
Returns:
the ruleAction if UID exists, otherwise null
Throws:
EpServiceException - - in case of any errors

get

RuleAction get(long ruleActionUid,
               java.lang.String ruleActionType)
               throws EpServiceException
Get the ruleAction with the given UID if it is greater than 0; otherwise get new instance of the ruleAction of the given ruleActionType from the spring beanFactory (assuming bean id is the same as the ruleActionType). Return null if no matching record exists.

Parameters:
ruleActionUid - the ruleAction UID
ruleActionType - the ruleAction type
Returns:
the rule if it exists, otherwise null.
Throws:
EpServiceException - in case of errors.

load

RuleAction load(long ruleActionUid)
                throws EpServiceException
Load the ruleAction with the given UID. Throw an unrecoverable exception if there is no matching database row.

Parameters:
ruleActionUid - the ruleAction UID
Returns:
the rule if UID exists, otherwise null
Throws:
EpServiceException - - in case of any errors

load

RuleAction load(long ruleActionUid,
                java.lang.String ruleActionType)
                throws EpServiceException
Load the ruleAction with the given UID if it is greater than 0; otherwise get new instance of the ruleAction of the given ruleActionType from the spring beanFactory (assuming bean id is the same as the ruleActionType). Throw an unrecoverable exception if there is no matching database row.

Parameters:
ruleActionUid - the ruleAction UID
ruleActionType - the ruleAction type
Returns:
the rule if it exists, otherwise null.
Throws:
EpServiceException - in case of errors.

remove

void remove(RuleAction ruleAction)
            throws EpServiceException
Delete the ruleAction.

Parameters:
ruleAction - the ruleAction to remove
Throws:
EpServiceException - - in case of any errors

update

void update(RuleAction ruleAction)
            throws EpServiceException
Updates the given ruleActionle.

Parameters:
ruleAction - the ruleAction to update
Throws:
EpServiceException - - in case of any errors