Author: tyrell
Date: Sun Mar  9 23:44:12 2008
New Revision: 14628

Log:

Enabling sharing backward compatibility with previous versions.

Modified:
   
trunk/mashup/java/modules/coreservices/servicesharinghelper/src/org/wso2/mashup/coreservices/servicesharinghelper/ServiceSharingHelper.java
   
trunk/mashup/java/modules/coreservices/sharingservice/src/org/wso2/mashup/share/service/MashupSharingService.java

Modified: 
trunk/mashup/java/modules/coreservices/servicesharinghelper/src/org/wso2/mashup/coreservices/servicesharinghelper/ServiceSharingHelper.java
==============================================================================
--- 
trunk/mashup/java/modules/coreservices/servicesharinghelper/src/org/wso2/mashup/coreservices/servicesharinghelper/ServiceSharingHelper.java
 (original)
+++ 
trunk/mashup/java/modules/coreservices/servicesharinghelper/src/org/wso2/mashup/coreservices/servicesharinghelper/ServiceSharingHelper.java
 Sun Mar  9 23:44:12 2008
@@ -52,12 +52,6 @@
             throws IOException {
         boolean success;
 
-        //Adding this to maintain backward compatibility with older versions 
of the Mashup Server
-        String overWrite = "false";
-        if(overwriteExisting != null){
-            overWrite = overwriteExisting;
-        }
-
         MessageContext currentMessageContext = 
MessageContext.getCurrentMessageContext();
         AxisConfiguration configuration = 
currentMessageContext.getAxisService()
                 .getAxisConfiguration();
@@ -88,7 +82,7 @@
                 
serviceName.substring(serviceName.indexOf(MashupConstants.SEPARATOR_CHAR) + 1);
         
masshupArchiveManupulator.uploadMashupService(destinationServerAddress, 
dataHandler,
                                                       configContext, 
serviceJS.getName(),
-                                                      shortServiceName, 
username, password, overWrite);
+                                                      shortServiceName, 
username, password, overwriteExisting);
         log
                 .info("Shared Service \'" + serviceName + "' to the 
destination server"
                         + destinationServerAddress + " at " + 
date.format(currentTime) + "from "

Modified: 
trunk/mashup/java/modules/coreservices/sharingservice/src/org/wso2/mashup/share/service/MashupSharingService.java
==============================================================================
--- 
trunk/mashup/java/modules/coreservices/sharingservice/src/org/wso2/mashup/share/service/MashupSharingService.java
   (original)
+++ 
trunk/mashup/java/modules/coreservices/sharingservice/src/org/wso2/mashup/share/service/MashupSharingService.java
   Sun Mar  9 23:44:12 2008
@@ -74,6 +74,12 @@
         //Authenticating the user
         boolean authenticated = false;
 
+        //Adding this to maintain backward compatibility with older versions 
of the Mashup Server
+        String overWrite = "false";
+        if(overwriteExisting != null){
+            overWrite = overwriteExisting;
+        }
+
         try {
             authenticated = MashupUtils.authenticateUser(username, password);
         } catch (AuthenticatorException e) {
@@ -91,7 +97,7 @@
                 .getAxisConfiguration();
         if ((axisConfiguration
                 .getService(username + MashupConstants.SEPARATOR_CHAR + 
serviceName) != null) &&
-                (!overwriteExisting.equals("true"))) {
+                (!overWrite.equals("true"))) {
             throw new AxisFault(
                     "A Service with a same name already exists in the remote 
Mashup Server.");
         }

_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev

Reply via email to