com.fatwire.cs.core.uri
Interface Definition

All Known Implementing Classes:
AbstractAssembler.AssemblyContext, SatelliteTokenAssembler.STADefinition, Simple

public interface Definition

This class is a data object which contains all of the data required to create a URI for a Content Server system. The definition cntains the Content Server app type for which the URI is being constructed, as well as all of the parameters for that app. Further, it contains information about the Satellite Server context (i.e. whether or not the URI generated should direct users to Satellite Server or directly to Content Server), the container in which Content Server is running (i.e. Server, Portlet) and a variety of other information pertinent to Content Server URIs. This Definition object will be converted into a String URI using the Assembler interface and one of the assemblers registered for the corresponding container type.

Since:
12-Oct-2004 5:13:27 PM

Nested Class Summary
static class Definition.AppType
          This object defines the Content Server app type for which the URI should be constructed.
static class Definition.ContainerType
          This object defines the containers for which a URI can be defined.
static class Definition.SatelliteContext
          Class to define the satellite context of the URI.
 
Field Summary
static java.lang.String LOG_NAME
          Logger name, for use with Jakarta Commons Logging.
 
Method Summary
 Definition.AppType getAppType()
          Returns the app type for which this URI is to be generated.
 java.lang.String getAuthority()
          Returns the authority for this URI.
 Definition.ContainerType getContainerType()
          Returns the container type for which this URI is to be generated.
 java.lang.String getFragment()
          Returns a fragment identifier for this URI.
 java.lang.String getParameter(java.lang.String name)
          Return a single parameter with the given name.
 java.util.Collection getParameterNames()
          Returns the names of all the parameters.
 java.lang.String[] getParameters(java.lang.String name)
          Returns an array of parameters with the given name.
 Definition.SatelliteContext getSatelliteContext()
          Returns an object describing whether the URI should be set to render a Satellite Server URL or a Content Server URL.
 java.lang.String getScheme()
          Returns the scheme for this URI.
 boolean sessionEncode()
          Returns true if this URI should be session-encoded by the container.
 

Field Detail

LOG_NAME

static final java.lang.String LOG_NAME
Logger name, for use with Jakarta Commons Logging.

See Also:
Log, Constant Field Values
Method Detail

getScheme

java.lang.String getScheme()
Returns the scheme for this URI. Typical values include http and https.

Returns:
URI scheme or null if not specified
See Also:
URI.getScheme()

getAuthority

java.lang.String getAuthority()
Returns the authority for this URI. This is typically a host and port, separated by a colon. For example, localhost:7001. Note that port is optional. As a result, another legal value would include localhost.

Returns:
URI authority or null if not specified.
See Also:
URI.getAuthority()

getContainerType

Definition.ContainerType getContainerType()
Returns the container type for which this URI is to be generated. Most uses will likely return Definition.ContainerType.DEFAULT which allows the current container to be used, however when switching container types is important, this method should return a different value. An example might be a popup window in a portlet.

Returns:
container type.
See Also:
ContainerType}

getAppType

Definition.AppType getAppType()
Returns the app type for which this URI is to be generated. This flag indicates to the assembler that a uri should be for Content Server, Blob Server or any other related app type.

Returns:
app type.
See Also:
@link{AppType}

getParameter

java.lang.String getParameter(java.lang.String name)
Return a single parameter with the given name. If there are multiple parameters, only the first one is returned.

Parameters:
name - parameter name
Returns:
parameter value or null if not found

getParameters

java.lang.String[] getParameters(java.lang.String name)
Returns an array of parameters with the given name. If there is only one parameter by the given name, an array of length one will be returned.

Parameters:
name - parameter name
Returns:
parameter values or null if no values exist.

getParameterNames

java.util.Collection getParameterNames()
Returns the names of all the parameters.

Returns:
collection of parameter names

getFragment

java.lang.String getFragment()
Returns a fragment identifier for this URI.

Returns:
fragment identifier for this URI.

sessionEncode

boolean sessionEncode()
Returns true if this URI should be session-encoded by the container.

Returns:
true to session-encode, false to not session-encode.

getSatelliteContext

Definition.SatelliteContext getSatelliteContext()
Returns an object describing whether the URI should be set to render a Satellite Server URL or a Content Server URL.

Most users want to create a URL that is a Content Server URL when invoked from Content Server and a Satellite Server URL when invoked from Satellite Server. The determination of the type of URL to be constructed must be made prior to the assembly of this URI, because the Assembler instances that processes this Definition do not accept null values for the SatelliteContext.

Returns:
Satellite Server or Content Server.
See Also:
SatelliteContext}