felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From christ...@apache.org
Subject svn commit: r629830 - in /felix/trunk/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin: BundleInfoImpl.java Constants.java DeploymentAdminImpl.java spi/ProcessResourceCommand.java
Date Thu, 21 Feb 2008 15:39:51 GMT
Author: christian
Date: Thu Feb 21 07:39:51 2008
New Revision: 629830

URL: http://svn.apache.org/viewvc?rev=629830&view=rev
Log:
Minor deployment admin fixes:
 - Typo in event-property successful
 - Typo in deploymentpackage header DeploymentPackage-Customizer
 - DeploymentPackageManifest validation now picks up on missing Bundle-Version headers for
bundle resources
 - ProcessResource command now asks for the right resources

Modified:
    felix/trunk/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/BundleInfoImpl.java
    felix/trunk/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/Constants.java
    felix/trunk/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/DeploymentAdminImpl.java
    felix/trunk/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/spi/ProcessResourceCommand.java

Modified: felix/trunk/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/BundleInfoImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/BundleInfoImpl.java?rev=629830&r1=629829&r2=629830&view=diff
==============================================================================
--- felix/trunk/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/BundleInfoImpl.java
(original)
+++ felix/trunk/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/BundleInfoImpl.java
Thu Feb 21 07:39:51 2008
@@ -53,13 +53,16 @@
         }
 
         String version = attributes.getValue(org.osgi.framework.Constants.BUNDLE_VERSION);
+        if (version == null || version == "") {
+            throw new DeploymentException(DeploymentException.CODE_BAD_HEADER, "Invalid '"
+ org.osgi.framework.Constants.BUNDLE_VERSION + "' header for manifest entry '" + getPath()
+ "'");
+        }
         try {
             m_version = Version.parseVersion(version);
         } catch (IllegalArgumentException e) {
             throw new DeploymentException(DeploymentException.CODE_BAD_HEADER, "Invalid '"
+ org.osgi.framework.Constants.BUNDLE_VERSION + "' header for manifest entry '" + getPath()
+ "'");
         }
 
-        m_customizer = parseBooleanHeader(attributes, Constants.DEPLOYMENTPACKAGE_CUSTOMISER);
+        m_customizer = parseBooleanHeader(attributes, Constants.DEPLOYMENTPACKAGE_CUSTOMIZER);
     }
 
     public String getSymbolicName() {

Modified: felix/trunk/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/Constants.java
URL: http://svn.apache.org/viewvc/felix/trunk/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/Constants.java?rev=629830&r1=629829&r2=629830&view=diff
==============================================================================
--- felix/trunk/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/Constants.java
(original)
+++ felix/trunk/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/Constants.java
Thu Feb 21 07:39:51 2008
@@ -28,14 +28,14 @@
     // manifest 'name' section header constants
     public static final String RESOURCE_PROCESSOR = "Resource-Processor";
     public static final String DEPLOYMENTPACKAGE_MISSING = "DeploymentPackage-Missing";
-    public static final String DEPLOYMENTPACKAGE_CUSTOMISER = "DeploymentPackage-Customiser";
+    public static final String DEPLOYMENTPACKAGE_CUSTOMIZER = "DeploymentPackage-Customizer";
 
     // event topics and properties
     public static final String EVENTTOPIC_INSTALL = "org/osgi/service/deployment/INSTALL";
     public static final String EVENTTOPIC_UNINSTALL = "org/osgi/service/deployment/UNINSTALL";
     public static final String EVENTTOPIC_COMPLETE = "org/osgi/service/deployment/COMPLETE";
     public static final String EVENTPROPERTY_DEPLOYMENTPACKAGE_NAME = "deploymentpackage.name";
-    public static final String EVENTPROPERTY_SUCCESFULL = "succesfull";
+    public static final String EVENTPROPERTY_SUCCESFUL = "succesful";
 
     // miscellaneous constants
     public static final String BUNDLE_LOCATION_PREFIX = "osgi-dp:";

Modified: felix/trunk/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/DeploymentAdminImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/DeploymentAdminImpl.java?rev=629830&r1=629829&r2=629830&view=diff
==============================================================================
--- felix/trunk/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/DeploymentAdminImpl.java
(original)
+++ felix/trunk/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/DeploymentAdminImpl.java
Thu Feb 21 07:39:51 2008
@@ -313,7 +313,7 @@
     private void sendCompleteEvent(String name, boolean success) {
         Dictionary props = new Properties();
         props.put(Constants.EVENTPROPERTY_DEPLOYMENTPACKAGE_NAME, name);
-        props.put(Constants.EVENTPROPERTY_SUCCESFULL, String.valueOf(success));
+        props.put(Constants.EVENTPROPERTY_SUCCESFUL, String.valueOf(success));
         Event completeEvent = new Event(Constants.EVENTTOPIC_COMPLETE, props);
         m_eventAdmin.postEvent(completeEvent);
     }

Modified: felix/trunk/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/spi/ProcessResourceCommand.java
URL: http://svn.apache.org/viewvc/felix/trunk/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/spi/ProcessResourceCommand.java?rev=629830&r1=629829&r2=629830&view=diff
==============================================================================
--- felix/trunk/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/spi/ProcessResourceCommand.java
(original)
+++ felix/trunk/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/spi/ProcessResourceCommand.java
Thu Feb 21 07:39:51 2008
@@ -57,7 +57,7 @@
         BundleContext context = session.getBundleContext();
 
         Map expectedResources = new HashMap();
-        AbstractInfo[] resourceInfos = (AbstractInfo[]) source.getBundleInfos();
+        AbstractInfo[] resourceInfos = (AbstractInfo[]) source.getResourceInfos();
         for (int i = 0; i < resourceInfos.length; i++) {
             AbstractInfo resourceInfo = resourceInfos[i];
             if(!resourceInfo.isMissing()) {



Mime
View raw message