You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2017/05/27 14:33:58 UTC

incubator-juneau-website git commit: [JUNEAU-52] - need to fix some typos and errors on sample codes.

Repository: incubator-juneau-website
Updated Branches:
  refs/heads/asf-site 2f6fc8b56 -> 2c37862cb


[JUNEAU-52] - need to fix some typos and errors on sample codes.

This closes #4

Project: http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/commit/2c37862c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/tree/2c37862c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/diff/2c37862c

Branch: refs/heads/asf-site
Commit: 2c37862cb174508655c069091738754b0f5695a5
Parents: 2f6fc8b
Author: JamesBognar <ja...@apache.org>
Authored: Sat May 27 10:32:27 2017 -0400
Committer: JamesBognar <ja...@apache.org>
Committed: Sat May 27 10:33:56 2017 -0400

----------------------------------------------------------------------
 .../org/apache/juneau/annotation/Pojo.html      |  8 +++----
 content/site/apidocs/overview-summary.html      | 25 +++++++++-----------
 2 files changed, 15 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/2c37862c/content/site/apidocs/org/apache/juneau/annotation/Pojo.html
----------------------------------------------------------------------
diff --git a/content/site/apidocs/org/apache/juneau/annotation/Pojo.html b/content/site/apidocs/org/apache/juneau/annotation/Pojo.html
index 52bcc0c..6529f27 100644
--- a/content/site/apidocs/org/apache/juneau/annotation/Pojo.html
+++ b/content/site/apidocs/org/apache/juneau/annotation/Pojo.html
@@ -165,10 +165,10 @@ public @interface <a href="../../../../src-html/org/apache/juneau/annotation/Poj
 
    <jc>// Our POJO swap to force the bean to be serialized as a String</jc>
    <jk>public class</jk> BSwap <jk>extends</jk> PojoSwap&lt;B,String&gt; {
-      <jk>public</jk> String swap(B o) <jk>throws</jk> SerializeException {
+      <jk>public</jk> String swap(BeanSession s, B o) <jk>throws</jk> SerializeException {
          <jk>return</jk> o.f1;
       }
-      <jk>public</jk> B unswap(String f) <jk>throws</jk> ParseException {
+      <jk>public</jk> B unswap(BeanSession s, String f) <jk>throws</jk> ParseException {
          B b1 = <jk>new</jk> B();
          b1.<jf>f1</jf> = f;
          <jk>return</jk> b1;
@@ -180,11 +180,11 @@ public @interface <a href="../../../../src-html/org/apache/juneau/annotation/Poj
       B b = <jk>new</jk> B();
       b.<jf>f1</jf> = <js>"bar"</js>;
       String json = s.serialize(b);
-      <jsm>assertEquals</jsm>(<js>"'bar'"</js>, json);
+      <jsm>assertEquals</jsm>(<js>"\"bar\""</js>, json);
 
       ReaderParser p = JsonParser.<jsf>DEFAULT</jsf>;
       b = p.parse(json, B.<jk>class</jk>);
-      <jsm>assertEquals</jsm>(<js>"bar"</js>, t.<jf>f1</jf>);
+      <jsm>assertEquals</jsm>(<js>"bar"</js>, b.<jf>f1</jf>);
    }
  </p>
  <p>

http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/2c37862c/content/site/apidocs/overview-summary.html
----------------------------------------------------------------------
diff --git a/content/site/apidocs/overview-summary.html b/content/site/apidocs/overview-summary.html
index 5e025ec..a066fc6 100644
--- a/content/site/apidocs/overview-summary.html
+++ b/content/site/apidocs/overview-summary.html
@@ -809,8 +809,8 @@
       <p class='bcode'>
    <jc>// Construct a new serializer group with configuration parameters that get applied to all serializers.</jc>
    SerializerGroup sg = <jk>new</jk> SerializerGroupBuilder()
-      .append(JsonSerializer.<jk>class</jk>, UrlEncodingSerializer.<jk>class</jk>);
-      .ws   <jc>// or .useWhitespace(true)</jc>
+      .append(JsonSerializer.<jk>class</jk>, UrlEncodingSerializer.<jk>class</jk>)
+      .ws() <jc>// or .useWhitespace(true)</jc>
       .pojoSwaps(CalendarSwap.ISO8601DT.<jk>class</jk>)
       .build();
 
@@ -820,7 +820,7 @@
       
    <jc>// Construct a new parser group with configuration parameters that get applied to all parsers.</jc>
    ParserGroup pg = <jk>new</jk> ParserGroupBuilder()
-      .append(JsonSerializer.<jk>class</jk>, UrlEncodingSerializer.<jk>class</jk>);
+      .append(JsonParser.<jk>class</jk>, UrlEncodingParser.<jk>class</jk>)
       .pojoSwaps(CalendarSwap.ISO8601DT.<jk>class</jk>)
       .build();
 
@@ -949,9 +949,6 @@
       .builder()
       .quoteChar(<js>'"'</js>)
       .build();
-
-   <jc>// Lock it so that the configuration cannot be changed.</jc>
-   s.lock();
       </p>
       
       <h6 class='topic'>Additional Information</h6>
@@ -1269,7 +1266,7 @@
       <jc>// Must provide a no-arg constructor!</jc>
       <jk>public</jk> MyAddressBeanFilter() {
          <jk>super</jk>(Address.<jk>class</jk>);  <jc>// The bean class that this filter applies to.</jc>
-         setIncludeProperties(<js>"street,city,state"</js>);  <jc>// The properties we want exposed.</jc>
+         properties(<js>"street,city,state"</js>);  <jc>// The properties we want exposed.</jc>
       }
    }  
          </p>     
@@ -1342,7 +1339,7 @@
    <ja>@Bean</ja>(typeName=<js>"foo"</js>)
    <jk>public class</jk> Foo {
       <jc>// A bean property where the object types cannot be inferred since it's an Object[].</jc>
-      <ja>@BeanProperty</ja>(typeDictionary={Bar.<jk>class</jk>,Baz.<jk>class</jk>})
+      <ja>@BeanProperty</ja>(beanDictionary={Bar.<jk>class</jk>,Baz.<jk>class</jk>})
       <jk>public</jk> Object[] x = <jk>new</jk> Object[]{<jk>new</jk> Bar(), <jk>new</jk> Baz()};
       }
       
@@ -1815,14 +1812,14 @@
    <jc>// Read values from default section</jc>
    key1 = f.getInt(<js>"key1"</js>);
    key2 = f.getBoolean(<js>"key2"</js>);
-   key3 = f.getObject(<jk>int</jk>[].<jk>class</jk>, <js>"key3"</js>);
-   key4 = f.getObject(URL.<jk>class</jk>, <js>"key4"</js>);
+   key3 = f.getObject(<js>"key3"</js>, <jk>int</jk>[].<jk>class</jk>);
+   key4 = f.getObject(<js>"key4"</js>, URL.<jk>class</jk>);
    
    <jc>// Read values from section #1</jc>
    key1 = f.getInt(<js>"Section1/key1"</js>);
    key2 = f.getBoolean(<js>"Section1/key2"</js>);
-   key3 = f.getObject(<jk>int</jk>[].<jk>class</jk>, <js>"Section1/key3"</js>);
-   key4 = f.getObject(URL.<jk>class</jk>, <js>"Section1/key4"</js>);
+   key3 = f.getObject(<js>"Section1/key3"</js>, <jk>int</jk>[].<jk>class</jk>);
+   key4 = f.getObject(<js>"Section1/key4"</js>, URL.<jk>class</jk>);
       </p>
       <p>
          The interface also allows a config file to be easily constructed programmatically:
@@ -1854,7 +1851,7 @@
    ConfigFile cf = <jk>new</jk> ConfigFileBuilder().build(<js>"MyConfig.cfg"</js>)
       .addLines(<jk>null</jk>,
          <js>"# Default section"</js>)
-      .addHeaderComments(<js>"section1"</js>,
+      .addHeaderComments(<js>"Section1"</js>,
          <js>"# Section 1"</js>);
    cf.put(<js>"key1"</js>, 1);
    cf.put(<js>"key2"</js>, <jk>true</jk>);
@@ -2282,7 +2279,7 @@
       .entries(
          <jsm>entry</jsm>(<js>"tag:juneau.sample.com,2013:1.2345"</js>, <js>"Juneau ATOM specification snapshot"</js>, <js>"2016-01-02T03:04:05Z"</js>)
          .links(
-            <jsm>link</jsm><js>"alternate"</js>, <js>"text/html"</js>, <js>"http://juneau.apache.org/juneau.atom"</js>),
+            <jsm>link</jsm>(<js>"alternate"</js>, <js>"text/html"</js>, <js>"http://juneau.apache.org/juneau.atom"</js>),
             <jsm>link</jsm>(<js>"enclosure"</js>, <js>"audio/mpeg"</js>, <js>"http://juneau.apache.org/audio/juneau_podcast.mp3"</js>).length(1337)
          )
          .published(<js>"2016-01-02T03:04:05Z"</js>)