com.fatwire.cs.core.uri
Class SatelliteTokenAssembler

java.lang.Object
  extended by com.fatwire.cs.core.uri.AbstractAssembler
      extended by com.fatwire.cs.core.uri.QueryAssembler
          extended by com.fatwire.cs.core.uri.SatelliteTokenAssembler
All Implemented Interfaces:
Assembler

public final class SatelliteTokenAssembler
extends QueryAssembler

This class assembles URIs that are destined for Satellite Server's translation. URIs assembled by this assembler will never be read by a human, but they will be parsed and re-assembled by Satellite Server.

This assembler does not make any use of properties set into it, and as a result it is not necessary to set properties into this assembler.

Since:
18-Oct-2004 11:18:44 AM

Nested Class Summary
static class SatelliteTokenAssembler.STADefinition
          This class constructs a special Definition that is designed for use with the SatelliteTokenAssembler.
 
Nested classes/interfaces inherited from class com.fatwire.cs.core.uri.AbstractAssembler
AbstractAssembler.AssemblyContext, AbstractAssembler.DisassemblyContext
 
Field Summary
static java.lang.String PREFERRED_ASSEMBLER
          Parameter for the preferred assembler
static java.lang.String SATELLITE_FRAGMENT
          Value always passed as the fragment into SatelliteTokenAssembler URIs.
static java.lang.String SATELLITE_SCHEME
          Value always passed as the scheme into SatelliteTokenAssembler URIs
static java.lang.String SATELLITE_TOKEN
          This string is a token that will appear in every URI assembled by this assembler.
 
Fields inherited from class com.fatwire.cs.core.uri.AbstractAssembler
PAGENAME
 
Fields inherited from interface com.fatwire.cs.core.uri.Assembler
LOG_NAME, PROP_PATH_PREFIX, PROP_URIBASE_BLOB_SERVER, PROP_URIBASE_CACHE_SERVER, PROP_URIBASE_CATALOG_MANAGER, PROP_URIBASE_CONTENT_SERVER, PROP_URIBASE_COOKIE_SERVER, PROP_URIBASE_DISPATCH_MANAGER, PROP_URIBASE_PAGE_DISPATCH_SERVER, PROP_URIBASE_SATELLITE_SERVER, PROP_URIBASE_SEED_DISPATCH_SERVER, PROP_URIBASE_SYNC_SEED_DISPATCH_SERVER, PROP_URIBASE_TREE_MANAGER
 
Constructor Summary
SatelliteTokenAssembler()
           
 
Method Summary
 Definition disassemble(java.net.URI uri, Definition.ContainerType ct)
          This method disassembles a URI into its components, constructing a Definition object to provide conveniece accessors to the data encoded in the URI.
protected  AbstractAssembler.AssemblyContext getAssemblyContext(Definition def)
          Returns an assembly context object given the input definition.
 java.lang.String getAuthority(AbstractAssembler.AssemblyContext def)
          Get the authority for this URI
 java.lang.String getFragment(AbstractAssembler.AssemblyContext def)
          Returns the fragment for this URI.
 java.lang.String getPath(AbstractAssembler.AssemblyContext def)
          This method returns the path for the URI given the definition specified.
 java.lang.String getScheme(AbstractAssembler.AssemblyContext def)
          Returns the scheme (protocol) for the assembly context specified.
 
Methods inherited from class com.fatwire.cs.core.uri.QueryAssembler
getAppType, getAuthority, getFragment, getPathForApp, getPathForSatelliteServer, getQuery, getQuery, getSatelliteContext, getScheme, getSessionEncode
 
Methods inherited from class com.fatwire.cs.core.uri.AbstractAssembler
assemble, decode, encode, getDisassemblyContext, getLog, getProperty, parseQueryString, setProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SATELLITE_SCHEME

public static java.lang.String SATELLITE_SCHEME
Value always passed as the scheme into SatelliteTokenAssembler URIs


SATELLITE_FRAGMENT

public static java.lang.String SATELLITE_FRAGMENT
Value always passed as the fragment into SatelliteTokenAssembler URIs.


SATELLITE_TOKEN

public static java.lang.String SATELLITE_TOKEN
This string is a token that will appear in every URI assembled by this assembler. URIs constructed by this assembler will never be seen by a user agent - they are for use only between Satellite Server and Content Server.


PREFERRED_ASSEMBLER

public static java.lang.String PREFERRED_ASSEMBLER
Parameter for the preferred assembler

Constructor Detail

SatelliteTokenAssembler

public SatelliteTokenAssembler()
Method Detail

getAssemblyContext

protected AbstractAssembler.AssemblyContext getAssemblyContext(Definition def)
Description copied from class: AbstractAssembler
Returns an assembly context object given the input definition.

Overrides:
getAssemblyContext in class AbstractAssembler
Parameters:
def - input definition
Returns:
AssemblyContext
See Also:
AbstractAssembler.AssemblyContext

getScheme

public java.lang.String getScheme(AbstractAssembler.AssemblyContext def)
Description copied from class: AbstractAssembler
Returns the scheme (protocol) for the assembly context specified.

Overrides:
getScheme in class QueryAssembler
Parameters:
def - Assembly context object
Returns:
scheme

getAuthority

public java.lang.String getAuthority(AbstractAssembler.AssemblyContext def)
Description copied from class: QueryAssembler
Get the authority for this URI

Overrides:
getAuthority in class QueryAssembler
Parameters:
def - Assembly context object
Returns:
decoded authority

getPath

public java.lang.String getPath(AbstractAssembler.AssemblyContext def)
Description copied from class: QueryAssembler
This method returns the path for the URI given the definition specified. This implementation checks the satellite context then invokes one of depending on the satellite context of the definition.

Overrides:
getPath in class QueryAssembler
Parameters:
def - Assembly context object
Returns:
decoded path

getFragment

public java.lang.String getFragment(AbstractAssembler.AssemblyContext def)
Description copied from class: QueryAssembler
Returns the fragment for this URI.

Overrides:
getFragment in class QueryAssembler
Parameters:
def - Assembly context object
Returns:
fragment

disassemble

public Definition disassemble(java.net.URI uri,
                              Definition.ContainerType ct)
                       throws java.net.URISyntaxException
This method disassembles a URI into its components, constructing a Definition object to provide conveniece accessors to the data encoded in the URI.

This method needs to be able to identify a URI passed to it as one of its own or as a foreign URI. If the URI is foreign, then this method will return null. If there is an error in the URI syntax, and this URI is identified as owned by the implementation, then a URISyntaxException may be thrown.

While it is not guaranteed that for a given Definition def and a given Assembler uria, that uri.assemble(def,false|true).equals(uria.disassemble(uria.assemble(def,false|true))), it is required that the arguments of a Definition passed into the assemble method will be identical to the arguments returned when the uri is disassembled.

Specified by:
disassemble in interface Assembler
Overrides:
disassemble in class AbstractAssembler
Parameters:
uri - URI to disassemble
ct - the type of the container that this URL is being generated for.
Returns:
a Definition that contained the data in the URI, or null if the URI was not constructed by this Assembler
Throws:
java.net.URISyntaxException - if there is a problem with the URI syntax.
See Also:
SatelliteTokenAssembler.STADefinition, Definition.ContainerType