|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.fatwire.cs.core.uri.AbstractAssembler
com.fatwire.cs.core.uri.QueryAssembler
com.fatwire.cs.core.uri.QueryAsPathInfoAssembler
public class QueryAsPathInfoAssembler
This assembler creates a URL without a query string. This is done by appending the query string and appending it to the servlet context path as path-info. This does not produce particulary nice-looking URLs, but because the URL appears to have no dynamic parameters, web bots like the googlebot are more likely to index these pages. No guarantees as to search engine indexability are made here, but reasonable logic indicates that URLs created with this appender will be indexable.
Nested Class Summary | |
---|---|
protected static class |
QueryAsPathInfoAssembler.PathInfo Simple class containing information embedded in the pathinfo. |
protected static class |
QueryAsPathInfoAssembler.QAPIDisassemblyContext |
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 | |
---|---|
QueryAsPathInfoAssembler() |
Method Summary | |
---|---|
java.net.URI |
assemble(Definition def) Constructs a URI from the Definition provided. |
protected Definition.AppType |
getAppType(AbstractAssembler.DisassemblyContext ctx) This method uses the PathInfo object to get the AppType found on the URI. |
protected AbstractAssembler.DisassemblyContext |
getDisassemblyContext(java.net.URI uri) This method tries to create a QueryAsPathInfoAssembler.PathInfo object by calling QueryAsPathInfoAssembler.parsePath(java.lang.String) . |
java.lang.String |
getPath(AbstractAssembler.AssemblyContext def) This method calls super.getPath() and encode(super.getQuery()) and appends them together. |
protected java.lang.String |
getQuery(AbstractAssembler.AssemblyContext def) Returns the query string. |
protected java.util.Map |
getQuery(AbstractAssembler.DisassemblyContext ctx) This method uses the PathInfo object to get the query parameters |
protected Definition.SatelliteContext |
getSatelliteContext(AbstractAssembler.DisassemblyContext ctx) This method uses the PathInfo object to get the Satellitecontext |
protected QueryAsPathInfoAssembler.PathInfo |
parsePath(java.lang.String path) Parse the path from the uriDefinition and get back a PathInfo data object containing all the useful info that was encoded in the path. |
Methods inherited from class com.fatwire.cs.core.uri.QueryAssembler |
---|
getAuthority, getAuthority, getFragment, getFragment, getPathForApp, getPathForSatelliteServer, getScheme, getScheme, getSessionEncode |
Methods inherited from class com.fatwire.cs.core.uri.AbstractAssembler |
---|
decode, decode, disassemble, encode, getAssemblyContext, 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 QueryAsPathInfoAssembler()
Method Detail |
---|
public java.lang.String getPath(AbstractAssembler.AssemblyContext def)
getPath
in class QueryAssembler
def
-protected java.lang.String getQuery(AbstractAssembler.AssemblyContext def)
getQuery
in class QueryAssembler
def
- DefinitionEncode provides a helpful method for quoting illegal characters in the query string.
protected AbstractAssembler.DisassemblyContext getDisassemblyContext(java.net.URI uri)
QueryAsPathInfoAssembler.PathInfo
object by calling QueryAsPathInfoAssembler.parsePath(java.lang.String)
. If it gets one, it creates a QAPIDisassemblyContext object using the {@link PathInfo} returned. If it fails to get back a {@link PathInfo} then it sets the foreign flag in the superclass' implementation of {@link DisassemblyContext}.getDisassemblyContext
in class AbstractAssembler
uri
-protected QueryAsPathInfoAssembler.PathInfo parsePath(java.lang.String path)
path
- the uri pathprotected Definition.AppType getAppType(AbstractAssembler.DisassemblyContext ctx)
getAppType
in class QueryAssembler
ctx
- DisassemblyContext object containing the URI, context parameters, and a flag inidicating whether or not this assembler is capable of disassembling this URI.QueryAsPathInfoAssembler.parsePath(String)
protected Definition.SatelliteContext getSatelliteContext(AbstractAssembler.DisassemblyContext ctx)
getSatelliteContext
in class QueryAssembler
ctx
- DisassemblyContext object containing the URI, context parameters, and a flag inidicating whether or not this assembler is capable of disassembling this URI.QueryAsPathInfoAssembler.parsePath(String)
protected java.util.Map getQuery(AbstractAssembler.DisassemblyContext ctx)
getQuery
in class QueryAssembler
ctx
- DisassemblyContext object containing the URI, context parameters, and a flag inidicating whether or not this assembler is capable of disassembling this URI.QueryAsPathInfoAssembler.parsePath(String)
public java.net.URI assemble(Definition def) throws java.net.URISyntaxException
AbstractAssembler
The components do not need to be encoded as this method will encode all values that require encoding.
The corresponding methods are called in the following order:
and the AssemblyContext object is not modified by this method. It is the same object in all of these methods. Most subclasses will not need to override this method, and should instead override the getter methods specified above instead.assemble
in interface Assembler
assemble
in class AbstractAssembler
def
- The definition to convert to a URIjava.net.URISyntaxException
- if the definition contains illegal dataAbstractAssembler.encode(String)
, AbstractAssembler.decode(String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.