public class Simple extends Object implements Definition
Definition interface. No bells or whistles, it's simply a value class.Definition.AppType, Definition.ContainerType, Definition.SatelliteContextLOG_NAME| Constructor and Description |
|---|
Simple(boolean enc, Definition.SatelliteContext context, Definition.ContainerType ct, String scheme, String authority, Definition.AppType at, String frag)
Simple Definition
|
| Modifier and Type | Method and Description |
|---|---|
Definition.AppType |
getAppType()
Returns the app type for which this URI is to be generated.
|
Collection |
getAttrbuteNames()
Returns the keys of all the attributes.
|
Object |
getAttribute(String key)
Return an attribute with the given key.
|
String |
getAuthority()
Returns the authority for this URI.
|
Definition.ContainerType |
getContainerType()
Returns the container type for which this URI is to be generated.
|
String |
getFragment()
Returns a fragment identifier for this URI.
|
String |
getParameter(String sName)
Return a single parameter with the given name.
|
Collection |
getParameterNames()
Returns the names of all the parameters.
|
String[] |
getParameters(String sName)
Returns an array of parameters with the given name.
|
Definition.SatelliteContext |
getSatelliteContext()
Returns an object describing whether the URI should be forcibly set to render a Satellite Server URL or a Content Server URL.
|
String |
getScheme()
Returns the scheme for this URI.
|
boolean |
sessionEncode()
Returns true if this URI should be session-encoded by the container.
|
void |
setAttribute(String key, Object value) |
String[] |
setQueryStringParameter(String name, String value)
Adds a value to the list of parameters for this Definition.
|
String[] |
setQueryStringParameter(String name, String[] value)
Sets the query string parameter for the name specified.
|
Map |
setQueryStringParameters(Map args)
Sets all of the query string parameters for this Definition.
|
public Simple(boolean enc,
Definition.SatelliteContext context,
Definition.ContainerType ct,
String scheme,
String authority,
Definition.AppType at,
String frag)
enc - True to session-encode the URI, false to not session-encode the URIcontext - SATELLITE_SERVER to force a SS URL, CONTENT_SERVER to force a CS URL, or null to choose dynamically.ct - the container type generating the URI.scheme - the scheme for this uri, like http or https. Null is ok.authority - the authority (host:port or host) for this URI. Null is ok.at - app type for the URIfrag - fragment for the URIpublic String[] setQueryStringParameter(String name, String value)
name - name of the parametervalue - value of the parameter. If the value is already set, an additional value is specified.Simple.setQueryStringParameter(String, String[])public String[] setQueryStringParameter(String name, String[] value)
name - name of the parametervalue - value of the parameter. If the value is already set, this replaces all other values for this parameter name.Simple.setQueryStringParameter(String, String)public Map setQueryStringParameters(Map args)
args - Map of String/String[] pairs that contains all of the parameters for this map.IllegalArgumentException - if the map is not of the correct form.public Definition.AppType getAppType()
DefinitiongetAppType in interface Definitionpublic String getFragment()
DefinitiongetFragment in interface Definitionpublic String getScheme()
Definitionhttp and https.getScheme in interface DefinitionURI.getScheme()public String getAuthority()
DefinitiongetAuthority in interface DefinitionURI.getAuthority()public Definition.ContainerType getContainerType()
DefinitionDefinition.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.getContainerType in interface Definitionpublic String getParameter(String sName)
DefinitiongetParameter in interface DefinitionsName - parameter namepublic String[] getParameters(String sName)
DefinitiongetParameters in interface DefinitionsName - parameter namepublic Collection getParameterNames()
DefinitiongetParameterNames in interface Definitionpublic boolean sessionEncode()
DefinitionsessionEncode in interface Definitionpublic Definition.SatelliteContext getSatelliteContext()
getSatelliteContext in interface Definitionpublic Object getAttribute(String key)
DefinitiongetAttribute in interface Definitionkey - attribute keypublic Collection getAttrbuteNames()
DefinitiongetAttrbuteNames in interface Definition