public void retrieveAssetContent(RuleAsset asset, AssetItem item) throws SerializationException { RuleModel ruleModel = getBrlXmlPersistence().unmarshal(item.getContent()); ruleModel.name = asset.getName(); asset.setContent(ruleModel); }
public void storeAssetContent(RuleAsset asset, AssetItem repoAsset) throws SerializationException { RuleModel data = (RuleModel) asset.getContent(); if (data.name == null) { data.name = repoAsset.getName(); } repoAsset.updateContent(getBrlXmlPersistence().marshal(data)); }
private String getSourceDRL(RuleModel model, BRMSPackageBuilder builder) { String drl = getBrlDrlPersistence().marshal(model); if (builder.hasDSL() && model.hasDSLSentences()) { drl = builder.getDSLExpander().expand(drl); } return drl; }
public RuleModel getRuleModel(BRLColumn<IPattern, BRLConditionVariableColumn> column) { RuleModel ruleModel = new RuleModel(); List<IPattern> definition = column.getDefinition(); ruleModel.lhs = definition.toArray(new IPattern[definition.size()]); return ruleModel; }
protected RuleModel buildModelFromAsset(AssetItem asset) { RuleModel model = getBrlXmlPersistence().unmarshal(asset.getContent()); model.name = asset.getName(); model.parentName = this.parentNameFromCategory(asset, model.parentName); return model; }