Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 59789 Details for
Bug 150385
Dependency on Apache Muse libraries for WSDM support in TPTP
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch for Axis-2 Dependency
Axis2_AbsolutePathsForLibFiles.txt (text/plain), 27.56 KB, created by
Saurabh Dravid
on 2007-02-26 10:10:35 EST
(
hide
)
Description:
Patch for Axis-2 Dependency
Filename:
MIME Type:
Creator:
Saurabh Dravid
Created:
2007-02-26 10:10:35 EST
Size:
27.56 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.tptp.wsdm.editor >Index: src/org/eclipse/tptp/wsdm/tooling/nls/messages/validation/internal/Messages.java >=================================================================== >RCS file: /cvsroot/ganges/org.eclipse.tptp.wsdm.editor/src/org/eclipse/tptp/wsdm/tooling/nls/messages/validation/internal/Messages.java,v >retrieving revision 1.1 >diff -u -r1.1 Messages.java >--- src/org/eclipse/tptp/wsdm/tooling/nls/messages/validation/internal/Messages.java 8 Feb 2007 19:40:12 -0000 1.1 >+++ src/org/eclipse/tptp/wsdm/tooling/nls/messages/validation/internal/Messages.java 26 Feb 2007 15:01:41 -0000 >@@ -43,6 +43,8 @@ > > public static String INVALID_XML_MESSAGE; > >+ public static String COULDNT_FIND_AXIS_VALIDATOR_EXT; >+ public static String COULDNT_FIND_AXIS_VALIDATOR; > static > { > NLS.initializeMessages(BUNDLE_NAME, Messages.class); >Index: src/org/eclipse/tptp/wsdm/tooling/nls/messages/validation/internal/messages.properties >=================================================================== >RCS file: /cvsroot/ganges/org.eclipse.tptp.wsdm.editor/src/org/eclipse/tptp/wsdm/tooling/nls/messages/validation/internal/messages.properties,v >retrieving revision 1.1 >diff -u -r1.1 messages.properties >--- src/org/eclipse/tptp/wsdm/tooling/nls/messages/validation/internal/messages.properties 8 Feb 2007 19:40:12 -0000 1.1 >+++ src/org/eclipse/tptp/wsdm/tooling/nls/messages/validation/internal/messages.properties 26 Feb 2007 15:01:41 -0000 >@@ -39,3 +39,6 @@ > FAILED_TO_CLOSE_IS = Failed to close the open inputstream > > INVALID_XML_MESSAGE = Invalid xml file : {0} >+ >+COULDNT_FIND_AXIS_VALIDATOR_EXT = Cannot find axisValidator extension >+COULDNT_FIND_AXIS_VALIDATOR = Found no axisValidator >\ No newline at end of file >Index: src/org/eclipse/tptp/wsdm/tooling/nls/messages/mrt/internal/Messages.java >=================================================================== >RCS file: /cvsroot/ganges/org.eclipse.tptp.wsdm.editor/src/org/eclipse/tptp/wsdm/tooling/nls/messages/mrt/internal/Messages.java,v >retrieving revision 1.5 >diff -u -r1.5 Messages.java >--- src/org/eclipse/tptp/wsdm/tooling/nls/messages/mrt/internal/Messages.java 25 Feb 2007 22:57:22 -0000 1.5 >+++ src/org/eclipse/tptp/wsdm/tooling/nls/messages/mrt/internal/Messages.java 26 Feb 2007 15:01:41 -0000 >@@ -144,10 +144,12 @@ > public static String CODEGEN_PREF_SERVERLOC; > public static String CODE_GEN_AXIS2_PROJECT_DIR; > public static String CODE_GEN_AXIS2_LOCATION_ERROR; >- public static String CODE_GEN_AXIS2_INSTAL_LOC_ERROR; > public static String PORT_TO_LISTEN_FOR_OSGI_ENDPOINT; > public static String MUST_RESTART_TO_APPLY; >- >+ public static String CODE_GEN_AXIS2_LIB_LOC_ERROR; >+ public static String CODE_GEN_INVALID_JAR_PATTER; >+ public static String CODE_GEN_INVALID_MAR_PATTER; >+ > static > { > NLS.initializeMessages(BUNDLE_NAME, Messages.class); >Index: src/org/eclipse/tptp/wsdm/tooling/nls/messages/mrt/internal/messages.properties >=================================================================== >RCS file: /cvsroot/ganges/org.eclipse.tptp.wsdm.editor/src/org/eclipse/tptp/wsdm/tooling/nls/messages/mrt/internal/messages.properties,v >retrieving revision 1.5 >diff -u -r1.5 messages.properties >--- src/org/eclipse/tptp/wsdm/tooling/nls/messages/mrt/internal/messages.properties 25 Feb 2007 22:57:22 -0000 1.5 >+++ src/org/eclipse/tptp/wsdm/tooling/nls/messages/mrt/internal/messages.properties 26 Feb 2007 15:01:41 -0000 >@@ -137,8 +137,10 @@ > FAILED_TO_INITIALIZE_MUSE_DESCRIPTOR_ERROR_ = IWAT0682E Failed to initialize muse descriptor > CODE_GEN_VALIDATE_SLOCATION = Validating the Server Location > CODEGEN_PREF_SERVERLOC = Please specify Axis2 server location: >-CODE_GEN_AXIS2_PROJECT_DIR = Axis2 Server directory must be specified >-CODE_GEN_AXIS2_LOCATION_ERROR = Invalid Axis2 Server location path >-CODE_GEN_AXIS2_INSTAL_LOC_ERROR = Invalid Axis2 Server Installation Path >+CODE_GEN_AXIS2_PROJECT_DIR = Please specify server home location >+CODE_GEN_AXIS2_LOCATION_ERROR = Specified location {0} did not exists >+CODE_GEN_AXIS2_LIB_LOC_ERROR = Specified location {0} did not exists >+CODE_GEN_INVALID_JAR_PATTER = Jar file did not exists in lib folder : {0} >+CODE_GEN_INVALID_MAR_PATTER = Mar file did not exists in modules folder : {0} > PORT_TO_LISTEN_FOR_OSGI_ENDPOINT = Port on which workbench should listen for notifications > MUST_RESTART_TO_APPLY = The workbench will be restarted when you change this setting >Index: src/org/eclipse/tptp/wsdm/tooling/editor/internal/Activator.java >=================================================================== >RCS file: /cvsroot/ganges/org.eclipse.tptp.wsdm.editor/src/org/eclipse/tptp/wsdm/tooling/editor/internal/Activator.java,v >retrieving revision 1.1 >diff -u -r1.1 Activator.java >--- src/org/eclipse/tptp/wsdm/tooling/editor/internal/Activator.java 8 Feb 2007 19:40:14 -0000 1.1 >+++ src/org/eclipse/tptp/wsdm/tooling/editor/internal/Activator.java 26 Feb 2007 15:01:41 -0000 >@@ -46,6 +46,10 @@ > // Codegen extension point > public static final String CODEGEN_EXT_PT = "codeGeneration"; > >+ // Axis2 extenstion point >+ public static final String AXIS2_EXT_PT = "axisValidator"; >+ >+ > /** > * Keep track of the singleton. <!-- begin-user-doc --> <!-- end-user-doc > * --> >Index: src/org/eclipse/tptp/wsdm/tooling/codegen/mrt/provisional/EclipseConfigurationData.java >=================================================================== >RCS file: /cvsroot/ganges/org.eclipse.tptp.wsdm.editor/src/org/eclipse/tptp/wsdm/tooling/codegen/mrt/provisional/EclipseConfigurationData.java,v >retrieving revision 1.1 >diff -u -r1.1 EclipseConfigurationData.java >--- src/org/eclipse/tptp/wsdm/tooling/codegen/mrt/provisional/EclipseConfigurationData.java 19 Feb 2007 19:39:12 -0000 1.1 >+++ src/org/eclipse/tptp/wsdm/tooling/codegen/mrt/provisional/EclipseConfigurationData.java 26 Feb 2007 15:01:41 -0000 >@@ -16,4 +16,5 @@ > public static final String ADDITIONAL_JARS = "jars"; > public static final String INSTANCES = "instances"; > public static final String PROGRESS_MONITOR = "progress_monitor"; >+ public static final String AXIS2_FILES = "axis2_files"; > } >Index: src/org/eclipse/tptp/wsdm/tooling/codegen/mrt/provisional/NewProjectWizard.java >=================================================================== >RCS file: /cvsroot/ganges/org.eclipse.tptp.wsdm.editor/src/org/eclipse/tptp/wsdm/tooling/codegen/mrt/provisional/NewProjectWizard.java,v >retrieving revision 1.3 >diff -u -r1.3 NewProjectWizard.java >--- src/org/eclipse/tptp/wsdm/tooling/codegen/mrt/provisional/NewProjectWizard.java 23 Feb 2007 07:30:19 -0000 1.3 >+++ src/org/eclipse/tptp/wsdm/tooling/codegen/mrt/provisional/NewProjectWizard.java 26 Feb 2007 15:01:41 -0000 >@@ -86,7 +86,9 @@ > private boolean updatePreference; > > java.net.URI _projectLocation; >- >+ >+ private String[] _requiredAxis2Files; >+ > /** > * Class that creates the Code Generation Wizard to create new Project > * @param codeGenerationDelegate >@@ -132,8 +134,10 @@ > if(updatePreference) > { > IPreferenceStore store = Activator.getPlugin().getPreferenceStore(); >- store.setValue(Axis2ServerLocationPreferencePage.SERVER_LOCATION_PREFERENCE_KEY,_serverLocation); >+ store.setValue(Axis2ServerLocationPreferencePage.SERVER_LOCATION_PREFERENCE_KEY,_serverLocation); >+ // Update the Lib and module location > } >+ _requiredAxis2Files = _axis2ServerLocationPage.getAxis2FilesToCopy(); > } > catch(Exception e) > { >@@ -146,9 +150,11 @@ > _helper = _codeGenerationDelegate.run(new SubProgressMonitor( > monitor, 1)); > // Step 3 : Copy the axis2 files for CodeGeneration >- String[] axis2files = _axis2ServerLocationPage.getAxis2Files(); >+/* String[] axis2files = _axis2ServerLocationPage.getAxis2Files(); > if(_isAxis2Project) > _helper.addAdditionalJars(_serverLocation, axis2files); >+*/ >+ > monitor.worked(1); > } > catch (Exception e) >@@ -256,6 +262,8 @@ > { > ConfigurationData data = new ConfigurationData(); > >+ data.addParameter(EclipseConfigurationData.AXIS2_FILES, _requiredAxis2Files); >+ > data.addParameter(ConfigurationData.DESCRIPTOR_DOCUMENT, _helper > .getDescriptorDocument()); > data.addParameter(EclipseConfigurationData.ADDITIONAL_JARS, _helper >Index: src/org/eclipse/tptp/wsdm/tooling/codegen/mrt/provisional/Axis2ServerLocationPage.java >=================================================================== >RCS file: /cvsroot/ganges/org.eclipse.tptp.wsdm.editor/src/org/eclipse/tptp/wsdm/tooling/codegen/mrt/provisional/Axis2ServerLocationPage.java,v >retrieving revision 1.2 >diff -u -r1.2 Axis2ServerLocationPage.java >--- src/org/eclipse/tptp/wsdm/tooling/codegen/mrt/provisional/Axis2ServerLocationPage.java 21 Feb 2007 13:46:51 -0000 1.2 >+++ src/org/eclipse/tptp/wsdm/tooling/codegen/mrt/provisional/Axis2ServerLocationPage.java 26 Feb 2007 15:01:41 -0000 >@@ -12,8 +12,6 @@ > > package org.eclipse.tptp.wsdm.tooling.codegen.mrt.provisional; > >-import java.io.File; >- > import org.eclipse.jface.preference.IPreferenceStore; > import org.eclipse.jface.wizard.WizardPage; > import org.eclipse.osgi.util.TextProcessor; >@@ -32,6 +30,7 @@ > import org.eclipse.tptp.wsdm.tooling.editor.internal.Activator; > import org.eclipse.tptp.wsdm.tooling.nls.messages.mrt.internal.Messages; > import org.eclipse.tptp.wsdm.tooling.preferences.internal.Axis2ServerLocationPreferencePage; >+import org.eclipse.tptp.wsdm.tooling.validation.util.internal.ValidationUtils; > > /** > * This is Wizard Page to show the Axis2 server location details >@@ -43,9 +42,8 @@ > protected Text _serverNameField; > private Button _browseButton; > private Button _preferenceUpdate; >- private final String[] axis2files = {"lib/axis2-adb-1.1.1.jar", >- "lib/axis2-codegen-1.1.1.jar","lib/axis2-java2wsdl-1.1.1.jar"}; >- >+ private String[] _filesToCopy; >+ > /** > * Instantiates the class. > */ >@@ -114,7 +112,7 @@ > } > }); > >- _serverNameField.setText(getPreferenceServerLocation()); >+ // _serverNameField.setText(getPreferenceServerLocation()); > > // browse button > _browseButton = new Button(parent, SWT.PUSH); >@@ -186,55 +184,66 @@ > > private String validateLocation() > { >- String locationFieldContents = _serverNameField.getText(); >- if (locationFieldContents.length() == 0) >- return(Messages.CODE_GEN_AXIS2_PROJECT_DIR); >- >- java.io.File newPath = new java.io.File(_serverNameField.getText()); >- if (!newPath.exists()) >- return(Messages.CODE_GEN_AXIS2_LOCATION_ERROR); >+ String serverHome = _serverNameField.getText(); > >- if(newPath.exists()) >- { >- // Step 2 : Check for Axis2 installation libraries >- boolean found = true; >+ ISoapServerDependency axisValidators[] = ValidationUtils.getAllAxisValidators(); >+ for(int i = 0 ; i < axisValidators.length ; i++){ > >- for(int i = 0 ; i < axis2files.length ; i++) >- { >- File axisFile = new File(locationFieldContents+ File.separator+axis2files[i]); >- if(axisFile.exists()) >- continue; >- else >- { >- found = false; >- break; >- } >- } >- if(!found) >- { >- return Messages.CODE_GEN_AXIS2_INSTAL_LOC_ERROR; >- } >+ ISoapServerDependency axis2Dependency = (Axis2ServerDependency)axisValidators[i]; >+ String errorMessage = axis2Dependency.validateSoapServerHome(serverHome); >+ if(errorMessage!=null) >+ return errorMessage; >+ _filesToCopy = axis2Dependency.getFilesToCopy(); >+ if(_filesToCopy == null) >+ _filesToCopy = new String[0]; > } >- return null; >+ return null; > } > > /** >- * Returns the Axis2 files >+ * Returns the Axis2 files to copied to generated code > * @return > */ >- public String[] getAxis2Files() >+ public String[] getAxis2FilesToCopy() > { >- return axis2files; >+ return _filesToCopy; > } > > /** >+ * Returns the absolute path of the lib folder. >+ */ >+/* public String getServerLibLocation(String serverName){ >+ ISoapServerDependency axisValidators[] = ValidationUtils.getAllAxisValidators();//new Axis2ServerDependency(); >+ for(int i = 0 ; i < axisValidators.length ; i++){ >+ ISoapServerDependency axis2Dependency = (Axis2ServerDependency)axisValidators[i]; >+ System.out.println("The lib folder : "); >+ return axis2Dependency.getServerLibLocation(serverName); >+ } >+ return null; >+ } >+*/ >+ /** >+ * Returns the absolute path of the modules folder. >+ */ >+/* public String getServerModulesLocation(String serverName){ >+ ISoapServerDependency axisValidators[] = ValidationUtils.getAllAxisValidators(); >+ for(int i = 0 ; i < axisValidators.length ; i++){ >+ ISoapServerDependency axis2Dependency = (Axis2ServerDependency)axisValidators[i]; >+ return axis2Dependency.getServerModulesLocation(serverName); >+ } >+ return null; >+ } >+*/ >+ >+ /** > * Method to Set the Wizard page to complete state > * @param validPage > */ >- public void makePageComplete(boolean completePage) >+ public synchronized void makePageComplete(boolean completePage) > { >- if(completePage) >+ if(completePage){ > setPageComplete(true); >+ } > else > setPageComplete(false); > } >Index: src/org/eclipse/tptp/wsdm/tooling/validation/util/internal/ValidationUtils.java >=================================================================== >RCS file: /cvsroot/ganges/org.eclipse.tptp.wsdm.editor/src/org/eclipse/tptp/wsdm/tooling/validation/util/internal/ValidationUtils.java,v >retrieving revision 1.1 >diff -u -r1.1 ValidationUtils.java >--- src/org/eclipse/tptp/wsdm/tooling/validation/util/internal/ValidationUtils.java 8 Feb 2007 19:40:12 -0000 1.1 >+++ src/org/eclipse/tptp/wsdm/tooling/validation/util/internal/ValidationUtils.java 26 Feb 2007 15:01:41 -0000 >@@ -20,6 +20,7 @@ > import org.eclipse.core.runtime.IExtensionPoint; > import org.eclipse.core.runtime.IExtensionRegistry; > import org.eclipse.core.runtime.Platform; >+import org.eclipse.tptp.wsdm.tooling.codegen.mrt.provisional.ISoapServerDependency; > import org.eclipse.tptp.wsdm.tooling.editor.internal.Activator; > import org.eclipse.tptp.wsdm.tooling.nls.messages.validation.internal.Messages; > import org.eclipse.tptp.wsdm.tooling.util.internal.WsdmToolingLog; >@@ -159,6 +160,48 @@ > } > > /** >+ * Returns all the mrt validators by reading the plugin registry. >+ */ >+ public static ISoapServerDependency[] getAllAxisValidators() >+ { >+ List validators = new ArrayList(); >+ IExtensionRegistry er = Platform.getExtensionRegistry(); >+ IExtensionPoint iep = er.getExtensionPoint(Activator.PLUGIN_ID, >+ Activator.AXIS2_EXT_PT); >+ if (iep == null) >+ { >+ WsdmToolingLog.logWarning(Messages.COULDNT_FIND_AXIS_VALIDATOR_EXT); >+ return null; >+ } >+ IExtension[] extensions = iep.getExtensions(); >+ if (extensions.length == 0) >+ { >+ WsdmToolingLog.logWarning(Messages.COULDNT_FIND_AXIS_VALIDATOR); >+ return null; >+ } >+ for (int i = 0; i < extensions.length; i++) >+ { >+ IConfigurationElement[] ice = extensions[i] >+ .getConfigurationElements(); >+ Object validator = null; >+ try >+ { >+ validator = ice[0].createExecutableExtension("validator"); >+ >+ } >+ catch (CoreException e) >+ { >+ e.printStackTrace(); >+ } >+ if (validator instanceof ISoapServerDependency) >+ validators.add(validator); >+ } >+ return (ISoapServerDependency[]) validators >+ .toArray(new ISoapServerDependency[validators.size()]); >+ } >+ >+ >+ /** > * Returns new error validation message. > */ > public static IValidationMessage createNewErrorMessage(String message) >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/ganges/org.eclipse.tptp.wsdm.editor/plugin.xml,v >retrieving revision 1.5 >diff -u -r1.5 plugin.xml >--- plugin.xml 25 Feb 2007 22:57:22 -0000 1.5 >+++ plugin.xml 26 Feb 2007 15:01:41 -0000 >@@ -6,6 +6,7 @@ > <extension-point id="mrtValidator" name="mrtValidator" schema="schema/mrtValidator.exsd"/> > <extension-point id="ddeValidator" name="ddeValidator" schema="schema/ddeValidator.exsd"/> > <extension-point id="codeGeneration" name="Code Generation Contributions" schema="schema/codeGeneration.exsd"/> >+ <extension-point id="axisValidator" name="Axis 2 Server Location " schema="schema/axisValidator.exsd"/> > > <extension > id="org.eclipse.tptp.wsdm.editor.validation.WSDMBuilder" >@@ -64,6 +65,13 @@ > point="org.eclipse.tptp.wsdm.editor.ddeValidator"> > <ddeValidator validator="org.eclipse.tptp.wsdm.tooling.validation.dde.internal.DdeValidator"/> > </extension> >+ >+ <extension >+ id="wsdmAxisValidator" >+ name="Axis2 Validator" >+ point="org.eclipse.tptp.wsdm.editor.axisValidator"> >+ <axisValidator validator="org.eclipse.tptp.wsdm.tooling.codegen.mrt.provisional.Axis2ServerDependency"/> >+ </extension> > > <extension > point="org.eclipse.ui.editors"> >Index: src/org/eclipse/tptp/wsdm/tooling/codegen/mrt/provisional/ISoapServerDependency.java >=================================================================== >RCS file: src/org/eclipse/tptp/wsdm/tooling/codegen/mrt/provisional/ISoapServerDependency.java >diff -N src/org/eclipse/tptp/wsdm/tooling/codegen/mrt/provisional/ISoapServerDependency.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/tptp/wsdm/tooling/codegen/mrt/provisional/ISoapServerDependency.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,42 @@ >+/******************************************************************************* >+ * Copyright (c) 2007 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Balan Subramanian (bsubram@us.ibm.com) >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+ >+package org.eclipse.tptp.wsdm.tooling.codegen.mrt.provisional; >+ >+/** >+ * Interface to represent Soap Library dependency used in Tooling codegeneration. >+ */ >+ >+public interface ISoapServerDependency >+{ >+ /** >+ * Returns null if the given Server Home has all the required soap jar files. >+ */ >+ String validateSoapServerHome(String serverHome); >+ >+ /** >+ * Returns the absolute path of all the required soap jar files. >+ */ >+ String[] getFilesToCopy(); >+ >+ /** >+ * Returns the absolute path of the lib folder. >+ */ >+// String getServerLibLocation(String serverName); >+ >+ /** >+ * Returns the absolute path of the modules folder. >+ */ >+// String getServerModulesLocation(String serverName); >+ >+ >+} >Index: src/org/eclipse/tptp/wsdm/tooling/codegen/mrt/provisional/Axis2ServerDependency.java >=================================================================== >RCS file: src/org/eclipse/tptp/wsdm/tooling/codegen/mrt/provisional/Axis2ServerDependency.java >diff -N src/org/eclipse/tptp/wsdm/tooling/codegen/mrt/provisional/Axis2ServerDependency.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/tptp/wsdm/tooling/codegen/mrt/provisional/Axis2ServerDependency.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,146 @@ >+/******************************************************************************* >+ * Copyright (c) 2007 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Balan Subramanian (bsubram@us.ibm.com) >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+ >+package org.eclipse.tptp.wsdm.tooling.codegen.mrt.provisional; >+ >+import java.io.File; >+import java.io.FileFilter; >+import java.util.LinkedList; >+import java.util.List; >+ >+import org.eclipse.osgi.util.NLS; >+import org.eclipse.tptp.wsdm.tooling.nls.messages.mrt.internal.Messages; >+ >+/** >+ * This class verifies the Axis2 Soap Library dependency. >+ */ >+ >+public class Axis2ServerDependency implements ISoapServerDependency >+{ >+ private String[] _jarFiles = new String[]{"annogen-*", "axiom-api-*", "axiom-impl-*", >+ "axis2-adb-*", "axis2-codegen-*", "axis2-java2wsdl-*","axis2-jibx-*", "axis2-kernel-*", "axis2-soapmonitor-*", >+ "axis2-xmlbeans-*", "backport-util-concurrent-*", "commons-codec-*", "commons-fileupload-*", >+ "commons-httpclient-*", "commons-logging-*","geronimo-spec-jms-*", >+ "jaxen-*", "jibx-run-*", "neethi-*", "stax-api-*", "wstx-asl-*", "xbean-*", "xercesImpl-*", >+ "xml-apis-*", "XmlSchema-*"}; >+ >+ private String[] _marFiles = new String[]{ >+ "addressing-*", "soapmonitor-*" >+ }; >+ >+ private List _filesToCopy = new LinkedList(); >+ >+ public String validateSoapServerHome(String serverHome) >+ { >+ if(serverHome == null || serverHome.length() == 0) >+ return Messages.CODE_GEN_AXIS2_PROJECT_DIR; >+ >+ File serverHomeDir = new File(serverHome); >+ if(!serverHomeDir.exists()){ >+ return NLS.bind(Messages.CODE_GEN_AXIS2_LOCATION_ERROR, serverHome); >+ } >+ >+ File libDir = new File(serverHome+File.separatorChar+"lib"); >+ if(!libDir.exists()){ >+ return NLS.bind(Messages.CODE_GEN_AXIS2_LIB_LOC_ERROR, serverHome+File.separatorChar+"lib"); >+ } >+ >+ File[] allJarFiles = libDir.listFiles(new CustomFileFilter("jar")); >+ for(int i=0;i<_jarFiles.length;i++) >+ { >+ String pattern = _jarFiles[i].substring(0,_jarFiles[i].indexOf("-*")); >+ boolean jarFileFound = false; >+ for(int j=0;j<allJarFiles.length;j++) >+ { >+ if(allJarFiles[j].getName().startsWith(pattern)) >+ { >+ jarFileFound = true; >+ _filesToCopy.add(allJarFiles[j].getAbsolutePath()); >+ break; >+ } >+ } >+ if(!jarFileFound){ >+ return NLS.bind(Messages.CODE_GEN_INVALID_JAR_PATTER, pattern); >+ } >+ } >+ >+ File modulesDir = new File(serverHome+File.separatorChar+"repository"+ File.separatorChar+"modules"); >+ if(!modulesDir.exists()){ >+ return NLS.bind(Messages.CODE_GEN_AXIS2_LIB_LOC_ERROR, serverHome+File.separatorChar+"repository"+ File.separatorChar+"modules"); >+ } >+ >+ File[] allMarFiles = modulesDir.listFiles(new CustomFileFilter("mar")); >+ for(int i=0;i<_marFiles.length;i++) >+ { >+ String pattern = _marFiles[i].substring(0,_marFiles[i].indexOf("-*")); >+ boolean marFileFound = false; >+ for(int j=0;j<allMarFiles.length;j++) >+ { >+ if(allMarFiles[j].getName().startsWith(pattern)) >+ { >+ marFileFound = true; >+ _filesToCopy.add(allMarFiles[j].getAbsolutePath()); >+ break; >+ } >+ } >+ if(!marFileFound){ >+ return NLS.bind(Messages.CODE_GEN_INVALID_MAR_PATTER, pattern); >+ } >+ } >+ >+ return null; >+ } >+ >+ public String[] getFilesToCopy() >+ { >+ return (String[])_filesToCopy.toArray(new String[_filesToCopy.size()]); >+ } >+ >+ /** >+ * Returns the absolute path of the lib folder. >+ */ >+/* public String getServerLibLocation(String serverName){ >+ String serverLocation = serverName; >+ if(!serverLocation.endsWith(File.separator)){ >+ serverLocation+=File.separator; >+ } >+ return serverLocation+"lib"; >+ } >+*/ >+ /** >+ * Returns the absolute path of the modules folder. >+ */ >+/* public String getServerModulesLocation(String serverName){ >+ String serverLocation = serverName; >+ if(!serverLocation.endsWith(File.separator)){ >+ serverLocation+=File.separator; >+ } >+ return serverLocation+"repository"+File.separator+"modules"; >+ >+ } >+ */ >+} >+ >+class CustomFileFilter implements FileFilter >+{ >+ String fileExtension; >+ >+ CustomFileFilter(String extension){ >+ fileExtension = extension; >+ } >+ public boolean accept(File pathname) >+ { >+ if(!pathname.isFile()) >+ return false; >+ return pathname.getName().endsWith(fileExtension); >+ } >+} >Index: schema/axisValidator.exsd >=================================================================== >RCS file: schema/axisValidator.exsd >diff -N schema/axisValidator.exsd >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ schema/axisValidator.exsd 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,110 @@ >+<?xml version='1.0' encoding='UTF-8'?> >+<!-- Schema file written by PDE --> >+<schema targetNamespace="org.eclipse.tptp.wsdm.editor"> >+<annotation> >+ <appInfo> >+ <meta.schema plugin="org.eclipse.tptp.wsdm.editor" id="axisValidator" name="axisValidator"/> >+ </appInfo> >+ <documentation> >+ This extension point will be used for validation of Axis2 libraries >+ </documentation> >+ </annotation> >+ >+ <element name="extension"> >+ <complexType> >+ <sequence> >+ <element ref="axisValidator"/> >+ </sequence> >+ <attribute name="point" type="string" use="required"> >+ <annotation> >+ <documentation> >+ >+ </documentation> >+ </annotation> >+ </attribute> >+ <attribute name="id" type="string"> >+ <annotation> >+ <documentation> >+ >+ </documentation> >+ </annotation> >+ </attribute> >+ <attribute name="name" type="string"> >+ <annotation> >+ <documentation> >+ >+ </documentation> >+ <appInfo> >+ <meta.attribute translatable="true"/> >+ </appInfo> >+ </annotation> >+ </attribute> >+ </complexType> >+ </element> >+ >+ <element name="axisValidator"> >+ <annotation> >+ <documentation> >+ specify the validator for wsdm resource type. >+ </documentation> >+ </annotation> >+ <complexType> >+ <attribute name="validator" type="string" use="required"> >+ <annotation> >+ <documentation> >+ >+ </documentation> >+ <appInfo> >+ <meta.attribute kind="java" basedOn="org.eclipse.tptp.wsdm.tooling.codegen.mrt.provisional.ISoapServerDependency"/> >+ </appInfo> >+ </annotation> >+ </attribute> >+ </complexType> >+ </element> >+ >+ <annotation> >+ <appInfo> >+ <meta.section type="since"/> >+ </appInfo> >+ <documentation> >+ [Enter the first release in which this extension point appears.] >+ </documentation> >+ </annotation> >+ >+ <annotation> >+ <appInfo> >+ <meta.section type="examples"/> >+ </appInfo> >+ <documentation> >+ [Enter extension point usage example here.] >+ </documentation> >+ </annotation> >+ >+ <annotation> >+ <appInfo> >+ <meta.section type="apiInfo"/> >+ </appInfo> >+ <documentation> >+ [Enter API information here.] >+ </documentation> >+ </annotation> >+ >+ <annotation> >+ <appInfo> >+ <meta.section type="implementation"/> >+ </appInfo> >+ <documentation> >+ [Enter information about supplied implementation of this extension point.] >+ </documentation> >+ </annotation> >+ >+ <annotation> >+ <appInfo> >+ <meta.section type="copyright"/> >+ </appInfo> >+ <documentation> >+ Copyright (c) 2007 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> >+ </documentation> >+ </annotation> >+ >+</schema>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 150385
:
58634
|
59357
|
59359
|
59361
|
59450
|
59461
| 59789 |
63686