Author: mnuttall
Date: Thu Dec 31 17:26:56 2009
New Revision: 894900
URL: http://svn.apache.org/viewvc?rev=894900&view=rev
Log:
ARIES-89: Implement application support: More work on
AriesApplicationManager.createApplication
Added:
incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/DeploymentMetadataFactory.java
incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/AriesApplicationResolver.java
incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/BundleConverter.java
Modified:
incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/ApplicationMetadataManager.java
Modified:
incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/ApplicationMetadataManager.java
URL:
http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/ApplicationMetadataManager.java?rev=894900&r1=894899&r2=894900&view=diff
==============================================================================
---
incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/ApplicationMetadataManager.java
(original)
+++
incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/ApplicationMetadataManager.java
Thu Dec 31 17:26:56 2009
@@ -64,6 +64,8 @@
// MN: Dec 22: register, unregisterApplication probably will not be required
// as we implement AriesApplicationManager, so I'm not refactoring the
method names.
+ // Once we remove the methods, this interface should be renamed
ApplicationMetadataFactory, since
+ // it won't be managing anything anymore.
/**
* This method is used to register an application. The ApplicationMetadata
Added:
incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/DeploymentMetadataFactory.java
URL:
http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/DeploymentMetadataFactory.java?rev=894900&view=auto
==============================================================================
---
incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/DeploymentMetadataFactory.java
(added)
+++
incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/DeploymentMetadataFactory.java
Thu Dec 31 17:26:56 2009
@@ -0,0 +1,37 @@
+/*
+ * 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 WARRANTIESOR 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.aries.application;
+
+import java.util.Set;
+
+import org.apache.aries.application.management.AriesApplication;
+import org.apache.aries.application.management.BundleInfo;
+
+public interface DeploymentMetadataFactory {
+
+ /**
+ * Create a DeploymentMetadata instance
+ * @param app The AriesApplication in question
+ * @param bundleInfo A resolved set of BundleInfo objects
+ * @return
+ */
+ public DeploymentMetadata createDeploymentMetadata (AriesApplication app,
Set<BundleInfo> bundleInfo);
+
+}
Added:
incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/AriesApplicationResolver.java
URL:
http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/AriesApplicationResolver.java?rev=894900&view=auto
==============================================================================
---
incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/AriesApplicationResolver.java
(added)
+++
incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/AriesApplicationResolver.java
Thu Dec 31 17:26:56 2009
@@ -0,0 +1,32 @@
+/*
+ * 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 WARRANTIESOR 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.aries.application.management;
+
+import java.util.Set;
+
+public interface AriesApplicationResolver {
+
+ /** Resolve an AriesApplication
+ *
+ * @param app The application to resolve
+ * @return The complete set of bundles required to resolve the application
+ */
+ Set<BundleInfo> resolve (AriesApplication app);
+}
Added:
incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/BundleConverter.java
URL:
http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/BundleConverter.java?rev=894900&view=auto
==============================================================================
---
incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/BundleConverter.java
(added)
+++
incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/BundleConverter.java
Thu Dec 31 17:26:56 2009
@@ -0,0 +1,37 @@
+/*
+ * 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 WARRANTIESOR 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.aries.application.management;
+
+import java.io.InputStream;
+
+/**
+ * A BundleConverter turns a .jar that is not an OSGi bundle into a well
formed OSGi bundle,
+ * or a .war that is not a WAB into a WAB.
+ */
+public interface BundleConverter {
+ /**
+ *
+ * @param inputBundle Stream to the input bundle
+ * @param bundleFileName Used to infer which type of conversion is required.
+ * @return valid input stream or null if the bundle could not be converted.
+ */
+ public InputStream convert (InputStream inputBundle, String bundleFileName);
+
+}