blob: 4f99274a156b823b51fab869114f45a4420195d9 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="de">
<head>
<!-- Generated by javadoc (version 1.7.0_25) on Mon Jul 01 14:53:20 CEST 2013 -->
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>ConfigurationPlugin (Apache Felix Configuration Admin Service 1.2.4 API)</title>
<meta name="date" content="2013-07-01">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ConfigurationPlugin (Apache Felix Configuration Admin Service 1.2.4 API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ConfigurationPlugin.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/osgi/service/cm/ConfigurationPermission.html" title="class in org.osgi.service.cm"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/osgi/service/cm/ManagedService.html" title="interface in org.osgi.service.cm"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/osgi/service/cm/ConfigurationPlugin.html" target="_top">Frames</a></li>
<li><a href="ConfigurationPlugin.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.osgi.service.cm</div>
<h2 title="Interface ConfigurationPlugin" class="title">Interface ConfigurationPlugin</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public interface <span class="strong">ConfigurationPlugin</span></pre>
<div class="block">A service interface for processing configuration dictionary before the
update.
<p>
A bundle registers a <code>ConfigurationPlugin</code> object in order to
process configuration updates before they reach the Managed Service or
Managed Service Factory. The Configuration Admin service will detect
registrations of Configuration Plugin services and must call these services
every time before it calls the <code>ManagedService</code> or
<code>ManagedServiceFactory</code>
<code>updated</code> method. The
Configuration Plugin service thus has the opportunity to view and modify the
properties before they are passed to the Managed Service or Managed Service
Factory.
<p>
Configuration Plugin (plugin) services have full read/write access to all
configuration information. Therefore, bundles using this facility should be
trusted. Access to this facility should be limited with
<code>ServicePermission[ConfigurationPlugin,REGISTER]</code>.
Implementations of a Configuration Plugin service should assure that they
only act on appropriate configurations.
<p>
The <code>Integer</code> <code>service.cmRanking</code> registration
property may be specified. Not specifying this registration property, or
setting it to something other than an <code>Integer</code>, is the same as
setting it to the <code>Integer</code> zero. The
<code>service.cmRanking</code> property determines the order in which
plugins are invoked. Lower ranked plugins are called before higher ranked
ones. In the event of more than one plugin having the same value of
<code>service.cmRanking</code>, then the Configuration Admin service
arbitrarily chooses the order in which they are called.
<p>
By convention, plugins with <code>service.cmRanking&lt; 0</code> or
<code>service.cmRanking &gt; 1000</code> should not make modifications to
the properties.
<p>
The Configuration Admin service has the right to hide properties from
plugins, or to ignore some or all the changes that they make. This might be
done for security reasons. Any such behavior is entirely implementation
defined.
<p>
A plugin may optionally specify a <code>cm.target</code> registration
property whose value is the PID of the Managed Service or Managed Service
Factory whose configuration updates the plugin is intended to intercept. The
plugin will then only be called with configuration updates that are targeted
at the Managed Service or Managed Service Factory with the specified PID.
Omitting the <code>cm.target</code> registration property means that the
plugin is called for all configuration updates.</div>
<dl><dt><span class="strong">Version:</span></dt>
<dd>$Revision: 809193 $</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/cm/ConfigurationPlugin.html#CM_RANKING">CM_RANKING</a></strong></code>
<div class="block">A service property to specify the order in which plugins are invoked.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/cm/ConfigurationPlugin.html#CM_TARGET">CM_TARGET</a></strong></code>
<div class="block">A service property to limit the Managed Service or Managed Service
Factory configuration dictionaries a Configuration Plugin service
receives.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/cm/ConfigurationPlugin.html#modifyConfiguration(org.osgi.framework.ServiceReference, java.util.Dictionary)">modifyConfiguration</a></strong>(org.osgi.framework.ServiceReference&nbsp;reference,
<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Dictionary.html?is-external=true" title="class or interface in java.util">Dictionary</a>&nbsp;properties)</code>
<div class="block">View and possibly modify the a set of configuration properties before
they are sent to the Managed Service or the Managed Service Factory.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="CM_TARGET">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CM_TARGET</h4>
<pre>static final&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> CM_TARGET</pre>
<div class="block">A service property to limit the Managed Service or Managed Service
Factory configuration dictionaries a Configuration Plugin service
receives.
This property contains a <code>String[]</code> of PIDs. A Configuration
Admin service must call a Configuration Plugin service only when this
property is not set, or the target service's PID is listed in this
property.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.osgi.service.cm.ConfigurationPlugin.CM_TARGET">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="CM_RANKING">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>CM_RANKING</h4>
<pre>static final&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> CM_RANKING</pre>
<div class="block">A service property to specify the order in which plugins are invoked.
This property contains an <code>Integer</code> ranking of the plugin.
Not specifying this registration property, or setting it to something
other than an <code>Integer</code>, is the same as setting it to the
<code>Integer</code> zero. This property determines the order in which
plugins are invoked. Lower ranked plugins are called before higher ranked
ones.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>1.2</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.osgi.service.cm.ConfigurationPlugin.CM_RANKING">Constant Field Values</a></dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="modifyConfiguration(org.osgi.framework.ServiceReference, java.util.Dictionary)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>modifyConfiguration</h4>
<pre>void&nbsp;modifyConfiguration(org.osgi.framework.ServiceReference&nbsp;reference,
<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Dictionary.html?is-external=true" title="class or interface in java.util">Dictionary</a>&nbsp;properties)</pre>
<div class="block">View and possibly modify the a set of configuration properties before
they are sent to the Managed Service or the Managed Service Factory. The
Configuration Plugin services are called in increasing order of their
<code>service.cmRanking</code> property. If this property is undefined
or is a non- <code>Integer</code> type, 0 is used.
<p>
This method should not modify the properties unless the
<code>service.cmRanking</code> of this plugin is in the range
<code>0 &lt;= service.cmRanking &lt;= 1000</code>.
<p>
If this method throws any <code>Exception</code>, the Configuration
Admin service must catch it and should log it.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>reference</code> - reference to the Managed Service or Managed Service
Factory</dd><dd><code>properties</code> - The configuration properties. This argument must not
contain the "service.bundleLocation" property. The value of this
property may be obtained from the
<code>Configuration.getBundleLocation</code> method.</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ConfigurationPlugin.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/osgi/service/cm/ConfigurationPermission.html" title="class in org.osgi.service.cm"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/osgi/service/cm/ManagedService.html" title="interface in org.osgi.service.cm"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/osgi/service/cm/ConfigurationPlugin.html" target="_top">Frames</a></li>
<li><a href="ConfigurationPlugin.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2006&#x2013;2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>