http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerSession.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerSession.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerSession.java index 8e20a3e..ac330a1 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerSession.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerSession.java @@ -26,8 +26,10 @@ import org.apache.juneau.serializer.*; /** * Context object that lives for the duration of a single serialization of {@link HtmlSerializer} and its subclasses. + * * <p> * See {@link SerializerContext} for details. + * * <p> * This class is NOT thread safe. It is meant to be discarded after one-time use. */ @@ -42,18 +44,25 @@ public final class HtmlDocSerializerSession extends HtmlSerializerSession { /** * Create a new session using properties specified in the context. * - * @param ctx The context creating this session object. + * @param ctx + * The context creating this session object. * The context contains all the configuration settings for this object. - * @param output The output object. See {@link JsonSerializerSession#getWriter()} for valid class types. - * @param op The override properties. + * @param output + * The output object. + * See {@link JsonSerializerSession#getWriter()} for valid class types. + * @param op + * The override properties. * These override any context properties defined in the context. * @param javaMethod The java method that called this serializer, usually the method in a REST servlet. - * @param locale The session locale. + * @param locale + * The session locale. * If <jk>null</jk>, then the locale defined on the context is used. - * @param timeZone The session timezone. + * @param timeZone + * The session timezone. * If <jk>null</jk>, then the timezone defined on the context is used. * @param mediaType The session media type (e.g. <js>"application/json"</js>). - * @param uriContext The URI context. + * @param uriContext + * The URI context. * Identifies the current request URI used for resolution of URIs to absolute or root-relative form. */ @SuppressWarnings({ "unchecked", "rawtypes" }) @@ -95,8 +104,10 @@ public final class HtmlDocSerializerSession extends HtmlSerializerSession { /** * Returns the {@link HtmlDocSerializerContext#HTMLDOC_cssUrl} setting value in this context. * - * @return The {@link HtmlDocSerializerContext#HTMLDOC_cssUrl} setting value in this context. - * <jk>null</jk> if not specified. Never an empty string. + * @return + * The {@link HtmlDocSerializerContext#HTMLDOC_cssUrl} setting value in this context. + * <jk>null</jk> if not specified. + * Never an empty string. */ public final String getCssUrl() { return cssUrl; @@ -105,7 +116,8 @@ public final class HtmlDocSerializerSession extends HtmlSerializerSession { /** * Returns the {@link HtmlDocSerializerContext#HTMLDOC_css} setting value in this context. * - * @return The {@link HtmlDocSerializerContext#HTMLDOC_css} setting value in this context. + * @return + * The {@link HtmlDocSerializerContext#HTMLDOC_css} setting value in this context. * <jk>null</jk> if not specified. Never an empty array. */ public final String[] getCss() { @@ -124,8 +136,9 @@ public final class HtmlDocSerializerSession extends HtmlSerializerSession { /** * Returns the {@link HtmlDocSerializerContext#HTMLDOC_title} setting value in this context. * - * @return The {@link HtmlDocSerializerContext#HTMLDOC_title} setting value in this context. - * <jk>null</jk> if not specified. Never an empty string. + * @return + * The {@link HtmlDocSerializerContext#HTMLDOC_title} setting value in this context. + * <jk>null</jk> if not specified. Never an empty string. */ public final String getTitle() { return title; @@ -134,8 +147,10 @@ public final class HtmlDocSerializerSession extends HtmlSerializerSession { /** * Returns the {@link HtmlDocSerializerContext#HTMLDOC_description} setting value in this context. * - * @return The {@link HtmlDocSerializerContext#HTMLDOC_description} setting value in this context. - * <jk>null</jk> if not specified. Never an empty string. + * @return + * The {@link HtmlDocSerializerContext#HTMLDOC_description} setting value in this context. + * <jk>null</jk> if not specified. + * Never an empty string. */ public final String getDescription() { return description; @@ -144,8 +159,10 @@ public final class HtmlDocSerializerSession extends HtmlSerializerSession { /** * Returns the {@link HtmlDocSerializerContext#HTMLDOC_branding} setting value in this context. * - * @return The {@link HtmlDocSerializerContext#HTMLDOC_branding} setting value in this context. - * <jk>null</jk> if not specified. Never an empty string. + * @return + * The {@link HtmlDocSerializerContext#HTMLDOC_branding} setting value in this context. + * <jk>null</jk> if not specified. + * Never an empty string. */ public final String getBranding() { return branding; @@ -154,8 +171,10 @@ public final class HtmlDocSerializerSession extends HtmlSerializerSession { /** * Returns the {@link HtmlDocSerializerContext#HTMLDOC_header} setting value in this context. * - * @return The {@link HtmlDocSerializerContext#HTMLDOC_header} setting value in this context. - * <jk>null</jk> if not specified. Never an empty string. + * @return + * The {@link HtmlDocSerializerContext#HTMLDOC_header} setting value in this context. + * <jk>null</jk> if not specified. + * Never an empty string. */ public final String getHeader() { return header; @@ -164,8 +183,10 @@ public final class HtmlDocSerializerSession extends HtmlSerializerSession { /** * Returns the {@link HtmlDocSerializerContext#HTMLDOC_links} setting value in this context. * - * @return The {@link HtmlDocSerializerContext#HTMLDOC_links} setting value in this context. - * <jk>null</jk> if not specified. Never an empty map. + * @return + * The {@link HtmlDocSerializerContext#HTMLDOC_links} setting value in this context. + * <jk>null</jk> if not specified. + * Never an empty map. */ public final Map<String,Object> getLinks() { return links; @@ -174,8 +195,9 @@ public final class HtmlDocSerializerSession extends HtmlSerializerSession { /** * Returns the template to use for generating the HTML page. * - * @return The HTML page generator. - * Never <jk>null</jk>. + * @return + * The HTML page generator. + * Never <jk>null</jk>. */ public final HtmlDocTemplate getTemplate() { return template; @@ -184,8 +206,10 @@ public final class HtmlDocSerializerSession extends HtmlSerializerSession { /** * Returns the {@link HtmlDocSerializerContext#HTMLDOC_nav} setting value in this context. * - * @return The {@link HtmlDocSerializerContext#HTMLDOC_nav} setting value in this context. - * <jk>null</jk> if not specified. Never an empty string. + * @return + * The {@link HtmlDocSerializerContext#HTMLDOC_nav} setting value in this context. + * <jk>null</jk> if not specified. + * Never an empty string. */ public final String getNav() { return nav; @@ -194,8 +218,10 @@ public final class HtmlDocSerializerSession extends HtmlSerializerSession { /** * Returns the {@link HtmlDocSerializerContext#HTMLDOC_aside} setting value in this context. * - * @return The {@link HtmlDocSerializerContext#HTMLDOC_aside} setting value in this context. - * <jk>null</jk> if not specified. Never an empty string. + * @return + * The {@link HtmlDocSerializerContext#HTMLDOC_aside} setting value in this context. + * <jk>null</jk> if not specified. + * Never an empty string. */ public final String getAside() { return aside; @@ -204,8 +230,10 @@ public final class HtmlDocSerializerSession extends HtmlSerializerSession { /** * Returns the {@link HtmlDocSerializerContext#HTMLDOC_footer} setting value in this context. * - * @return The {@link HtmlDocSerializerContext#HTMLDOC_footer} setting value in this context. - * <jk>null</jk> if not specified. Never an empty string. + * @return + * The {@link HtmlDocSerializerContext#HTMLDOC_footer} setting value in this context. + * <jk>null</jk> if not specified. + * Never an empty string. */ public final String getFooter() { return footer; @@ -214,8 +242,10 @@ public final class HtmlDocSerializerSession extends HtmlSerializerSession { /** * Returns the {@link HtmlDocSerializerContext#HTMLDOC_noResultsMessage} setting value in this context. * - * @return The {@link HtmlDocSerializerContext#HTMLDOC_noResultsMessage} setting value in this context. - * <jk>null</jk> if not specified. Never an empty string. + * @return + * The {@link HtmlDocSerializerContext#HTMLDOC_noResultsMessage} setting value in this context. + * <jk>null</jk> if not specified. + * Never an empty string. */ public final String getNoResultsMessage() { return noResultsMessage;
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplate.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplate.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplate.java index 2e743f6..cc8b2b8 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplate.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplate.java @@ -15,6 +15,7 @@ package org.apache.juneau.html; /** * Defines the interface for rendering the contents of an HTML page produced by the {@link HtmlDocSerializer} * serializer. + * * <p> * The HTML doc serializer produces the following document structure with the typical contents: * <p class='bcode'> @@ -45,6 +46,7 @@ package org.apache.juneau.html; * </body> * </html></xt> * </p> + * * <p> * This interface allows you to control how these sections get rendered. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplateBasic.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplateBasic.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplateBasic.java index 99a9688..3360770 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplateBasic.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplateBasic.java @@ -18,6 +18,7 @@ import org.apache.juneau.internal.*; /** * A basic template for the HTML doc serializer. + * * <p> * This class can be subclassed to customize page rendering. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/html/HtmlLink.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlLink.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlLink.java index 5748815..39fba6f 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlLink.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlLink.java @@ -19,10 +19,13 @@ import java.lang.annotation.*; /** * Used in conjunction with the {@link HtmlSerializer} class to define hyperlinks. + * * <p> * This annotation is applied to classes. + * * <p> * Annotation that can be used to specify that a class has a URL associated with it. + * * <p> * When rendered using the {@link org.apache.juneau.html.HtmlSerializer HtmlSerializer} class, this class will get * rendered as a hyperlink like so... http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java index b28e73b..093c411 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java @@ -514,7 +514,7 @@ public class HtmlParser extends XmlParser { + JsonSerializer.DEFAULT.toString(expected), r.getLocation()); } - /** + /* * Skips over the current element and advances to the next element. * <p> * Precondition: Pointing to opening tag. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserBuilder.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserBuilder.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserBuilder.java index 7418e1b..b5e11dc 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserBuilder.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserBuilder.java @@ -36,6 +36,7 @@ public class HtmlParserBuilder extends XmlParserBuilder { /** * Constructor. + * * @param propertyStore The initial configuration settings for this builder. */ public HtmlParserBuilder(PropertyStore propertyStore) { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserContext.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserContext.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserContext.java index 5541aba..e1abc7f 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserContext.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserContext.java @@ -17,9 +17,11 @@ import org.apache.juneau.xml.*; /** * Configurable properties on the {@link HtmlParser} class. + * * <p> * Context properties are set by calling {@link PropertyStore#setProperty(String, Object)} on the property store * passed into the constructor. + * * <p> * See {@link PropertyStore} for more information about context properties. * @@ -40,6 +42,7 @@ public final class HtmlParserContext extends XmlParserContext { /** * Constructor. + * * <p> * Typically only called from {@link PropertyStore#getContext(Class)}. * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserSession.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserSession.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserSession.java index 5e7881f..21ccd9a 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserSession.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserSession.java @@ -28,6 +28,7 @@ import org.apache.juneau.xml.*; /** * Session object that lives for the duration of a single use of {@link HtmlParser}. + * * <p> * This class is NOT thread safe. It is meant to be discarded after one-time use. */ @@ -42,9 +43,11 @@ public final class HtmlParserSession extends XmlParserSession { /** * Create a new session using properties specified in the context. * - * @param ctx The context creating this session object. - * The context contains all the configuration settings for this object. - * @param input The input. Can be any of the following types: + * @param ctx + * The context creating this session object. + * The context contains all the configuration settings for this object. + * @param input + * The input. Can be any of the following types: * <ul> * <li><jk>null</jk> * <li>{@link Reader} @@ -52,14 +55,17 @@ public final class HtmlParserSession extends XmlParserSession { * <li>{@link InputStream} containing UTF-8 encoded text. * <li>{@link File} containing system encoded text. * </ul> - * @param op The override properties. - * These override any context properties defined in the context. + * @param op + * The override properties. + * These override any context properties defined in the context. * @param javaMethod The java method that called this parser, usually the method in a REST servlet. * @param outer The outer object for instantiating top-level non-static inner classes. - * @param locale The session locale. - * If <jk>null</jk>, then the locale defined on the context is used. - * @param timeZone The session timezone. - * If <jk>null</jk>, then the timezone defined on the context is used. + * @param locale + * The session locale. + * If <jk>null</jk>, then the locale defined on the context is used. + * @param timeZone + * The session timezone. + * If <jk>null</jk>, then the timezone defined on the context is used. * @param mediaType The session media type (e.g. <js>"application/json"</js>). */ public HtmlParserSession(HtmlParserContext ctx, ObjectMap op, Object input, Method javaMethod, Object outer, @@ -69,6 +75,7 @@ public final class HtmlParserSession extends XmlParserSession { /** * Parses CHARACTERS data. + * * <p> * Precondition: Pointing to event immediately following opening tag. * Postcondition: Pointing to closing tag. @@ -158,8 +165,8 @@ public final class HtmlParserSession extends XmlParserSession { } /** - * Identical to {@link #parseText(XMLStreamReader)} except assumes the current event - * is the opening tag. + * Identical to {@link #parseText(XMLStreamReader)} except assumes the current event is the opening tag. + * * <p> * Precondition: Pointing to opening tag. * Postcondition: Pointing to closing tag. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/html/HtmlRender.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlRender.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlRender.java index b3dba1b..90e9898 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlRender.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlRender.java @@ -17,18 +17,21 @@ import org.apache.juneau.serializer.*; /** * Allows custom rendering of bean property values when serialized as HTML. + * * <p> * Associated with bean properties using the {@link Html#render() @Html.render()} annotation. + * * <p> * Using this class, you can alter the CSS style and HTML content of the bean property. + * * <p> * The following example shows two render classes that customize the appearance of the <code>pctFull</code> and - * <code>status</code> columns shown below: + * <code>status</code> columns shown below: + * * <p> * <img class='bordered' src='doc-files/HtmlRender_1.png'> * * <p class='bcode'> - * * <jc>// Our bean class</jc> * <jk>public class</jk> FileSpace { * @@ -116,6 +119,7 @@ import org.apache.juneau.serializer.*; * } * } * </p> + * * @param <T> The bean property type. */ public abstract class HtmlRender<T> { @@ -123,7 +127,8 @@ public abstract class HtmlRender<T> { /** * Returns the CSS style of the element containing the bean property value. * - * @param session The current serializer session. + * @param session + * The current serializer session. * Can be used to retrieve properties and session-level information. * @param value The bean property value. * @return The CSS style string, or <jk>null</jk> if no style should be added. @@ -134,11 +139,13 @@ public abstract class HtmlRender<T> { /** * Returns the delegate value for the specified bean property value. + * * <p> * The default implementation simply returns the same value. * A typical use is to return an HTML element using one of the HTML5 DOM beans. * - * @param session The current serializer session. + * @param session + * The current serializer session. * Can be used to retrieve properties and session-level information. * @param value The bean property value. * @return The new bean property value. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java index 7420331..d4fcdd6 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java @@ -30,14 +30,17 @@ import org.apache.juneau.transform.*; * <h5 class='section'>Media types:</h5> * <p> * Handles <code>Accept</code> types: <code>text/html+schema</code> + * * <p> * Produces <code>Content-Type</code> types: <code>text/html</code> * * <h5 class='section'>Description:</h5> * <p> * Essentially the same as {@link HtmlSerializer}, except serializes the POJO metamodel instead of the model itself. + * * <p> * Produces output that describes the POJO metamodel similar to an XML schema document. + * * <p> * The easiest way to create instances of this class is through the {@link HtmlSerializer#getSchemaSerializer()}, * which will create a schema serializer with the same settings as the originating serializer. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializer.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializer.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializer.java index 022fdab..22805bd 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializer.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializer.java @@ -34,28 +34,31 @@ import org.apache.juneau.xml.annotation.*; * <h5 class='section'>Media types:</h5> * <p> * Handles <code>Accept</code> types: <code>text/html</code> + * * <p> * Produces <code>Content-Type</code> types: <code>text/html</code> * * <h5 class='section'>Description:</h5> * <p> * The conversion is as follows... - * <ul class='spaced-list'> - * <li> - * {@link Map Maps} (e.g. {@link HashMap}, {@link TreeMap}) and beans are converted to HTML tables with - * 'key' and 'value' columns. - * <li> - * {@link Collection Collections} (e.g. {@link HashSet}, {@link LinkedList}) and Java arrays are converted - * to HTML ordered lists. - * <li> - * {@code Collections} of {@code Maps} and beans are converted to HTML tables with keys as headers. - * <li> - * Everything else is converted to text. - * </ul> + * <ul class='spaced-list'> + * <li> + * {@link Map Maps} (e.g. {@link HashMap}, {@link TreeMap}) and beans are converted to HTML tables with + * 'key' and 'value' columns. + * <li> + * {@link Collection Collections} (e.g. {@link HashSet}, {@link LinkedList}) and Java arrays are converted + * to HTML ordered lists. + * <li> + * {@code Collections} of {@code Maps} and beans are converted to HTML tables with keys as headers. + * <li> + * Everything else is converted to text. + * </ul> + * * <p> * This serializer provides several serialization options. Typically, one of the predefined <jsf>DEFAULT</jsf> * serializers will be sufficient. * However, custom serializers can be constructed to fine-tune behavior. + * * <p> * The {@link HtmlLink} annotation can be used on beans to add hyperlinks to the output. * @@ -228,8 +231,9 @@ public class HtmlSerializer extends XmlSerializer { * @param out The writer. * @param o The object to serialize. * @param eType The expected type of the object if this is a bean property. - * @param name The attribute name of this object if this object was a field in a JSON object (i.e. key of a - * {@link java.util.Map.Entry} or property name of a bean). + * @param name + * The attribute name of this object if this object was a field in a JSON object (i.e. key of a + * {@link java.util.Map.Entry} or property name of a bean). * @param indent The current indentation value. * @param pMeta The bean property being serialized, or <jk>null</jk> if we're not serializing a bean property. * @param isRoot <jk>true</jk> if this is the root element of the document. @@ -773,6 +777,7 @@ public class HtmlSerializer extends XmlSerializer { /** * Returns the schema serializer based on the settings of this serializer. + * * @return The schema serializer. */ @Override /* XmlSerializer */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerBuilder.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerBuilder.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerBuilder.java index c6cb528..0633abd 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerBuilder.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerBuilder.java @@ -54,6 +54,7 @@ public class HtmlSerializerBuilder extends XmlSerializerBuilder { /** * <b>Configuration property:</b> Anchor text source. + * * <p> * <ul> * <li><b>Name:</b> <js>"HtmlSerializer.uriAnchorText"</js> @@ -61,9 +62,11 @@ public class HtmlSerializerBuilder extends XmlSerializerBuilder { * <li><b>Default:</b> <js>"toString"</js> * <li><b>Session-overridable:</b> <jk>true</jk> * </ul> + * * <p> * When creating anchor tags (e.g. <code><xt><a</xt> <xa>href</xa>=<xs>'...'</xs><xt>></xt>text<xt></a></xt></code>) * in HTML, this setting defines what to set the inner text to. + * * <p> * Possible values: * <ul class='spaced-list'> @@ -97,6 +100,7 @@ public class HtmlSerializerBuilder extends XmlSerializerBuilder { /** * <b>Configuration property:</b> Look for URLs in {@link String Strings}. + * * <p> * <ul> * <li><b>Name:</b> <js>"HtmlSerializer.detectLinksInStrings"</js> @@ -104,9 +108,10 @@ public class HtmlSerializerBuilder extends XmlSerializerBuilder { * <li><b>Default:</b> <jk>true</jk> * <li><b>Session-overridable:</b> <jk>true</jk> * </ul> + * * <p> * If a string looks like a URL (e.g. starts with <js>"http://"</js> or <js>"https://"</js>, then treat it like a URL - * and make it into a hyperlink based on the rules specified by {@link HtmlSerializerContext#HTML_uriAnchorText}. + * and make it into a hyperlink based on the rules specified by {@link HtmlSerializerContext#HTML_uriAnchorText}. * * <h5 class='section'>Notes:</h5> * <ul> @@ -124,6 +129,7 @@ public class HtmlSerializerBuilder extends XmlSerializerBuilder { /** * <b>Configuration property:</b> Look for link labels in the <js>"label"</js> parameter of the URL. + * * <p> * <ul> * <li><b>Name:</b> <js>"HtmlSerializer.lookForLabelParameters"</js> @@ -131,8 +137,10 @@ public class HtmlSerializerBuilder extends XmlSerializerBuilder { * <li><b>Default:</b> <jk>true</jk> * <li><b>Session-overridable:</b> <jk>true</jk> * </ul> + * * <p> * If the URL has a label parameter (e.g. <js>"?label=foobar"</js>), then use that as the anchor text of the link. + * * <p> * The parameter name can be changed via the {@link HtmlSerializerContext#HTML_labelParameter} property. * @@ -151,8 +159,8 @@ public class HtmlSerializerBuilder extends XmlSerializerBuilder { } /** - * <b>Configuration property:</b> The parameter name to use when using - * {@link HtmlSerializerContext#HTML_lookForLabelParameters}. + * <b>Configuration property:</b> The parameter name to use when using {@link HtmlSerializerContext#HTML_lookForLabelParameters}. + * * <p> * <ul> * <li><b>Name:</b> <js>"HtmlSerializer.labelParameter"</js> @@ -177,6 +185,7 @@ public class HtmlSerializerBuilder extends XmlSerializerBuilder { /** * <b>Configuration property:</b> Add key/value headers on bean/map tables. + * * <p> * <ul> * <li><b>Name:</b> <js>"HtmlSerializer.addKeyValueTableHeaders"</js> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerContext.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerContext.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerContext.java index f66b94f..cbead45 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerContext.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerContext.java @@ -18,9 +18,11 @@ import org.apache.juneau.xml.*; /** * Configurable properties on the {@link HtmlSerializer} class. + * * <p> * Context properties are set by calling {@link PropertyStore#setProperty(String, Object)} on the property store * passed into the constructor. + * * <p> * See {@link PropertyStore} for more information about context properties. * @@ -41,6 +43,7 @@ public class HtmlSerializerContext extends XmlSerializerContext { /** * <b>Configuration property:</b> Anchor text source. + * * <p> * <ul> * <li><b>Name:</b> <js>"HtmlSerializer.uriAnchorText"</js> @@ -48,9 +51,11 @@ public class HtmlSerializerContext extends XmlSerializerContext { * <li><b>Default:</b> <js>"toString"</js> * <li><b>Session-overridable:</b> <jk>true</jk> * </ul> + * * <p> * When creating anchor tags (e.g. <code><xt><a</xt> <xa>href</xa>=<xs>'...'</xs> * <xt>></xt>text<xt></a></xt></code>) in HTML, this setting defines what to set the inner text to. + * * <p> * Possible values: * <ul class='spaced-list'> @@ -84,6 +89,7 @@ public class HtmlSerializerContext extends XmlSerializerContext { /** * <b>Configuration property:</b> Look for URLs in {@link String Strings}. + * * <p> * <ul> * <li><b>Name:</b> <js>"HtmlSerializer.detectLinksInStrings"</js> @@ -91,6 +97,7 @@ public class HtmlSerializerContext extends XmlSerializerContext { * <li><b>Default:</b> <jk>true</jk> * <li><b>Session-overridable:</b> <jk>true</jk> * </ul> + * * <p> * If a string looks like a URL (e.g. starts with <js>"http://"</js> or <js>"https://"</js>, then treat it like a URL * and make it into a hyperlink based on the rules specified by {@link #HTML_uriAnchorText}. @@ -99,6 +106,7 @@ public class HtmlSerializerContext extends XmlSerializerContext { /** * <b>Configuration property:</b> Look for link labels in the <js>"label"</js> parameter of the URL. + * * <p> * <ul> * <li><b>Name:</b> <js>"HtmlSerializer.lookForLabelParameters"</js> @@ -106,8 +114,10 @@ public class HtmlSerializerContext extends XmlSerializerContext { * <li><b>Default:</b> <jk>true</jk> * <li><b>Session-overridable:</b> <jk>true</jk> * </ul> + * * <p> * If the URL has a label parameter (e.g. <js>"?label=foobar"</js>), then use that as the anchor text of the link. + * * <p> * The parameter name can be changed via the {@link #HTML_labelParameter} property. */ @@ -115,6 +125,7 @@ public class HtmlSerializerContext extends XmlSerializerContext { /** * <b>Configuration property:</b> The parameter name to use when using {@link #HTML_lookForLabelParameters}. + * * <p> * <ul> * <li><b>Name:</b> <js>"HtmlSerializer.labelParameter"</js> @@ -127,6 +138,7 @@ public class HtmlSerializerContext extends XmlSerializerContext { /** * <b>Configuration property:</b> Add key/value headers on bean/map tables. + * * <p> * <ul> * <li><b>Name:</b> <js>"HtmlSerializer.addKeyValueTableHeaders"</js> @@ -139,6 +151,7 @@ public class HtmlSerializerContext extends XmlSerializerContext { /** * <b>Configuration property:</b> Add <js>"_type"</js> properties when needed. + * * <p> * <ul> * <li><b>Name:</b> <js>"HtmlSerializer.addBeanTypeProperties"</js> @@ -146,12 +159,14 @@ public class HtmlSerializerContext extends XmlSerializerContext { * <li><b>Default:</b> <jk>false</jk> * <li><b>Session-overridable:</b> <jk>true</jk> * </ul> + * * <p> * If <jk>true</jk>, then <js>"_type"</js> properties will be added to beans if their type cannot be inferred * through reflection. * This is used to recreate the correct objects during parsing if the object types cannot be inferred. * For example, when serializing a {@code Map<String,Object>} field, where the bean class cannot be determined * from the value type. + * * <p> * When present, this value overrides the {@link SerializerContext#SERIALIZER_addBeanTypeProperties} setting and is * provided to customize the behavior of specific serializers in a {@link SerializerGroup}. @@ -169,6 +184,7 @@ public class HtmlSerializerContext extends XmlSerializerContext { /** * Constructor. + * * <p> * Typically only called from {@link PropertyStore#getContext(Class)}. * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerSession.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerSession.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerSession.java index 5377a8a..8a4f27f 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerSession.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerSession.java @@ -27,6 +27,7 @@ import org.apache.juneau.xml.*; /** * Session object that lives for the duration of a single use of {@link HtmlSerializer}. + * * <p> * This class is NOT thread safe. It is meant to be discarded after one-time use. */ @@ -50,18 +51,23 @@ public class HtmlSerializerSession extends XmlSerializerSession { /** * Create a new session using properties specified in the context. * - * @param ctx The context creating this session object. + * @param ctx + * The context creating this session object. * The context contains all the configuration settings for this object. * @param output The output object. See {@link JsonSerializerSession#getWriter()} for valid class types. - * @param op The override properties. + * @param op + * The override properties. * These override any context properties defined in the context. * @param javaMethod The java method that called this serializer, usually the method in a REST servlet. - * @param locale The session locale. + * @param locale + * The session locale. * If <jk>null</jk>, then the locale defined on the context is used. - * @param timeZone The session timezone. + * @param timeZone + * The session timezone. * If <jk>null</jk>, then the timezone defined on the context is used. * @param mediaType The session media type (e.g. <js>"application/json"</js>). - * @param uriContext The URI context. + * @param uriContext + * The URI context. * Identifies the current request URI used for resolution of URIs to absolute or root-relative form. */ protected HtmlSerializerSession(HtmlSerializerContext ctx, ObjectMap op, Object output, Method javaMethod, @@ -99,8 +105,9 @@ public class HtmlSerializerSession extends XmlSerializerSession { * Returns <jk>true</jk> if the specified object is a URL. * * @param cm The ClassMeta of the object being serialized. - * @param pMeta The property metadata of the bean property of the object. - * Can be <jk>null</jk> if the object isn't from a bean property. + * @param pMeta + * The property metadata of the bean property of the object. + * Can be <jk>null</jk> if the object isn't from a bean property. * @param o The object. * @return <jk>true</jk> if the specified object is a URL. */ @@ -117,8 +124,9 @@ public class HtmlSerializerSession extends XmlSerializerSession { /** * Returns the anchor text to use for the specified URL object. * - * @param pMeta The property metadata of the bean property of the object. - * Can be <jk>null</jk> if the object isn't from a bean property. + * @param pMeta + * The property metadata of the bean property of the object. + * Can be <jk>null</jk> if the object isn't from a bean property. * @param o The URL object. * @return The anchor text to use for the specified URL object. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/html/HtmlStrippedDocSerializer.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlStrippedDocSerializer.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlStrippedDocSerializer.java index a43f1e7..d73319c 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlStrippedDocSerializer.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlStrippedDocSerializer.java @@ -25,6 +25,7 @@ import org.apache.juneau.serializer.*; * <h5 class='section'>Media types:</h5> * <p> * Handles <code>Accept</code> types: <code>text/html+stripped</code> + * * <p> * Produces <code>Content-Type</code> types: <code>text/html</code> * @@ -39,6 +40,7 @@ public class HtmlStrippedDocSerializer extends HtmlSerializer { /** * Constructor. + * * @param propertyStore The property store containing all the settings for this object. */ public HtmlStrippedDocSerializer(PropertyStore propertyStore) { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/html/annotation/Html.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/annotation/Html.java b/juneau-core/src/main/java/org/apache/juneau/html/annotation/Html.java index 3ada90e..b385ac7 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/annotation/Html.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/annotation/Html.java @@ -20,8 +20,7 @@ import java.lang.annotation.*; import org.apache.juneau.html.*; /** - * Annotation that can be applied to classes, fields, and methods to tweak how - * they are handled by {@link HtmlSerializer}. + * Annotation that can be applied to classes, fields, and methods to tweak how they are handled by {@link HtmlSerializer}. */ @Documented @Target({TYPE,FIELD,METHOD}) @@ -31,12 +30,16 @@ public @interface Html { /** * Treat as XML. + * + * <p> * Useful when creating beans that model HTML elements. */ boolean asXml() default false; /** * Treat as plain text. + * + * <p> * Object is serialized to a String using the <code>toString()</code> method and written directly to output. * Useful when you want to serialize custom HTML. */ @@ -44,18 +47,23 @@ public @interface Html { /** * When <jk>true</jk>, collections of beans should be rendered as trees instead of tables. + * + * <p> * Default is <jk>false</jk>. */ boolean noTables() default false; /** * When <jk>true</jk>, don't add headers to tables. + * + * <p> * Default is <jk>false</jk>. */ boolean noTableHeaders() default false; /** * Associates an {@link HtmlRender} with a bean property for custom HTML rendering of the property. + * * <p> * This annotation applies to bean properties and classes. */ @@ -64,8 +72,10 @@ public @interface Html { /** * Adds a hyperlink to a bean property when rendered as HTML. + * * <p> * The text can contain any bean property values resolved through variables of the form <js>"{property-name}"</js>. + * * <p> * The URLs can be any of the following forms: * <ul> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/Accept.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/Accept.java b/juneau-core/src/main/java/org/apache/juneau/http/Accept.java index 48d6373..4ea7bec 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/Accept.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/Accept.java @@ -21,6 +21,7 @@ import org.apache.juneau.internal.*; /** * Represents a parsed <l>Accept</l> HTTP request header. + * * <p> * Content-Types that are acceptable for the response. * @@ -46,10 +47,12 @@ import org.apache.juneau.internal.*; * accept-params = ";" "q" "=" qvalue *( accept-extension ) * accept-extension = ";" token [ "=" ( token | quoted-string ) ] * </p> + * * <p> * The asterisk "*" character is used to group media types into ranges, with "* /*" indicating all media types and * "type/*" indicating all subtypes of that type. * The media-range MAY include media type parameters that are applicable to that range. + * * <p> * Each media-range MAY be followed by one or more accept-params, beginning with the "q" parameter for indicating a * relative quality factor. @@ -57,6 +60,7 @@ import org.apache.juneau.internal.*; * Quality factors allow the user or user agent to indicate the relative degree of preference for that media-range, * using the qvalue scale from 0 to 1 (section 3.9). * The default value is q=1. + * * <p> * Note: Use of the "q" parameter name to separate media type parameters from Accept extension parameters is due to * historical practice. @@ -64,6 +68,7 @@ import org.apache.juneau.internal.*; * believed to be unlikely given the lack of any "q" parameters in the IANA * media type registry and the rare usage of any media type parameters in Accept. * Future media types are discouraged from registering any parameter named "q". + * * <p> * The example * <p class='bcode'> @@ -72,21 +77,26 @@ import org.apache.juneau.internal.*; * <p> * SHOULD be interpreted as "I prefer audio/basic, but send me any audio type if it is the best available after an 80% * mark-down in quality." + * * <p> * If no Accept header field is present, then it is assumed that the client accepts all media types. + * * <p> * If an Accept header field is present, and if the server cannot send a response which is acceptable according to the * combined Accept field value, then the server SHOULD send a 406 (not acceptable) response. + * * <p> * A more elaborate example is * <p class='bcode'> * Accept: text/plain; q=0.5, text/html, * text/x-dvi; q=0.8, text/x-c * </p> + * * <p> * Verbally, this would be interpreted as "text/html and text/x-c are the preferred media types, but if they do not * exist, then send the * text/x-dvi entity, and if that does not exist, send the text/plain entity." + * * <p> * Media ranges can be overridden by more specific media ranges or specific media types. * If more than one media range applies to a given type, the most specific reference has precedence. @@ -102,6 +112,7 @@ import org.apache.juneau.internal.*; * <li>text/* * <li>* /* * </ol> + * * <p> * The media type quality factor associated with a given type is determined by finding the media range with the highest * precedence which matches that type. @@ -120,6 +131,7 @@ import org.apache.juneau.internal.*; * text/html;level=2 = 0.4 * text/html;level=3 = 0.7 * </p> + * * <p> * Note: A user agent might be provided with a default set of quality values for certain media ranges. * However, unless the user agent is a closed system which cannot interact with other rendering agents, this default @@ -164,6 +176,7 @@ public final class Accept { /** * Returns the list of the media ranges that make up this header. + * * <p> * The media ranges in the list are sorted by their q-value in descending order. * @@ -175,6 +188,7 @@ public final class Accept { /** * Given a list of media types, returns the best match for this <code>Accept</code> header. + * * <p> * Note that fuzzy matching is allowed on the media types where the <code>Accept</code> header may * contain additional subtype parts. @@ -183,10 +197,10 @@ public final class Accept { * isn't found. * <br>The purpose for this is to allow serializers to match when artifacts such as <code>id</code> properties are * present in the header. + * * <p> * See <a class='doclink' href='https://www.w3.org/TR/activitypub/#retrieving-objects'> * ActivityPub / Retrieving Objects</a> - * <p> * * @param mediaTypes The media types to match against. * @return The index into the array of the best match, or <code>-1</code> if no suitable matches could be found. @@ -218,8 +232,9 @@ public final class Accept { } /** - * Convenience method for searching through all of the subtypes of all the media ranges in this header - * for the presence of a subtype fragment. + * Convenience method for searching through all of the subtypes of all the media ranges in this header for the + * presence of a subtype fragment. + * * <p> * For example, given the header <js>"text/json+activity"</js>, calling * <code>hasSubtypePart(<js>"activity"</js>)</code> returns <jk>true</jk>. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/AcceptCharset.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/AcceptCharset.java b/juneau-core/src/main/java/org/apache/juneau/http/AcceptCharset.java index 295aceb..c17ec3f 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/AcceptCharset.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/AcceptCharset.java @@ -19,6 +19,7 @@ import org.apache.juneau.internal.*; /** * Represents a parsed <l>Accept-Charset</l> HTTP request header. + * * <p> * Character sets that are acceptable. * @@ -30,6 +31,7 @@ import org.apache.juneau.internal.*; * <h6 class='topic'>RFC2616 Specification</h6> * * The Accept-Charset request-header field can be used to indicate what character sets are acceptable for the response. + * * <p> * This field allows clients capable of understanding more comprehensive or special- purpose character sets to signal * that capability to a server which is capable of representing documents in those character sets. @@ -37,6 +39,7 @@ import org.apache.juneau.internal.*; * Accept-Charset = "Accept-Charset" ":" * 1#( ( charset | "*" )[ ";" "q" "=" qvalue ] ) * </p> + * * <p> * Character set values are described in section 3.4. Each charset MAY be given an associated quality value which * represents the user's preference for that charset. @@ -45,14 +48,18 @@ import org.apache.juneau.internal.*; * <p class='bcode'> * Accept-Charset: iso-8859-5, unicode-1-1;q=0.8 * </p> + * * <p> * The special value "*", if present in the Accept-Charset field, matches every character set (including ISO-8859-1) * which is not mentioned elsewhere in the Accept-Charset field. + * * <p> * If no "*" is present in an Accept-Charset field, then all character sets not explicitly mentioned get a quality * value of 0, except for ISO-8859-1, which gets a quality value of 1 if not explicitly mentioned. + * * <p> * If no Accept-Charset header is present, the default is that any character set is acceptable. + * * <p> * If an Accept-Charset header is present, and if the server cannot send a response which is acceptable according to * the Accept-Charset header, then the server SHOULD send an error response with the 406 (not acceptable) status code, http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/AcceptEncoding.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/AcceptEncoding.java b/juneau-core/src/main/java/org/apache/juneau/http/AcceptEncoding.java index c9e7fef..c0cf845 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/AcceptEncoding.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/AcceptEncoding.java @@ -18,6 +18,7 @@ import org.apache.juneau.internal.*; /** * Represents a parsed <l>Accept-Encoding</l> HTTP request header. + * * <p> * List of acceptable encodings. * @@ -36,6 +37,7 @@ import org.apache.juneau.internal.*; * 1#( codings [ ";" "q" "=" qvalue ] ) * codings = ( content-coding | "*" ) * </p> + * * <p> * Examples of its use are: * <p class='bcode'> @@ -45,6 +47,7 @@ import org.apache.juneau.internal.*; * Accept-Encoding: compress;q=0.5, gzip;q=1.0 * Accept-Encoding: gzip;q=1.0, identity; q=0.5, *;q=0 * </p> + * * <p> * A server tests whether a content-coding is acceptable, according to an Accept-Encoding field, using these rules: * <ol> @@ -60,20 +63,24 @@ import org.apache.juneau.internal.*; * "identity" content-coding. * If the Accept-Encoding field-value is empty, then only the "identity" encoding is acceptable. * </ol> + * * <p> * If an Accept-Encoding field is present in a request, and if the server cannot send a response which is acceptable * according to the Accept-Encoding header, then the server SHOULD send an error response with the 406 (Not Acceptable) * status code. + * * <p> * If no Accept-Encoding field is present in a request, the server MAY assume that the client will accept any content * coding. * In this case, if "identity" is one of the available content-codings, then the server SHOULD use the "identity" * content-coding, unless it has additional information that a different content-coding is meaningful to the client. + * * <p> * Note: If the request does not include an Accept-Encoding field, and if the "identity" content-coding is unavailable, * then content-codings commonly understood by HTTP/1.0 clients (i.e.,"gzip" and "compress") are preferred; some older * clients improperly display messages sent with other content-codings. * The server might also make this decision based on information about the particular user-agent or client. + * * <p> * Note: Most HTTP/1.0 applications do not recognize or obey qvalues associated with content-codings. * This means that qvalues will not work and are not permitted with x-gzip or x-compress. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/AcceptLanguage.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/AcceptLanguage.java b/juneau-core/src/main/java/org/apache/juneau/http/AcceptLanguage.java index 0eb3454..cd187d9 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/AcceptLanguage.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/AcceptLanguage.java @@ -18,6 +18,7 @@ import org.apache.juneau.internal.*; /** * Represents a parsed <l>Accept-Language</l> HTTP request header. + * * <p> * List of acceptable human languages for response. * @@ -37,6 +38,7 @@ import org.apache.juneau.internal.*; * 1#( language-range [ ";" "q" "=" qvalue ] ) * language-range = ( ( 1*8ALPHA *( "-" 1*8ALPHA ) ) | "*" ) * </p> + * * <p> * Each language-range MAY be given an associated quality value which represents an estimate of the user's preference * for the languages specified by that range. @@ -47,36 +49,46 @@ import org.apache.juneau.internal.*; * </p> * <p> * ...would mean: "I prefer Danish, but will accept British English and other types of English." + * * <p> * A language-range matches a language-tag if it exactly equals the tag, or if it exactly equals a prefix of the tag * such that the first tag character following the prefix is "-". + * * <p> * The special range "*", if present in the Accept-Language field, matches every tag not matched by any other range * present in the Accept-Language field. + * * <p> * Note: This use of a prefix matching rule does not imply that language tags are assigned to languages in such a way * that it is always true that if a user understands a language with a certain * tag, then this user will also understand all languages with tags for which this tag is a prefix. * The prefix rule simply allows the use of prefix tags if this is the case. + * * <p> * The language quality factor assigned to a language-tag by the Accept-Language field is the quality value of the * longest language- range in the field that matches the language-tag. + * * <p> * If no language- range in the field matches the tag, the language quality factor assigned is 0. + * * <p> * If no Accept-Language header is present in the request, the server SHOULD assume that all languages are equally * acceptable. + * * <p> * If an Accept-Language header is present, then all languages which are assigned a quality factor greater than 0 are * acceptable. + * * <p> * It might be contrary to the privacy expectations of the user to send an Accept-Language header with the complete * linguistic preferences of the user in every request. * For a discussion of this issue, see section 15.1.4. + * * <p> * As intelligibility is highly dependent on the individual user, it is recommended that client applications make the * choice of linguistic preference available to the user. * If the choice is not made available, then the Accept-Language header field MUST NOT be given in the request. + * * <p> * Note: When making the choice of linguistic preference available to the user, we remind implementors of the fact that * users are not familiar with the details of language matching as described above, and should provide appropriate http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/AcceptRanges.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/AcceptRanges.java b/juneau-core/src/main/java/org/apache/juneau/http/AcceptRanges.java index 0ce6df4..18023b8 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/AcceptRanges.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/AcceptRanges.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Accept-Range</l> HTTP response header. + * * <p> * What partial content range types this server supports via byte serving. * @@ -30,6 +31,7 @@ package org.apache.juneau.http; * Accept-Ranges = "Accept-Ranges" ":" acceptable-ranges * acceptable-ranges = 1#range-unit | "none" * </p> + * * <p> * Origin servers that accept byte-range requests MAY send... * <p class='bcode'> @@ -37,10 +39,13 @@ package org.apache.juneau.http; * </p> * <p> * ...but are not required to do so. + * * <p> * Clients MAY generate byte-range requests without having received this header for the resource involved. + * * <p> * Range units are defined in section 3.12. + * * <p> * Servers that do not accept any kind of range request for a resource MAY send... * <p class='bcode'> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/Age.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/Age.java b/juneau-core/src/main/java/org/apache/juneau/http/Age.java index b1b1ce9..8cbdff0 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/Age.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/Age.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Age</l> HTTP response header. + * * <p> * The age the object has been in a proxy cache in seconds. * @@ -33,14 +34,18 @@ package org.apache.juneau.http; * Age = "Age" ":" age-value * age-value = delta-seconds * </p> + * * <p> * Age values are non-negative decimal integers, representing time in seconds. + * * <p> * If a cache receives a value larger than the largest positive integer it can represent, or if any of its age * calculations overflows, it MUST transmit an Age header with a value of 2147483648 (2^31). + * * <p> * An HTTP/1.1 server that includes a cache MUST include an Age header field in every response generated from its own * cache. + * * <p> * Caches SHOULD use an arithmetic type of at least 31 bits of range. * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/Allow.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/Allow.java b/juneau-core/src/main/java/org/apache/juneau/http/Allow.java index 7baa277..b0fab92 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/Allow.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/Allow.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Allow</l> HTTP response header. + * * <p> * Valid methods for a specified resource. To be used for a 405 Method not allowed. * @@ -31,22 +32,28 @@ package org.apache.juneau.http; * <p class='bcode'> * Allow = "Allow" ":" #Method * </p> + * * <p> * Example of use: * <p class='bcode'> * Allow: GET, HEAD, PUT * </p> + * * <p> * This field cannot prevent a client from trying other methods. * However, the indications given by the Allow header field value SHOULD be followed. + * * <p> * The actual set of allowed methods is defined by the origin server at the time of each request. + * * <p> * The Allow header field MAY be provided with a PUT request to recommend the methods to be supported by the new or * modified resource. + * * <p> * The server is not required to support these methods and SHOULD include an Allow header in the response giving the * actual supported methods. + * * <p> * A proxy MUST NOT modify the Allow header field even if it does not understand all the methods specified, since the * user agent might http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/Authorization.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/Authorization.java b/juneau-core/src/main/java/org/apache/juneau/http/Authorization.java index f4fc56b..07412c8 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/Authorization.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/Authorization.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Authorization</l> HTTP request header. + * * <p> * Authentication credentials for HTTP authentication. * @@ -26,6 +27,7 @@ package org.apache.juneau.http; * * A user agent that wishes to authenticate itself with a server--usually, but not necessarily, after receiving a 401 * response--does so by including an Authorization request-header field with the request. + * * <p> * The Authorization field value consists of credentials containing the authentication information of the user agent for * the realm of the resource being requested. @@ -33,12 +35,15 @@ package org.apache.juneau.http; * <p class='bcode'> * Authorization = "Authorization" ":" credentials * </p> + * * <p> * HTTP access authentication is described in "HTTP Authentication: Basic and Digest Access Authentication". + * * <p> * If a request is authenticated and a realm specified, the same credentials SHOULD be valid for all other requests * within this realm (assuming that the authentication scheme itself does not require otherwise, such as credentials * that vary according to a challenge value or using synchronized clocks). + * * <p> * When a shared cache (see section 13.7) receives a request containing an Authorization field, it MUST NOT return the * corresponding response as a reply to any other request, unless one of the following specific exceptions holds: http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/CacheControl.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/CacheControl.java b/juneau-core/src/main/java/org/apache/juneau/http/CacheControl.java index 7fee28b..8c46228 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/CacheControl.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/CacheControl.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Cache-Control</l> HTTP request header. + * * <p> * Used to specify directives that must be obeyed by all caching mechanisms along the request-response chain. * @@ -30,9 +31,11 @@ package org.apache.juneau.http; * These directives typically override the default caching algorithms. * Cache directives are unidirectional in that the presence of a directive in a request does not imply that the same * directive is to be given in the response. + * * <p> * Note that HTTP/1.0 caches might not implement Cache-Control and might only implement Pragma: no-cache (see section * 14.32). + * * <p> * Cache directives MUST be passed through by a proxy or gateway application, regardless of their significance to that * application, since the directives might be applicable to all recipients along the request/response chain. @@ -64,11 +67,13 @@ package org.apache.juneau.http; * | cache-extension ; Section 14.9.6 * cache-extension = token [ "=" ( token | quoted-string ) ] * </p> + * * <p> * When a directive appears without any 1#field-name parameter, the directive applies to the entire request or response. * When such a directive appears with a 1#field-name parameter, it applies only to the named field or fields, and not * to the rest of the request or response. This mechanism supports extensibility; implementations of future versions * of the HTTP protocol might apply these directives to header fields not defined in HTTP/1.1. + * * <p> * The cache-control directives can be broken down into these general categories: * <ul> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/Connection.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/Connection.java b/juneau-core/src/main/java/org/apache/juneau/http/Connection.java index aed6e82..c005c25 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/Connection.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/Connection.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Connection</l> HTTP request header. + * * <p> * Control options for the current connection and list of hop-by-hop request fields. * @@ -27,20 +28,24 @@ package org.apache.juneau.http; * * The Connection general-header field allows the sender to specify options that are desired for that particular * connection and MUST NOT be communicated by proxies over further connections. + * * <p> * The Connection header has the following grammar: * <p class='bcode'> * Connection = "Connection" ":" 1#(connection-token) * connection-token = token * </p> + * * <p> * HTTP/1.1 proxies MUST parse the Connection header field before a message is forwarded and, for each connection-token * in this field, remove any header field(s) from the message with the same name as the connection-token. * Connection options are signaled by the presence of a connection-token in the Connection header field, not by any * corresponding additional header field(s), since the additional header field may not be sent if there are no * parameters associated with that connection option. + * * <p> * Message headers listed in the Connection header MUST NOT include end-to-end headers, such as Cache-Control. + * * <p> * HTTP/1.1 defines the "close" connection option for the sender to signal that the connection will be closed after * completion of the response. @@ -51,9 +56,11 @@ package org.apache.juneau.http; * <p> * ...in either the request or the response header fields indicates that the connection SHOULD NOT be considered * `persistent' (section 8.1) after the current request/response is complete. + * * <p> * HTTP/1.1 applications that do not support persistent connections MUST include the "close" connection option in * every message. + * * <p> * A system receiving an HTTP/1.0 (or lower-version) message that includes a Connection header MUST, for each * connection-token in this field, remove and ignore any header field(s) from the message with the same name as the http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/ContentEncoding.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/ContentEncoding.java b/juneau-core/src/main/java/org/apache/juneau/http/ContentEncoding.java index 04ebf3e..76f9552 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/ContentEncoding.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/ContentEncoding.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Content-Encoding</l> HTTP response header. + * * <p> * The type of encoding used on the data. * @@ -33,22 +34,27 @@ package org.apache.juneau.http; * <p class='bcode'> * Content-Encoding = "Content-Encoding" ":" 1#content-coding * </p> + * * <p> * Content codings are defined in section 3.5. An example of its use is... * <p class='bcode'> * Content-Encoding: gzip * </p> + * * <p> * The content-coding is a characteristic of the entity identified by the Request-URI. * Typically, the entity-body is stored with this encoding and is only decoded before rendering or analogous usage. * However, a non-transparent proxy MAY modify the content-coding if the new coding is known to be acceptable to the * recipient, unless the "no-transform" cache-control directive is present in the message. + * * <p> * If the content-coding of an entity is not "identity", then the response MUST include a Content-Encoding * entity-header (section 14.11) that lists the non-identity content-coding(s) used. + * * <p> * If the content-coding of an entity in a request message is not acceptable to the origin server, the server SHOULD * respond with a status code of 415 (Unsupported Media Type). + * * <p> * If multiple encodings have been applied to an entity, the content codings MUST be listed in the order in which they * were applied. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/ContentLanguage.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/ContentLanguage.java b/juneau-core/src/main/java/org/apache/juneau/http/ContentLanguage.java index 09cb94b..4e6cef5 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/ContentLanguage.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/ContentLanguage.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Content-Language</l> HTTP response header. + * * <p> * The natural language or languages of the intended audience for the enclosed content. * @@ -30,6 +31,7 @@ package org.apache.juneau.http; * <p class='bcode'> * Content-Language = "Content-Language" ":" 1#language-tag * </p> + * * <p> * Language tags are defined in section 3.10. * The primary purpose of Content-Language is to allow a user to identify and differentiate entities according to the @@ -38,10 +40,12 @@ package org.apache.juneau.http; * <p class='bcode'> * Content-Language: da * </p> + * * <p> * If no Content-Language is specified, the default is that the content is intended for all language audiences. * This might mean that the sender does not consider it to be specific to any natural language, or that the sender * does not know for which language it is intended. + * * <p> * Multiple languages MAY be listed for content that is intended for multiple audiences. * For example, a rendition of the "Treaty of Waitangi," presented simultaneously in the original Maori and English @@ -49,12 +53,14 @@ package org.apache.juneau.http; * <p class='bcode'> * Content-Language: mi, en * </p> + * * <p> * However, just because multiple languages are present within an entity does not mean that it is intended for * multiple linguistic audiences. * An example would be a beginner's language primer, such as "A First Lesson in Latin," which is clearly intended to * be used by an English-literate audience. * In this case, the Content-Language would properly only include "en". + * * <p> * Content-Language MAY be applied to any media type -- it is not limited to textual documents. * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/ContentLength.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/ContentLength.java b/juneau-core/src/main/java/org/apache/juneau/http/ContentLength.java index 94ca051..a0f3777 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/ContentLength.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/ContentLength.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Content-Length</l> HTTP request/response header. + * * <p> * The length of the response body in octets (8-bit bytes). * @@ -30,17 +31,21 @@ package org.apache.juneau.http; * <p class='bcode'> * Content-Length = "Content-Length" ":" 1*DIGIT * </p> + * * <p> * An example is... * <p class='bcode'> * Content-Length: 3495 * </p> + * * <p> * Applications SHOULD use this field to indicate the transfer-length of the message-body, unless this is prohibited by * the rules in section 4.4. + * * <p> * Any Content-Length greater than or equal to zero is a valid value. * Section 4.4 describes how to determine the length of a message-body if a Content-Length is not given. + * * <p> * Note that the meaning of this field is significantly different from the corresponding definition in MIME, where it is * an optional field used within the "message/external-body" content-type. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/ContentLocation.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/ContentLocation.java b/juneau-core/src/main/java/org/apache/juneau/http/ContentLocation.java index cf71009..f222af0 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/ContentLocation.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/ContentLocation.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Content-Location</l> HTTP response header. + * * <p> * An alternate location for the returned data. * @@ -34,20 +35,25 @@ package org.apache.juneau.http; * Content-Location = "Content-Location" ":" * ( absoluteURI | relativeURI ) * </p> + * * <p> * The value of Content-Location also defines the base URI for the entity. + * * <p> * The Content-Location value is not a replacement for the original requested URI; it is only a statement of the * location of the resource corresponding to this particular entity at the time of the request. * Future requests MAY specify the Content-Location URI as the request- URI if the desire is to identify the source of * that particular entity. + * * <p> * A cache cannot assume that an entity with a Content-Location different from the URI used to retrieve it can be used * to respond to later requests on that Content-Location URI. * However, the Content- Location can be used to differentiate between multiple entities retrieved from a single * requested resource, as described in section 13.6. + * * <p> * If the Content-Location is a relative URI, the relative URI is interpreted relative to the Request-URI. + * * <p> * The meaning of the Content-Location header in PUT or POST requests is undefined; servers are free to ignore it in * those cases. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/ContentRange.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/ContentRange.java b/juneau-core/src/main/java/org/apache/juneau/http/ContentRange.java index 78811e2..dc7ef18 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/ContentRange.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/ContentRange.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Content-Range</l> HTTP response header. + * * <p> * Where in a full body message this partial message belongs. * @@ -23,6 +24,7 @@ package org.apache.juneau.http; * </p> * * <h6 class='topic'>RFC2616 Specification</h6> + * * The Content-Range entity-header is sent with a partial entity-body to specify where in the full entity-body the * partial body should be applied. * Range units are defined in section 3.12. @@ -36,23 +38,28 @@ package org.apache.juneau.http; * | "*" * instance-length = 1*DIGIT * </p> + * * <p> * The header SHOULD indicate the total length of the full entity-body, unless this length is unknown or difficult to * determine. * The asterisk "*" character means that the instance-length is unknown at the time when the response was generated. + * * <p> * Unlike byte-ranges-specifier values (see section 14.35.1), a byte- range-resp-spec MUST only specify one range, and * MUST contain absolute byte positions for both the first and last byte of the range. + * * <p> * A byte-content-range-spec with a byte-range-resp-spec whose last- byte-pos value is less than its first-byte-pos * value, or whose instance-length value is less than or equal to its last-byte-pos value, is invalid. * The recipient of an invalid byte-content-range- spec MUST ignore it and any content transferred along with it. + * * <p> * A server sending a response with status code 416 (Requested range not satisfiable) SHOULD include a Content-Range * field with a byte-range- resp-spec of "*". * The instance-length specifies the current length of the selected resource. * A response with status code 206 (Partial Content) MUST NOT include a Content-Range field with a byte-range-resp-spec * of "*". + * * <p> * Examples of byte-content-range-spec values, assuming that the entity contains a total of 1234 bytes: * <p class='bcode'> @@ -65,6 +72,7 @@ package org.apache.juneau.http; * The last 500 bytes: * bytes 734-1233/1234 * </p> + * * <p> * When an HTTP message includes the content of a single range (for example, a response to a request for a single range, * or to a request for a set of ranges that overlap without any holes), this content is transmitted with a Content-Range @@ -78,29 +86,35 @@ package org.apache.juneau.http; * Content-Length: 26012 * Content-Type: image/gif * </p> + * * <p> * When an HTTP message includes the content of multiple ranges (for example, a response to a request for multiple * non-overlapping ranges), these are transmitted as a multipart message. * The multipart media type used for this purpose is "multipart/byteranges" as defined in appendix 19.2. * See appendix 19.6.3 for a compatibility issue. + * * <p> * A response to a request for a single range MUST NOT be sent using the multipart/byteranges media type. * A response to a request for multiple ranges, whose result is a single range, MAY be sent as a multipart/byteranges * media type with one part. * A client that cannot decode a multipart/byteranges message MUST NOT ask for multiple byte-ranges in a single request. + * * <p> * When a client requests multiple byte-ranges in one request, the server SHOULD return them in the order that they * appeared in the request. + * * <p> * If the server ignores a byte-range-spec because it is syntactically invalid, the server SHOULD treat the request as * if the invalid Range header field did not exist. * (Normally, this means return a 200 response containing the full entity). + * * <p> * If the server receives a request (other than one including an If- Range request-header field) with an unsatisfiable * Range request- header field * (that is, all of whose byte-range-spec values have a first-byte-pos value greater than the current length of the * selected resource), * it SHOULD return a response code of 416 (Requested range not satisfiable) (section 10.4.17). + * * <p> * Note: clients cannot depend on servers to send a 416 (Requested range not satisfiable) response instead of a 200 (OK) * response for http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/ContentType.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/ContentType.java b/juneau-core/src/main/java/org/apache/juneau/http/ContentType.java index 7c1ec7d..565fe21 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/ContentType.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/ContentType.java @@ -18,6 +18,7 @@ import org.apache.juneau.internal.*; /** * Represents a parsed <l>Content-Type</l> HTTP request/response header. + * * <p> * The MIME type of this content. * @@ -33,6 +34,7 @@ import org.apache.juneau.internal.*; * <p class='bcode'> * Content-Type = "Content-Type" ":" media-type * </p> + * * <p> * Media types are defined in section 3.7. * An example of the field is... @@ -75,6 +77,7 @@ public class ContentType extends MediaType { /** * Given a list of media types, returns the best match for this <code>Content-Type</code> header. + * * <p> * Note that fuzzy matching is allowed on the media types where the <code>Content-Types</code> header may * contain additional subtype parts. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/Date.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/Date.java b/juneau-core/src/main/java/org/apache/juneau/http/Date.java index 310836b..3b5be3e 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/Date.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/Date.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Date</l> HTTP request/response header. + * * <p> * The date and time that the message was sent (in "HTTP-date" format as defined by RFC 7231). * @@ -30,31 +31,37 @@ package org.apache.juneau.http; * <p class='bcode'> * Date = "Date" ":" HTTP-date * </p> + * * <p> * An example is... * <p class='bcode'> * Date: Tue, 15 Nov 1994 08:12:31 GMT * </p> + * * <p> * Origin servers MUST include a Date header field in all responses, except in these cases: * <ol> * <li>If the response status code is 100 (Continue) or 101 (Switching Protocols), the response MAY include a Date - * header field, at the server's option. + * header field, at the server's option. * <li>If the response status code conveys a server error, e.g. 500 (Internal Server Error) or 503 (Service - * Unavailable), and it is inconvenient or impossible to generate a valid Date. + * Unavailable), and it is inconvenient or impossible to generate a valid Date. * <li>If the server does not have a clock that can provide a reasonable approximation of the current time, its - * responses MUST NOT include a Date header field. + * responses MUST NOT include a Date header field. * In this case, the rules in section 14.18.1 MUST be followed. * </ol> + * + * <p> * A received message that does not have a Date header field MUST be assigned one by the recipient if the message will * be cached by that recipient or gatewayed via a protocol which requires a Date. * An HTTP implementation without a clock MUST NOT cache responses without revalidating them on every use. * An HTTP cache, especially a shared cache, SHOULD use a mechanism, such as NTP, to synchronize its clock with a * reliable external standard. + * * <p> * Clients SHOULD only send a Date header field in messages that include an entity-body, as in the case of the PUT and * POST requests, and even then it is optional. * A client without a clock MUST NOT send a Date header field in a request. + * * <p> * The HTTP-date sent in a Date header SHOULD NOT represent a date and time subsequent to the generation of the message. * It SHOULD represent the best available approximation of the date and time of message generation, unless the http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/ETag.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/ETag.java b/juneau-core/src/main/java/org/apache/juneau/http/ETag.java index 0fe1d44..23a41df 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/ETag.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/ETag.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>ETag</l> HTTP response header. + * * <p> * An identifier for a specific version of a resource, often a message digest. * @@ -27,9 +28,11 @@ package org.apache.juneau.http; * The ETag response-header field provides the current value of the entity tag for the requested variant. * The headers used with entity tags are described in sections 14.24, 14.26 and 14.44. * The entity tag MAY be used for comparison with other entities from the same resource (see section 13.3.3). + * * <p class='bcode'> * ETag = "ETag" ":" entity-tag * </p> + * * <p> * Examples: * <p class='bcode'> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/EntityValidator.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/EntityValidator.java b/juneau-core/src/main/java/org/apache/juneau/http/EntityValidator.java index 65865c9..e4a3439 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/EntityValidator.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/EntityValidator.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a validator value. + * * <p> * <h6 class='figure'>Example</h6> * <p class='bcode'> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/Expect.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/Expect.java b/juneau-core/src/main/java/org/apache/juneau/http/Expect.java index 0a69862..6fa204b 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/Expect.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/Expect.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Expect</l> HTTP request header. + * * <p> * Indicates that particular server behaviors are required by the client. * @@ -32,24 +33,30 @@ package org.apache.juneau.http; * *expect-params ] * expect-params = ";" token [ "=" ( token | quoted-string ) ] * </p> + * * <p> * A server that does not understand or is unable to comply with any of the expectation values in the Expect field of a * request MUST respond with appropriate error status. * The server MUST respond with a 417 (Expectation Failed) status if any of the expectations cannot be met or, if there * are other problems with the request, some other 4xx status. + * * <p> * This header field is defined with extensible syntax to allow for future extensions. * If a server receives a request containing an Expect field that includes an expectation-extension that it does not * support, it MUST respond with a 417 (Expectation Failed) status. + * * <p> * Comparison of expectation values is case-insensitive for unquoted tokens (including the 100-continue token), and is * case-sensitive for quoted-string expectation-extensions. + * * <p> * The Expect mechanism is hop-by-hop: that is, an HTTP/1.1 proxy MUST return a 417 (Expectation Failed) status if it * receives a request with an expectation that it cannot meet. * However, the Expect request-header itself is end-to-end; it MUST be forwarded if the request is forwarded. + * * <p> * Many older HTTP/1.0 and HTTP/1.1 applications do not understand the Expect header. + * * <p> * See section 8.2.3 for the use of the 100 (continue) status. *
