|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lumis.portal.url.GenericURLResolver
public class GenericURLResolver
Generic implementation of IURLResolver
.
The web resource's property
lumis.portal.url.IURLResolver.pattern
is used to customize the friendly path generated by this resolver.
The value of the property is a EL expression where the following variables
may be used:
wr
: the WebResource
instance.ancestralPath
: the friendly path of the nearest ancestral
web resource that has a friendly path value set. If no such web resource
exists, it is resolved to null
param
: Maps a request parameter name to a single value.paramValues
: Maps a request parameter name to an array of values.paramsPath: an automatic generated path fragment containing
parameter names and values. The path starts with slash if it is non-empty,
otherwise it does not contain an starting slash. GUID format parameter values
and values for special parameters are ignored.
currentPath
: the current path value in the pipeline.
Corresponds to the parameter given in
resolveFriendlyPath(WebResource, String)
.
The default pattern (used if the pattern property is not set) is:
${ancestralPath}/${wr.title}${paramsPath}
Constructor Summary | |
---|---|
GenericURLResolver()
|
Method Summary | |
---|---|
protected boolean |
isParameterVisible(String name,
String[] values)
Indicates if a parameter is to be shown in the string generated by paramsPath . |
protected String |
normalize(String value)
Normalizes a string value to the form it should take in the friendly path. |
String |
resolveFriendlyPath(WebResource resource,
String currentPath)
Resolves the friendly path for a web resource. |
protected Object |
resolveVariable(String variableName,
WebResource webResource,
String currentPath)
Resolves a variable in the friendly path expression. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GenericURLResolver()
Method Detail |
---|
public String resolveFriendlyPath(WebResource resource, String currentPath) throws PortalException
IURLResolver
resolveFriendlyPath
in interface IURLResolver
resource
- the web resource.currentPath
- the path value resolved by previous
IURLResolver
in the resolution pipeline, or an empty String
if this is the first resolver in the pipeline.
PortalException
protected Object resolveVariable(String variableName, WebResource webResource, String currentPath) throws ELException
variableName
- the name of the variable to be resolved.webResource
- the web resource.currentPath
- the current path in the friendly path resolution.
ELException
- if the variable could not be resolved.resolveFriendlyPath(WebResource, String)
protected boolean isParameterVisible(String name, String[] values)
paramsPath
.
name
- the parameter name.values
- the parameter values.
true
if the parameter is to be shown,
false
otherwise.protected String normalize(String value)
value
- the string value to be normalized.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |