juneau-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesbog...@apache.org
Subject [01/34] incubator-juneau git commit: Add builder classes for all serializers and parsers.
Date Fri, 10 Mar 2017 16:50:57 GMT
Repository: incubator-juneau
Updated Branches:
  refs/heads/master d59d737c3 -> 95e832e1a


http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/95e832e1/juneau-rest/src/main/java/org/apache/juneau/rest/RestServlet.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestServlet.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestServlet.java
index 396e5e1..83c9bcc 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestServlet.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestServlet.java
@@ -127,7 +127,7 @@ public abstract class RestServlet extends HttpServlet {
 	// allow the config file to be accessed during object creation.
 	// e.g. private String myConfig = getConfig().getString("myConfig");
 	{
-		varResolver = createVarResolver();
+		VarResolverBuilder vrb = createVarResolver();
 
 		// @RestResource annotations from bottom to top.
 		restResourceAnnotationsChildFirst = ReflectionUtils.findAnnotationsMap(RestResource.class,
getClass());
@@ -141,11 +141,13 @@ public abstract class RestServlet extends HttpServlet {
 		}
 
 		try {
-			configFile = createConfigFile();
-			varResolver.setContextObject(ConfigFileVar.SESSION_config, configFile);
+			configFile = createConfigFile(vrb);
+			vrb.contextObject(ConfigFileVar.SESSION_config, configFile);
 		} catch (IOException e) {
 			this.initException = e;
 		}
+
+		varResolver = vrb.build();
 	}
 
 	@Override /* Servlet */
@@ -204,14 +206,14 @@ public abstract class RestServlet extends HttpServlet {
 			properties = createProperties();
 			beanFilters = createBeanFilters();
 			pojoSwaps = createPojoSwaps();
-			context = ContextFactory.create().setProperties(properties).getContext(RestServletContext.class);
+			context = PropertyStore.create().setProperties(properties).getContext(RestServletContext.class);
 			beanContext = createBeanContext(properties, beanFilters, pojoSwaps);
-			urlEncodingSerializer = createUrlEncodingSerializer(properties, beanFilters, pojoSwaps).lock();
-			urlEncodingParser = createUrlEncodingParser(properties, beanFilters, pojoSwaps).lock();
-			serializers = createSerializers(properties, beanFilters, pojoSwaps).lock();
-			parsers = createParsers(properties, beanFilters, pojoSwaps).lock();
+			urlEncodingSerializer = createUrlEncodingSerializer(properties, beanFilters, pojoSwaps).build();
+			urlEncodingParser = createUrlEncodingParser(properties, beanFilters, pojoSwaps).build();
+			serializers = createSerializers(properties, beanFilters, pojoSwaps).build();
+			parsers = createParsers(properties, beanFilters, pojoSwaps).build();
 			converters = createConverters(properties);
-			encoders = createEncoders(properties);
+			encoders = createEncoders(properties).build();
 			guards = createGuards(properties);
 			mimetypesFileTypeMap = createMimetypesFileTypeMap(properties);
 			defaultRequestHeaders = new TreeMap<String,String>(String.CASE_INSENSITIVE_ORDER);
@@ -253,13 +255,11 @@ public abstract class RestServlet extends HttpServlet {
 			for (RestServlet child : childResources.values())
 				child.init(servletConfig);
 
-			varResolver.addVars(
-				LocalizationVar.class,
-				RequestVar.class,
-				SerializedRequestAttrVar.class,
-				ServletInitParamVar.class,
-				UrlEncodeVar.class
-			);
+			varResolver = varResolver
+				.builder()
+				.vars(LocalizationVar.class, RequestVar.class, SerializedRequestAttrVar.class, ServletInitParamVar.class,
UrlEncodeVar.class)
+				.build()
+			;
 
 		} catch (RestException e) {
 			// Thrown RestExceptions are simply caught and rethrown on subsequent calls to service().
@@ -460,7 +460,7 @@ public abstract class RestServlet extends HttpServlet {
 	 * @throws Exception If bean context not be constructed for any reason.
 	 */
 	protected BeanContext createBeanContext(ObjectMap properties, Class<?>[] beanFilters,
Class<?>[] pojoSwaps) throws Exception {
-		return ContextFactory.create().addBeanFilters(beanFilters).addPojoSwaps(pojoSwaps).setProperties(properties).getBeanContext();
+		return PropertyStore.create().addBeanFilters(beanFilters).addPojoSwaps(pojoSwaps).setProperties(properties).getBeanContext();
 	}
 
 	/**
@@ -474,8 +474,8 @@ public abstract class RestServlet extends HttpServlet {
 	 * @return The new URL-Encoding serializer.
 	 * @throws Exception If the serializer could not be constructed for any reason.
 	 */
-	protected UrlEncodingSerializer createUrlEncodingSerializer(ObjectMap properties, Class<?>[]
beanFilters, Class<?>[] pojoSwaps) throws Exception {
-		return new UrlEncodingSerializer().setProperties(properties).addBeanFilters(beanFilters).addPojoSwaps(pojoSwaps);
+	protected UrlEncodingSerializerBuilder createUrlEncodingSerializer(ObjectMap properties,
Class<?>[] beanFilters, Class<?>[] pojoSwaps) throws Exception {
+		return new UrlEncodingSerializerBuilder().properties(properties).beanFilters(beanFilters).pojoSwaps(pojoSwaps);
 	}
 
 	/**
@@ -489,8 +489,8 @@ public abstract class RestServlet extends HttpServlet {
 	 * @return The new URL-Encoding parser.
 	 * @throws Exception If the parser could not be constructed for any reason.
 	 */
-	protected UrlEncodingParser createUrlEncodingParser(ObjectMap properties, Class<?>[]
beanFilters, Class<?>[] pojoSwaps) throws Exception {
-		return new UrlEncodingParser().setProperties(properties).addBeanFilters(beanFilters).addPojoSwaps(pojoSwaps);
+	protected UrlEncodingParserBuilder createUrlEncodingParser(ObjectMap properties, Class<?>[]
beanFilters, Class<?>[] pojoSwaps) throws Exception {
+		return new UrlEncodingParserBuilder().properties(properties).beanFilters(beanFilters).pojoSwaps(pojoSwaps);
 	}
 
 	/**
@@ -509,21 +509,14 @@ public abstract class RestServlet extends HttpServlet {
 	 * @return The group of serializers.
 	 * @throws Exception If serializer group could not be constructed for any reason.
 	 */
-	protected SerializerGroup createSerializers(ObjectMap properties, Class<?>[] beanFilters,
Class<?>[] pojoSwaps) throws Exception {
-		SerializerGroup g = new SerializerGroup();
+	protected SerializerGroupBuilder createSerializers(ObjectMap properties, Class<?>[]
beanFilters, Class<?>[] pojoSwaps) throws Exception {
+		SerializerGroupBuilder g = new SerializerGroupBuilder();
 
 		// Serializers are loaded in parent-to-child order to allow overrides.
 		for (RestResource r : restResourceAnnotationsParentFirst.values())
-			for (Class<? extends Serializer> c : reverse(r.serializers()))
-				try {
-					g.append(c);
-				} catch (Exception e) {
-					throw new RestServletException("Exception occurred while trying to instantiate Serializer
''{0}''", c.getSimpleName()).initCause(e);
-				}
+			g.append(reverse(r.serializers()));
 
-		g.setProperties(properties);
-		g.addBeanFilters(beanFilters).addPojoSwaps(pojoSwaps);
-		return g;
+		return g.properties(properties).beanFilters(beanFilters).pojoSwaps(pojoSwaps);
 	}
 
 	/**
@@ -542,21 +535,14 @@ public abstract class RestServlet extends HttpServlet {
 	 * @return The group of parsers.
 	 * @throws Exception If parser group could not be constructed for any reason.
 	 */
-	protected ParserGroup createParsers(ObjectMap properties, Class<?>[] beanFilters,
Class<?>[] pojoSwaps) throws Exception {
-		ParserGroup g = new ParserGroup();
+	protected ParserGroupBuilder createParsers(ObjectMap properties, Class<?>[] beanFilters,
Class<?>[] pojoSwaps) throws Exception {
+		ParserGroupBuilder g = new ParserGroupBuilder();
 
 		// Parsers are loaded in parent-to-child order to allow overrides.
 		for (RestResource r : restResourceAnnotationsParentFirst.values())
-			for (Class<? extends Parser> p : reverse(r.parsers()))
-				try {
-					g.append(p);
-				} catch (Exception e) {
-					throw new RestServletException("Exception occurred while trying to instantiate Parser
''{0}''", p.getSimpleName()).initCause(e);
-				}
+			g.append(reverse(r.parsers()));
 
-		g.setProperties(properties);
-		g.addBeanFilters(beanFilters).addPojoSwaps(pojoSwaps);
-		return g;
+		return g.properties(properties).beanFilters(beanFilters).pojoSwaps(pojoSwaps);
 	}
 
 	/**
@@ -599,8 +585,8 @@ public abstract class RestServlet extends HttpServlet {
 	 * @return The new encoder group associated with this servet.
 	 * @throws RestServletException
 	 */
-	protected EncoderGroup createEncoders(ObjectMap properties) throws RestServletException
{
-		EncoderGroup g = new EncoderGroup().append(IdentityEncoder.INSTANCE);
+	protected EncoderGroupBuilder createEncoders(ObjectMap properties) throws RestServletException
{
+		EncoderGroupBuilder g = new EncoderGroupBuilder().append(IdentityEncoder.INSTANCE);
 
 		// Encoders are loaded in parent-to-child order to allow overrides.
 		for (RestResource r : restResourceAnnotationsParentFirst.values())
@@ -1831,12 +1817,13 @@ public abstract class RestServlet extends HttpServlet {
 	 * <p>
 	 * The default implementation uses the path defined by the {@link RestResource#config()
@RestResource.config()} property resolved
 	 * 	by {@link ConfigMgr#DEFAULT}.
+	 * @param vrb
 	 *
 	 * @return The config file for this servlet.
 	 * @throws IOException
 	 */
-	protected ConfigFile createConfigFile() throws IOException {
-		String cf = varResolver.resolve(configPath);
+	protected ConfigFile createConfigFile(VarResolverBuilder vrb) throws IOException {
+		String cf = vrb.build().resolve(configPath);
 		if (cf.isEmpty())
 			return getConfigMgr().create();
 		return getConfigMgr().get(cf);
@@ -1925,7 +1912,7 @@ public abstract class RestServlet extends HttpServlet {
 	}
 
 	/**
-	 * Returns the config manager used to create the config file in {@link #createConfigFile()}.
+	 * Returns the config manager used to create the config file in {@link #createConfigFile(VarResolverBuilder)}.
 	 * <p>
 	 * The default implementation return {@link ConfigMgr#DEFAULT}, but subclasses can override
 	 * 	this if they want to provide their own customized config manager.
@@ -2147,10 +2134,20 @@ public abstract class RestServlet extends HttpServlet {
 				ArrayList<Inherit> si = new ArrayList<Inherit>(Arrays.asList(m.serializersInherit()));
 				ArrayList<Inherit> pi = new ArrayList<Inherit>(Arrays.asList(m.parsersInherit()));
 
+				SerializerGroupBuilder sgb = null;
+				ParserGroupBuilder pgb = null;
+				UrlEncodingParserBuilder uepb = null;
+
 				if (m.serializers().length > 0 || m.parsers().length > 0 || m.properties().length
> 0 || m.beanFilters().length > 0 || m.pojoSwaps().length > 0) {
-					mSerializers = (si.contains(SERIALIZERS) || m.serializers().length == 0 ? mSerializers.clone()
: new SerializerGroup());
-					mParsers = (pi.contains(PARSERS) || m.parsers().length == 0 ? mParsers.clone() : new
ParserGroup());
-					mUrlEncodingParser = mUrlEncodingParser.clone();
+					sgb = new SerializerGroupBuilder();
+					pgb = new ParserGroupBuilder();
+					uepb = new UrlEncodingParserBuilder(mUrlEncodingParser.createPropertyStore());
+
+					if (si.contains(SERIALIZERS) || m.serializers().length == 0)
+						sgb.append(mSerializers.getSerializers());
+
+					if (pi.contains(PARSERS) || m.parsers().length == 0)
+						pgb.append(mParsers.getParsers());
 				}
 
 				httpMethod = m.name().toUpperCase(Locale.ENGLISH);
@@ -2191,47 +2188,46 @@ public abstract class RestServlet extends HttpServlet {
 				this.requiredMatchers = requiredMatchers.toArray(new RestMatcher[requiredMatchers.size()]);
 				this.optionalMatchers = optionalMatchers.toArray(new RestMatcher[optionalMatchers.size()]);
 
-				if (m.serializers().length > 0) {
-					mSerializers.append(m.serializers());
+				if (sgb != null) {
+					sgb.append(m.serializers());
 					if (si.contains(TRANSFORMS))
-						mSerializers.addBeanFilters(getBeanFilters()).addPojoSwaps(getPojoSwaps());
+						sgb.beanFilters(getBeanFilters()).pojoSwaps(getPojoSwaps());
 					if (si.contains(PROPERTIES))
-						mSerializers.setProperties(getProperties());
+						sgb.properties(getProperties());
+					for (Property p1 : m.properties())
+						sgb.property(p1.name(), p1.value());
+					sgb.beanFilters(m.beanFilters());
+					sgb.pojoSwaps(m.pojoSwaps());
 				}
 
-				if (m.parsers().length > 0) {
-					mParsers.append(m.parsers());
+				if (pgb != null) {
+					pgb.append(m.parsers());
 					if (pi.contains(TRANSFORMS))
-						mParsers.addBeanFilters(getBeanFilters()).addPojoSwaps(getPojoSwaps());
+						pgb.beanFilters(getBeanFilters()).pojoSwaps(getPojoSwaps());
 					if (pi.contains(PROPERTIES))
-						mParsers.setProperties(getProperties());
+						pgb.properties(getProperties());
+					for (Property p1 : m.properties())
+						pgb.property(p1.name(), p1.value());
+					pgb.beanFilters(m.beanFilters());
+					pgb.pojoSwaps(m.pojoSwaps());
+				}
+
+				if (uepb != null) {
+					for (Property p1 : m.properties())
+						uepb.property(p1.name(), p1.value());
+					uepb.beanFilters(m.beanFilters());
+					uepb.pojoSwaps(m.pojoSwaps());
 				}
 
 				if (m.properties().length > 0) {
 					mProperties = new ObjectMap().setInner(getProperties());
 					for (Property p1 : m.properties()) {
-						String n = p1.name(), v = p1.value();
-						mProperties.put(n, v);
-						mSerializers.setProperty(n, v);
-						mParsers.setProperty(n, v);
-						mUrlEncodingParser.setProperty(n, v);
+						mProperties.put(p1.name(), p1.value());
 					}
 				}
 
-				if (m.beanFilters().length > 0) {
-					mSerializers.addBeanFilters(m.beanFilters());
-					mParsers.addBeanFilters(m.beanFilters());
-					mUrlEncodingParser.addBeanFilters(m.beanFilters());
-				}
-
-				if (m.pojoSwaps().length > 0) {
-					mSerializers.addPojoSwaps(m.pojoSwaps());
-					mParsers.addPojoSwaps(m.pojoSwaps());
-					mUrlEncodingParser.addPojoSwaps(m.pojoSwaps());
-				}
-
 				if (m.encoders().length > 0 || ! m.inheritEncoders()) {
-					EncoderGroup g = new EncoderGroup();
+					EncoderGroupBuilder g = new EncoderGroupBuilder();
 					if (m.inheritEncoders())
 						g.append(mEncoders);
 					else
@@ -2244,7 +2240,7 @@ public abstract class RestServlet extends HttpServlet {
 							throw new RestServletException("Exception occurred while trying to instantiate Encoder
''{0}''", c.getSimpleName()).initCause(e);
 						}
 					}
-					mEncoders = g;
+					mEncoders = g.build();
 				}
 
 				mDefaultRequestHeaders = new TreeMap<String,String>(String.CASE_INSENSITIVE_ORDER);
@@ -2274,9 +2270,12 @@ public abstract class RestServlet extends HttpServlet {
 					}
 				}
 
-				mSerializers.lock();
-				mParsers.lock();
-				mUrlEncodingParser.lock();
+				if (sgb != null)
+					mSerializers = sgb.build();
+				if (pgb != null)
+					mParsers = pgb.build();
+				if (uepb != null)
+					mUrlEncodingParser = uepb.build();
 
 				// Need this to access methods in anonymous inner classes.
 				method.setAccessible(true);
@@ -2881,9 +2880,9 @@ public abstract class RestServlet extends HttpServlet {
 	 *
 	 * @return The reusable variable resolver for this servlet.
 	 */
-	protected VarResolver createVarResolver() {
-		return new VarResolver()
-			.addVars(
+	protected VarResolverBuilder createVarResolver() {
+		return new VarResolverBuilder()
+			.vars(
 				SystemPropertiesVar.class,
 				EnvVariablesVar.class,
 				ConfigFileVar.class,

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/95e832e1/juneau-rest/src/main/java/org/apache/juneau/rest/RestServletContext.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestServletContext.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestServletContext.java
index 1ea0340..f01c339 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestServletContext.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestServletContext.java
@@ -30,7 +30,7 @@ import org.apache.juneau.serializer.*;
  * Some of these properties are only applicable on the servlet class, and others can be specified
on the servlet class or method.<br>
  * These distinctions are noted below.
  * <p>
- * See {@link ContextFactory} for more information about context properties.
+ * See {@link PropertyStore} for more information about context properties.
  */
 public final class RestServletContext extends Context {
 
@@ -282,21 +282,21 @@ public final class RestServletContext extends Context {
 	/**
 	 * Constructor.
 	 * <p>
-	 * Typically only called from {@link ContextFactory#getContext(Class)}.
+	 * Typically only called from {@link PropertyStore#getContext(Class)}.
 	 *
-	 * @param cf The factory that created this context.
+	 * @param ps The property store that created this context.
 	 */
-	public RestServletContext(ContextFactory cf) {
-		super(cf);
-		allowHeaderParams = cf.getProperty(REST_allowHeaderParams, boolean.class, true);
-		allowBodyParam = cf.getProperty(REST_allowBodyParam, boolean.class, true);
-		renderResponseStackTraces = cf.getProperty(REST_renderResponseStackTraces, boolean.class,
false);
-		useStackTraceHashes = cf.getProperty(REST_useStackTraceHashes, boolean.class, true);
-		defaultCharset = cf.getProperty(REST_defaultCharset, String.class, "utf-8");
-		paramFormat = cf.getProperty(REST_paramFormat, String.class, "");
+	public RestServletContext(PropertyStore ps) {
+		super(ps);
+		allowHeaderParams = ps.getProperty(REST_allowHeaderParams, boolean.class, true);
+		allowBodyParam = ps.getProperty(REST_allowBodyParam, boolean.class, true);
+		renderResponseStackTraces = ps.getProperty(REST_renderResponseStackTraces, boolean.class,
false);
+		useStackTraceHashes = ps.getProperty(REST_useStackTraceHashes, boolean.class, true);
+		defaultCharset = ps.getProperty(REST_defaultCharset, String.class, "utf-8");
+		paramFormat = ps.getProperty(REST_paramFormat, String.class, "");
 
 		Set<String> s = new LinkedHashSet<String>();
-		for (String m : StringUtils.split(cf.getProperty(REST_allowMethodParam, String.class, ""),
','))
+		for (String m : StringUtils.split(ps.getProperty(REST_allowMethodParam, String.class, ""),
','))
 			if (m.equals("true"))  // For backwards compatibility when this was a boolean field.
 				s.add("*");
 			else

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/95e832e1/juneau-rest/src/main/java/org/apache/juneau/rest/RestServletDefault.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestServletDefault.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestServletDefault.java
index 2ad34af..8af7efe 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestServletDefault.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestServletDefault.java
@@ -23,6 +23,7 @@ import org.apache.juneau.msgpack.*;
 import org.apache.juneau.plaintext.*;
 import org.apache.juneau.rest.annotation.*;
 import org.apache.juneau.soap.*;
+import org.apache.juneau.uon.*;
 import org.apache.juneau.urlencoding.*;
 import org.apache.juneau.xml.*;
 
@@ -95,7 +96,7 @@ import org.apache.juneau.xml.*;
  * 	<tr>
  * 		<td class='code'>application/x-java-serialized-object</td>
  * 		<td class='code'>application/x-java-serialized-object</td>
- * 		<td>{@link JavaSerializedObjectSerializer}</td>
+ * 		<td>{@link JsoSerializer}</td>
  * 	</tr>
  * </table>
  * <p>
@@ -132,7 +133,7 @@ import org.apache.juneau.xml.*;
  * 	</tr>
  * </table>
  * <p>
- * It should be noted that we do NOT add {@link JavaSerializedObjectParser} to the list of
parsers since this could
+ * It should be noted that we do NOT add {@link JsoParser} to the list of parsers since this
could
  * 	cause security issues.  Use caution when using this particular parser as it could inadvertantly
cause
  * 	code execution security holes.
  * <p>
@@ -168,7 +169,7 @@ import org.apache.juneau.xml.*;
 		MsgPackSerializer.class,
 		SoapXmlSerializer.class,
 		PlainTextSerializer.class,
-		JavaSerializedObjectSerializer.class
+		JsoSerializer.class
 	},
 	parsers={
 		JsonParser.class,

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/95e832e1/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestResource.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestResource.java
b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestResource.java
index 3889b84..13adbc2 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestResource.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/RestResource.java
@@ -593,4 +593,9 @@ public @interface RestResource {
 	 * If not specified, uses <js>"X-Client-Version"</js>.
 	 */
 	String clientVersionHeader() default "";
+
+	/**
+	 * TODO
+	 */
+	String[] links() default "";
 }

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/95e832e1/juneau-rest/src/main/java/org/apache/juneau/rest/jena/RestServletJenaDefault.java
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/jena/RestServletJenaDefault.java
b/juneau-rest/src/main/java/org/apache/juneau/rest/jena/RestServletJenaDefault.java
index 76c7a66..fdfd0bb 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/jena/RestServletJenaDefault.java
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/jena/RestServletJenaDefault.java
@@ -25,6 +25,7 @@ import org.apache.juneau.plaintext.*;
 import org.apache.juneau.rest.*;
 import org.apache.juneau.rest.annotation.*;
 import org.apache.juneau.soap.*;
+import org.apache.juneau.uon.*;
 import org.apache.juneau.urlencoding.*;
 import org.apache.juneau.xml.*;
 
@@ -105,7 +106,7 @@ import org.apache.juneau.xml.*;
  * 	<tr>
  * 		<td class='code'>application/x-java-serialized-object</td>
  * 		<td class='code'>application/x-java-serialized-object</td>
- * 		<td>{@link JavaSerializedObjectSerializer}</td>
+ * 		<td>{@link JsoSerializer}</td>
  * 	</tr>
  * 	<tr>
  * 		<td class='code'>text/xml+rdf</td>
@@ -195,13 +196,12 @@ import org.apache.juneau.xml.*;
 		JsonSerializer.Simple.class,
 		JsonSchemaSerializer.class,
 		XmlDocSerializer.class,
-		XmlDocSerializer.Simple.class,
 		XmlSchemaDocSerializer.class,
 		UonSerializer.class,
 		UrlEncodingSerializer.class,
 		MsgPackSerializer.class,
 		SoapXmlSerializer.class,
-		JavaSerializedObjectSerializer.class,
+		JsoSerializer.class,
 		PlainTextSerializer.class,
 		RdfSerializer.Xml.class,
 		RdfSerializer.XmlAbbrev.class,

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/95e832e1/juneau-rest/src/main/java/org/apache/juneau/rest/package.html
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/package.html b/juneau-rest/src/main/java/org/apache/juneau/rest/package.html
index 27fc8a5..da2ff80 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/package.html
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/package.html
@@ -442,7 +442,7 @@
 		<tr>
 			<td class='code'>text/uon</td>
 			<td class='code'>text/uon</td>
-			<td>{@link org.apache.juneau.urlencoding.UonSerializer}</td>
+			<td>{@link org.apache.juneau.uon.UonSerializer}</td>
 		</tr>
 		<tr>
 			<td class='code'>application/x-www-form-urlencoded</td>
@@ -462,7 +462,7 @@
 		<tr>
 			<td class='code'>application/x-java-serialized-object</td>
 			<td class='code'>application/x-java-serialized-object</td>
-			<td>{@link org.apache.juneau.jso.JavaSerializedObjectSerializer}</td>
+			<td>{@link org.apache.juneau.jso.JsoSerializer}</td>
 		</tr>
 	</table>
 	<h6 class='figure'>Valid Content-Type headers for RestServletDefault</h6>
@@ -485,7 +485,7 @@
 		</tr>
 		<tr>
 			<td class='code'>text/uon</td>
-			<td>{@link org.apache.juneau.urlencoding.UonParser}</td>
+			<td>{@link org.apache.juneau.uon.UonParser}</td>
 		</tr>
 		<tr>
 			<td class='code'>application/x-www-form-urlencoded</td>
@@ -1321,12 +1321,10 @@
 
 	<jc>// Example #3 - Serializers defined on servlet by overriding the createSerializers(ObjectMap,Class[],Class[])
method</jc>
 	<ja>@Override</ja>
-	<jk>public</jk> SerializerGroup createSerializers(ObjectMap,Class[],Class[])
{
+	<jk>public</jk> SerializerGroupBuilder createSerializers(ObjectMap,Class[],Class[])
{
 
- 		SerializerGroup g = <jk>new</jk> SerializerGroup()
+ 		<jk>return new</jk> SerializerGroupBuilder()
  			.append(JsonSerializer.<jk>class</jk>, XmlSerializer.<jk>class</jk>);
-
-		<jk>return</jk> g;
 	}
 		</p>
 		<p class='info'>
@@ -1382,12 +1380,10 @@
 	
 		<jc>// Example #3 - Parsers defined on servlet by overriding the getParserGroup method</jc>
 		<ja>@Override</ja>
-		<jk>public</jk> ParserGroup getParserGroup() {
+		<jk>public</jk> ParserGroupBuilder getParserGroup() {
 	
-	 		ParserGroup g = <jk>new</jk> ParserGroup()
+	 		<jk>return new</jk> ParserGroupBuilder()
 				.append(JsonParser.<jk>class</jk>, XmlParser.<jk>class</jk>);
-	
-	 		<jk>return</jk> g;
 	 	}
 		</p>
 		<h6 class='topic'>Additional Information</h6>

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/95e832e1/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/package.html
----------------------------------------------------------------------
diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/package.html b/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/package.html
index b6a9d7f..239ae95 100644
--- a/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/package.html
+++ b/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/package.html
@@ -78,7 +78,7 @@
 	</p>
 	<p>
 		Proxy interfaces are retrieved using the {@link org.apache.juneau.rest.client.RestClient#getRemoteableProxy(Class)}
method.
-		The {@link org.apache.juneau.rest.client.RestClient#setRemoteableServletUri(String)} method
is used to specify the location
+		The {@link org.apache.juneau.rest.client.RestClientBuilder#remoteableServletUri(String)}
method is used to specify the location
 			of the remoteable services servlet running on the server.
 		The remoteable servlet is a specialized subclass of {@link org.apache.juneau.rest.RestServlet}
that provides a full-blown
 			REST interface for calling remoteable services (e.g. POJOs) remotely. 
@@ -99,8 +99,9 @@
 	</p>
 	<p class='bcode'>
 	<jc>// Create a RestClient using JSON for serialization, and point to the server-side
remoteable servlet.</jc>
-	RestClient client = <jk>new</jk> RestClient(JsonSerializer.<jk>class</jk>,JsonParser.<jk>class</jk>)
-		.setRemoteableServletUri(<js>"https://localhost:9080/juneau/sample/remoteable"</js>);
+	RestClient client = <jk>new</jk> RestClientBuilder()
+		.remoteableServletUri(<js>"https://localhost:9080/juneau/sample/remoteable"</js>)
+		.build();
 	
 	<jc>// Create a proxy interface.</jc>
 	IAddressBook ab = client.getRemoteableProxy(IAddressBook.<jk>class</jk>);
@@ -300,7 +301,7 @@
 	<img class='bordered' src="doc-files/6.png">
 	<p>
 		When specifying the POST body as a <code>&amp;content</code> parameter,
the method arguments should be in UON notation.
-		See {@link org.apache.juneau.urlencoding.UonSerializer} for more information about this
encoding.
+		See {@link org.apache.juneau.uon.UonSerializer} for more information about this encoding.
 		Usually you can also pass in JSON if you specify <code>&amp;Content-Type=text/json</code>
in the URL parameters
 			but passing in unencoded JSON in a URL may not work in all browsers.  Therefore, UON is
preferred.
 	</p>


Mime
View raw message