synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u...@apache.org
Subject svn commit: r603845 - in /webservices/synapse/trunk/java/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf: ScriptMediator.java ScriptMediatorSerializer.java
Date Thu, 13 Dec 2007 07:20:09 GMT
Author: upul
Date: Wed Dec 12 23:20:08 2007
New Revision: 603845

URL: http://svn.apache.org/viewvc?rev=603845&view=rev
Log:
script mediator - added include element for serialization

Modified:
    webservices/synapse/trunk/java/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/ScriptMediator.java
    webservices/synapse/trunk/java/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/ScriptMediatorSerializer.java

Modified: webservices/synapse/trunk/java/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/ScriptMediator.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/ScriptMediator.java?rev=603845&r1=603844&r2=603845&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/ScriptMediator.java
(original)
+++ webservices/synapse/trunk/java/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/ScriptMediator.java
Wed Dec 12 23:20:08 2007
@@ -362,4 +362,13 @@
         log.error(msg);
         throw new SynapseException(msg);
     }
+
+    public Map getIncludeMap() {
+      return includes;
+    }
+
+    public void setIncludeMap(Map includeMap) {
+      this.includes = includeMap;
+    }
+    
 }

Modified: webservices/synapse/trunk/java/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/ScriptMediatorSerializer.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/ScriptMediatorSerializer.java?rev=603845&r1=603844&r2=603845&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/ScriptMediatorSerializer.java
(original)
+++ webservices/synapse/trunk/java/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/ScriptMediatorSerializer.java
Wed Dec 12 23:20:08 2007
@@ -18,6 +18,9 @@
  */
 package org.apache.synapse.mediators.bsf;
 
+import java.util.Iterator;
+import java.util.Map;
+
 import org.apache.synapse.config.xml.AbstractMediatorSerializer;
 import org.apache.synapse.Mediator;
 import org.apache.commons.logging.Log;
@@ -25,6 +28,9 @@
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.impl.llom.OMTextImpl;
 
+import com.sun.java_cup.internal.internal_error;
+
+
 import javax.xml.stream.XMLStreamConstants;
 
 /**
@@ -58,6 +64,15 @@
             OMTextImpl textData = (OMTextImpl) fac.createOMText(scriptMediator.getScriptSrc().trim());
             textData.setType(XMLStreamConstants.CDATA);
             script.addChild(textData);
+        }
+        
+        Map includeMap = scriptMediator.getIncludeMap();
+        Iterator iterIncludeMap = includeMap.keySet().iterator();
+        while(iterIncludeMap.hasNext()) {
+          String includeKey = (String) iterIncludeMap.next();
+          OMElement includeKeyElement = fac.createOMElement("include", synNS);
+          includeKeyElement.addAttribute(fac.createOMAttribute("key", nullNS, includeKey));
+          script.addChild(includeKeyElement);
         }
 
         saveTracingState(script, scriptMediator);



---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


Mime
View raw message