Author: keith
Date: Sun Jan 27 07:40:14 2008
New Revision: 13006
Log:
Removing unused code
Modified:
trunk/mashup/java/modules/coreservices/servicesharinghelper/src/org/wso2/mashup/coreservices/servicesharinghelper/ServiceSharingHelper.java
trunk/mashup/java/modules/coreservices/sharingservice/META-INF/services.xml
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 Jan 27 07:40:14 2008
@@ -90,49 +90,4 @@
success = true;
return Boolean.valueOf(success);
}
-
- /**
- * Downloads a service from a remote Mashup server to this Mashup server.
We
- * expose this only through https, hence it's safe to get the username &
- * password in plain text.
- *
- * @param remoteServer -
- * Remote sever which has the downloadable service
- * @param serviceName of the downloadable service
- * @param username -
- * an admin user name of this server
- * @param password -
- * password for the above user.
- * @return Boolean - Indicating whether the operation was succesfull
- * @throws IOException - Thrown in case an IO Exception Occurs
- */
- public Boolean downloadService(String remoteServer, String serviceName,
String username,
- String password) throws IOException {
- MessageContext messageContext =
MessageContext.getCurrentMessageContext();
- ConfigurationContext configurationContext =
messageContext.getConfigurationContext();
- String remoteIP = (String)
messageContext.getProperty(MessageContext.REMOTE_ADDR);
- SimpleDateFormat date = new SimpleDateFormat("'['yyyy-MM-dd
HH:mm:ss,SSSS']'");
- Date currentTime = Calendar.getInstance().getTime();
- boolean loggedIn;
- try {
- loggedIn = MashupUtils.authenticateUser(username, password);
- } catch (UserManagerException e) {
- throw AxisFault.makeFault(e);
- }
- if (loggedIn) {
- AxisConfiguration axisConfiguration =
configurationContext.getAxisConfiguration();
-
- // forms might have posted the data with URLEncoding
- remoteServer = URIEncoderDecoder.decode(remoteServer);
- MashupArchiveManupulator archiveManupulator = new
MashupArchiveManupulator();
- archiveManupulator.downloadMashupService(remoteServer,
serviceName, username, password,
- messageContext,
axisConfiguration);
- log.info("Downloaded Service \'" + serviceName + " at " +
date.format(currentTime));
- return Boolean.TRUE;
- }
- log.info("Authentication Failure : Download Service \'" + serviceName
+ "' from \'"
- + remoteServer + "' with username \'" + username + "' failed
from IP address "
- + remoteIP + " at " + date.format(currentTime) + " failed.");
- throw new AxisFault("Username or password for the local server is
incorrect.");
- }
}
Modified:
trunk/mashup/java/modules/coreservices/sharingservice/META-INF/services.xml
==============================================================================
--- trunk/mashup/java/modules/coreservices/sharingservice/META-INF/services.xml
(original)
+++ trunk/mashup/java/modules/coreservices/sharingservice/META-INF/services.xml
Sun Jan 27 07:40:14 2008
@@ -25,9 +25,6 @@
org.wso2.mashup.share.service.MashupSharingService
</parameter>
<parameter name="serviceType"
locked="false">MashupReadOnlyService</parameter>
- <operation name="getMashup">
- <parameter name="enableMTOM">true</parameter>
- </operation>
<schema schemaNamespace="http://service.share.mashup.wso2.org/xsd"/>
</service>
</serviceGroup>
\ No newline at end of file
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 Jan 27 07:40:14 2008
@@ -68,31 +68,5 @@
}
MashupArchiveManupulator archiveManupulator = new
MashupArchiveManupulator();
archiveManupulator.deploySharedService(fileName, username, password,
dataHandler, axisConfiguration);
- }
-
- /**
- * Facilitate the downloading of mashup services by a remote Mashup Server.
- *
- * @param serviceName - The name of the service
- * @return DataHandler containing an archived Mashup Service
- * @throws IOException - Thrown in case the service cannot be found
- */
- public DownloadServiceResponse getMashup(String serviceName) throws
IOException {
- ConfigurationContext configurationContext =
MessageContext.getCurrentMessageContext()
- .getConfigurationContext();
- AxisConfiguration axisConfiguration =
configurationContext.getAxisConfiguration();
- AxisService service = axisConfiguration.getService(serviceName);
- if (service == null) {
- throw new MashupFault(
- "Requested Mashup service cannot be found in the remote
Mashup server.");
- }
- MashupArchiveManupulator mashupArchiveManupulator = new
MashupArchiveManupulator();
- DataHandler mashupServiceDataHandler = mashupArchiveManupulator
- .createMashupArchiveDataHandler(service, configurationContext);
- Parameter serviceJSParameter =
service.getParameter(JavaScriptEngineConstants.SERVICE_JS);
- // We do not need to check for Null or whether this is a file as we
have
- // already checked it inside the createMashupArchiveDataHandler method.
- File serviceJS = (File) serviceJSParameter.getValue();
- return new DownloadServiceResponse(serviceJS.getName(),
mashupServiceDataHandler);
- }
+ }
}
_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev