You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by bu...@apache.org on 2017/02/13 14:39:06 UTC

svn commit: r1006682 - in /websites/staging/felix/trunk/content: ./ documentation/subprojects/apache-felix-maven-scr-plugin/scr-annotations.html

Author: buildbot
Date: Mon Feb 13 14:39:05 2017
New Revision: 1006682

Log:
Staging update by buildbot for felix

Modified:
    websites/staging/felix/trunk/content/   (props changed)
    websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-maven-scr-plugin/scr-annotations.html

Propchange: websites/staging/felix/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Mon Feb 13 14:39:05 2017
@@ -1 +1 @@
-1782778
+1782781

Modified: websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-maven-scr-plugin/scr-annotations.html
==============================================================================
--- websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-maven-scr-plugin/scr-annotations.html (original)
+++ websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-maven-scr-plugin/scr-annotations.html Mon Feb 13 14:39:05 2017
@@ -88,11 +88,11 @@ h2:hover > .headerlink, h3:hover > .head
   visibility: hidden;
 }
 h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style>
-<p>The <code>maven-scr-plugin</code> uses the <code>SCR</code> annotations from the corresponding subproject at Apache Felix. All annotations are in the <code>org.apache.felix.scr.annotations</code> package. If you want to use the annotations in your project, you have to use a <code>maven-scr-plugin</code> version &gt;= 1.2.0 and make sure that you add a dependency to the annotations to your <code>POM</code>:</p>
+<p>The <code>maven-scr-plugin</code> uses the <code>SCR</code> annotations from the corresponding subproject at Apache Felix. All annotations are in the <code>org.apache.felix.scr.annotations</code> package. If you want to use the annotations in your project, you have to use a <code>maven-scr-plugin</code> version &gt;= 1.24.0 and make sure that you add a dependency to the annotations to your <code>POM</code>:</p>
 <div class="codehilite"><pre><span class="nt">&lt;dependency&gt;</span>
     <span class="nt">&lt;groupId&gt;</span>org.apache.felix<span class="nt">&lt;/groupId&gt;</span>
     <span class="nt">&lt;artifactId&gt;</span>org.apache.felix.scr.annotations<span class="nt">&lt;/artifactId&gt;</span>
-    <span class="nt">&lt;version&gt;</span>1.9.6<span class="nt">&lt;/version&gt;</span>
+    <span class="nt">&lt;version&gt;</span>1.12.0<span class="nt">&lt;/version&gt;</span>
 <span class="nt">&lt;/dependency&gt;</span>
 </pre></div>
 
@@ -105,91 +105,92 @@ h2:hover > .headerlink, h3:hover > .head
 <li><a href="#property">@Property</a></li>
 <li><a href="#reference">@Reference</a></li>
 </ul>
+<p>The annotations itself do <em>not</em> support the new features from R6 or above. It is suggested to use the official OSGi annotations for Declarative Services instead.</p>
 <h2 id="component">@Component<a class="headerlink" href="#component" title="Permanent link">&para;</a></h2>
 <p>The <code>@Component</code> annotation is the only required annotation. If this annotation is not declared for a Java class, the class is not declared as a component.</p>
 <p>This annotation is used to declare the <code>&lt;component&gt;</code> element of the component declaration. See section 112.4.3, Component Element, in the OSGi Service Platform Service Compendium Specification for more information. The required <code>&lt;implementation&gt;</code> element is automatically generated with the fully qualified name of the class containing the <code>@Component</code> annotation.</p>
 <p>Supported attributes:</p>
 <hr />
 <p><strong><code>ds</code></strong>  <br />
-<em>Defaut</em>: <code>true</code>  <br />
+<em>Default</em>: <code>true</code>  <br />
 <em>SCR Descriptor</em>: --  <br />
 <em>Metatype Descriptor</em>: --  <br />
 Whether Declarative Services descriptor is generated or not. If this parameter is not set or set to <code>true</code> the Declarative Services descriptor is generated in the service descriptor file for this component. Otherwise no Declarative Services descriptor is generated for this component.</p>
 <hr />
 <p><strong><code>specVersion</code></strong>  <br />
-<em>Defaut</em>: <code>1.0</code>  <br />
+<em>Default</em>: <code>1.0</code>  <br />
 <em>SCR Descriptor</em>: --  <br />
 <em>Metatype Descriptor</em>: --  <br />
 Defines what Declarative Services specification the component is written against. Though the Maven SCR Plugin is very good at detecting whether components are written against the original or a newer specification, there are some cases, where the plugin may fail. For these cases, the <code>specVersion</code> attribute may be set to the correct version. Currently supported values for this attribute are <code>1.0</code> and <code>1.1</code>. Since version 1.4.1 of the Maven SCR Plugin and version 1.0.1 of the SCR Annotations.</p>
 <hr />
 <p><strong><code>metatype</code></strong>  <br />
