Esempio n. 1
0
  public void retrieveAssetContent(RuleAsset asset, AssetItem item) throws SerializationException {
    RuleModel ruleModel = getBrlXmlPersistence().unmarshal(item.getContent());

    ruleModel.name = asset.getName();

    asset.setContent(ruleModel);
  }
Esempio n. 2
0
 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));
 }
Esempio n. 3
0
  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;
 }
Esempio n. 5
0
 protected RuleModel buildModelFromAsset(AssetItem asset) {
   RuleModel model = getBrlXmlPersistence().unmarshal(asset.getContent());
   model.name = asset.getName();
   model.parentName = this.parentNameFromCategory(asset, model.parentName);
   return model;
 }