incubator-aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mnutt...@apache.org
Subject svn commit: r900820 - in /incubator/aries/trunk/application: application-api/src/main/java/org/apache/aries/application/ application-api/src/main/java/org/apache/aries/application/filesystem/ application-api/src/main/java/org/apache/aries/application/m...
Date Tue, 19 Jan 2010 15:40:35 GMT
Author: mnuttall
Date: Tue Jan 19 15:40:34 2010
New Revision: 900820

URL: http://svn.apache.org/viewvc?rev=900820&view=rev
Log:
Aries-121: Additional javadoc. Also ensure that Resolver calls throw a ResolverException.


Added:
    incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ResolverException.java
Modified:
    incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/ApplicationMetadata.java
    incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/ApplicationMetadataFactory.java
    incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/Content.java
    incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/DeploymentContent.java
    incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/DeploymentMetadata.java
    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/ServiceDeclaration.java
    incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/VersionRange.java
    incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/filesystem/IDirectory.java
    incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ApplicationContext.java
    incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ApplicationContextManager.java
    incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ApplicationEvent.java
    incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ApplicationListener.java
    incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/AriesApplication.java
    incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/AriesApplicationManager.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/BundleInfo.java
    incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ConversionException.java
    incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/LocalPlatform.java
    incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ManagementException.java
    incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ResolveConstraint.java
    incubator/aries/trunk/application/application-management/src/main/java/org/apache/aries/application/management/impl/AriesApplicationManagerImpl.java
    incubator/aries/trunk/application/application-management/src/main/java/org/apache/aries/application/management/messages/AppManagementMessages.properties

Modified: incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/ApplicationMetadata.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/ApplicationMetadata.java?rev=900820&r1=900819&r2=900820&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/ApplicationMetadata.java
(original)
+++ incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/ApplicationMetadata.java
Tue Jan 19 15:40:34 2010
@@ -26,7 +26,9 @@
 import org.osgi.framework.Version;
 
 /**
- * this interface describes the Application.mf file
+ * A representation of an APPLICATION.MF file. 
+ * @see <a href="http://incubator.apache.org/aries/applications.html">
+ * http://incubator.apache.org/aries/applications.html</a>. 
  *
  */
 public interface ApplicationMetadata
@@ -74,7 +76,17 @@
    */
   public String getApplicationScope();
   
-  /** Stores any changes to disk using this implementation's storage form */
+  /** 
+   * Persist this metadata. 
+   * @param f The file to store this metadata to
+   * @throws IOException
+   */
   public void store(File f) throws IOException;
+  
+  /** 
+   * Persist this metadata. 
+   * @param out The output stream to store this metadata to
+   * @throws IOException
+   */
   public void store(OutputStream out) throws IOException;
 }

Modified: incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/ApplicationMetadataFactory.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/ApplicationMetadataFactory.java?rev=900820&r1=900819&r2=900820&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/ApplicationMetadataFactory.java
(original)
+++ incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/ApplicationMetadataFactory.java
Tue Jan 19 15:40:34 2010
@@ -25,7 +25,8 @@
 import org.osgi.framework.Version;
 
 /**
- * This service provides manages application metadata.
+ * Provides various means of generating {@link org.apache.aries.application.ApplicationMetadata
 
+ * ApplicationMetadata} instances.  
  */
 public interface ApplicationMetadataFactory
 {

Modified: incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/Content.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/Content.java?rev=900820&r1=900819&r2=900820&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/Content.java
(original)
+++ incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/Content.java
Tue Jan 19 15:40:34 2010
@@ -22,7 +22,7 @@
 
 
 /**
- * this interface describes the content metadata such as Application-Content, Import-Package,
etc
+ * A representation of content metadata such as Application-Content, Import-Package, etc
  *
  */
 public interface Content

Modified: incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/DeploymentContent.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/DeploymentContent.java?rev=900820&r1=900819&r2=900820&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/DeploymentContent.java
(original)
+++ incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/DeploymentContent.java
Tue Jan 19 15:40:34 2010
@@ -23,7 +23,6 @@
 
 /**
  * An entry in DEPLOYMENT.MF's Deployed-Content header
- *
  */
 public interface DeploymentContent extends Content {
 

Modified: incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/DeploymentMetadata.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/DeploymentMetadata.java?rev=900820&r1=900819&r2=900820&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/DeploymentMetadata.java
(original)
+++ incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/DeploymentMetadata.java
Tue Jan 19 15:40:34 2010
@@ -51,13 +51,24 @@
   public List<DeploymentContent> getApplicationDeploymentContents();
   
   /**
-   * return the application this deployment metadata is associated with.
-   * 
-   * @return the application.
+   * Obtain the associated 
+   * {@link org.apache.aries.application.ApplicationMetadata ApplicationMetadata}. 
+   * @return The application metadata.
    */
   public ApplicationMetadata getApplicationMetadata();
   
-  /** Stores any changes to disk using this implementation's storage form */
+  /** 
+   * Persist this metadata as Manifest-formatted text. 
+   * @param f The file to store this metadata to
+   * @throws IOException
+   */
   public void store(File f) throws IOException;
-  public void store(OutputStream in) throws IOException;
+  
+  /** 
+   * Persist this metadata.  
+   * @param out The OutputStream to store this metadata to. 
+   * @throws IOException
+   */
+
+  public void store(OutputStream out) throws IOException;
 }

Modified: 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=900820&r1=900819&r2=900820&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/DeploymentMetadataFactory.java
(original)
+++ incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/DeploymentMetadataFactory.java
Tue Jan 19 15:40:34 2010
@@ -26,18 +26,25 @@
 import org.apache.aries.application.management.AriesApplication;
 import org.apache.aries.application.management.BundleInfo;
 
+/**
+ * Methods for creating a DeploymentMetadata instance
+ */
 public interface DeploymentMetadataFactory {
 
   /** 
-   * Create a DeploymentMetadata instance
-   * @param app The AriesApplication in question
-   * @param bundleInfo A resolved set of BundleInfo objects
-   * @return
+   * Create a DeploymentMetadata from an AriesApplication and its by-value bundles. 
+   * @param  app The AriesApplication in question
+   * @param  bundleInfo A resolved set of BundleInfo objects
+   * @throws IOException
+   * @return DeploymentMetadata instance
    */
   public DeploymentMetadata createDeploymentMetadata (AriesApplication app, Set<BundleInfo>
bundleInfo);
   
   /**
-   * Create a DeploymentMetadata instance from an IFile
+   * Extract a DeploymentMetadata instance from an IFile
+   * @param src DEPLOYMENT.MF file, either in an exploded directory or within a jar file.

+   * @throws IOException
+   * @return DeploymentMetadata instance
    */
   public DeploymentMetadata createDeploymentMetadata (IFile src) throws IOException;
   

Modified: incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/ServiceDeclaration.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/ServiceDeclaration.java?rev=900820&r1=900819&r2=900820&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/ServiceDeclaration.java
(original)
+++ incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/ServiceDeclaration.java
Tue Jan 19 15:40:34 2010
@@ -20,11 +20,16 @@
 
 import org.osgi.framework.Filter;
 
+/**
+ * Represents a service imported or exported by an Aries application. 
+ * @see <a href="http://incubator.apache.org/aries/applications.html">
+ * http://incubator.apache.org/aries/applications.html</a>. 
+ */
 public interface ServiceDeclaration {
 
 	/**
 	 * get the interface name for the service
-	 * @return
+	 * @return The name of the service's interface class. 
 	 */
 	public abstract String getInterfaceName();
 

Modified: incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/VersionRange.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/VersionRange.java?rev=900820&r1=900819&r2=900820&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/VersionRange.java
(original)
+++ incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/VersionRange.java
Tue Jan 19 15:40:34 2010
@@ -20,6 +20,10 @@
 
 import org.osgi.framework.Version;
 
+/**
+ * A representation of a Version Range. @see <a href="http://www.osgi.org/Release4/HomePage">
+ * section 3.2.6</a> of the OSGi Service Platform Core Specification. 
+ */
 public interface VersionRange
 {
   /**

Modified: incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/filesystem/IDirectory.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/filesystem/IDirectory.java?rev=900820&r1=900819&r2=900820&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/filesystem/IDirectory.java
(original)
+++ incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/filesystem/IDirectory.java
Tue Jan 19 15:40:34 2010
@@ -22,7 +22,8 @@
 import java.util.List;
 
 /**
- * A virtual directory in a file system.
+ * A virtual directory in a file system. Widely used to present a common view of regular

+ * file sytems, jar and zip files. 
  */
 public interface IDirectory extends Iterable<IFile>, IFile
 {

Modified: incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ApplicationContext.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ApplicationContext.java?rev=900820&r1=900819&r2=900820&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ApplicationContext.java
(original)
+++ incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ApplicationContext.java
Tue Jan 19 15:40:34 2010
@@ -25,14 +25,43 @@
 import org.osgi.framework.BundleException;
 
 /**
- * Represents an Aries application in the runtime
+ * Represents an Aries application in the runtime. See the application-runtime module for
a 
+ * sample implementation. 
  */
 public interface ApplicationContext
 {
+  /** 
+   * Get the state of a running application. An application is INSTALLED if all its bundles

+   * are installed, RESOLVED if all its bundles are resolved, ACTIVE if all its bundles are

+   * active, and so on. 
+   * @return ApplicationState. 
+   */
   public ApplicationState getApplicationState();
+  
+  /**
+   * Obtain the associated AriesApplication metadata.  
+   * @return AriesApplication
+   */
   public AriesApplication getApplication();
+  
+  /**
+   * Start the application by starting all its constituent bundles as per the DeploymentContent

+   * in the associated AriesApplication's DeploymentMetadata. 
+   * @throws BundleException
+   */
   public void start() throws BundleException;
+  
+  /**
+   * Stop the application by stopping all its constituent bundles. 
+   * @throws BundleException
+   */
   public void stop() throws BundleException;
+  
+  /**
+   * Get the org.osgi.framework.Bundle objects representing the application's runtime
+   * constituents. 
+   * @return The application's runtime content. 
+   */
   public Set<Bundle> getApplicationContent(); // 
   
   public enum ApplicationState

Modified: incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ApplicationContextManager.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ApplicationContextManager.java?rev=900820&r1=900819&r2=900820&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ApplicationContextManager.java
(original)
+++ incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ApplicationContextManager.java
Tue Jan 19 15:40:34 2010
@@ -21,13 +21,23 @@
 
 import java.util.Set;
 
-/* We'll use this interface as a plug-point to the application-runtime */
+/**
+ * An ApplicationContextManager is responsible for managing Aries applications in the 
+ * server's OSGi runtime. We expect that many projects consuming this code will provide
+ * their own implementation of this service. 
+ */
 public interface ApplicationContextManager {
 
-  // Moved from AriesApplicationManager
+  /**
+   * Obtain an ApplicationContext for an AriesApplication. Applications are stopped and
+   * started via an ApplicationContext. 
+   * @param app The applicaton for which to obtain an ApplicationContext. 
+   * @return ApplicationContext
+   */
   public ApplicationContext getApplicationContext(AriesApplication app);
-  
-  // Not sure who needs this or for what, so don't yet know if it'll need to 
-  // be an immutable copy, or a live reference. 
+
+  /**
+   * @return The set of all ApplicationContexts.
+   */
   public Set<ApplicationContext> getApplicationContexts();
 }

Modified: incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ApplicationEvent.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ApplicationEvent.java?rev=900820&r1=900819&r2=900820&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ApplicationEvent.java
(original)
+++ incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ApplicationEvent.java
Tue Jan 19 15:40:34 2010
@@ -20,12 +20,20 @@
 package org.apache.aries.application.management;
 
 /**
- * Passed to ApplicationListener clients
- *
+ * Objects of this type are passed to ApplicationListener clients
  */
 public abstract class ApplicationEvent {
 
+  /**
+   * Get the type of the event
+   * @return
+   */
   abstract public ApplicationContext.ApplicationState getType();
+  
+  /**
+   * Get the associated AriesApplication
+   * @return
+   */
   abstract public AriesApplication getApplication();
   
 }

Modified: incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ApplicationListener.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ApplicationListener.java?rev=900820&r1=900819&r2=900820&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ApplicationListener.java
(original)
+++ incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ApplicationListener.java
Tue Jan 19 15:40:34 2010
@@ -19,6 +19,9 @@
 
 package org.apache.aries.application.management;
 
+/**
+ * A client that wishes to receive ApplicationEvents should implement this interface. 
+ */
 public interface ApplicationListener {
 
   /**

Modified: incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/AriesApplication.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/AriesApplication.java?rev=900820&r1=900819&r2=900820&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/AriesApplication.java
(original)
+++ incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/AriesApplication.java
Tue Jan 19 15:40:34 2010
@@ -30,19 +30,41 @@
 
 
 /**
- * Metadata about an Aries application - a representation of a .eba
- * file, as per http://incubator.apache.org/aries/applications.html
+ * Metadata about an Aries application
+ * @see <a href="http://incubator.apache.org/aries/applications.html">
+ * http://incubator.apache.org/aries/applications.html</a>. 
  *
  */
 public interface AriesApplication
 {
+  /**
+   * Get the application metadata, which is stored in META-INF/APPLICATION.MF.
+   * @return ApplicationMetadata
+   */
   public ApplicationMetadata getApplicationMetadata();
+  
+  /**
+   * Get the deployment metadata, which is stored in META-INF/DEPLOYMENT.MF.
+   * @return DeploymentMetadata
+   */
   public DeploymentMetadata getDeploymentMetadata();
 
-  /** the set of bundles included in the application by value */
+  /** 
+   * @return the set of bundles included in the application by value 
+   */
   public Set<BundleInfo> getBundleInfo();
 
-  /** Stores any changes to disk using this implementations storage form */
+  /** 
+   * Persist this metadata. 
+   * @param f The file to store this metadata to
+   * @throws IOException
+   */
   public void store(File f) throws FileNotFoundException, IOException;
+  
+  /** 
+   * Persist this metadata. 
+   * @param out The output stream to store this metadata to
+   * @throws IOException
+   */
   public void store(OutputStream out) throws FileNotFoundException, IOException;
 }

Modified: incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/AriesApplicationManager.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/AriesApplicationManager.java?rev=900820&r1=900819&r2=900820&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/AriesApplicationManager.java
(original)
+++ incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/AriesApplicationManager.java
Tue Jan 19 15:40:34 2010
@@ -26,15 +26,63 @@
 import org.osgi.framework.BundleException;
 
 /**
- * Create, install and uninstall applications via this service. 
+ * An AriesApplicationManager service is used to create, install and uninstall Aries
+ * applications. 
  */
 public interface AriesApplicationManager
 {
+  /**
+   * Create an AriesApplication from a local resource
+   * @param source .eba file, or exploded directory
+   * @return AriesApplication
+   * @throws ManagementException
+   */
   public AriesApplication createApplication(IDirectory source) throws ManagementException;
+  
+  /**
+   * Create an AriesApplication from a remote resource
+   * @param url
+   * @return
+   * @throws ManagementException
+   */
   public AriesApplication createApplication(URL url) throws ManagementException;
+  
+  /**
+   * Install an AriesApplication - i.e. load its bundles into the runtime, but do 
+   * not start them. 
+   * @param app Application to install 
+   * @return ApplicationContext, a handle to an application in the runtime
+   * @throws BundleException
+   */
   public ApplicationContext install(AriesApplication app) throws BundleException;
+  
+  /**
+   * Uninstall an AriesApplication - i.e. unload its bundles from the runtime. 
+   * @param app The installed application to uninstall
+   * @throws BundleException
+   */
   public void uninstall(ApplicationContext app) throws BundleException;
+  
+  /**
+   * Add an ApplicationListener
+   * @param l
+   */
   public void addApplicationListener(ApplicationListener l);
+  
+  /**
+   * Remove an ApplicationListener
+   * @param l
+   */
   public void removeApplicationListener(ApplicationListener l);
-  AriesApplication resolve (AriesApplication originalApp, ResolveConstraint ... constraints);
+  
+  /**
+   * Re-resolve an AriesApplication against a set of constraints. Each ResolveConstraint
+   * represents a single proposed change to the content of an 
+   * @param originalApp Original application
+   * @param constraints Constraints
+   * @throws ResolverException
+   * @return New AriesApplication
+   */
+  AriesApplication resolve (AriesApplication originalApp, ResolveConstraint ... constraints)
+    throws ResolverException;
 }

Modified: 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=900820&r1=900819&r2=900820&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/AriesApplicationResolver.java
(original)
+++ incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/AriesApplicationResolver.java
Tue Jan 19 15:40:34 2010
@@ -27,7 +27,8 @@
    * 
    * @param app The application to resolve
    * @return The additional bundles required to ensure that the application resolves. This
-   *         set will not include those provided by value within the application. 
+   *         set will not include those provided by value within the application.
+   * @throws ResolverException if the application cannot be resolved.  
    */
-  Set<BundleInfo> resolve (AriesApplication app);
+  Set<BundleInfo> resolve (AriesApplication app) throws ResolverException ;
 }

Modified: incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/BundleInfo.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/BundleInfo.java?rev=900820&r1=900819&r2=900820&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/BundleInfo.java
(original)
+++ incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/BundleInfo.java
Tue Jan 19 15:40:34 2010
@@ -26,7 +26,6 @@
 
 /**
  * Information about a bundle
- *
  */
 public interface BundleInfo
 {

Modified: incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ConversionException.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ConversionException.java?rev=900820&r1=900819&r2=900820&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ConversionException.java
(original)
+++ incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ConversionException.java
Tue Jan 19 15:40:34 2010
@@ -19,6 +19,9 @@
 
 package org.apache.aries.application.management;
 
+/**
+ * An Exception thrown by a BundleConverter
+ */
 public class ConversionException extends Exception {
 
   private static final long serialVersionUID = -5921912484821992252L;

Modified: incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/LocalPlatform.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/LocalPlatform.java?rev=900820&r1=900819&r2=900820&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/LocalPlatform.java
(original)
+++ incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/LocalPlatform.java
Tue Jan 19 15:40:34 2010
@@ -25,10 +25,20 @@
 /**
  * This is a difficult interface to name properly. It holds methods that need to 
  * be implemented on a per-application server platform basis. 
- *
  */
 public interface LocalPlatform {
 
+  /**
+   * Obtain a temporary directory
+   * @return Temporary directory
+   * @throws IOException
+   */
   public File getTemporaryDirectory() throws IOException;
+
+  /**
+   * Obtain a temporary file
+   * @return Temporary directory
+   * @throws IOException
+   */
   public File getTemporaryFile() throws IOException;
 }

Modified: incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ManagementException.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ManagementException.java?rev=900820&r1=900819&r2=900820&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ManagementException.java
(original)
+++ incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ManagementException.java
Tue Jan 19 15:40:34 2010
@@ -19,6 +19,9 @@
 
 package org.apache.aries.application.management;
 
+/**
+ * An exception thrown by various methods within this package.
+ */
 public class ManagementException extends Exception {
 
   private static final long serialVersionUID = 6472726820228618243L;

Modified: incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ResolveConstraint.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ResolveConstraint.java?rev=900820&r1=900819&r2=900820&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ResolveConstraint.java
(original)
+++ incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ResolveConstraint.java
Tue Jan 19 15:40:34 2010
@@ -27,7 +27,16 @@
  * application. 
  */
 public interface ResolveConstraint {
+  /**
+   * The name of the newly required bundle
+   * @return Bundle name
+   */
   public String getBundleName();
+  
+  /** 
+   * The version of the newly required bundle
+   * @return Bundle version
+   */
   public Version getVersion();
 
 }

Added: incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ResolverException.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ResolverException.java?rev=900820&view=auto
==============================================================================
--- incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ResolverException.java
(added)
+++ incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/management/ResolverException.java
Tue Jan 19 15:40:34 2010
@@ -0,0 +1,53 @@
+/*
+ * 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.aries.application.management;
+
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * Exception thrown by the AriesApplicationResolver interface
+ */
+public class ResolverException extends Exception {
+
+  private static final long serialVersionUID = 8176120468577397671L;
+  private List<String> _unsatisfiedRequirementMessages = new ArrayList<String>();
+  
+  /**
+   * Construct from an Exception
+   * @param e
+   */
+  public ResolverException (Exception e) { 
+    super(e);
+  }
+  /**
+   * Construct from a String
+   * @param s
+   */
+  public ResolverException (String s) { 
+    super(s);
+  }
+  
+  public void setUnsatisfiedRequirements (List<String> reqts) { 
+    _unsatisfiedRequirementMessages = reqts;
+  }
+  public List<String> getUnsatisfiedRequirements() { 
+    return _unsatisfiedRequirementMessages;
+  }
+}

Modified: incubator/aries/trunk/application/application-management/src/main/java/org/apache/aries/application/management/impl/AriesApplicationManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-management/src/main/java/org/apache/aries/application/management/impl/AriesApplicationManagerImpl.java?rev=900820&r1=900819&r2=900820&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-management/src/main/java/org/apache/aries/application/management/impl/AriesApplicationManagerImpl.java
(original)
+++ incubator/aries/trunk/application/application-management/src/main/java/org/apache/aries/application/management/impl/AriesApplicationManagerImpl.java
Tue Jan 19 15:40:34 2010
@@ -52,6 +52,7 @@
 import org.apache.aries.application.management.LocalPlatform;
 import org.apache.aries.application.management.ManagementException;
 import org.apache.aries.application.management.ResolveConstraint;
+import org.apache.aries.application.management.ResolverException;
 import org.apache.aries.application.management.internal.MessageUtil;
 import org.apache.aries.application.utils.AppConstants;
 import org.apache.aries.application.utils.filesystem.FileSystem;
@@ -188,8 +189,10 @@
     } catch (IOException iox) { 
       _logger.error ("APPMANAGEMENT0006E", new Object []{ebaFile.getName(), iox});
       throw new ManagementException(iox);
+    } catch (ResolverException rx) { 
+      _logger.error ("APPMANAGEMENT0008E", new Object []{ebaFile.getName(), rx});
+      throw new ManagementException(rx);
     }
-    
     return application;
   }
 

Modified: incubator/aries/trunk/application/application-management/src/main/java/org/apache/aries/application/management/messages/AppManagementMessages.properties
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-management/src/main/java/org/apache/aries/application/management/messages/AppManagementMessages.properties?rev=900820&r1=900819&r2=900820&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-management/src/main/java/org/apache/aries/application/management/messages/AppManagementMessages.properties
(original)
+++ incubator/aries/trunk/application/application-management/src/main/java/org/apache/aries/application/management/messages/AppManagementMessages.properties
Tue Jan 19 15:40:34 2010
@@ -4,4 +4,5 @@
 APPMANAGEMENT0004E=APPMANAGEMENT0004E: Exception caught when converting artifact {0} in {1}:
{2}.
 APPMANAGEMENT0005E=APPMANAGEMENT0005E: Failed to create application from {0} due to conversion
errors: see log for details.
 APPMANAGEMENT0006E=APPMANAGEMENT0006E: IOException encountered while constructing Aries application
from {0}: {1}.
-APPMANAGEMENT0007E=APPMANAGEMENT0007E: IOException encountered while parsing APPICATION.MF
in {0}: {1}. 
\ No newline at end of file
+APPMANAGEMENT0007E=APPMANAGEMENT0007E: IOException encountered while parsing APPICATION.MF
in {0}: {1}. 
+APPMANAGEMENT0008E=APPMANAGEMENT0008E: ResolverException encountered while constructing Aries
application from {0}: {1}.
\ No newline at end of file



Mime
View raw message