You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by ch...@apache.org on 2007/05/17 11:36:10 UTC

svn commit: r538848 - in /webservices/synapse/trunk/java: modules/samples/src/main/java/samples/mediators/DiscountQuoteMediator.java repository/conf/sample/synapse_sample_600.xml

Author: chathura_ce
Date: Thu May 17 02:36:09 2007
New Revision: 538848

URL: http://svn.apache.org/viewvc?view=rev&rev=538848
Log:
Minor fix to the class mediator sample class.
Added license to the sample 600.

Modified:
    webservices/synapse/trunk/java/modules/samples/src/main/java/samples/mediators/DiscountQuoteMediator.java
    webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_600.xml

Modified: webservices/synapse/trunk/java/modules/samples/src/main/java/samples/mediators/DiscountQuoteMediator.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/src/main/java/samples/mediators/DiscountQuoteMediator.java?view=diff&rev=538848&r1=538847&r2=538848
==============================================================================
--- webservices/synapse/trunk/java/modules/samples/src/main/java/samples/mediators/DiscountQuoteMediator.java (original)
+++ webservices/synapse/trunk/java/modules/samples/src/main/java/samples/mediators/DiscountQuoteMediator.java Thu May 17 02:36:09 2007
@@ -1,5 +1,23 @@
-package samples.mediators;
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
 
+package samples.mediators;
 
 import org.apache.synapse.MessageContext;
 import org.apache.synapse.Mediator;
@@ -40,6 +58,7 @@
         //Special discount of 5% offers for the first responses as set in the bonusFor property
         if (bonusCount <= bonusNo) {
             lastPrice = new Double(lastPrice.doubleValue() - lastPrice.doubleValue() * 0.05);
+            bonusCount++;
         }
 
         String discountedPrice = lastPrice.toString();
@@ -81,6 +100,5 @@
     public String getBonusFor(){
         return bonusFor;
     }
-
 }
 

Modified: webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_600.xml
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_600.xml?view=diff&rev=538848&r1=538847&r2=538848
==============================================================================
--- webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_600.xml (original)
+++ webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_600.xml Thu May 17 02:36:09 2007
@@ -1,3 +1,23 @@
+<!--
+  ~  Licensed to the Apache Software Foundation (ASF) under one
+  ~  or more contributor license agreements.  See the NOTICE file
+  ~  distributed with this work for additional information
+  ~  regarding copyright ownership.  The ASF licenses this file
+  ~  to you under the Apache License, Version 2.0 (the
+  ~  "License"); you may not use this file except in compliance
+  ~  with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing,
+  ~  software distributed under the License is distributed on an
+  ~   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~  KIND, either express or implied.  See the License for the
+  ~  specific language governing permissions and limitations
+  ~  under the License.
+  -->
+
+<!-- Demonstrate the use of class mediator -->
 <definitions xmlns="http://ws.apache.org/ns/synapse">
 
     <sequence name="fault">



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