[Carbon-commits] [Carbon] svn commit r92413 - trunk/carbon/components/registry/org.wso2.carbon.registry.extensions/src/main/java/org/wso2/carbon/registry/extensions/handlers/utils
senaka at wso2.com
senaka at wso2.com
Mon Apr 25 00:58:19 PDT 2011
Author: senaka
Date: Mon Apr 25 00:58:19 2011
New Revision: 92413
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=92413
Log:
fixing Symlink issues when uploading WSDL more than once.
Modified:
trunk/carbon/components/registry/org.wso2.carbon.registry.extensions/src/main/java/org/wso2/carbon/registry/extensions/handlers/utils/SchemaProcessor.java
trunk/carbon/components/registry/org.wso2.carbon.registry.extensions/src/main/java/org/wso2/carbon/registry/extensions/handlers/utils/WSDLProcessor.java
Modified: trunk/carbon/components/registry/org.wso2.carbon.registry.extensions/src/main/java/org/wso2/carbon/registry/extensions/handlers/utils/SchemaProcessor.java
URL: http://wso2.org/svn/browse/wso2/trunk/carbon/components/registry/org.wso2.carbon.registry.extensions/src/main/java/org/wso2/carbon/registry/extensions/handlers/utils/SchemaProcessor.java?rev=92413&r1=92412&r2=92413&view=diff
==============================================================================
--- trunk/carbon/components/registry/org.wso2.carbon.registry.extensions/src/main/java/org/wso2/carbon/registry/extensions/handlers/utils/SchemaProcessor.java (original)
+++ trunk/carbon/components/registry/org.wso2.carbon.registry.extensions/src/main/java/org/wso2/carbon/registry/extensions/handlers/utils/SchemaProcessor.java Mon Apr 25 00:58:19 2011
@@ -373,7 +373,16 @@
}
}
}
- registry.createLink(symlinkLocation + resourceName, schemaPath);
+ String symlinkPath = symlinkLocation + resourceName;
+ if (registry.resourceExists(symlinkPath)) {
+ if (registry.get(symlinkPath).getProperty(RegistryConstants.REGISTRY_LINK) !=
+ null) {
+ registry.removeLink(symlinkPath);
+ registry.createLink(symlinkPath, schemaPath);
+ }
+ } else {
+ registry.createLink(symlinkPath, schemaPath);
+ }
}
if (schemaInfo.isMasterSchema()) {
Modified: trunk/carbon/components/registry/org.wso2.carbon.registry.extensions/src/main/java/org/wso2/carbon/registry/extensions/handlers/utils/WSDLProcessor.java
URL: http://wso2.org/svn/browse/wso2/trunk/carbon/components/registry/org.wso2.carbon.registry.extensions/src/main/java/org/wso2/carbon/registry/extensions/handlers/utils/WSDLProcessor.java?rev=92413&r1=92412&r2=92413&view=diff
==============================================================================
--- trunk/carbon/components/registry/org.wso2.carbon.registry.extensions/src/main/java/org/wso2/carbon/registry/extensions/handlers/utils/WSDLProcessor.java (original)
+++ trunk/carbon/components/registry/org.wso2.carbon.registry.extensions/src/main/java/org/wso2/carbon/registry/extensions/handlers/utils/WSDLProcessor.java Mon Apr 25 00:58:19 2011
@@ -646,7 +646,17 @@
}
}
}
- registry.createLink(symlinkLocation + resourceName, wsdlPath);
+ String symlinkPath = symlinkLocation + resourceName;
+ if (registry.resourceExists(symlinkPath)) {
+ if (registry.get(symlinkPath)
+ .getProperty(RegistryConstants.REGISTRY_LINK) !=
+ null) {
+ registry.removeLink(symlinkPath);
+ registry.createLink(symlinkPath, wsdlPath);
+ }
+ } else {
+ registry.createLink(symlinkPath, wsdlPath);
+ }
}
identifyAssociationsNew(wsdlInfo);
More information about the Carbon-commits
mailing list