Sorry for not being clear, here's what I have so far.
Code: Select all
@ManyToMany(targetEntity = StructuredContentRuleImpl.class, cascade = {CascadeType.ALL})
@JoinTable(name = "BLC_SC_RULE_MAP", inverseJoinColumns = @JoinColumn(name = "SC_RULE_ID", referencedColumnName = "SC_RULE_ID"))
@Cascade(value={org.hibernate.annotations.CascadeType.ALL, org.hibernate.annotations.CascadeType.DELETE_ORPHAN})
@MapKeyColumn(name = "MAP_KEY", nullable = false)
@AdminPresentationMapFields(
mapDisplayFields = {
@AdminPresentationMapField(
fieldName = RuleIdentifier.CUSTOMER_FIELD_KEY,
fieldPresentation = @AdminPresentation(fieldType = SupportedFieldType.RULE_SIMPLE, order = 1,
tab = Presentation.Tab.Name.Rules, tabOrder = Presentation.Tab.Order.Rules,
group = Presentation.Group.Name.General, groupOrder = Presentation.Group.Order.General,
ruleIdentifier = RuleIdentifier.CUSTOMER, friendlyName = "Generic_TCCustomer_Rule")
),
@AdminPresentationMapField(
fieldName = RuleIdentifier.[b]MY CUSTOM FIELD NAME[/b],
fieldPresentation = @AdminPresentation(fieldType = SupportedFieldType.RULE_SIMPLE, order = 2,
tab = Presentation.Tab.Name.Rules, tabOrder = Presentation.Tab.Order.Rules,
group = Presentation.Group.Name.General, groupOrder = Presentation.Group.Order.General,
ruleIdentifier = RuleIdentifier.[b]MY ENTITY CONTEXT[/b], friendlyName = "Generic_MyOwnEntity_Rule")
)
}
)
Map<String, StructuredContentRule> structuredContentMatchRules = new HashMap<String, StructuredContentRule>();
I need to create a rule matching based on my newly created entity fields
And im also confused on how I can implement the rule matching.. for example the customer fields
And how to create StructuredContent Processors. Im currently looking at the
StructuredContentCartRuleProcessor