Class SourceRuleModelHistoricalContentCreator
- java.lang.Object
-
- de.hybris.platform.ruleengineservices.versioning.impl.SourceRuleModelHistoricalContentCreator
-
- All Implemented Interfaces:
RuleModelHistoricalContentCreator
- Direct Known Subclasses:
CampaignSourceRuleModelHistoricalContentCreator
public class SourceRuleModelHistoricalContentCreator extends java.lang.Object implements RuleModelHistoricalContentCreator
Helper class, that manages the historical version of the SourceRule object creation
-
-
Constructor Summary
Constructors Constructor Description SourceRuleModelHistoricalContentCreator()
-
Method Summary
-
-
-
Method Detail
-
createHistoricalVersion
public void createHistoricalVersion(@Nonnull SourceRuleModel sourceRule, @Nonnull InterceptorContext context) throws InterceptorExceptionDescription copied from interface:RuleModelHistoricalContentCreatorcreates the historical version of the model- Specified by:
createHistoricalVersionin interfaceRuleModelHistoricalContentCreator- Parameters:
sourceRule- - the model to be versionedcontext- - the InterceptorContext instance, where the versioned copy is registered- Throws:
InterceptorException
-
isUnpublished
protected boolean isUnpublished(SourceRuleModel sourceRule, InterceptorContext context)
-
createHistoricalVersionIfNeeded
protected void createHistoricalVersionIfNeeded(SourceRuleModel sourceRule, InterceptorContext ctx) throws InterceptorException
- Throws:
InterceptorException
-
resetModifiedFields
protected void resetModifiedFields(SourceRuleModel toSourceRule, InterceptorContext ctx)
-
copyField
protected void copyField(ItemModelContext modelContext, SourceRuleModel sourceRule, java.util.Map.Entry<java.lang.String,java.util.Set<java.util.Locale>> attribute)
-
incrementRuleModelVersion
protected void incrementRuleModelVersion(SourceRuleModel ruleModel)
-
historicalVersionMustBeCreated
protected boolean historicalVersionMustBeCreated(SourceRuleModel sourceRule, InterceptorContext context)
-
ruleStatusChangedToPublished
protected boolean ruleStatusChangedToPublished(SourceRuleModel model, InterceptorContext context)
-
doCreateHistoricalVersion
protected SourceRuleModel doCreateHistoricalVersion(SourceRuleModel sourceRule, InterceptorContext context)
-
putOriginalValuesIntoHistoricalVersion
protected void putOriginalValuesIntoHistoricalVersion(SourceRuleModel sourceRule, SourceRuleModel historicalSourceRule, InterceptorContext ctx)
-
modelIsValid
protected boolean modelIsValid(SourceRuleModel sourceRule)
-
modelIsBeingModified
protected boolean modelIsBeingModified(AbstractRuleModel ruleModel, InterceptorContext ctx)
-
essentialFieldsAreModified
protected boolean essentialFieldsAreModified(AbstractRuleModel ruleModel, InterceptorContext ctx)
-
associatedTypesChanged
protected boolean associatedTypesChanged(AbstractRuleModel ruleModel, InterceptorContext ctx)
-
getNonEssentialAttributes
protected java.lang.String[] getNonEssentialAttributes()
-
matchAnyOf
protected boolean matchAnyOf(java.lang.String sample, java.lang.String... probes)
-
hasStatus
protected boolean hasStatus(InterceptorContext ctx, SourceRuleModel sourceRule, RuleStatus ruleStatus)
-
getOriginal
protected <T> T getOriginal(SourceRuleModel sourceRule, InterceptorContext context, java.lang.String attributeQualifier)
-
getRuleDao
protected RuleDao getRuleDao()
-
setRuleDao
public void setRuleDao(RuleDao ruleDao)
-
getHistoricalRuleContentProviders
protected java.util.List<HistoricalRuleContentProvider> getHistoricalRuleContentProviders()
-
setHistoricalRuleContentProviders
public void setHistoricalRuleContentProviders(java.util.List<HistoricalRuleContentProvider> historicalRuleContentProviders)
-
-