-<em>Defaut</em>: <code>false</code>  <br />
+<em>Default</em>: <code>false</code>  <br />
 <em>SCR Descriptor</em>: --  <br />
 <em>Metatype Descriptor</em>: --  <br />
 Whether Metatype Service data is generated or not. If this parameter is set to <code>true</code> Metatype Service data is generated in the <code>metatype.xml</code> file for this component. Otherwise no Metatype Service data is generated for this component.</p>
 <hr />
 <p><strong><code>componentAbstract</code></strong>  <br />
-<em>Defaut</em>: see <a href="#abstract-service-descriptions">description</a>  <br />
+<em>Default</em>: see <a href="#abstract-service-descriptions">description</a>  <br />
 <em>SCR Descriptor</em>: --  <br />
 <em>Metatype Descriptor</em>: --  <br />
 This marks an abstract service description which is not added to the descriptor but intended for reuse through inheritance. This attribute defaults to <code>true</code> for abstract classes and <code>false</code> for concrete classes.</p>
 <hr />
 <p><strong><code>inherit</code></strong>  <br />
-<em>Defaut</em>: <code>true</code>  <br />
+<em>Default</em>: <code>true</code>  <br />
 <em>SCR Descriptor</em>: --  <br />
 <em>Metatype Descriptor</em>: --  <br />
 Whether any service, property and reference declarations from base classes should be inherited by this class.</p>
 <hr />
 <p><strong><code>createPid</code></strong>  <br />
-<em>Defaut</em>: <code>true</code>  <br />
+<em>Default</em>: <code>true</code>  <br />
 <em>SCR Descriptor</em>: <code>service.pid</code>  <br />
 <em>Metatype Descriptor</em>: --  <br />
 Generate the <code>service.pid</code> property if non is declared.</p>
 <hr />
 <p><strong><code>name</code></strong>  <br />
-<em>Defaut</em>: Fully qualified name of the Java class  <br />
+<em>Default</em>: Fully qualified name of the Java class  <br />
 <em>SCR Descriptor</em>: <code>component.name</code>  <br />
 <em>Metatype Descriptor</em>: <code>OCD.id</code>  <br />
 Defines the Component name also used as the PID for the Configuration Admin Service</p>
 <hr />
 <p><strong><code>enabled</code></strong>  <br />
-<em>Defaut</em>: <code>true</code>  <br />
+<em>Default</em>: <code>true</code>  <br />
 <em>SCR Descriptor</em>: <code>component.enabled</code>  <br />
 <em>Metatype Descriptor</em>: --  <br />
 Whether the component is enabled when the bundle starts</p>
 <hr />
 <p><strong><code>factory</code></strong>  <br />
-<em>Defaut</em>: --  <br />
+<em>Default</em>: --  <br />
 <em>SCR Descriptor</em>: <code>component.factory</code>  <br />
 <em>Metatype Descriptor</em>: --  <br />
 Whether the component is a factory component</p>
 <hr />
 <p><strong><code>immediate</code></strong>  <br />
-<em>Defaut</em>: --  <br />
+<em>Default</em>: --  <br />
 <em>SCR Descriptor</em>: <code>component.immediate</code>  <br />
 <em>Metatype Descriptor</em>: --  <br />
 Whether the component is immediately activated</p>
 <hr />
 <p><strong><code>policy</code></strong>  <br />
-<em>Defaut</em>: <code>OPTIONAL</code>  <br />
+<em>Default</em>: <code>OPTIONAL</code>  <br />
 <em>SCR Descriptor</em>: <code>component.policy</code>  <br />
 <em>Metatype Descriptor</em>: --  <br />
 The configuration policy for this component: <code>OPTIONAL</code>, <code>IGNORE</code>, or <code>REQUIRE</code>. This attribute is supported since version 1.4.0 of the plugin and requires a Declarative Service implementation 1.1 or higher.</p>
 <hr />
 <p><strong><code>label</code></strong>  <br />
-<em>Defaut</em>: <code>%&lt;name&gt;.name</code>  <br />
+<em>Default</em>: <code>%&lt;name&gt;.name</code>  <br />
 <em>SCR Descriptor</em>: --  <br />
 <em>Metatype Descriptor</em>: <code>OCD.name</code>  <br />
 This is generally used as a title for the object described by the meta type. This name may be localized by prepending a <code>%</code> sign to the name.</p>
 <hr />
 <p><strong><code>description</code></strong>  <br />
