You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by va...@apache.org on 2009/03/18 21:23:03 UTC
svn commit: r755722 [2/2] - in
/tuscany/branches/sca-java-1.x/modules/contribution-jee: ./
src/main/java/org/apache/tuscany/sca/contribution/jee/
src/main/java/org/apache/tuscany/sca/contribution/jee/impl/
src/main/resources/META-INF/services/ src/test...
Added: tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WebArchiveProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WebArchiveProcessor.java?rev=755722&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WebArchiveProcessor.java (added)
+++ tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WebArchiveProcessor.java Wed Mar 18 20:23:02 2009
@@ -0,0 +1,59 @@
+package org.apache.tuscany.sca.contribution.jee.impl;
+
+import java.io.File;
+import java.net.URI;
+import java.net.URL;
+
+import org.apache.tuscany.sca.contribution.jee.JavaEEIntrospector;
+import org.apache.tuscany.sca.contribution.jee.WebModuleInfo;
+import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+import org.apache.tuscany.sca.contribution.service.ContributionReadException;
+import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.monitor.Monitor;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+public class WebArchiveProcessor implements URLArtifactProcessor<WebModuleInfo> {
+ private JavaEEIntrospector jeeIntrospector;
+
+ public WebArchiveProcessor(ExtensionPointRegistry registry, Monitor monitor) {
+ jeeIntrospector = registry.getExtensionPoint(JavaEEIntrospector.class);
+ }
+
+ public String getArtifactType() {
+ return ".war";
+ }
+
+ public WebModuleInfo read(URL contributionURL, URI artifactURI, URL artifactURL) throws ContributionReadException {
+ WebModuleInfo webModuleInfo = jeeIntrospector.introspectWebArchive(artifactURL);
+ webModuleInfo.setUri(artifactURI);
+ webModuleInfo.setModuleName(new File(artifactURL.getFile()).getName());
+ return webModuleInfo;
+ }
+
+ public Class<WebModuleInfo> getModelType() {
+ return WebModuleInfo.class;
+ }
+
+ public void resolve(WebModuleInfo arg0, ModelResolver arg1)
+ throws ContributionResolveException {
+ }
+}
Propchange: tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WebArchiveProcessor.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WebArchiveProcessor.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WebArchiveProcessor.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WebModuleInfoImpl.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WebModuleInfoImpl.java?rev=755722&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WebModuleInfoImpl.java (added)
+++ tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WebModuleInfoImpl.java Wed Mar 18 20:23:02 2009
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.contribution.jee.impl;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.tuscany.sca.contribution.jee.EjbReferenceInfo;
+import org.apache.tuscany.sca.contribution.jee.EnvEntryInfo;
+import org.apache.tuscany.sca.contribution.jee.WebModuleInfo;
+
+public class WebModuleInfoImpl implements WebModuleInfo {
+
+ private URI uri;
+ private String moduleName;
+ private Collection<Class<?>> classesToScan = new ArrayList<Class<?>>();
+ private Map<String, EjbReferenceInfo> ejbReferences = new HashMap<String, EjbReferenceInfo>();
+ private Map<String, EnvEntryInfo> envEntries = new HashMap<String, EnvEntryInfo>();
+
+ public WebModuleInfoImpl() {
+ }
+ public Collection<Class<?>> getClassesToScan() {
+ return classesToScan;
+ }
+
+ public EjbReferenceInfo getEjbReference(String ejbRefName) {
+ return ejbReferences.get(ejbRefName);
+ }
+
+ public Map<String, EjbReferenceInfo> getEjbReferences() {
+ return ejbReferences;
+ }
+
+ public Map<String, EnvEntryInfo> getEnvEntries() {
+ return envEntries;
+ }
+
+ public EnvEntryInfo getEnvEntry(String envEntryName) {
+ return envEntries.get(envEntryName);
+ }
+
+ public String getModuleName() {
+ return moduleName;
+ }
+
+ public void setModuleName(String moduleName) {
+ this.moduleName = moduleName;
+ }
+
+ public URI getUri() {
+ return uri;
+ }
+
+ public void setUri(URI uri) {
+ this.uri = uri;
+ }
+}
Propchange: tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WebModuleInfoImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WebModuleInfoImpl.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/WebModuleInfoImpl.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.jee.JavaEEExtension
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.jee.JavaEEExtension?rev=755722&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.jee.JavaEEExtension (added)
+++ tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.jee.JavaEEExtension Wed Mar 18 20:23:02 2009
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+org.apache.tuscany.sca.contribution.jee.impl.JavaEEExtensionImpl
\ No newline at end of file
Added: tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.jee.JavaEEOptionalExtension
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.jee.JavaEEOptionalExtension?rev=755722&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.jee.JavaEEOptionalExtension (added)
+++ tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.jee.JavaEEOptionalExtension Wed Mar 18 20:23:02 2009
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+org.apache.tuscany.sca.contribution.jee.impl.JavaEEOptionalExtensionImpl
\ No newline at end of file
Added: tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor?rev=755722&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor (added)
+++ tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor Wed Mar 18 20:23:02 2009
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Implementation class for the artifact processor extension
+org.apache.tuscany.sca.contribution.jee.impl.WebArchiveProcessor;type=.war,model=org.apache.tuscany.sca.contribution.jee.WebModuleInfo
+org.apache.tuscany.sca.contribution.jee.impl.EjbArchiveProcessor;type=.jar,model=org.apache.tuscany.sca.contribution.jee.EjbModuleInfo
+org.apache.tuscany.sca.contribution.jee.impl.JavaEEArchiveProcessor;type=.ear,model=org.apache.tuscany.sca.contribution.jee.JavaEEApplicationInfo
\ No newline at end of file
Added: tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.resolver.ModelResolver
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.resolver.ModelResolver?rev=755722&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.resolver.ModelResolver (added)
+++ tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.resolver.ModelResolver Wed Mar 18 20:23:02 2009
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+org.apache.tuscany.sca.contribution.jee.WebModuleModelResolver;model=org.apache.tuscany.sca.contribution.jee.WebModuleInfo
+org.apache.tuscany.sca.contribution.jee.EjbModuleModelResolver;model=org.apache.tuscany.sca.contribution.jee.EjbModuleInfo
+org.apache.tuscany.sca.contribution.jee.JavaEEApplicationModelResolver;model=org.apache.tuscany.sca.contribution.jee.JavaEEApplicationInfo
\ No newline at end of file