-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Spring app context and classpath extension capabilities
- Loading branch information
Jennifer Hickey
authored and
Ryan Morgan
committed
Mar 4, 2010
1 parent
24d8bcf
commit f550223
Showing
42 changed files
with
1,212 additions
and
453 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry excluding="app/" kind="src" path="hqu/hqapi1"/> | ||
<classpathentry kind="src" path="resources"/> | ||
<classpathentry kind="src" path="build/src"/> | ||
<classpathentry kind="src" path="hqu/hqapi1/app"/> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="lib" path="lib/activation.jar"/> | ||
<classpathentry kind="lib" path="lib/commons-codec-1.3.jar"/> | ||
<classpathentry kind="lib" path="lib/commons-httpclient-3.1.jar"/> | ||
<classpathentry kind="lib" path="lib/commons-logging.jar"/> | ||
<classpathentry kind="lib" path="lib/jaxb-api.jar"/> | ||
<classpathentry kind="lib" path="lib/jaxb-impl.jar"/> | ||
<classpathentry kind="lib" path="lib/jaxb-xjc.jar"/> | ||
<classpathentry kind="lib" path="lib/jopt-simple-3.0-beta2-SNAPSHOT.jar"/> | ||
<classpathentry kind="lib" path="lib/jsr173_1.0_api.jar"/> | ||
<classpathentry kind="lib" path="lib/junit-4.4.jar"/> | ||
<classpathentry kind="lib" path="lib/localizer-1.0.jar"/> | ||
<classpathentry kind="lib" path="lib/log4j-1.2.14.jar"/> | ||
<classpathentry kind="lib" path="lib/wadl-ant-1.0-SNAPSHOT.jar"/> | ||
<classpathentry kind="lib" path="lib/wadl-cmdline-1.0-SNAPSHOT.jar"/> | ||
<classpathentry kind="lib" path="lib/wadl-core-1.0-SNAPSHOT.jar"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | ||
<classpathentry exported="true" kind="con" path="GROOVY_SUPPORT"/> | ||
<classpathentry combineaccessrules="false" kind="src" path="/HQ"/> | ||
<classpathentry kind="output" path="build/classes"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>hqapi</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.springframework.ide.eclipse.core.springbuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.springframework.ide.eclipse.core.springnature</nature> | ||
<nature>org.eclipse.jdt.groovy.core.groovyNature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#Wed Oct 14 10:56:48 PDT 2009 | ||
eclipse.preferences.version=1 | ||
org.springframework.ide.eclipse.beans.core.ignoreMissingNamespaceHandler=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#Wed Oct 14 10:56:48 PDT 2009 | ||
eclipse.preferences.version=1 | ||
org.springframework.ide.eclipse.core.builders.enable.aopreferencemodelbuilder=true | ||
org.springframework.ide.eclipse.core.builders.enable.beanmetadatabuilder=true | ||
org.springframework.ide.eclipse.core.builders.enable.osgibundleupdater=false | ||
org.springframework.ide.eclipse.core.enable.project.preferences=false | ||
org.springframework.ide.eclipse.core.validator.enable.com.springsource.server.ide.manifest.core.manifestvalidator=true | ||
org.springframework.ide.eclipse.core.validator.enable.com.springsource.sts.bestpractices.beansvalidator=false | ||
org.springframework.ide.eclipse.core.validator.enable.com.springsource.sts.server.quickfix.manifestvalidator=false | ||
org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.beans.core.beansvalidator=true | ||
org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.core.springvalidator=false | ||
org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.webflow.core.validator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.applicationSymbolicNameRule-com.springsource.server.ide.manifest.core.manifestvalidator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.applicationVersionRule-com.springsource.server.ide.manifest.core.manifestvalidator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.bundleActivationPolicyRule-com.springsource.server.ide.manifest.core.manifestvalidator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.bundleActivatorRule-com.springsource.server.ide.manifest.core.manifestvalidator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.bundleManifestVersionRule-com.springsource.server.ide.manifest.core.manifestvalidator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.bundleNameRule-com.springsource.server.ide.manifest.core.manifestvalidator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.bundleSymbolicNameRule-com.springsource.server.ide.manifest.core.manifestvalidator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.bundleVersionRule-com.springsource.server.ide.manifest.core.manifestvalidator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.exportPackageRule-com.springsource.server.ide.manifest.core.manifestvalidator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.importRule-com.springsource.server.ide.manifest.core.manifestvalidator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.parsingProblemsRule-com.springsource.server.ide.manifest.core.manifestvalidator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.requireBundleRule-com.springsource.server.ide.manifest.core.manifestvalidator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.AvoidDriverManagerDataSource-com.springsource.sts.bestpractices.beansvalidator=false | ||
org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.ImportElementsAtTopRulee-com.springsource.sts.bestpractices.beansvalidator=false | ||
org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.ParentBeanSpecifiesAbstractClassRule-com.springsource.sts.bestpractices.beansvalidator=false | ||
org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.RefElementRule-com.springsource.sts.bestpractices.beansvalidator=false | ||
org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.TooManyBeansInFileRule-com.springsource.sts.bestpractices.beansvalidator=false | ||
org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.UnnecessaryValueElementRule-com.springsource.sts.bestpractices.beansvalidator=false | ||
org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.UseBeanInheritance-com.springsource.sts.bestpractices.beansvalidator=false | ||
org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.legacyxmlusage.jndiobjectfactory-com.springsource.sts.bestpractices.beansvalidator=false | ||
org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.server.quickfix.importBundleVersionRule-com.springsource.sts.server.quickfix.manifestvalidator=false | ||
org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.server.quickfix.importLibraryVersionRule-com.springsource.sts.server.quickfix.manifestvalidator=false | ||
org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.server.quickfix.importPackageVersionRule-com.springsource.sts.server.quickfix.manifestvalidator=false | ||
org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.server.quickfix.requireBundleVersionRule-com.springsource.sts.server.quickfix.manifestvalidator=false | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanAlias-org.springframework.ide.eclipse.beans.core.beansvalidator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanClass-org.springframework.ide.eclipse.beans.core.beansvalidator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanConstructorArgument-org.springframework.ide.eclipse.beans.core.beansvalidator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanDefinition-org.springframework.ide.eclipse.beans.core.beansvalidator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanDefinitionHolder-org.springframework.ide.eclipse.beans.core.beansvalidator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanFactory-org.springframework.ide.eclipse.beans.core.beansvalidator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanInitDestroyMethod-org.springframework.ide.eclipse.beans.core.beansvalidator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanProperty-org.springframework.ide.eclipse.beans.core.beansvalidator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanReference-org.springframework.ide.eclipse.beans.core.beansvalidator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.methodOverride-org.springframework.ide.eclipse.beans.core.beansvalidator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.parsingProblems-org.springframework.ide.eclipse.beans.core.beansvalidator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.requiredProperty-org.springframework.ide.eclipse.beans.core.beansvalidator=false | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.core.springClasspath-org.springframework.ide.eclipse.core.springvalidator=false | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.action-org.springframework.ide.eclipse.webflow.core.validator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.actionstate-org.springframework.ide.eclipse.webflow.core.validator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.attribute-org.springframework.ide.eclipse.webflow.core.validator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.attributemapper-org.springframework.ide.eclipse.webflow.core.validator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.beanaction-org.springframework.ide.eclipse.webflow.core.validator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.evaluationaction-org.springframework.ide.eclipse.webflow.core.validator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.evaluationresult-org.springframework.ide.eclipse.webflow.core.validator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.exceptionhandler-org.springframework.ide.eclipse.webflow.core.validator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.import-org.springframework.ide.eclipse.webflow.core.validator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.inputattribute-org.springframework.ide.eclipse.webflow.core.validator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.mapping-org.springframework.ide.eclipse.webflow.core.validator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.outputattribute-org.springframework.ide.eclipse.webflow.core.validator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.set-org.springframework.ide.eclipse.webflow.core.validator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.state-org.springframework.ide.eclipse.webflow.core.validator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.subflowstate-org.springframework.ide.eclipse.webflow.core.validator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.transition-org.springframework.ide.eclipse.webflow.core.validator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.variable-org.springframework.ide.eclipse.webflow.core.validator=true | ||
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.webflowstate-org.springframework.ide.eclipse.webflow.core.validator=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<beansProjectDescription> | ||
<version>1</version> | ||
<pluginVersion><![CDATA[2.2.6.200908051215-RELEASE]]></pluginVersion> | ||
<configSuffixes> | ||
<configSuffix><![CDATA[xml]]></configSuffix> | ||
</configSuffixes> | ||
<enableImports><![CDATA[false]]></enableImports> | ||
<configs> | ||
<config>resources/META-INF/spring/hqapi-context.xml</config> | ||
</configs> | ||
<configSets> | ||
</configSets> | ||
</beansProjectDescription> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<beans xmlns="http://www.springframework.org/schema/beans" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:util="http://www.springframework.org/schema/util" | ||
xmlns:context="http://www.springframework.org/schema/context" | ||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd | ||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd | ||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd"> | ||
|
||
<bean id="commandDispatcher" class="org.hyperic.hq.hqapi1.tools.Shell"> | ||
<constructor-arg> | ||
<bean class="org.hyperic.hq.hqapi1.tools.CommandsFactory" /> | ||
</constructor-arg> | ||
</bean> | ||
|
||
<bean id="optionParser" class="org.hyperic.hq.hqapi1.tools.OptionParserFactory"/> | ||
|
||
<bean id="connection" class="org.hyperic.hq.hqapi1.HQConnection"> | ||
<constructor-arg index="0" value="#{ systemProperties['scripting.client.host'] }" /> | ||
<constructor-arg index="1" value="#{ systemProperties['scripting.client.port'] }" /> | ||
<constructor-arg index="2" value="#{ systemProperties['scripting.client.secure'] }" /> | ||
<constructor-arg index="3" value="#{ systemProperties['scripting.client.user'] }" /> | ||
<constructor-arg index="4" value="#{ systemProperties['scripting.client.password'] }" /> | ||
<constructor-arg index="5"> | ||
<bean class="org.hyperic.hq.hqapi1.XmlResponseHandler"/> | ||
</constructor-arg> | ||
</bean> | ||
|
||
<context:annotation-config /> | ||
|
||
<context:component-scan base-package="org.hyperic.hq.hqapi1"/> | ||
|
||
</beans> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
package org.hyperic.hq.hqapi1; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
import java.util.Map; | ||
|
||
public interface Connection { | ||
|
||
//<T> T doGet(String path, Map<String, String[]> params, File targetFile, Class<T> resultClass) throws IOException; | ||
|
||
/** | ||
* Issue a GET against the API. | ||
* | ||
* @param path | ||
* The web service endpoint. | ||
* @param params | ||
* A Map of key value pairs that are converted into query | ||
* arguments. | ||
* @param resultClass | ||
* The response object type. | ||
* @return The response object from the operation. This response will be of | ||
* the type given in the resultClass argument. | ||
* @throws IOException | ||
* If a network error occurs during the request. | ||
*/ | ||
<T> T doGet(String path, Map<String, String[]> params, Class<T> resultClass) | ||
throws IOException; | ||
|
||
/** | ||
* Issue a POST against the API. | ||
* | ||
* @param path | ||
* The web service endpoint | ||
* @param params | ||
* A Map of key value pairs that are converted into query | ||
* arguments. | ||
* @param o | ||
* The object to POST. This object will be serialized into XML | ||
* prior to being sent. | ||
* @param resultClass | ||
* The result object type. | ||
* @return The response object from the operation. This response will be of | ||
* the type given in the resultClass argument. | ||
* @throws IOException | ||
* If a network error occurs during the request. | ||
*/ | ||
//<T> T doPost(String path, Map<String, String[]> params, Class<T> resultClass) | ||
// throws IOException; | ||
|
||
/** | ||
* Issue a POST against the API. | ||
* | ||
* @param path | ||
* The web service endpoint | ||
* @param params | ||
* A Map of key value pairs that are added to the post data | ||
* @param file | ||
* The file to post | ||
* @param resultClass | ||
* The result object type. | ||
* @return The response object from the operation. This response will be of | ||
* the type given in the resultClass argument. | ||
* @throws IOException | ||
* If a network error occurs during the request. | ||
*/ | ||
// <T> T doPost(String path, Map<String, String> params, File file, | ||
// Class<T> resultClass) throws IOException; | ||
|
||
/** | ||
* Issue a POST against the API. | ||
* | ||
* @param path | ||
* The web service endpoint | ||
* @param o | ||
* The object to POST. This object will be serialized into XML | ||
* prior to being sent. | ||
* @param resultClass | ||
* The result object type. | ||
* @return The response object from the operation. This response will be of | ||
* the type given in the resultClass argument. | ||
* @throws IOException | ||
* If a network error occurs during the request. | ||
*/ | ||
<T> T doPost(String path, Object o, Class<T> resultClass) | ||
throws IOException; | ||
} |
Oops, something went wrong.