com.google.gdata.wireformats
Class StreamPropertiesBuilder<T extends StreamPropertiesBuilder<T>>

java.lang.Object
  extended by com.google.gdata.wireformats.StreamPropertiesBuilder<T>
Type Parameters:
T - the concrete subtype of StreamPropertiesBuilder that will be used as the return type for property setters to enable chaining.
Direct Known Subclasses:
InputPropertiesBuilder, OutputPropertiesBuilder

public abstract class StreamPropertiesBuilder<T extends StreamPropertiesBuilder<T>>
extends java.lang.Object

The StreamPropertiesBuilder class is a abstract builder base class that aids in the construction of new StreamProperties instances.


Nested Class Summary
protected static class StreamPropertiesBuilder.StreamPropertiesImpl
          The StreamPropertiesImpl class is a simple immutable value object that implements the StreamProperties interface.
 
Field Summary
protected  AltRegistry altRegistry
           
protected  ContentType contentType
           
protected  ExtensionProfile extensionProfile
           
protected  java.util.Map<java.lang.String,java.lang.String> queryMap
           
protected  ElementMetadata<?,?> rootMetadata
           
 
Constructor Summary
protected StreamPropertiesBuilder()
          Constructs a new StreamPropertiesBuilder with no properties set.
protected StreamPropertiesBuilder(StreamProperties source)
          Constructs a new StreamPropertiesBuilder instance with the initial value of all properties copied from another StreamProperties instance.
 
Method Summary
 T setAltRegistry(AltRegistry altRegistry)
          Sets the AltRegistry property that should be used for instances created by the builder.
 T setContentType(ContentType contentType)
          Sets the ContentType property that should be used for instances created by the builder.
 T setElementMetadata(ElementMetadata<?,?> elementMetadata)
          Sets the ElementMetadata that should be used for instances created by the builder.
 T setExtensionProfile(ExtensionProfile extensionProfile)
          Sets the ExtensionProfile property that should be used for instances created by the builder.
 T setQueryParameter(java.lang.String name, java.lang.String value)
          Sets the value of a query parameter in the query Map that should be used for instances created by the builder.
 T setQueryParameters(java.util.Map<java.lang.String,java.lang.String> queryMap)
          Adds all query parameter values defined in the provided Map to the set of query parameters used for instances created by the builder.
 T thisInstance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

altRegistry

protected AltRegistry altRegistry

contentType

protected ContentType contentType

extensionProfile

protected ExtensionProfile extensionProfile

rootMetadata

protected ElementMetadata<?,?> rootMetadata

queryMap

protected final java.util.Map<java.lang.String,java.lang.String> queryMap
Constructor Detail

StreamPropertiesBuilder

protected StreamPropertiesBuilder()
Constructs a new StreamPropertiesBuilder with no properties set.


StreamPropertiesBuilder

protected StreamPropertiesBuilder(StreamProperties source)
Constructs a new StreamPropertiesBuilder instance with the initial value of all properties copied from another StreamProperties instance.

Parameters:
source - stream properties instance to copy from.
Method Detail

thisInstance

public final T thisInstance()

setAltRegistry

public T setAltRegistry(AltRegistry altRegistry)
Sets the AltRegistry property that should be used for instances created by the builder.

Parameters:
altRegistry - alt registry to set in built instances.
Returns:
this builder (to enable initialization chaining).

setContentType

public T setContentType(ContentType contentType)
Sets the ContentType property that should be used for instances created by the builder.

Parameters:
contentType - content type to set in built instances.
Returns:
this builder (to enable initialization chaining).

setExtensionProfile

public T setExtensionProfile(ExtensionProfile extensionProfile)
Sets the ExtensionProfile property that should be used for instances created by the builder.

Parameters:
extensionProfile - extension profile to set in built instances.
Returns:
this builder (to enable initialization chaining).

setQueryParameter

public T setQueryParameter(java.lang.String name,
                           java.lang.String value)
Sets the value of a query parameter in the query Map that should be used for instances created by the builder. Any existing value with the same name will be overwritten.

Parameters:
name - query parameter name
value - query parameter value
Returns:
this builder (to enable initialization chaining).

setQueryParameters

public T setQueryParameters(java.util.Map<java.lang.String,java.lang.String> queryMap)
Adds all query parameter values defined in the provided Map to the set of query parameters used for instances created by the builder. Any existing query parameter mappings with names contained in the map will be overwritten.

Parameters:
queryMap - query map to set in built instances.
Returns:
this builder (to enable initialization chaining).

setElementMetadata

public T setElementMetadata(ElementMetadata<?,?> elementMetadata)
Sets the ElementMetadata that should be used for instances created by the builder.

Parameters:
elementMetadata - element metadata to set in built instances.
Returns:
this builder (to enable initialization chaining).