-<em>Defaut</em>: <code>%&lt;name&gt;.name</code>  <br />
+<em>Default</em>: <code>%&lt;name&gt;.name</code>  <br />
 <em>SCR Descriptor</em>: --  <br />
 <em>Metatype Descriptor</em>: <code>OCD.description</code>  <br />
 This is generally used as a description for the object described by the meta type. This name may be localized by prepending a <code>%</code> sign to the name.</p>
 <hr />
 <p><strong><code>configurationFactory</code></strong>  <br />
-<em>Defaut</em>: <code>false</code>  <br />
+<em>Default</em>: <code>false</code>  <br />
 <em>SCR Descriptor</em>: --  <br />
 <em>Metatype Descriptor</em>: <code>Designate.factoryPid</code>  <br />
 Is this a configuration factory? (since 1.4.0)</p>
@@ -205,12 +206,12 @@ Is this a configuration factory? (since
 <p>Supported attributes:</p>
 <hr />
 <p><strong><code>value</code></strong>  <br />
-<em>Defaut</em>: All implemented interfaces  <br />
+<em>Default</em>: All implemented interfaces  <br />
 <em>SCR Descriptor</em>: <code>provide.interface</code>  <br />
 The name of the service interface provided by the component. This can either be the fully qualified  name or just the interface class name if the interface is either in the same package or is imported. If this property is not set <code>provide</code> elements will be generated for all interfaces generated by the class</p>
 <hr />
 <p><strong><code>serviceFactory</code></strong>  <br />
-<em>Defaut</em>: <code>false</code>  <br />
+<em>Default</em>: <code>false</code>  <br />
 <em>SCR Descriptor</em>: <code>service.servicefactory</code>  <br />
 Whether the component is registered as a <code>ServiceFactory</code> or not</p>
 <p>Omitting the <code>Service</code> annotation will just define (and activate if required) the component but not register it as a service. Multiple <code>Service</code> annotations may be declared each with its own <code>value</code>. These annotations need to be wrapped into a <code>Services</code> anotation. The component is registered as a <code>ServiceFactory</code> if at least on <code>Service</code> annotations declares the <code>serviceFactory</code> attribute as <code>true</code>.</p>
@@ -221,91 +222,91 @@ Whether the component is registered as a
 <p>Supported attributes:</p>
 <hr />
 <p><strong><code>name</code></strong>  <br />
-<em>Defaut</em>: The name of constant  <br />
+<em>Default</em>: The name of constant  <br />
 <em>SCR Descriptor</em>: <code>property.name</code>  <br />
 <em>Metatype Descriptor</em>: <code>AD.id</code>  <br />
 The name of the property. If this tag is defined on a field with an initialization expression, the value of that expression is used as the name if the field is of type <code>String</code>.</p>
 <hr />
 <p><strong><code>value</code></strong>  <br />
-<em>Defaut</em>: --  <br />
+<em>Default</em>: --  <br />
 <em>SCR Descriptor</em>: <code>property.value</code>  <br />
 <em>Metatype Descriptor</em>: <code>AD.default</code>  <br />
 The string value of the property. This can either be a single value or an array.</p>
 <hr />
 <p><strong><code>longValue</code></strong>  <br />
-<em>Defaut</em>: --  <br />
+<em>Default</em>: --  <br />
 <em>SCR Descriptor</em>: <code>property.value</code>  <br />
 <em>Metatype Descriptor</em>: <code>AD.default</code>  <br />
 The long value of the property. This can either be a single value or an array.</p>
 <hr />
 <p><strong><code>doubleValue</code></strong>  <br />
-<em>Defaut</em>: --  <br />
+<em>Default</em>: --  <br />
 <em>SCR Descriptor</em>: <code>property.value</code>  <br />
 <em>Metatype Descriptor</em>: <code>AD.default</code>  <br />
 The double value of the property. This can either be a single value or an array.</p>
 <hr />
 <p><strong><code>floatValue</code></strong>  <br />
-<em>Defaut</em>: --  <br />
+<em>Default</em>: --  <br />
 <em>SCR Descriptor</em>: <code>property.value</code>  <br />
 <em>Metatype Descriptor</em>: <code>AD.default</code>  <br />
 The float value of the property. This can either be a single value or an array.</p>
 <hr />
 <p><strong><code>intValue</code></strong>  <br />
-<em>Defaut</em>: --  <br />
+<em>Default</em>: --  <br />
 <em>SCR Descriptor</em>: <code>property.value</code>  <br />
 <em>Metatype Descriptor</em>: <code>AD.default</code>  <br />
 The int value of the property. This can either be a single value or an array.</p>
 <hr />
 <p><strong><code>byteValue</code></strong>  <br />
-<em>Defaut</em>: --  <br />
+<em>Default</em>: --  <br />
 <em>SCR Descriptor</em>: <code>property.value</code>  <br />
 <em>Metatype Descriptor</em>: <code>AD.default</code>  <br />
 The byte value of the property. This can either be a single value or an array.</p>
 <hr />
 <p><strong><code>charValue</code></strong>  <br />
-<em>Defaut</em>: --  <br />
+<em>Default</em>: --  <br />
 <em>SCR Descriptor</em>: <code>property.value</code>  <br />
 <em>Metatype Descriptor</em>: <code>AD.default</code>  <br />
 The char value of the property. This can either be a single value or an array.</p>
 <hr />
 <p><strong><code>boolValue</code></strong>  <br />
-<em>Defaut</em>: --  <br />
+<em>Default</em>: --  <br />
 <em>SCR Descriptor</em>: <code>property.value</code>  <br />
 <em>Metatype Descriptor</em>: <code>AD.default</code>  <br />
 The boolean value of the property. This can either be a single value or an array.</p>
 <hr />
 <p><strong><code>shortValue</code></strong>  <br />
-<em>Defaut</em>: --  <br />
+<em>Default</em>: --  <br />
 <em>SCR Descriptor</em>: <code>property.value</code>  <br />
 <em>Metatype Descriptor</em>: <code>AD.default</code>  <br />
 The short value of the property. This can either be a single value or an array.</p>
 <hr />
 <p><strong><code>label</code></strong>  <br />
-<em>Defaut</em>: <code>%&lt;name&gt;.name</code>  <br />
+<em>Default</em>: <code>%&lt;name&gt;.name</code>  <br />
 <em>SCR Descriptor</em>: --  <br />
 <em>Metatype Descriptor</em>: <code>AD.name</code>  <br />
 The label to display in a form to configure this property. This name may be localized by prepending a <code>%</code> sign to the name.</p>
 <hr />
 <p><strong><code>description</code></strong>  <br />
-<em>Defaut</em>: <code>%&lt;name&gt;.description</code>  <br />
+<em>Default</em>: <code>%&lt;name&gt;.description</code>  <br />
 <em>SCR Descriptor</em>: --  <br />
 <em>Metatype Descriptor</em>: <code>AD.description</code>  <br />
 A descriptive text to provide the client in a form to configure this property. This name may be localized by prepending a <code>%</code> sign to the name.</p>
 <hr />
 <p><strong><code>propertyPrivate</code></strong>  <br />
-<em>Defaut</em>: Depending on the name  <br />
+<em>Default</em>: Depending on the name  <br />
 <em>SCR Descriptor</em>: --  <br />
 <em>Metatype Descriptor</em>: See description
 Boolean flag defining whether a metatype descriptor entry should be generated for this property or not. By default a metatype descriptor entry, i.e. an <code>AD</code> element, is generated except for the properties <code>service.pid</code>, <code>service.description</code>, <code>service.id</code>, <code>service.ranking</code>, <code>service.vendor</code>, <code>service.bundlelocation</code> and <code>service.factoryPid</code>. If a property should not be available for display in a configuration user interface, this parameter should be set to <code>true</code>.</p>
 <hr />
 <p><strong><code>cardinality</code></strong>  <br />
-<em>Defaut</em>: Depends on property value(s)  <br />
+<em>Default</em>: Depends on property value(s)  <br />
 <em>SCR Descriptor</em>: --  <br />
 <em>Metatype Descriptor</em>: <code>AD.cardinality</code>  <br />
 Defines the cardinality of the property and its collection type. If the cardinality is negative, the property is expected to be stored in a <code>java.util.Vector</code> (primitive types such as <code>boolean</code> are boxed in the Wrapper class), if the cardinality is positive, the property is stored in an array (primitve types are unboxed, that is <code>Boolean</code> type values are stored in <code>boolean\[\]()</code>). The actual value defines the maximum number of elements in the vector or array, where <code>Integer.MIN*INT</code> describes an unbounded Vector and <code>Integer.MAX*INT</code> describes an unbounded array. If the cardinality is zero, the property is a scalar value. If the defined value of the property is set in the <code>value</code> attribute, the cardinality defaults to <code>0</code> (zero for scalar value). If the property is defined in one or more properties starting with <code>values</code>, the cardinality defaults to <code>Integer.MAX_INT</code>, that 
 is an unbounded array.</p>
 <hr />
 <p><strong><code>options</code></strong>  <br />
-<em>Defaut</em>: --  <br />
+<em>Default</em>: --  <br />
 <em>SCR Descriptor</em>: --  <br />
 <em>Metatype Descriptor</em>: <a href="#the-options-attribute">See below</a>  <br />
 See below for a description of the <code>options</code> attribute.</p>
@@ -356,46 +357,46 @@ parameter defines the <code>Option.label
 <p>Supported parameters:</p>
 <hr />
 <p><strong><code>name</code></strong>  <br />
-<em>Defaut</em>: Name of the field  <br />
+<em>Default</em>: Name of the field  <br />
 <em>SCR Descriptor</em>: <code>reference.name</code>  <br />
 The local name of the reference. If the <code>Reference</code> annotation is declared in the class comment, this parameter is required. If the annotation is declared on a field, the default value for the <code>name</code> parameter is the name of the field</p>
 <hr />
 <p><strong><code>interfaceReference</code></strong>  <br />
-<em>Defaut</em>: Type of the field  <br />
+<em>Default</em>: Type of the field  <br />
 <em>SCR Descriptor</em>: <code>reference.interface</code>  <br />
 The name of the service interface. This name is used by the Service Component Runtime to access the service on behalf of the component. If the <code>Reference</code> annotation is declared on a class level, this parameter is required. If the annoation is declared on a field, the default value for the <code>interfaceReference</code> parameter is the type of the field</p>
 <hr />
 <p><strong><code>cardinality</code></strong>  <br />
-<em>Defaut</em>: <code>1..1</code>  <br />
+<em>Default</em>: <code>1..1</code>  <br />
 <em>SCR Descriptor</em>: <code>reference.cardinality</code>  <br />
 The cardinality of the service reference. This must be one of value from the enumeration <code>ReferenceCardinality</code></p>
 <hr />
 <p><strong><code>policy</code></strong>  <br />
-<em>Defaut</em>: <code>static</code>  <br />
+<em>Default</em>: <code>static</code>  <br />
 <em>SCR Descriptor</em>: <code>reference.policy</code>  <br />
 The dynamicity policy of the reference. If <code>dynamic</code> the service will be made available to the component as it comes and goes. If <code>static</code> the component will be deactivated and re-activated if the service comes and/or goes away. This must be one of <code>static</code> and <code>dynamic</code></p>
 <hr />
 <p><strong><code>target</code></strong>  <br />
-<em>Defaut</em>: --  <br />
+<em>Default</em>: --  <br />
 <em>SCR Descriptor</em>: <code>reference.target</code>  <br />
 A service target filter to select specific services to be made available. In order to be able to overwrite the value of this value by a configuration property, this parameter must be declared. If the parameter is not declared, the respective declaration attribute will not be generated</p>
 <hr />
 <p><strong><code>bind</code></strong>  <br />
-<em>Defaut</em>: See description  <br />
+<em>Default</em>: See description  <br />
 <em>SCR Descriptor</em>: <code>reference.bind</code>  <br />
 The name of the method to be called when the service is to be bound to the component. The default value is the name created by appending the reference <code>name</code> to the string <code>bind</code>. The method must be declared <code>public</code> or <code>protected</code> and take single argument which is declared with the service interface type</p>
 <hr />
 <p><strong><code>unbind</code></strong>  <br />
-<em>Defaut</em>: See description  <br />
+<em>Default</em>: See description  <br />
 <em>SCR Descriptor</em>: <code>reference.unbind</code>  <br />
 The name of the method to be called when the service is to be unbound from the component. The default value is the name created by appending the reference <code>name</code> to the string <code>unbind</code>. The method must be declared <code>public</code> or <code>protected</code> and take single argument which is declared with the service interface type</p>
 <hr />
 <p><strong><code>strategy</code></strong>  <br />
-<em>Defaut</em>: <code>event</code>  <br />
+<em>Default</em>: <code>event</code>  <br />
 <em>SCR Descriptor</em>: <code>reference.strategy</code>  <br />
 The strategy used for this reference, one of <code>event</code> or <code>lookup</code>. If the reference is defined on a field with a strategy of <code>event</code> and there is no bind or unbind method, the plugin will create the necessary methods.</p>
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
-        Rev. 1549774 by cziegeler on Tue, 10 Dec 2013 07:40:55 +0000
+        Rev. 1782781 by cziegeler on Mon, 13 Feb 2017 14:38:51 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Felix, Felix, Apache, the Apache feather logo, and the Apache Felix project