|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.fatwire.cs.core.uri.AbstractAssembler
com.fatwire.cs.core.uri.QueryAssembler
public class QueryAssembler
This class is capable of assembling and disassembling a standard URL for Content Server. Content Server URLs put all parameters in the query string. These URLs look exactly the same as URLs in Content Server 6.1.0 and earlier.
This assembler identifies itself by ensuring that the entire path consists of the values corresponding to the path properties passed in. If the path does not match one of the properties, this will not disassemble the URI. This class is meant to be extended by users desiring a custom URI appearance without needing to make significant changes to the structure of the URI. (i.e. embed an argument in the path info, rename a parameter, set default parameter values, etc.)
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.fatwire.cs.core.uri.AbstractAssembler |
---|
AbstractAssembler.AssemblyContext, AbstractAssembler.DisassemblyContext |
Field Summary |
---|
Fields inherited from class com.fatwire.cs.core.uri.AbstractAssembler |
---|
PAGENAME |
Constructor Summary | |
---|---|
QueryAssembler()
|
Method Summary | |
---|---|
protected Definition.AppType |
getAppType(AbstractAssembler.DisassemblyContext ctx)
Get the app type for this URI. |
protected java.lang.String |
getAuthority(AbstractAssembler.AssemblyContext def)
Get the authority for this URI |
protected java.lang.String |
getAuthority(AbstractAssembler.DisassemblyContext ctx)
Get the authority from the URI specified |
protected java.lang.String |
getFragment(AbstractAssembler.AssemblyContext def)
Returns the fragment for this URI. |
protected java.lang.String |
getFragment(AbstractAssembler.DisassemblyContext ctx)
Get the fragment from the URI specified |
protected java.lang.String |
getPath(AbstractAssembler.AssemblyContext def)
This method returns the path for the URI given the definition specified. |
protected java.lang.String |
getPathForApp(Definition.AppType type)
Returns the path for the definition specified given the app type. |
protected java.lang.String |
getPathForSatelliteServer(Definition.AppType type)
This method returns the path for a given app type when a Satellite Server URI has been requested. |
protected java.lang.String |
getQuery(AbstractAssembler.AssemblyContext def)
This method grabs all the parameters from the Definition specified and converts them into a query string. |
protected java.util.Map |
getQuery(AbstractAssembler.DisassemblyContext ctx)
Return the query paramers from the URI. |
protected Definition.SatelliteContext |
getSatelliteContext(AbstractAssembler.DisassemblyContext ctx)
Returns the satellite context for the URI specified. |
protected java.lang.String |
getScheme(AbstractAssembler.AssemblyContext def)
Returns the scheme (protocol) for the assembly context specified. |
protected java.lang.String |
getScheme(AbstractAssembler.DisassemblyContext ctx)
Get the scheme from the URI specified. |
protected boolean |
getSessionEncode(AbstractAssembler.DisassemblyContext ctx)
Return whether or not session encoding should be done for the URI specified. |
Methods inherited from class com.fatwire.cs.core.uri.AbstractAssembler |
---|
assemble, decode, decode, disassemble, encode, getAssemblyContext, getDisassemblyContext, getLog, getProperty, parseQueryString, setProperties |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QueryAssembler()
Method Detail |
---|
protected java.lang.String getScheme(AbstractAssembler.AssemblyContext def)
AbstractAssembler
getScheme
in class AbstractAssembler
def
- Assembly context object
protected java.lang.String getAuthority(AbstractAssembler.AssemblyContext def)
getAuthority
in class AbstractAssembler
def
-
protected java.lang.String getPath(AbstractAssembler.AssemblyContext def)
QueryAssembler.getPathForApp(Definition.AppType)
QueryAssembler.getPathForSatelliteServer(Definition.AppType)
getPath
in class AbstractAssembler
def
-
protected java.lang.String getPathForSatelliteServer(Definition.AppType type)
type
- The app type
java.lang.IllegalArgumentException
- if the app type is not
supported by Satellite Server.protected java.lang.String getPathForApp(Definition.AppType type)
type
-
QueryAssembler.getPathForSatelliteServer(Definition.AppType)
protected java.lang.String getQuery(AbstractAssembler.AssemblyContext def)
AssemblyContext
's AssemblyContext#getParameterNames
method.
getQuery
in class AbstractAssembler
def
-
Name | Value |
foo | bar&blah |
+=-#* | MathChars |
Encode provides a helpful method for quoting illegal characters in the query string.
protected java.lang.String getFragment(AbstractAssembler.AssemblyContext def)
getFragment
in class AbstractAssembler
def
-
protected boolean getSessionEncode(AbstractAssembler.DisassemblyContext ctx)
getSessionEncode
in class AbstractAssembler
ctx
- DisassemblyContext object containing the URI, context parameters, and
a flag inidicating whether or not this assembler is capable of disassembling this
URI.
protected java.lang.String getScheme(AbstractAssembler.DisassemblyContext ctx)
getScheme
in class AbstractAssembler
ctx
- DisassemblyContext object containing the URI, context parameters, and
a flag inidicating whether or not this assembler is capable of disassembling this
URI.
protected java.lang.String getAuthority(AbstractAssembler.DisassemblyContext ctx)
getAuthority
in class AbstractAssembler
ctx
- DisassemblyContext object containing the URI, context parameters, and
a flag inidicating whether or not this assembler is capable of disassembling this
URI.
protected java.lang.String getFragment(AbstractAssembler.DisassemblyContext ctx)
getFragment
in class AbstractAssembler
ctx
- DisassemblyContext object containing the URI, context parameters, and
a flag inidicating whether or not this assembler is capable of disassembling this
URI.
protected Definition.SatelliteContext getSatelliteContext(AbstractAssembler.DisassemblyContext ctx)
getSatelliteContext
in class AbstractAssembler
ctx
- DisassemblyContext object containing the URI, context parameters, and
a flag inidicating whether or not this assembler is capable of disassembling this
URI.
protected Definition.AppType getAppType(AbstractAssembler.DisassemblyContext ctx)
QueryAssembler.getPathForSatelliteServer(com.fatwire.cs.core.uri.Definition.AppType)
and
QueryAssembler.getPathForApp(com.fatwire.cs.core.uri.Definition.AppType)
methods will have to override this method as well.
getAppType
in class AbstractAssembler
ctx
- DisassemblyContext object containing the URI, context parameters, and
a flag inidicating whether or not this assembler is capable of disassembling this
URI.
protected java.util.Map getQuery(AbstractAssembler.DisassemblyContext ctx)
AbstractAssembler.getQuery(AssemblyContext)
will need to override
this method as well.
getQuery
in class AbstractAssembler
ctx
- DisassemblyContext object containing the URI, context parameters, and
a flag inidicating whether or not this assembler is capable of disassembling this
URI.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |