servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r634789 - in /servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer: ./ descriptor/ handler/ impl/
Date Fri, 07 Mar 2008 19:46:55 GMT
Author: gnodet
Date: Fri Mar  7 11:46:52 2008
New Revision: 634789

URL: http://svn.apache.org/viewvc?rev=634789&view=rev
Log:
Javadoc a bit more the deployer packages

Added:
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/package.html
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/package.html
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/package.html
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/package.html
      - copied, changed from r634741, servicemix/smx4/nmr/trunk/jbi/api/src/main/java/javax/jbi/package.html
Modified:
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/Component.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/ClassPath.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/ComponentDesc.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Connection.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Connections.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Consumer.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Consumes.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Descriptor.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/DescriptorFactory.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Identification.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/InstallationDescriptorExtension.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Provider.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Provides.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/ServiceAssemblyDesc.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/ServiceUnitDesc.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Services.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/SharedLibraryDesc.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/SharedLibraryList.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Target.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/Connection.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/JBIDeploymentListener.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/Transformer.java
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/URLHandler.java

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/Component.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/Component.java?rev=634789&r1=634788&r2=634789&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/Component.java
(original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/Component.java
Fri Mar  7 11:46:52 2008
@@ -19,7 +19,7 @@
 import javax.jbi.management.ComponentLifeCycleMBean;
 
 /**
- * Represents a JBI component lifecycle.
+ * Represents a JBI component.
  */
 public interface Component extends ComponentLifeCycleMBean {
 

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/ClassPath.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/ClassPath.java?rev=634789&r1=634788&r2=634789&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/ClassPath.java
(original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/ClassPath.java
Fri Mar  7 11:46:52 2008
@@ -20,7 +20,7 @@
 import java.util.List;
 
 /**
- * @version $Revision: 426415 $
+ * The <code>jbi:classpath</code> complex type.
  */
 public class ClassPath {
     

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/ComponentDesc.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/ComponentDesc.java?rev=634789&r1=634788&r2=634789&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/ComponentDesc.java
(original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/ComponentDesc.java
Fri Mar  7 11:46:52 2008
@@ -19,7 +19,7 @@
 import org.apache.servicemix.jbi.deployer.descriptor.ClassPath;
 
 /**
- * @version $Revision: 426415 $
+ * The <code>&lt;jbi:component&gt;</code> element.
  */
 public class ComponentDesc {
     private String type;

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Connection.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Connection.java?rev=634789&r1=634788&r2=634789&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Connection.java
(original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Connection.java
Fri Mar  7 11:46:52 2008
@@ -17,7 +17,7 @@
 package org.apache.servicemix.jbi.deployer.descriptor;
 
 /**
- * @version $Revision: 426415 $
+ * The <code>&lt;jbi:connection&gt;</code> element.
  */
 public class Connection {
     private Consumer consumer;

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Connections.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Connections.java?rev=634789&r1=634788&r2=634789&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Connections.java
(original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Connections.java
Fri Mar  7 11:46:52 2008
@@ -19,11 +19,11 @@
 import org.apache.servicemix.jbi.deployer.descriptor.Connection;
 
 /**
- * Inner class used to handle the grouping of connections
- * 
+ * The <code>&lt;jbi:connections&gt;</code> element.
  */
 public class Connections {
-	private Connection[] connections;
+
+    private Connection[] connections;
 
 	public Connection[] getConnections() {
 		return connections;

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Consumer.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Consumer.java?rev=634789&r1=634788&r2=634789&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Consumer.java
(original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Consumer.java
Fri Mar  7 11:46:52 2008
@@ -19,9 +19,7 @@
 import javax.xml.namespace.QName;
 
 /**
- * Specifies either an interface name or a service and endpoint name.
- *
- * @version $Revision: 426415 $
+ * The <code>&lt;jbi:consumer&gt;</code> element.
  */
 public class Consumer {
     private QName interfaceName;

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Consumes.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Consumes.java?rev=634789&r1=634788&r2=634789&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Consumes.java
(original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Consumes.java
Fri Mar  7 11:46:52 2008
@@ -19,9 +19,7 @@
 import javax.xml.namespace.QName;
 
 /**
- * Specifies either an interface name or a service and endpoint name.
- *
- * @version $Revision: 426415 $
+ * The <code>&lt;jbi:consumes&gt;</code> element.
  */
 public class Consumes {
     private QName interfaceName;

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Descriptor.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Descriptor.java?rev=634789&r1=634788&r2=634789&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Descriptor.java
(original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Descriptor.java
Fri Mar  7 11:46:52 2008
@@ -16,12 +16,11 @@
  */
 package org.apache.servicemix.jbi.deployer.descriptor;
 
-import org.apache.servicemix.jbi.deployer.descriptor.ComponentDesc;
-
 /**
- * @version $Revision: 426415 $
+ * The <code>&lt;jbi:jbi&gt;</code> element.
  */
 public class Descriptor {
+
     private double version;
     private ComponentDesc component;
     private SharedLibraryDesc sharedLibrary;
@@ -69,94 +68,3 @@
     }
 }
 
-/*
-default namespace this = "http://java.sun.com/xml/ns/jbi"
-start =
-  element jbi {
-    attribute version { xsd:decimal },
-    ( component | shared-library | service-assembly | services)
-  }
-component =
-  element component {
-    attribute type { "service-engine" | "binding-component" },
-    attribute component-class-loader-delegation { "parent-first" | "self-first" }?,
-    attribute bootstrap-class-loader-delegation { "parent-first" | "self-first" }?,
-    identification,
-    element component-class-name { attribute description { text }?, text },
-    element component-class-path { class-path },
-    element bootstrap-class-name { text },
-    element bootstrap-class-path { class-path },
-    shared-library-list*,
-    element* -this:* { text }*
-  }
-shared-library =
-  element shared-library {
-    attribute class-loader-delegation { "parent-first" | "self-first" }?,
-    attribute version { text }?,
-    identification,
-    element shared-library-class-path { class-path }
-  }
-shared-library-list =
-  element shared-library {
-    attribute version { text }?,
-    text
-  }
-service-assembly =
-  element service-assembly {
-    identification,
-    service-unit*,
-    connections?,
-    element* -this:* { text }*
-  }
-service-unit =
-  element service-unit {
-    identification,
-    element target {
-      element artifacts-zip { text },
-      element component-name { xsd:NCName }
-    },
-    element* -this:* { text }*
-  }
-identification =
-  element identification {
-    element name { xsd:NCName },
-    element description { text },
-    element* -this:* { text }*
- }
-class-path =
-  (element path-element { text })+
-services =
-  element services {
-    attribute binding-component { xsd:boolean },
-    provides*,
-    consumes*,
-    element* -this:* { text }*
-  }
-connections =
-  element connections {
-    element connection {
-      element consumer {
-        ( attribute interface-name { xsd:QName } |
-          (attribute service-name { xsd:QName }, attribute endpoint-name { text })
-        )
-      },
-      element provider {
-        attribute service-name { xsd:QName }, attribute endpoint-name { text }
-      }
-    }*,
-    element* -this:* { text }*
-  }
-provides =
-  element provides {
-    attribute interface-name { xsd:QName },
-    attribute service-name {xsd:QName }, attribute endpoint-name { text },
-    element* -this:* { text }*
-  }
-consumes =
-  element consumes {
-    attribute interface-name { xsd:QName },
-    ( attribute service-name {xsd:QName }, attribute endpoint-name { text },
-      attribute link-type { "standard" | "hard" | "soft" }? )?,
-    element* -this:* { text }*
-  }
-*/

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/DescriptorFactory.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/DescriptorFactory.java?rev=634789&r1=634788&r2=634789&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/DescriptorFactory.java
(original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/DescriptorFactory.java
Fri Mar  7 11:46:52 2008
@@ -46,7 +46,7 @@
 import org.xml.sax.SAXParseException;
 
 /**
- * @version $Revision: 359151 $
+ * Factory to read a JBI descriptor from a file, url or stream.
  */
 public class DescriptorFactory {
 
@@ -55,10 +55,13 @@
      */
     private static final String XSD_SCHEMA_LANGUAGE = "http://www.w3.org/2001/XMLSchema";
 
+    /**
+     * The location of the JBI descriptor in a JBI artifact.
+     */
     public static final String DESCRIPTOR_FILE = "META-INF/jbi.xml";
 
     /**
-     * Build a jbi descriptor from a file archive
+     * Build a jbi descriptor from a file archive.
      * 
      * @param descriptorFile
      *            path to the jbi descriptor, or to the root directory
@@ -113,9 +116,11 @@
     }
 
     /**
-     * Build a jbi descriptor from the specified binary data
+     * Build a jbi descriptor from the specified binary data.
+     * The descriptor is validated against the schema, but no
+     * semantic validation is performed.
      * 
-     * @param bytes
+     * @param bytes hold the content of the JBI descriptor xml document
      * @return the Descriptor object
      */
     public static Descriptor buildDescriptor(final byte[] bytes) {
@@ -338,7 +343,7 @@
     }
 
     /**
-     * Check validity of the JBI descriptor
+     * Check validity of the JBI descriptor.
      * 
      * @param descriptor
      *            the descriptor to check

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Identification.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Identification.java?rev=634789&r1=634788&r2=634789&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Identification.java
(original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Identification.java
Fri Mar  7 11:46:52 2008
@@ -17,7 +17,7 @@
 package org.apache.servicemix.jbi.deployer.descriptor;
 
 /**
- * @version $Revision: 426415 $
+ * The <code>&lt;jbi:identification&gt;</code> element.
  */
 public class Identification {
     private String name;

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/InstallationDescriptorExtension.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/InstallationDescriptorExtension.java?rev=634789&r1=634788&r2=634789&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/InstallationDescriptorExtension.java
(original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/InstallationDescriptorExtension.java
Fri Mar  7 11:46:52 2008
@@ -20,8 +20,6 @@
 
 /**
  * A POJO used to hold the descriptor extension.
- *
- * @version $Revision: 426415 $
  */
 public class InstallationDescriptorExtension {
     DocumentFragment descriptorExtension;

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Provider.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Provider.java?rev=634789&r1=634788&r2=634789&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Provider.java
(original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Provider.java
Fri Mar  7 11:46:52 2008
@@ -19,7 +19,7 @@
 import javax.xml.namespace.QName;
 
 /**
- * @version $Revision: 426415 $
+ * The <code>&lt;jbi:provider&gt;</code> element.
  */
 public class Provider {
     private QName serviceName;

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Provides.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Provides.java?rev=634789&r1=634788&r2=634789&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Provides.java
(original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Provides.java
Fri Mar  7 11:46:52 2008
@@ -19,7 +19,7 @@
 import javax.xml.namespace.QName;
 
 /**
- * @version $Revision: 426415 $
+ * The <code>&lt;jbi:provides&gt;</code> element.
  */
 public class Provides {
     private QName serviceName;

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/ServiceAssemblyDesc.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/ServiceAssemblyDesc.java?rev=634789&r1=634788&r2=634789&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/ServiceAssemblyDesc.java
(original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/ServiceAssemblyDesc.java
Fri Mar  7 11:46:52 2008
@@ -17,7 +17,7 @@
 package org.apache.servicemix.jbi.deployer.descriptor;
 
 /**
- * @version $Revision: 426415 $
+ * The <code>&lt;jbi:service-assembly&gt;</code> element.
  */
 public class ServiceAssemblyDesc {
 

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/ServiceUnitDesc.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/ServiceUnitDesc.java?rev=634789&r1=634788&r2=634789&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/ServiceUnitDesc.java
(original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/ServiceUnitDesc.java
Fri Mar  7 11:46:52 2008
@@ -17,7 +17,7 @@
 package org.apache.servicemix.jbi.deployer.descriptor;
 
 /**
- * @version $Revision: 426415 $
+ * The <code>&lt;jbi:service-unit&gt;</code> element.
  */
 public class ServiceUnitDesc {
     private Identification identification;

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Services.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Services.java?rev=634789&r1=634788&r2=634789&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Services.java
(original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Services.java
Fri Mar  7 11:46:52 2008
@@ -17,7 +17,7 @@
 package org.apache.servicemix.jbi.deployer.descriptor;
 
 /**
- * @version $Revision: 426415 $
+ * The <code>&lt;jbi:services&gt;</code> element.
  */
 public class Services {
     private boolean bindingComponent;

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/SharedLibraryDesc.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/SharedLibraryDesc.java?rev=634789&r1=634788&r2=634789&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/SharedLibraryDesc.java
(original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/SharedLibraryDesc.java
Fri Mar  7 11:46:52 2008
@@ -17,7 +17,7 @@
 package org.apache.servicemix.jbi.deployer.descriptor;
 
 /**
- * @version $Revision: 426415 $
+ * The <code>&lt;jbi:shared-library&gt;</code> element.
  */
 public class SharedLibraryDesc {
     private String classLoaderDelegation = "parent-first";

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/SharedLibraryList.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/SharedLibraryList.java?rev=634789&r1=634788&r2=634789&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/SharedLibraryList.java
(original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/SharedLibraryList.java
Fri Mar  7 11:46:52 2008
@@ -17,7 +17,7 @@
 package org.apache.servicemix.jbi.deployer.descriptor;
 
 /**
- * @version $Revision: 426415 $
+ * The <code>jbi:shared-library-list</code> complex type.
  */
 public class SharedLibraryList {
     private String version;

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Target.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Target.java?rev=634789&r1=634788&r2=634789&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Target.java
(original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/Target.java
Fri Mar  7 11:46:52 2008
@@ -17,7 +17,7 @@
 package org.apache.servicemix.jbi.deployer.descriptor;
 
 /**
- * @version $Revision: 426415 $
+ * The <code>&lt;jbi:target&gt;</code> element.
  */
 public class Target {
     private String artifactsZip;

Added: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/package.html
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/package.html?rev=634789&view=auto
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/package.html
(added)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/descriptor/package.html
Fri Mar  7 11:46:52 2008
@@ -0,0 +1,118 @@
+<!--
+    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.
+-->
+<html>
+<head>
+</head>
+<body>
+
+JBI descriptor POJOs based model.
+
+Relax NG Schema for JBI descriptor:
+<pre>
+    default namespace this = "http://java.sun.com/xml/ns/jbi"
+    start =
+      element jbi {
+        attribute version { xsd:decimal },
+        ( component | shared-library | service-assembly | services)
+      }
+    component =
+      element component {
+        attribute type { "service-engine" | "binding-component" },
+        attribute component-class-loader-delegation { "parent-first" | "self-first" }?,
+        attribute bootstrap-class-loader-delegation { "parent-first" | "self-first" }?,
+        identification,
+        element component-class-name { attribute description { text }?, text },
+        element component-class-path { class-path },
+        element bootstrap-class-name { text },
+        element bootstrap-class-path { class-path },
+        shared-library-list*,
+        element* -this:* { text }*
+      }
+    shared-library =
+      element shared-library {
+        attribute class-loader-delegation { "parent-first" | "self-first" }?,
+        attribute version { text }?,
+        identification,
+        element shared-library-class-path { class-path }
+      }
+    shared-library-list =
+      element shared-library {
+        attribute version { text }?,
+        text
+      }
+    service-assembly =
+      element service-assembly {
+        identification,
+        service-unit*,
+        connections?,
+        element* -this:* { text }*
+      }
+    service-unit =
+      element service-unit {
+        identification,
+        element target {
+          element artifacts-zip { text },
+          element component-name { xsd:NCName }
+        },
+        element* -this:* { text }*
+      }
+    identification =
+      element identification {
+        element name { xsd:NCName },
+        element description { text },
+        element* -this:* { text }*
+     }
+    class-path =
+      (element path-element { text })+
+    services =
+      element services {
+        attribute binding-component { xsd:boolean },
+        provides*,
+        consumes*,
+        element* -this:* { text }*
+      }
+    connections =
+      element connections {
+        element connection {
+          element consumer {
+            ( attribute interface-name { xsd:QName } |
+              (attribute service-name { xsd:QName }, attribute endpoint-name { text })
+            )
+          },
+          element provider {
+            attribute service-name { xsd:QName }, attribute endpoint-name { text }
+          }
+        }*,
+        element* -this:* { text }*
+      }
+    provides =
+      element provides {
+        attribute interface-name { xsd:QName },
+        attribute service-name {xsd:QName }, attribute endpoint-name { text },
+        element* -this:* { text }*
+      }
+    consumes =
+      element consumes {
+        attribute interface-name { xsd:QName },
+        ( attribute service-name {xsd:QName }, attribute endpoint-name { text },
+          attribute link-type { "standard" | "hard" | "soft" }? )?,
+        element* -this:* { text }*
+      }
+</pre>
+
+</body>
+</html>

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/Connection.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/Connection.java?rev=634789&r1=634788&r2=634789&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/Connection.java
(original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/Connection.java
Fri Mar  7 11:46:52 2008
@@ -29,7 +29,10 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.jbi.deployer.impl.FileUtil;
 
-
+/**
+ * A URL connection to handle the JBI to OSGi transformation
+ * using a URL.
+ */
 public class Connection extends URLConnection {
 	
 	private static Log logger = LogFactory.getLog(Connection.class);
@@ -42,15 +45,22 @@
 	}
 
 
-	@Override
-	public void connect() throws IOException {
-		
+    /**
+     * Connect method.  Nothing to do in our case.
+     */
+    @Override
+	public void connect() {
 	}
-	
-	@Override
+
+    /**
+     * Retrieve an InputStream on the OSGi bundle.
+     * 
+     * @return an InputStream used to read the transformation output.
+     * @throws IOException if an error occurs when transforming the JBI artifact.
+     */
+    @Override
 	public InputStream getInputStream() throws IOException {
 		try {
-			connect();
 			InputStream targetInputStream = urlHandler.getJbiArtifactURL().openConnection().getInputStream();
 			File jbiZipFile = File.createTempFile("jbi", ".zip");
 			FileOutputStream jbiZip = new FileOutputStream(jbiZipFile);

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/JBIDeploymentListener.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/JBIDeploymentListener.java?rev=634789&r1=634788&r2=634789&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/JBIDeploymentListener.java
(original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/JBIDeploymentListener.java
Fri Mar  7 11:46:52 2008
@@ -24,14 +24,27 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.servicemix.jbi.deployer.descriptor.DescriptorFactory;
 import org.apache.servicemix.kernel.filemonitor.DeploymentListener;
 
-
+/**
+ * A JBI DeploymentListener which transforms plain JBI artifacts to OSGi bundles.
+ * The deployer will recognize zip and jar files containing a JBI descriptor and
+ * without any OSGi manifest entries.
+ */
 public class JBIDeploymentListener implements DeploymentListener {
 	
 	private static final Log Logger = LogFactory.getLog(JBIDeploymentListener.class);
-	
-	public boolean canHandle(File artifact) {
+
+    /**
+     * Check if the file is a recognized JBI artifact that needs to be
+     * processed.
+     *
+     * @param artifact the file to check
+     * @return <code>true</code> is the file is a JBI artifact that
+     *         should be transformed into an OSGi bundle.
+     */
+    public boolean canHandle(File artifact) {
 		try {
             // Accept jars and zips
             if (!artifact.getName().endsWith(".zip") &&
@@ -39,7 +52,7 @@
                 return false;
             }
 			JarFile jar = new JarFile(artifact);
-			JarEntry entry = jar.getJarEntry("META-INF/jbi.xml");
+			JarEntry entry = jar.getJarEntry(DescriptorFactory.DESCRIPTOR_FILE);
             // Only handle JBI artifacts
             if (entry == null) {
 				return false;
@@ -57,8 +70,16 @@
 		}
 	}
 
-	
-	public File handle(File artifact, File tmpDir) {
+
+    /**
+     * Transform the file, which is a JBI artifact, into an OSGi bundle.
+     *
+     * @param artifact the file to transform.
+     * @param tmpDir the location where the file should be stored.
+     * @return the location of the transformed OSGi bundle, or <code>null</code>
+     *         if the transformation could not take place.
+     */
+    public File handle(File artifact, File tmpDir) {
 		try{
 			String bundleName = artifact.getName().substring(0, artifact.getName().length() -4 ) +
".jar";
 			File destFile = new File(tmpDir, bundleName);

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/Transformer.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/Transformer.java?rev=634789&r1=634788&r2=634789&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/Transformer.java
(original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/Transformer.java
Fri Mar  7 11:46:52 2008
@@ -31,11 +31,30 @@
 import org.apache.servicemix.jbi.deployer.impl.FileUtil;
 
 /**
- * Helper class to transform JBI artifacts into OSGi bundles
+ * Helper class to transform JBI artifacts into OSGi bundles.
  */
 public class Transformer {
 
-    public static void transformToOSGiBundle(File jbiArtifact, File jbiBundle) throws Exception
{
+    /**
+     * Prevent instanciation.
+     */
+    private Transformer() {
+    }
+
+    /**
+     * Create an OSGi bundle from the JBI artifact.
+     * The process creates the following OSGi manifest entries:
+     * <ul>
+     *   <li><b><code>Bundle-SymbolicName</code></b>: the name
of the JBI artifact</li>
+     *   <li><b><code>Bundle-Version</code></b>: retrieved
from the <code>Implementation-Version</code> manifest entry</li>
+     *   <li><b><code>DynamicImport-Package</code></b>: javax.*,org.xml.*,org.w3c.*</li>
+     * </ul>
+     *
+     * @param jbiArtifact the input JBI artifact.
+     * @param osgiBundle the output OSGi bundle.
+     * @throws Exception if an error occurs during the transformation process.
+     */
+    public static void transformToOSGiBundle(File jbiArtifact, File osgiBundle) throws Exception
{
     	JarFile jar = new JarFile(jbiArtifact);
         Manifest m = jar.getManifest();
         if (m == null) {
@@ -62,7 +81,7 @@
         m.getMainAttributes().putValue("DynamicImport-Package", "javax.*,org.xml.*,org.w3c.*");
 
 		JarInputStream jis = new JarInputStream(new FileInputStream(jbiArtifact));
-		JarOutputStream jos = new JarOutputStream(new FileOutputStream(jbiBundle), m);
+		JarOutputStream jos = new JarOutputStream(new FileOutputStream(osgiBundle), m);
 
 		JarEntry entry = jis.getNextJarEntry();
 		while (entry != null) {

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/URLHandler.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/URLHandler.java?rev=634789&r1=634788&r2=634789&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/URLHandler.java
(original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/URLHandler.java
Fri Mar  7 11:46:52 2008
@@ -26,10 +26,9 @@
 import org.apache.commons.logging.LogFactory;
 import org.osgi.service.url.AbstractURLStreamHandlerService;
 
-
 /**
  * A URL handler that will transform a JBI artifact to an OSGi bundle
- * on the fly.
+ * on the fly.  Needs to be registered in the OSGi registry.
  */
 public class URLHandler extends AbstractURLStreamHandlerService {
 	
@@ -38,8 +37,15 @@
 	private static String SYNTAX = "jbi: jbi-jar-uri";
 	
 	private URL jbiArtifactURL;
-	
-	@Override
+
+    /**
+     * Open the connection for the given URL.
+     *
+     * @param url the url from which to open a connection.
+     * @return a connection on the specified URL.
+     * @throws IOException if an error occurs or if the URL is malformed.
+     */
+    @Override
 	public URLConnection openConnection(URL url) throws IOException {
 		if (url.getPath() == null || url.getPath().trim().length() == 0) {
 			throw new MalformedURLException ("Path can not be null or empty. Syntax: " + SYNTAX );

Added: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/package.html
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/package.html?rev=634789&view=auto
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/package.html
(added)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/package.html
Fri Mar  7 11:46:52 2008
@@ -0,0 +1,25 @@
+<!--
+    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.
+-->
+<html>
+<head>
+</head>
+<body>
+
+Transformation of JBI artifacts to OSGi bundles.
+
+</body>
+</html>

Added: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/package.html
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/package.html?rev=634789&view=auto
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/package.html
(added)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/package.html
Fri Mar  7 11:46:52 2008
@@ -0,0 +1,25 @@
+<!--
+    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.
+-->
+<html>
+<head>
+</head>
+<body>
+
+OSGi deployer implementation for JBI artifacts.
+
+</body>
+</html>

Copied: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/package.html
(from r634741, servicemix/smx4/nmr/trunk/jbi/api/src/main/java/javax/jbi/package.html)
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/package.html?p2=servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/package.html&p1=servicemix/smx4/nmr/trunk/jbi/api/src/main/java/javax/jbi/package.html&r1=634741&r2=634789&rev=634789&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/api/src/main/java/javax/jbi/package.html (original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/package.html
Fri Mar  7 11:46:52 2008
@@ -19,7 +19,7 @@
 </head>
 <body>
 
-Java Business Integration APIs/SPIs
+Contains interfaces defining Services associated to JBI artifacts.
 
 </body>
 </html>



Mime
View raw message