Class TurbineURLMapperService
- java.lang.Object
-
- org.apache.turbine.services.BaseInitable
-
- org.apache.turbine.services.BaseService
-
- org.apache.turbine.services.TurbineBaseService
-
- org.apache.turbine.services.urlmapper.TurbineURLMapperService
-
- All Implemented Interfaces:
Initable
,Service
,URLMapperService
public class TurbineURLMapperService extends TurbineBaseService implements URLMapperService
The URL mapper service provides methods to map a set of parameters to a simplified URL and vice-versa. This service was inspired by the Liferay Friendly URL Mapper.A mapper valve and a link pull tool are provided for easy application.
- Version:
- $Id$
- Author:
- Thomas Vandahl
- See Also:
URLMapperService
,MappedTemplateLink
,URLMapperValve
-
-
Field Summary
-
Fields inherited from class org.apache.turbine.services.BaseService
configuration, name, serviceBroker
-
Fields inherited from class org.apache.turbine.services.BaseInitable
initableBroker, isInitialized
-
Fields inherited from interface org.apache.turbine.services.Service
SERVICE_NAME
-
Fields inherited from interface org.apache.turbine.services.urlmapper.URLMapperService
SERVICE_NAME
-
-
Constructor Summary
Constructors Constructor Description TurbineURLMapperService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
init()
Initializes the service.void
mapFromURL(String url, org.apache.fulcrum.parser.ParameterParser pp)
Map a simplified URL to a set of parametersvoid
mapToURL(TurbineURI uri)
Map a set of parameters (contained in TurbineURI PathInfo and QueryData) to a TurbineURIvoid
shutdown()
Returns to uninitialized state.-
Methods inherited from class org.apache.turbine.services.TurbineBaseService
init, init
-
Methods inherited from class org.apache.turbine.services.BaseService
getConfiguration, getName, getProperties, getServiceBroker, setName, setServiceBroker
-
Methods inherited from class org.apache.turbine.services.BaseInitable
getInit, getInitableBroker, setInit, setInitableBroker
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.turbine.services.Initable
getInit, init, setInitableBroker
-
Methods inherited from interface org.apache.turbine.services.Service
getConfiguration, getName, getProperties, setName, setServiceBroker
-
-
-
-
Constructor Detail
-
TurbineURLMapperService
public TurbineURLMapperService()
-
-
Method Detail
-
mapToURL
public void mapToURL(TurbineURI uri)
Map a set of parameters (contained in TurbineURI PathInfo and QueryData) to a TurbineURI- Specified by:
mapToURL
in interfaceURLMapperService
- Parameters:
uri
- the URI to be modified (with setScriptName())
-
mapFromURL
public void mapFromURL(String url, org.apache.fulcrum.parser.ParameterParser pp)
Map a simplified URL to a set of parameters- Specified by:
mapFromURL
in interfaceURLMapperService
- Parameters:
url
- the URLpp
- a ParameterParser to use for parameter mangling
-
init
public void init() throws InitializationException
Initializes the service.- Specified by:
init
in interfaceInitable
- Overrides:
init
in classTurbineBaseService
- Throws:
InitializationException
- if initialization of this class was not successful.
-
shutdown
public void shutdown()
Returns to uninitialized state.- Specified by:
shutdown
in interfaceInitable
- Overrides:
shutdown
in classTurbineBaseService
-
-