http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/1b5bde65/content/site/apidocs/org/apache/juneau/PropertyNamer.html ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/PropertyNamer.html b/content/site/apidocs/org/apache/juneau/PropertyNamer.html index e05cae1..4a0f824 100644 --- a/content/site/apidocs/org/apache/juneau/PropertyNamer.html +++ b/content/site/apidocs/org/apache/juneau/PropertyNamer.html @@ -104,11 +104,13 @@ var activeTableTab = "activeTableTab"; </dl> <hr> <br> -<pre>public interface <a href="../../../src-html/org/apache/juneau/PropertyNamer.html#line.25">PropertyNamer</a></pre> +<pre>public interface <a href="../../../src-html/org/apache/juneau/PropertyNamer.html#line.27">PropertyNamer</a></pre> <div class="block">Defines an API for converting conventional bean property names to some other form. + <p> - For example, given the bean property <js>"fooBarURL"</js>, the <a href="../../../org/apache/juneau/PropertyNamerDLC.html" title="class in org.apache.juneau"><code>PropertyNamerDLC</code></a> - property namer will convert this to <js>"foo-bar-url"</js>. + For example, given the bean property <js>"fooBarURL"</js>, the <a href="../../../org/apache/juneau/PropertyNamerDLC.html" title="class in org.apache.juneau"><code>PropertyNamerDLC</code></a> property namer will convert + this to <js>"foo-bar-url"</js>. + <p> Property namers are associated with beans through the <a href="../../../org/apache/juneau/annotation/Bean.html#propertyNamer--"><code>Bean.propertyNamer()</code></a> annotation.</div> </li> @@ -156,7 +158,7 @@ var activeTableTab = "activeTableTab"; <ul class="blockListLast"> <li class="blockList"> <h4>getPropertyName</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> <a href="../../../src-html/org/apache/juneau/PropertyNamer.html#line.32">getPropertyName</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> name)</pre> +<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> <a href="../../../src-html/org/apache/juneau/PropertyNamer.html#line.35">getPropertyName</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> name)</pre> <div class="block">Convert the specified default property name to some other value.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt>
http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/1b5bde65/content/site/apidocs/org/apache/juneau/PropertyNamerDefault.html ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/PropertyNamerDefault.html b/content/site/apidocs/org/apache/juneau/PropertyNamerDefault.html index ff227ae..ecdbbe6 100644 --- a/content/site/apidocs/org/apache/juneau/PropertyNamerDefault.html +++ b/content/site/apidocs/org/apache/juneau/PropertyNamerDefault.html @@ -112,7 +112,7 @@ var activeTableTab = "activeTableTab"; </dl> <hr> <br> -<pre>public final class <a href="../../../src-html/org/apache/juneau/PropertyNamerDefault.html#line.30">PropertyNamerDefault</a> +<pre>public final class <a href="../../../src-html/org/apache/juneau/PropertyNamerDefault.html#line.31">PropertyNamerDefault</a> extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> implements <a href="../../../org/apache/juneau/PropertyNamer.html" title="interface in org.apache.juneau">PropertyNamer</a></pre> <div class="block">Default property namer. @@ -124,6 +124,7 @@ implements <a href="../../../org/apache/juneau/PropertyNamer.html" title="interf <li><js>"FooBarURL"</js> -> <js>"fooBarURL"</js> <li><js>"URL"</js> -> <js>"URL"</js> </ul> + <p> See <a href="http://docs.oracle.com/javase/7/docs/api/java/beans/Introspector.html?is-external=true#decapitalize-java.lang.String-" title="class or interface in java.beans"><code>Introspector.decapitalize(String)</code></a> for exact rules.</div> </li> @@ -195,7 +196,7 @@ implements <a href="../../../org/apache/juneau/PropertyNamer.html" title="interf <ul class="blockListLast"> <li class="blockList"> <h4>PropertyNamerDefault</h4> -<pre>public <a href="../../../src-html/org/apache/juneau/PropertyNamerDefault.html#line.30">PropertyNamerDefault</a>()</pre> +<pre>public <a href="../../../src-html/org/apache/juneau/PropertyNamerDefault.html#line.31">PropertyNamerDefault</a>()</pre> </li> </ul> </li> @@ -212,7 +213,7 @@ implements <a href="../../../org/apache/juneau/PropertyNamer.html" title="interf <ul class="blockListLast"> <li class="blockList"> <h4>getPropertyName</h4> -<pre>public <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="../../../src-html/org/apache/juneau/PropertyNamerDefault.html#line.33">getPropertyName</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> name)</pre> +<pre>public <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="../../../src-html/org/apache/juneau/PropertyNamerDefault.html#line.34">getPropertyName</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> name)</pre> <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../org/apache/juneau/PropertyNamer.html#getPropertyName-java.lang.String-">PropertyNamer</a></code></span></div> <div class="block">Convert the specified default property name to some other value.</div> <dl> http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/1b5bde65/content/site/apidocs/org/apache/juneau/PropertyStore.PropertyMap.html ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/PropertyStore.PropertyMap.html b/content/site/apidocs/org/apache/juneau/PropertyStore.PropertyMap.html index 5b5b208..9dd1db8 100644 --- a/content/site/apidocs/org/apache/juneau/PropertyStore.PropertyMap.html +++ b/content/site/apidocs/org/apache/juneau/PropertyStore.PropertyMap.html @@ -112,11 +112,13 @@ var activeTableTab = "activeTableTab"; </dl> <hr> <br> -<pre>public class <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.921">PropertyStore.PropertyMap</a> +<pre>public class <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.923">PropertyStore.PropertyMap</a> extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> <div class="block">Contains all the properties for a particular property prefix (e.g. <js>'BeanContext'</js>) + <p> Instances of this map are immutable from outside this class. + <p> The <a href="../../../org/apache/juneau/PropertyStore.PropertyMap.html#hashCode--"><code>hashCode()</code></a> and <a href="../../../org/apache/juneau/PropertyStore.PropertyMap.html#equals-java.lang.Object-"><code>equals(Object)</code></a> methods can be used to compare with other property maps.</div> @@ -203,7 +205,7 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>get</h4> -<pre>public <T> T <a href="../../../src-html/org/apache/juneau/PropertyStore.PropertyMap.html#line.967">get</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> name, +<pre>public <T> T <a href="../../../src-html/org/apache/juneau/PropertyStore.PropertyMap.html#line.969">get</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> name, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> type, T def)</pre> <div class="block">Returns the specified property as the specified class type.</div> @@ -223,11 +225,12 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>getMap</h4> -<pre>public <K,V> <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><K,V> <a href="../../../src-html/org/apache/juneau/PropertyStore.PropertyMap.html#line.998">getMap</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> name, +<pre>public <K,V> <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><K,V> <a href="../../../src-html/org/apache/juneau/PropertyStore.PropertyMap.html#line.1001">getMap</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> name, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><K> keyType, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><V> valueType, <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><K,V> def)</pre> <div class="block">Returns the specified property as a map with the specified key and value types. + <p> The map returned is an instance of <a href="http://docs.oracle.com/javase/7/docs/api/java/util/LinkedHashMap.html?is-external=true" title="class or interface in java.util"><code>LinkedHashMap</code></a>.</div> <dl> @@ -247,8 +250,9 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>asMap</h4> -<pre>public <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="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> <a href="../../../src-html/org/apache/juneau/PropertyStore.PropertyMap.html#line.1027">asMap</a>()</pre> +<pre>public <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="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> <a href="../../../src-html/org/apache/juneau/PropertyStore.PropertyMap.html#line.1031">asMap</a>()</pre> <div class="block">Convenience method for returning all values in this property map as a simple map. + <p> Primarily useful for debugging.</div> <dl> @@ -263,7 +267,7 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>hashCode</h4> -<pre>public int <a href="../../../src-html/org/apache/juneau/PropertyStore.PropertyMap.html#line.1100">hashCode</a>()</pre> +<pre>public int <a href="../../../src-html/org/apache/juneau/PropertyStore.PropertyMap.html#line.1104">hashCode</a>()</pre> <dl> <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a></code> in class <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd> @@ -276,7 +280,7 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>equals</h4> -<pre>public boolean <a href="../../../src-html/org/apache/juneau/PropertyStore.PropertyMap.html#line.1116">equals</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> o)</pre> +<pre>public boolean <a href="../../../src-html/org/apache/juneau/PropertyStore.PropertyMap.html#line.1120">equals</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> o)</pre> <dl> <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a></code> in class <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd> @@ -289,7 +293,7 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockListLast"> <li class="blockList"> <h4>toString</h4> -<pre>public <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="../../../src-html/org/apache/juneau/PropertyStore.PropertyMap.html#line.1132">toString</a>()</pre> +<pre>public <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="../../../src-html/org/apache/juneau/PropertyStore.PropertyMap.html#line.1136">toString</a>()</pre> <dl> <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a></code> in class <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd> http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/1b5bde65/content/site/apidocs/org/apache/juneau/PropertyStore.html ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/PropertyStore.html b/content/site/apidocs/org/apache/juneau/PropertyStore.html index d958a69..fea67e3 100644 --- a/content/site/apidocs/org/apache/juneau/PropertyStore.html +++ b/content/site/apidocs/org/apache/juneau/PropertyStore.html @@ -108,120 +108,106 @@ var activeTableTab = "activeTableTab"; <li class="blockList"> <hr> <br> -<pre>public final class <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.263">PropertyStore</a> +<pre>public final class <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.252">PropertyStore</a> extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> <div class="block">A store for instantiating <a href="../../../org/apache/juneau/Context.html" title="class in org.apache.juneau"><code>Context</code></a> objects. + <p> The hierarchy of these objects are... <ul class='spaced-list'> - <li><a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau"><code>PropertyStore</code></a> - A thread-safe, modifiable context property store. - <br> - Used to create <a href="../../../org/apache/juneau/Context.html" title="class in org.apache.juneau"><code>Context</code></a> objects. - - <li><a href="../../../org/apache/juneau/Context.html" title="class in org.apache.juneau"><code>Context</code></a> - A reusable, cacheable, thread-safe, read-only context with configuration properties copied + <li> + <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau"><code>PropertyStore</code></a> - A thread-safe, modifiable context property store. + <br>Used to create <a href="../../../org/apache/juneau/Context.html" title="class in org.apache.juneau"><code>Context</code></a> objects. + <li> + <a href="../../../org/apache/juneau/Context.html" title="class in org.apache.juneau"><code>Context</code></a> - A reusable, cacheable, thread-safe, read-only context with configuration properties copied from the store. - <br> - Often used to create <a href="../../../org/apache/juneau/Session.html" title="class in org.apache.juneau"><code>Session</code></a> objects. - - <li><a href="../../../org/apache/juneau/Session.html" title="class in org.apache.juneau"><code>Session</code></a> - A one-time-use non-thread-safe object. + <br>Often used to create <a href="../../../org/apache/juneau/Session.html" title="class in org.apache.juneau"><code>Session</code></a> objects. + <li> + <a href="../../../org/apache/juneau/Session.html" title="class in org.apache.juneau"><code>Session</code></a> - A one-time-use non-thread-safe object. <br>Used by serializers and parsers to retrieve context properties and to be used as scratchpads. </ul> <h6 class='topic'>PropertyStore objects</h6> - <p> + Property stores can be thought of as consisting of the following: - <ul class='spaced-list'> + <ul> <li>A <code>Map<String,Object></code> of context properties. <li>A <code>Map<Class,Context></code> of context instances. </ul> + <p> Property stores are used to create and cache <a href="../../../org/apache/juneau/Context.html" title="class in org.apache.juneau"><code>Context</code></a> objects using the <a href="../../../org/apache/juneau/PropertyStore.html#getContext-java.lang.Class-"><code>getContext(Class)</code></a> method. + <p> As a general rule, <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau"><code>PropertyStore</code></a> objects are 'slow'. - <br> - Setting and retrieving properties on a store can involve relatively slow data conversion and synchronization. - <br> - However, the <a href="../../../org/apache/juneau/PropertyStore.html#getContext-java.lang.Class-"><code>getContext(Class)</code></a> method is fast, and will return cached context objects if the context + <br>Setting and retrieving properties on a store can involve relatively slow data conversion and synchronization. + <br>However, the <a href="../../../org/apache/juneau/PropertyStore.html#getContext-java.lang.Class-"><code>getContext(Class)</code></a> method is fast, and will return cached context objects if the context properties have not changed. + <p> Property stores can be used to store context properties for a variety of contexts. - <br> - For example, a single store can store context properties for the JSON serializer, XML serializer, HTML serializer + <br>For example, a single store can store context properties for the JSON serializer, XML serializer, HTML serializer etc... and can thus be used to retrieve context objects for those serializers. - <p> <h6 class='topic'>Context properties</h6> - <p> + Context properties are 'settings' for serializers and parsers. - <br> - For example, the <a href="../../../org/apache/juneau/BeanContext.html#BEAN_sortProperties"><code>BeanContext.BEAN_sortProperties</code></a> context property defines whether bean properties should be + <br>For example, the <a href="../../../org/apache/juneau/BeanContext.html#BEAN_sortProperties"><code>BeanContext.BEAN_sortProperties</code></a> context property defines whether bean properties should be serialized in alphabetical order. + <p> Each <a href="../../../org/apache/juneau/Context.html" title="class in org.apache.juneau"><code>Context</code></a> object should contain the context properties that apply to it as static fields (e.g <a href="../../../org/apache/juneau/BeanContext.html#BEAN_sortProperties"><code>BeanContext.BEAN_sortProperties</code></a>). + <p> Context properties can be of the following types: <ul class='spaced-list'> - <li><l>SIMPLE</l> - A simple property. - <br> - Examples include: booleans, integers, Strings, Classes, etc... - <br><br> - An example of this would be the <a href="../../../org/apache/juneau/BeanContext.html#BEAN_sortProperties"><code>BeanContext.BEAN_sortProperties</code></a> property. - <br> - It's name is simply <js>"BeanContext.sortProperties"</js>. - - <li><l>SET</l> - A sorted set of objects. - <br> - These are denoted by appending <js>".set"</js> to the property name. - <br> - Objects can be of any type, even complex types. - <br> - Sorted sets use tree sets to maintain the value in alphabetical order. - <br> - For example, the <a href="../../../org/apache/juneau/BeanContext.html#BEAN_notBeanClasses"><code>BeanContext.BEAN_notBeanClasses</code></a> property is used to store classes that should not be + <li> + <l>SIMPLE</l> - A simple property. + <br>Examples include: booleans, integers, Strings, Classes, etc... + <br>An example of this would be the <a href="../../../org/apache/juneau/BeanContext.html#BEAN_sortProperties"><code>BeanContext.BEAN_sortProperties</code></a> property. + <br>It's name is simply <js>"BeanContext.sortProperties"</js>. + <li> + <l>SET</l> - A sorted set of objects. + <br>These are denoted by appending <js>".set"</js> to the property name. + <br>Objects can be of any type, even complex types. + <br>Sorted sets use tree sets to maintain the value in alphabetical order. + <br>For example, the <a href="../../../org/apache/juneau/BeanContext.html#BEAN_notBeanClasses"><code>BeanContext.BEAN_notBeanClasses</code></a> property is used to store classes that should not be treated like beans. - <br> - It's name is <js>"BeanContext.notBeanClasses.set"</js>. - - <li><l>LIST</l> - A list of unique objects. - <br> - These are denoted by appending <js>".list"</js> to the property name. - <br> - Objects can be of any type, even complex types. - <br> - Use lists if the ordering of the values in the set is important (similar to how the order of entries in a + <br>It's name is <js>"BeanContext.notBeanClasses.set"</js>. + <li> + <l>LIST</l> - A list of unique objects. + <br>These are denoted by appending <js>".list"</js> to the property name. + <br>Objects can be of any type, even complex types. + <br>Use lists if the ordering of the values in the set is important (similar to how the order of entries in a classpath is important). - <br> - <br> - For example, the <a href="../../../org/apache/juneau/BeanContext.html#BEAN_beanFilters"><code>BeanContext.BEAN_beanFilters</code></a> property is used to store bean filters. - <br> - It's name is <js>"BeanContext.transforms.list"</js>. - - <li><l>MAP</l> - A sorted map of key-value pairs. - <br> - These are denoted by appending <js>".map"</js> to the property name. - <br> - Keys can be any type directly convertible to and from Strings. + <br>For example, the <a href="../../../org/apache/juneau/BeanContext.html#BEAN_beanFilters"><code>BeanContext.BEAN_beanFilters</code></a> property is used to store bean filters. + <br>It's name is <js>"BeanContext.transforms.list"</js>. + <li> + <l>MAP</l> - A sorted map of key-value pairs. + <br>These are denoted by appending <js>".map"</js> to the property name. + <br>Keys can be any type directly convertible to and from Strings. Values can be of any type, even complex types. - <br> - <br> - For example, the <a href="../../../org/apache/juneau/BeanContext.html#BEAN_implClasses"><code>BeanContext.BEAN_implClasses</code></a> property is used to specify the names of implementation + <br>For example, the <a href="../../../org/apache/juneau/BeanContext.html#BEAN_implClasses"><code>BeanContext.BEAN_implClasses</code></a> property is used to specify the names of implementation classes for interfaces. - <br> - It's name is <js>"BeanContext.implClasses.map"</js>. + <br>It's name is <js>"BeanContext.implClasses.map"</js>. </ul> + <p> All context properties are set using the <a href="../../../org/apache/juneau/PropertyStore.html#setProperty-java.lang.String-java.lang.Object-"><code>setProperty(String, Object)</code></a> method. + <p> Default values for context properties can be specified globally as system properties. - <br> - Example: <code>System.<jsm>setProperty</jsm>(<jsf>BEAN_sortProperties</jsf>, <jk>true</jk>);</code> + <br>Example: <code>System.<jsm>setProperty</jsm>(<jsf>BEAN_sortProperties</jsf>, <jk>true</jk>);</code> + <p> SET and LIST properties can be added to using the <a href="../../../org/apache/juneau/PropertyStore.html#addToProperty-java.lang.String-java.lang.Object-"><code>addToProperty(String, Object)</code></a> method and removed from using the <a href="../../../org/apache/juneau/PropertyStore.html#removeFromProperty-java.lang.String-java.lang.Object-"><code>removeFromProperty(String, Object)</code></a> method. + <p> SET and LIST properties can also be added to and removed from by appending <js>".add"</js> or <js>".remove"</js> to the property name and using the <a href="../../../org/apache/juneau/PropertyStore.html#setProperty-java.lang.String-java.lang.Object-"><code>setProperty(String, Object)</code></a> method. + <p> The following shows the two different ways to append to a set or list property: <p class='bcode'> @@ -234,6 +220,7 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <jc>// Append to set property using set().</jc> ps.setProperty(<js>"BeanContext.notBeanClasses.set.add"</js>, MyNotBeanClass.<jk>class</jk>); </p> + <p> SET and LIST properties can also be set and manipulated using JSON strings. <p class='bcode'> @@ -251,15 +238,15 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <jc>// Remove an array of values as a JSON array.. ps.removeFromProperty(<js>"BeanContext.notBeanClasses.set"</js>, <js>"['com.my.MyNotBeanClass3']"</js>); </p> + <p> MAP properties can be added to using the <a href="../../../org/apache/juneau/PropertyStore.html#putToProperty-java.lang.String-java.lang.Object-java.lang.Object-"><code>putToProperty(String, Object, Object)</code></a> and <a href="../../../org/apache/juneau/PropertyStore.html#putToProperty-java.lang.String-java.lang.Object-"><code>putToProperty(String, Object)</code></a> methods. - <br> - MAP property entries can be removed by setting the value to <jk>null</jk> + <br>MAP property entries can be removed by setting the value to <jk>null</jk> (e.g. <code>putToProperty(<js>"BEAN_implClasses"</js>, MyNotBeanClass.<jk>class</jk>, <jk>null</jk>);</code>. - <br> - MAP properties can also be added to by appending <js>".put"</js> to the property name and using the + <br>MAP properties can also be added to by appending <js>".put"</js> to the property name and using the <a href="../../../org/apache/juneau/PropertyStore.html#setProperty-java.lang.String-java.lang.Object-"><code>setProperty(String, Object)</code></a> method. + <p> The following shows the two different ways to append to a set property: <p class='bcode'> @@ -273,6 +260,7 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? Map m = <jk>new</jk> AMap().append(MyInterface.<jk>class</jk>,MyInterfaceImpl.<jk>class</jk>); ps.setProperty(<js>"BeanContext.implClasses.map.put"</js>, m); </p> + <p> MAP properties can also be set and manipulated using JSON strings. <p class='bcode'> @@ -289,30 +277,33 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <jc>// Remove from MAP using JSON object.</jc> ps.putToProperty(<js>"BeanContext.implClasses.map"</js>, <js>"{'com.my.MyInterface2':null}"</js>); </p> + <p> Context properties are retrieved from this store using the following 3 methods: <ul class='spaced-list'> - <li><a href="../../../org/apache/juneau/PropertyStore.html#getProperty-java.lang.String-java.lang.Class-T-"><code>getProperty(String, Class, Object)</code></a> - Retrieve a SIMPLE or SET property converted to the specified + <li> + <a href="../../../org/apache/juneau/PropertyStore.html#getProperty-java.lang.String-java.lang.Class-T-"><code>getProperty(String, Class, Object)</code></a> - Retrieve a SIMPLE or SET property converted to the specified class type. - <li><a href="../../../org/apache/juneau/PropertyStore.html#getMap-java.lang.String-java.lang.Class-java.lang.Class-java.util.Map-"><code>getMap(String, Class, Class, Map)</code></a> - Retrieve a MAP property with keys/values converted to the + <li> + <a href="../../../org/apache/juneau/PropertyStore.html#getMap-java.lang.String-java.lang.Class-java.lang.Class-java.util.Map-"><code>getMap(String, Class, Class, Map)</code></a> - Retrieve a MAP property with keys/values converted to the specified class types. - <li><a href="../../../org/apache/juneau/PropertyStore.html#getPropertyMap-java.lang.String-"><code>getPropertyMap(String)</code></a> - Retrieve a map of all context properties with the specified prefix + <li> + <a href="../../../org/apache/juneau/PropertyStore.html#getPropertyMap-java.lang.String-"><code>getPropertyMap(String)</code></a> - Retrieve a map of all context properties with the specified prefix (e.g. <js>"BeanContext"</js> for <a href="../../../org/apache/juneau/BeanContext.html" title="class in org.apache.juneau"><code>BeanContext</code></a> properties). </ul> + <p> As a general rule, only <a href="../../../org/apache/juneau/Context.html" title="class in org.apache.juneau"><code>Context</code></a> objects will use these read methods. <h6 class='topic'>Context objects</h6> - <p> + A Context object can be thought of as unmodifiable snapshot of a store. - <br> - They should be 'fast' by avoiding synchronization by using final fields whenever possible. - <br> - However, they MUST be thread safe. + <br>They should be 'fast' by avoiding synchronization by using final fields whenever possible. + <br>However, they MUST be thread safe. + <p> Context objects are created using the <a href="../../../org/apache/juneau/PropertyStore.html#getContext-java.lang.Class-"><code>getContext(Class)</code></a> method. - <br> - As long as the properties on a store have not been modified, the store will return a cached copy of a context. + <br>As long as the properties on a store have not been modified, the store will return a cached copy of a context. <p class='bcode'> PropertyStore ps = PropertyStore.<jsm>create</jsm>(); @@ -332,14 +323,12 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? </p> <h6 class='topic'>Session objects</h6> - <p> + Session objects are created through <a href="../../../org/apache/juneau/Context.html" title="class in org.apache.juneau"><code>Context</code></a> objects, typically through a <code>createContext()</code> method. - <br> - Unlike context objects, they are NOT reusable and NOT thread safe. - <br> - They are meant to be used one time and then thrown away. - <br> - They should NEVER need to use synchronization. + <br>Unlike context objects, they are NOT reusable and NOT thread safe. + <br>They are meant to be used one time and then thrown away. + <br>They should NEVER need to use synchronization. + <p> Session objects are also often used as scratchpads for information such as keeping track of call stack information to detect recursive loops when serializing beans.</div> @@ -601,7 +590,7 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>create</h4> -<pre>public static <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.306">create</a>()</pre> +<pre>public static <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.295">create</a>()</pre> <div class="block">Create a new property store with default settings.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> @@ -615,7 +604,7 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>create</h4> -<pre>public static <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.318">create</a>(<a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> copyFrom)</pre> +<pre>public static <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.307">create</a>(<a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> copyFrom)</pre> <div class="block">Create a new property store with settings copied from the specified store.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> @@ -631,11 +620,11 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>copyFrom</h4> -<pre>public <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.343">copyFrom</a>(<a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> ps)</pre> +<pre>public <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.332">copyFrom</a>(<a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> ps)</pre> <div class="block">Copies the properties from the specified store into this store. + <p> - Properties of type set/list/collection will be appended to the existing - properties if they already exist.</div> + Properties of type set/list/collection will be appended to the existing properties if they already exist.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>ps</code> - The store to copy from.</dd> @@ -650,7 +639,7 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>create</h4> -<pre>public <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.360">create</a>(<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="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> overrideProperties)</pre> +<pre>public <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.349">create</a>(<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="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> overrideProperties)</pre> <div class="block">Creates a new store with the specified override properties applied to this store.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> @@ -666,18 +655,19 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>setProperty</h4> -<pre>public <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.421">setProperty</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> name, +<pre>public <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.413">setProperty</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> name, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> <div class="block">Sets a configuration property value on this object. + <p> A typical usage is to set or overwrite configuration values like so... <p class='bcode'> PropertyStore ps = PropertyStore.<jsm>create</jsm>(); ps.setProperty(<jsf>BEAN_sortProperties</jsf>, <jk>true</jk>); </p> + <p> The possible class types of the value depend on the property type: - <p> <table class='styled'> <tr> <th>Property type</th> @@ -714,15 +704,15 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>name</code> - The configuration property name. - <br>If name ends with <l>.add</l>, then the specified value is added to the existing property value as an entry - in a SET or LIST property. - <br>If name ends with <l>.put</l>, then the specified value is added to the existing property value as a - key/value pair in a MAP property. - <br>If name ends with <l>.remove</l>, then the specified value is removed from the existing property property - value in a SET or LIST property.</dd> + <br>If name ends with <l>.add</l>, then the specified value is added to the existing property value as an entry + in a SET or LIST property. + <br>If name ends with <l>.put</l>, then the specified value is added to the existing property value as a + key/value pair in a MAP property. + <br>If name ends with <l>.remove</l>, then the specified value is removed from the existing property property + value in a SET or LIST property.</dd> <dd><code>value</code> - The new value. - If <jk>null</jk>, the property value is deleted. - In general, the value type can be anything.</dd> + If <jk>null</jk>, the property value is deleted. + In general, the value type can be anything.</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>This object (for method chaining).</dd> </dl> @@ -734,8 +724,9 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>setProperties</h4> -<pre>public <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.453">setProperties</a>(<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="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> newProperties)</pre> +<pre>public <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.446">setProperties</a>(<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="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> newProperties)</pre> <div class="block">Convenience method for setting multiple properties in one call. + <p> This appends to any previous configuration properties set on this store.</div> <dl> @@ -752,7 +743,7 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>addProperties</h4> -<pre>public <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.487">addProperties</a>(<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="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> properties)</pre> +<pre>public <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.480">addProperties</a>(<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="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> properties)</pre> <div class="block">Adds several properties to this store.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> @@ -768,7 +759,7 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>addToProperty</h4> -<pre>public <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.502">addToProperty</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> name, +<pre>public <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.495">addToProperty</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> name, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> <div class="block">Adds a value to a SET property.</div> <dl> @@ -788,7 +779,7 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>putToProperty</h4> -<pre>public <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.525">putToProperty</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> name, +<pre>public <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.518">putToProperty</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> name, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> key, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> <div class="block">Adds or overwrites a value to a MAP property.</div> @@ -810,7 +801,7 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>putToProperty</h4> -<pre>public <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.547">putToProperty</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> name, +<pre>public <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.540">putToProperty</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> name, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> <div class="block">Adds or overwrites a value to a MAP property.</div> <dl> @@ -830,7 +821,7 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>removeFromProperty</h4> -<pre>public <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.569">removeFromProperty</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> name, +<pre>public <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.562">removeFromProperty</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> name, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</pre> <div class="block">Removes a value from a SET property.</div> <dl> @@ -850,11 +841,13 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>getContext</h4> -<pre>public <T extends <a href="../../../org/apache/juneau/Context.html" title="class in org.apache.juneau">Context</a>> T <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.594">getContext</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c)</pre> +<pre>public <T extends <a href="../../../org/apache/juneau/Context.html" title="class in org.apache.juneau">Context</a>> T <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.589">getContext</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c)</pre> <div class="block">Returns an instance of the specified context initialized with the properties in this store. + <p> Multiple calls to this method for the same store class will return the same cached value as long as the properties on this store are not touched. + <p> As soon as any properties are modified on this store, all cached entries are discarded and recreated as needed.</div> <dl> @@ -871,8 +864,9 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>getPropertyMap</h4> -<pre>public <a href="../../../org/apache/juneau/PropertyStore.PropertyMap.html" title="class in org.apache.juneau">PropertyStore.PropertyMap</a> <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.629">getPropertyMap</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> prefix)</pre> +<pre>public <a href="../../../org/apache/juneau/PropertyStore.PropertyMap.html" title="class in org.apache.juneau">PropertyStore.PropertyMap</a> <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.625">getPropertyMap</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> prefix)</pre> <div class="block">Returns the configuration properties with the specified prefix. + <p> For example, if <l>prefix</l> is <js>"BeanContext"</js>, then retrieves all configuration properties that are prefixed with <js>"BeanContext."</js>.</div> @@ -890,11 +884,13 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>setClassLoader</h4> -<pre>public <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.650">setClassLoader</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang">ClassLoader</a> classLoader)</pre> +<pre>public <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.648">setClassLoader</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang">ClassLoader</a> classLoader)</pre> <div class="block">Specifies the classloader to use when resolving classes from strings. + <p> Can be used for resolving class names when the classes being created are in a different classloader from the Juneau code. + <p> If <jk>null</jk>, the system classloader will be used to resolve classes.</div> <dl> @@ -911,8 +907,9 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>setDefaultParser</h4> -<pre>public <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.663">setDefaultParser</a>(<a href="../../../org/apache/juneau/parser/ReaderParser.html" title="class in org.apache.juneau.parser">ReaderParser</a> defaultParser)</pre> +<pre>public <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.662">setDefaultParser</a>(<a href="../../../org/apache/juneau/parser/ReaderParser.html" title="class in org.apache.juneau.parser">ReaderParser</a> defaultParser)</pre> <div class="block">Specifies the parser to use to convert Strings to POJOs. + <p> If <jk>null</jk>, <a href="../../../org/apache/juneau/json/JsonParser.html#DEFAULT"><code>JsonParser.DEFAULT</code></a> will be used.</div> <dl> @@ -931,7 +928,7 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>getProperty</h4> -<pre>public <T> T <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.677">getProperty</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> name, +<pre>public <T> T <a href="../../../src-html/org/apache/juneau/PropertyStore.html#line.676">getProperty</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> name, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> type, T def)</pre> <div class="block">Returns a property value converted to the specified type.</div> @@ -958,6 +955,7 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends T> def, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... args)</pre> <div class="block">Returns a property value either cast to the specified type, or a new instance of the specified type. + <p> It's assumed that the current property value is either an instance of that type, or a <code>Class</code> that's a subclass of the type to be instantiated.</div> @@ -1207,7 +1205,7 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockListLast"> <li class="blockList"> <h4>toString</h4> -<pre>public <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="../../../src-html/org/apache/juneau/PropertyStore.html#line.1457">toString</a>()</pre> +<pre>public <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="../../../src-html/org/apache/juneau/PropertyStore.html#line.1463">toString</a>()</pre> <dl> <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a></code> in class <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd> http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/1b5bde65/content/site/apidocs/org/apache/juneau/Session.html ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/Session.html b/content/site/apidocs/org/apache/juneau/Session.html index f4877e6..41e1179 100644 --- a/content/site/apidocs/org/apache/juneau/Session.html +++ b/content/site/apidocs/org/apache/juneau/Session.html @@ -112,12 +112,13 @@ var activeTableTab = "activeTableTab"; </dl> <hr> <br> -<pre>public abstract class <a href="../../../src-html/org/apache/juneau/Session.html#line.33">Session</a> +<pre>public abstract class <a href="../../../src-html/org/apache/juneau/Session.html#line.34">Session</a> extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> <div class="block">A one-time-use non-thread-safe object that's meant to be used once and then thrown away. + <p> - Serializers and parsers use session objects to retrieve config properties and to use it - as a scratchpad during serialize and parse actions.</div> + Serializers and parsers use session objects to retrieve config properties and to use it as a scratchpad during + serialize and parse actions.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau"><code>PropertyStore</code></a></dd> @@ -283,13 +284,13 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockListLast"> <li class="blockList"> <h4>Session</h4> -<pre>protected <a href="../../../src-html/org/apache/juneau/Session.html#line.50">Session</a>(<a href="../../../org/apache/juneau/Context.html" title="class in org.apache.juneau">Context</a> ctx, +<pre>protected <a href="../../../src-html/org/apache/juneau/Session.html#line.52">Session</a>(<a href="../../../org/apache/juneau/Context.html" title="class in org.apache.juneau">Context</a> ctx, <a href="../../../org/apache/juneau/ObjectMap.html" title="class in org.apache.juneau">ObjectMap</a> op)</pre> <div class="block">Default constructor.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>ctx</code> - The context creating this session object. - The context contains all the configuration settings for the session.</dd> + The context contains all the configuration settings for the session.</dd> <dd><code>op</code> - Properties associated with this session.</dd> </dl> </li> @@ -308,8 +309,9 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>getProperty</h4> -<pre>public <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="../../../src-html/org/apache/juneau/Session.html#line.68">getProperty</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> key)</pre> +<pre>public <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="../../../src-html/org/apache/juneau/Session.html#line.71">getProperty</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> key)</pre> <div class="block">Returns the session property with the specified key. + <p> The order of lookup for the property is as follows: <ul> @@ -331,7 +333,7 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>getProperty</h4> -<pre>public <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="../../../src-html/org/apache/juneau/Session.html#line.79">getProperty</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> key, +<pre>public <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="../../../src-html/org/apache/juneau/Session.html#line.82">getProperty</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> key, <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> def)</pre> <div class="block">Same as <a href="../../../org/apache/juneau/Session.html#getProperty-java.lang.String-"><code>getProperty(String)</code></a> but with a default value.</div> <dl> @@ -349,7 +351,7 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>getProperty</h4> -<pre>public <T> T <a href="../../../src-html/org/apache/juneau/Session.html#line.95">getProperty</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> type, +<pre>public <T> T <a href="../../../src-html/org/apache/juneau/Session.html#line.98">getProperty</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> type, <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">Same as <a href="../../../org/apache/juneau/Session.html#getProperty-java.lang.String-"><code>getProperty(String)</code></a> but transforms the value to the specified type.</div> <dl> @@ -369,7 +371,7 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>getProperty</h4> -<pre>public <T> T <a href="../../../src-html/org/apache/juneau/Session.html#line.107">getProperty</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> type, +<pre>public <T> T <a href="../../../src-html/org/apache/juneau/Session.html#line.110">getProperty</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> type, <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, T def)</pre> <div class="block">Same as <a href="../../../org/apache/juneau/Session.html#getProperty-java.lang.Class-java.lang.String-"><code>getProperty(Class,String)</code></a> but with a default value.</div> @@ -389,9 +391,11 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>addToCache</h4> -<pre>public void <a href="../../../src-html/org/apache/juneau/Session.html#line.121">addToCache</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> key, +<pre>public void <a href="../../../src-html/org/apache/juneau/Session.html#line.126">addToCache</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> key, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> val)</pre> <div class="block">Adds an arbitrary object to this session's cache. + + <p> Can be used to store objects for reuse during a session.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> @@ -406,13 +410,15 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>addToCache</h4> -<pre>public void <a href="../../../src-html/org/apache/juneau/Session.html#line.134">addToCache</a>(<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="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> cacheObjects)</pre> +<pre>public void <a href="../../../src-html/org/apache/juneau/Session.html#line.142">addToCache</a>(<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="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> cacheObjects)</pre> <div class="block">Adds arbitrary objects to this session's cache. + + <p> Can be used to store objects for reuse during a session.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>cacheObjects</code> - The objects to add to this session's cache. - No-op if <jk>null</jk>.</dd> + No-op if <jk>null</jk>.</dd> </dl> </li> </ul> @@ -422,7 +428,7 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>getFromCache</h4> -<pre>public <T> T <a href="../../../src-html/org/apache/juneau/Session.html#line.150">getFromCache</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c, +<pre>public <T> T <a href="../../../src-html/org/apache/juneau/Session.html#line.158">getFromCache</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c, <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">Returns an object stored in the session cache.</div> <dl> @@ -440,7 +446,7 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>addWarning</h4> -<pre>public final void <a href="../../../src-html/org/apache/juneau/Session.html#line.160">addWarning</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> msg, +<pre>public final void <a href="../../../src-html/org/apache/juneau/Session.html#line.168">addWarning</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> msg, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... args)</pre> <div class="block">Logs a warning message.</div> <dl> @@ -456,7 +462,7 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>hasWarnings</h4> -<pre>public boolean <a href="../../../src-html/org/apache/juneau/Session.html#line.172">hasWarnings</a>()</pre> +<pre>public boolean <a href="../../../src-html/org/apache/juneau/Session.html#line.180">hasWarnings</a>()</pre> <div class="block">Returns <jk>true</jk> if warnings occurred in this session.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> @@ -470,7 +476,7 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>getWarnings</h4> -<pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</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="../../../src-html/org/apache/juneau/Session.html#line.181">getWarnings</a>()</pre> +<pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</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="../../../src-html/org/apache/juneau/Session.html#line.189">getWarnings</a>()</pre> <div class="block">Returns the warnings that occurred in this session.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> @@ -484,8 +490,10 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <ul class="blockList"> <li class="blockList"> <h4>getLogger</h4> -<pre>protected <a href="../../../org/apache/juneau/internal/JuneauLogger.html" title="class in org.apache.juneau.internal">JuneauLogger</a> <a href="../../../src-html/org/apache/juneau/Session.html#line.191">getLogger</a>()</pre> +<pre>protected <a href="../../../org/apache/juneau/internal/JuneauLogger.html" title="class in org.apache.juneau.internal">JuneauLogger</a> <a href="../../../src-html/org/apache/juneau/Session.html#line.201">getLogger</a>()</pre> <div class="block">Returns the logger associated with this session. + + <p> Subclasses can override this method to provide their own logger.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> @@ -500,7 +508,7 @@ extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html? <li class="blockList"> <h4>asMap</h4> <pre><a href="../../../org/apache/juneau/annotation/Overrideable.html" title="annotation in org.apache.juneau.annotation">@Overrideable</a> -public <a href="../../../org/apache/juneau/ObjectMap.html" title="class in org.apache.juneau">ObjectMap</a> <a href="../../../src-html/org/apache/juneau/Session.html#line.203">asMap</a>()</pre> +public <a href="../../../org/apache/juneau/ObjectMap.html" title="class in org.apache.juneau">ObjectMap</a> <a href="../../../src-html/org/apache/juneau/Session.html#line.213">asMap</a>()</pre> <div class="block">Returns the properties defined on this bean context as a simple map for debugging purposes.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> @@ -514,7 +522,7 @@ public <a href="../../../org/apache/juneau/ObjectMap.html" title="class in <ul class="blockList"> <li class="blockList"> <h4>toString</h4> -<pre>public <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="../../../src-html/org/apache/juneau/Session.html#line.208">toString</a>()</pre> +<pre>public <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="../../../src-html/org/apache/juneau/Session.html#line.218">toString</a>()</pre> <dl> <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a></code> in class <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd> @@ -527,7 +535,7 @@ public <a href="../../../org/apache/juneau/ObjectMap.html" title="class in <ul class="blockList"> <li class="blockList"> <h4>close</h4> -<pre>public boolean <a href="../../../src-html/org/apache/juneau/Session.html#line.222">close</a>() +<pre>public boolean <a href="../../../src-html/org/apache/juneau/Session.html#line.232">close</a>() throws <a href="../../../org/apache/juneau/BeanRuntimeException.html" title="class in org.apache.juneau">BeanRuntimeException</a></pre> <div class="block">Perform cleanup on this context object if necessary.</div> <dl> @@ -544,7 +552,7 @@ public <a href="../../../org/apache/juneau/ObjectMap.html" title="class in <ul class="blockListLast"> <li class="blockList"> <h4>finalize</h4> -<pre>protected void <a href="../../../src-html/org/apache/juneau/Session.html#line.230">finalize</a>() +<pre>protected void <a href="../../../src-html/org/apache/juneau/Session.html#line.240">finalize</a>() throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a></pre> <dl> <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/1b5bde65/content/site/apidocs/org/apache/juneau/Streamable.html ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/Streamable.html b/content/site/apidocs/org/apache/juneau/Streamable.html index ab87301..4934878 100644 --- a/content/site/apidocs/org/apache/juneau/Streamable.html +++ b/content/site/apidocs/org/apache/juneau/Streamable.html @@ -106,9 +106,9 @@ var activeTableTab = "activeTableTab"; <br> <pre>public interface <a href="../../../src-html/org/apache/juneau/Streamable.html#line.25">Streamable</a></pre> <div class="block">Interface that identifies that an object can be serialized directly to an output stream. + <p> - Instances must identify the media type of the content by implementing the - <a href="../../../org/apache/juneau/Streamable.html#getMediaType--"><code>getMediaType()</code></a> method.</div> + Instances must identify the media type of the content by implementing the <a href="../../../org/apache/juneau/Streamable.html#getMediaType--"><code>getMediaType()</code></a> method.</div> </li> </ul> </div>
