incubator-aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mnutt...@apache.org
Subject svn commit: r893207 - in /incubator/aries/trunk/application: application-api/src/main/java/org/apache/aries/application/ application-utils/src/main/java/org/apache/aries/application/impl/ application-utils/src/test/java/org/apache/aries/application/utils/
Date Tue, 22 Dec 2009 15:41:34 GMT
Author: mnuttall
Date: Tue Dec 22 15:41:33 2009
New Revision: 893207

URL: http://svn.apache.org/viewvc?rev=893207&view=rev
Log:
ARIES-89: Implement application support: more meaningful method names on ApplicationMetadataManager

Modified:
    incubator/aries/trunk/application/application-api/src/main/java/org/apache/aries/application/ApplicationMetadataManager.java
    incubator/aries/trunk/application/application-utils/src/main/java/org/apache/aries/application/impl/ApplicationMetadataManagerImpl.java
    incubator/aries/trunk/application/application-utils/src/main/java/org/apache/aries/application/impl/ApplicationMetadataManagerServiceImpl.java
    incubator/aries/trunk/application/application-utils/src/test/java/org/apache/aries/application/utils/ApplicationMetadataImplTest.java
    incubator/aries/trunk/application/application-utils/src/test/java/org/apache/aries/application/utils/ManifestProcessorTest.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=893207&r1=893206&r2=893207&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
Tue Dec 22 15:41:33 2009
@@ -39,7 +39,7 @@
    * 
    * @throws IOException if an IOException occurs reading from the stream.
    */
-  public ApplicationMetadata parseApplication(InputStream in) throws IOException;
+  public ApplicationMetadata parseApplicationMetadata(InputStream in) throws IOException;
   public Content parseContent(String content);
   public VersionRange parseVersionRange(String versionRange);
   /**
@@ -50,7 +50,7 @@
    * @param man the manifest to read from
    * @return    the parsed application metadata.
    */
-  public ApplicationMetadata createApplication(Manifest man);
+  public ApplicationMetadata createApplicationMetadata(Manifest man);
   /**
    * This method is used to retrived a previously registered application metadata.
    * 
@@ -60,7 +60,11 @@
    * @return the application metadata, or null if no application has been 
    *         registered.
    */
-  public ApplicationMetadata getApplication(String applicationSymbolicName, Version version);
+  public ApplicationMetadata getApplicationMetadata (String applicationSymbolicName, Version
version);
+  
+  // MN: Dec 22: register, unregisterApplication probably will not be required
+  // as we implement AriesApplicationManager, so I'm not refactoring the method names. 
+  
   /**
    * This method is used to register an application. The ApplicationMetadata
    * passed in should be created via the createApplication or parseApplication

Modified: incubator/aries/trunk/application/application-utils/src/main/java/org/apache/aries/application/impl/ApplicationMetadataManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-utils/src/main/java/org/apache/aries/application/impl/ApplicationMetadataManagerImpl.java?rev=893207&r1=893206&r2=893207&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-utils/src/main/java/org/apache/aries/application/impl/ApplicationMetadataManagerImpl.java
(original)
+++ incubator/aries/trunk/application/application-utils/src/main/java/org/apache/aries/application/impl/ApplicationMetadataManagerImpl.java
Tue Dec 22 15:41:33 2009
@@ -41,13 +41,13 @@
   /** The applications managed, keyed based on the app symbolic name and version */
   public ConcurrentMap<String, ApplicationMetadata> applications = new ConcurrentHashMap<String,
ApplicationMetadata>();
 
-  public ApplicationMetadata getApplication(String applicationSymbolicName, Version version)
+  public ApplicationMetadata getApplicationMetadata (String applicationSymbolicName, Version
version)
   {
     ApplicationMetadata metadata = applications.get(applicationSymbolicName + "_" + version);
     return metadata;
   }
 
-  public ApplicationMetadata parseApplication(InputStream in) throws IOException
+  public ApplicationMetadata parseApplicationMetadata(InputStream in) throws IOException
   {
     Manifest man = ManifestProcessor.parseManifest(in);
     
@@ -63,7 +63,7 @@
     return existingApp == null;
   }
   
-  public ApplicationMetadata createApplication(Manifest man)
+  public ApplicationMetadata createApplicationMetadata(Manifest man)
   {
     return new ApplicationMetadataImpl(man);
   }

Modified: incubator/aries/trunk/application/application-utils/src/main/java/org/apache/aries/application/impl/ApplicationMetadataManagerServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-utils/src/main/java/org/apache/aries/application/impl/ApplicationMetadataManagerServiceImpl.java?rev=893207&r1=893206&r2=893207&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-utils/src/main/java/org/apache/aries/application/impl/ApplicationMetadataManagerServiceImpl.java
(original)
+++ incubator/aries/trunk/application/application-utils/src/main/java/org/apache/aries/application/impl/ApplicationMetadataManagerServiceImpl.java
Tue Dec 22 15:41:33 2009
@@ -52,19 +52,19 @@
       manager = man;
     }
 
-    public ApplicationMetadata getApplication(String applicationSymbolicName, Version version)
+    public ApplicationMetadata getApplicationMetadata (String applicationSymbolicName, Version
version)
     {
-      return manager.getApplication(applicationSymbolicName, version);
+      return manager.getApplicationMetadata (applicationSymbolicName, version);
     }
   
-    public ApplicationMetadata parseApplication(InputStream in) throws IOException
+    public ApplicationMetadata parseApplicationMetadata(InputStream in) throws IOException
     {
-      return manager.parseApplication(in);
+      return manager.parseApplicationMetadata(in);
     }
   
-    public ApplicationMetadata createApplication(Manifest man)
+    public ApplicationMetadata createApplicationMetadata(Manifest man)
     {
-      return manager.createApplication(man);
+      return manager.createApplicationMetadata(man);
     }
   
     public boolean registerApplication(ApplicationMetadata app)

Modified: incubator/aries/trunk/application/application-utils/src/test/java/org/apache/aries/application/utils/ApplicationMetadataImplTest.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-utils/src/test/java/org/apache/aries/application/utils/ApplicationMetadataImplTest.java?rev=893207&r1=893206&r2=893207&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-utils/src/test/java/org/apache/aries/application/utils/ApplicationMetadataImplTest.java
(original)
+++ incubator/aries/trunk/application/application-utils/src/test/java/org/apache/aries/application/utils/ApplicationMetadataImplTest.java
Tue Dec 22 15:41:33 2009
@@ -33,7 +33,7 @@
   public void testBasicMetadataCreation() throws IOException
   {
     ApplicationMetadataManager manager = new ApplicationMetadataManagerImpl();
-    ApplicationMetadata app = manager.parseApplication(getClass().getResourceAsStream("/META-INF/APPLICATION.MF"));
+    ApplicationMetadata app = manager.parseApplicationMetadata(getClass().getResourceAsStream("/META-INF/APPLICATION.MF"));
     
     Assert.assertEquals("Travel Reservation", app.getApplicationName());
   }

Modified: incubator/aries/trunk/application/application-utils/src/test/java/org/apache/aries/application/utils/ManifestProcessorTest.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-utils/src/test/java/org/apache/aries/application/utils/ManifestProcessorTest.java?rev=893207&r1=893206&r2=893207&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-utils/src/test/java/org/apache/aries/application/utils/ManifestProcessorTest.java
(original)
+++ incubator/aries/trunk/application/application-utils/src/test/java/org/apache/aries/application/utils/ManifestProcessorTest.java
Tue Dec 22 15:41:33 2009
@@ -86,7 +86,7 @@
   {
     ApplicationMetadataManagerImpl manager = new ApplicationMetadataManagerImpl();
     InputStream in = getClass().getClassLoader().getResourceAsStream("META-INF/APPLICATION.MF");
-    ApplicationMetadata am = manager.parseApplication(in);
+    ApplicationMetadata am = manager.parseApplicationMetadata(in);
     assertNotNull(am);
 
     assertEquals(am.getApplicationName(),appName);
@@ -117,7 +117,7 @@
     
     InputStream in = getClass().getClassLoader().getResourceAsStream("META-INF/APPLICATION2.MF");
     
-    ApplicationMetadata am = manager.parseApplication(in);
+    ApplicationMetadata am = manager.parseApplicationMetadata(in);
     assertNotNull(am);
 
     assertEquals(am.getApplicationName(),appName);
@@ -144,7 +144,7 @@
     
     InputStream in = getClass().getClassLoader().getResourceAsStream("META-INF/APPLICATION3.MF");
     
-    ApplicationMetadata am = manager.parseApplication(in);
+    ApplicationMetadata am = manager.parseApplicationMetadata(in);
     assertNotNull(am);
 
     assertEquals("Wrong number of bundles are in the application", 1, am.getApplicationContents().size());



Mime
View raw message