コード例 #1
0
ファイル: BRLContentHandler.java プロジェクト: Rikkola/guvnor
  public void retrieveAssetContent(RuleAsset asset, AssetItem item) throws SerializationException {
    RuleModel ruleModel = getBrlXmlPersistence().unmarshal(item.getContent());

    ruleModel.name = asset.getName();

    asset.setContent(ruleModel);
  }
コード例 #2
0
 public void onSave() {
   try {
     String s =
         callSave(
             ((IFrameElement) ((com.google.gwt.dom.client.Element) frame.getElement()))
                 .getContentDocument());
     String p =
         callPreprocessingData(
             ((IFrameElement) ((com.google.gwt.dom.client.Element) frame.getElement()))
                 .getContentDocument());
     if (asset.getContent() == null) {
       asset.setContent(new RuleFlowContentModel());
     }
     ((RuleFlowContentModel) asset.getContent()).setXml(null);
     ((RuleFlowContentModel) asset.getContent()).setJson(s);
     ((RuleFlowContentModel) asset.getContent()).setPreprocessingdata(p);
   } catch (Exception e) {
     GWT.log("JSNI method callSave() threw an exception:", e);
     Window.alert("JSNI method callSave() threw an exception: " + e);
   }
 }