| <!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 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>PropertySource (Apache Tamaya Base 0.3-incubating API)</title> |
| <meta name="keywords" content="org.apache.tamaya.spi.PropertySource interface"> |
| <meta name="keywords" content="TAMAYA_ORDINAL"> |
| <meta name="keywords" content="EMPTY"> |
| <meta name="keywords" content="getOrdinal()"> |
| <meta name="keywords" content="getName()"> |
| <meta name="keywords" content="get()"> |
| <meta name="keywords" content="getProperties()"> |
| <meta name="keywords" content="isScannable()"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="PropertySource (Apache Tamaya Base 0.3-incubating API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <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/PropertySource.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/apache/tamaya/spi/PropertyFilter.html" title="interface in org.apache.tamaya.spi"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/tamaya/spi/PropertySourceProvider.html" title="interface in org.apache.tamaya.spi"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/tamaya/spi/PropertySource.html" target="_top">Frames</a></li> |
| <li><a href="PropertySource.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: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li>Constr | </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.apache.tamaya.spi</div> |
| <h2 title="Interface PropertySource" class="title">Interface PropertySource</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Known Implementing Classes:</dt> |
| <dd><a href="../../../../org/apache/tamaya/core/propertysource/BasePropertySource.html" title="class in org.apache.tamaya.core.propertysource">BasePropertySource</a>, <a href="../../../../org/apache/tamaya/core/propertysource/CLIPropertySource.html" title="class in org.apache.tamaya.core.propertysource">CLIPropertySource</a>, <a href="../../../../org/apache/tamaya/core/propertysource/EnvironmentPropertySource.html" title="class in org.apache.tamaya.core.propertysource">EnvironmentPropertySource</a>, <a href="../../../../org/apache/tamaya/core/propertysource/JavaConfigurationPropertySource.html" title="class in org.apache.tamaya.core.propertysource">JavaConfigurationPropertySource</a>, <a href="../../../../org/apache/tamaya/core/propertysource/SimplePropertySource.html" title="class in org.apache.tamaya.core.propertysource">SimplePropertySource</a>, <a href="../../../../org/apache/tamaya/examples/custompropertysource/SimplePropertySource.html" title="class in org.apache.tamaya.examples.custompropertysource">SimplePropertySource</a>, <a href="../../../../org/apache/tamaya/core/propertysource/SystemPropertySource.html" title="class in org.apache.tamaya.core.propertysource">SystemPropertySource</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public interface <span class="typeNameLabel">PropertySource</span></pre> |
| <div class="block"><p>This interface models a provider that serves configuration properties. The contained |
| properties may be read from a Map of single or several sources (composite). |
| PropertySources are the building blocks of the final configuration. </p> |
| <h3>Implementation Requirements</h3> |
| <p>Implementations of this interface must be</p> |
| <ul> |
| <li>Thread safe.</li> |
| </ul> |
| |
| <p>A PropertySourceProvider will get picked up via the |
| <a href="http://docs.oracle.com/javase/7/docs/api/java/util/ServiceLoader.html?is-external=true" title="class or interface in java.util"><code>ServiceLoader</code></a> mechanism and can be registered via |
| <code>META-INF/services/org.apache.tamaya.spi.PropertySource</code> |
| </p> |
| <p> |
| If you like to register multiple PropertySources at the same time |
| you can use the <a href="../../../../org/apache/tamaya/spi/PropertySourceProvider.html" title="interface in org.apache.tamaya.spi"><code>PropertySourceProvider</code></a> |
| interface. |
| </p></div> |
| </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="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
| <caption><span>Fields</span><span class="tabEnd"> </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="../../../../org/apache/tamaya/spi/PropertySource.html" title="interface in org.apache.tamaya.spi">PropertySource</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/tamaya/spi/PropertySource.html#EMPTY">EMPTY</a></span></code> |
| <div class="block">A resusable instance of an empty PropertySource.</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><span class="memberNameLink"><a href="../../../../org/apache/tamaya/spi/PropertySource.html#TAMAYA_ORDINAL">TAMAYA_ORDINAL</a></span></code> |
| <div class="block">property name to override default tamaya ordinals</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="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/tamaya/spi/PropertyValue.html" title="class in org.apache.tamaya.spi">PropertyValue</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/tamaya/spi/PropertySource.html#get-java.lang.String-">get</a></span>(<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> key)</code> |
| <div class="block">Access a property.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><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><span class="memberNameLink"><a href="../../../../org/apache/tamaya/spi/PropertySource.html#getName--">getName</a></span>()</code> |
| <div class="block">Get the name of the property source.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/tamaya/spi/PropertySource.html#getOrdinal--">getOrdinal</a></span>()</code> |
| <div class="block">The ordinal value is the default ordering parameter which definines the default order of |
| auto-discovered property sources.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<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>,<a href="../../../../org/apache/tamaya/spi/PropertyValue.html" title="class in org.apache.tamaya.spi">PropertyValue</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/tamaya/spi/PropertySource.html#getProperties--">getProperties</a></span>()</code> |
| <div class="block">Access the current properties as Set.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/tamaya/spi/PropertySource.html#isScannable--">isScannable</a></span>()</code> |
| <div class="block">Determines if this config source can be scanned for its list of properties.</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="TAMAYA_ORDINAL"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>TAMAYA_ORDINAL</h4> |
| <pre>static final <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> TAMAYA_ORDINAL</pre> |
| <div class="block">property name to override default tamaya ordinals</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../constant-values.html#org.apache.tamaya.spi.PropertySource.TAMAYA_ORDINAL">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="EMPTY"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>EMPTY</h4> |
| <pre>static final <a href="../../../../org/apache/tamaya/spi/PropertySource.html" title="interface in org.apache.tamaya.spi">PropertySource</a> EMPTY</pre> |
| <div class="block">A resusable instance of an empty PropertySource.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getOrdinal--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getOrdinal</h4> |
| <pre>int getOrdinal()</pre> |
| <div class="block">The ordinal value is the default ordering parameter which definines the default order of |
| auto-discovered property sources. Ordering of property sources is important since values |
| from property sources with higher ordinal values override values from less significant |
| property sources. |
| |
| By default Tamaya includes the following property sources: |
| <ol> |
| <li>Properties file values (/META-INF/javaconfiguration.properties) (ordinal 100)</li> |
| <li>JNDI values (ordinal 200, only when adding the <code>tamaya-jndi</code> extension module)</li> |
| <li>Environment properties (ordinal 300)</li> |
| <li>System properties (ordinal 1000)</li> |
| </ol> |
| |
| <p><b>Important Hints for custom implementations</b>:</p> |
| <p> |
| If a custom implementation should be invoked <b>before</b> the default implementations, use a value > 1000 |
| </p> |
| <p> |
| If a custom implementation should be invoked <b>after</b> the default implementations, use a value < 100 |
| </p> |
| |
| <p>Reordering of the default order of the config-sources:</p> |
| <p>Example: If the properties file/s should be used <b>before</b> the other implementations, |
| you have to configure an ordinal > 1000. That means, you have to add e.g. tamaya.ordinal=401 to |
| /META-INF/javaconfiguration.properties . Hint: In case of property files every file is handled as independent |
| config-source, but all of them have ordinal 400 by default (and can be reordered in a fine-grained manner.</p> |
| |
| In cases where it is not possible to change a config sources ordinal value, you may have several options: |
| <ul> |
| <li>you can register an alternate implementation of <a href="../../../../org/apache/tamaya/spi/PropertyValueCombinationPolicy.html" title="interface in org.apache.tamaya.spi"><code>PropertyValueCombinationPolicy</code></a>.</li> |
| <li>you can use a <a href="../../../../org/apache/tamaya/spi/ConfigurationContextBuilder.html" title="interface in org.apache.tamaya.spi"><code>ConfigurationContextBuilder</code></a> to redefine the source order and finally use |
| <a href="../../../../org/apache/tamaya/ConfigurationProvider.html#setConfiguration-org.apache.tamaya.Configuration-"><code>ConfigurationProvider.setConfiguration(Configuration)</code></a> to |
| change the current default <a href="../../../../org/apache/tamaya/Configuration.html" title="interface in org.apache.tamaya"><code>Configuration</code></a>.</li> |
| <li>finally, the imeplementor of this API may define alternate mechanism to reconfigure an ordinal |
| in a vendor specific way.</li> |
| </ul></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the 'importance' aka ordinal of the configured values. The higher, the more important.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getName--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getName</h4> |
| <pre><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> getName()</pre> |
| <div class="block">Get the name of the property source. The name should be unique for the type of source, whereas the id is used |
| to ensure unique identity, either locally or remotely.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the configuration's name, never <code>null</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="get-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>get</h4> |
| <pre><a href="../../../../org/apache/tamaya/spi/PropertyValue.html" title="class in org.apache.tamaya.spi">PropertyValue</a> get(<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> key)</pre> |
| <div class="block">Access a property.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>key</code> - the property's key, not <code>null</code>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the property value map, where <code>map.get(key) == value</code>, including also any metadata. In case a |
| value is null, simply return <code>null</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getProperties--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getProperties</h4> |
| <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<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>,<a href="../../../../org/apache/tamaya/spi/PropertyValue.html" title="class in org.apache.tamaya.spi">PropertyValue</a>> getProperties()</pre> |
| <div class="block">Access the current properties as Set. The resulting Map may not return all items accessible, e.g. |
| when the underlying storage does not support iteration of its entries. |
| <code>null</code></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the corresponding map, never null.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isScannable--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>isScannable</h4> |
| <pre>boolean isScannable()</pre> |
| <div class="block">Determines if this config source can be scanned for its list of properties. |
| |
| <p> |
| PropertySources which are not scannable might not be able to find all the |
| configured values to provide via <a href="../../../../org/apache/tamaya/spi/PropertySource.html#getProperties--"><code>getProperties()</code></a>. This might happen |
| if the underlying storage doesn't support listing. |
| </p></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if this PropertySource can be scanned for its list of properties, |
| <code>false</code> if it cannot/should not be scanned.</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> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <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/PropertySource.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/apache/tamaya/spi/PropertyFilter.html" title="interface in org.apache.tamaya.spi"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/tamaya/spi/PropertySourceProvider.html" title="interface in org.apache.tamaya.spi"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/tamaya/spi/PropertySource.html" target="_top">Frames</a></li> |
| <li><a href="PropertySource.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: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li>Constr | </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 © 2014–2017 <a href="https://apache.org">Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |