|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.turbine.services.BaseInitable org.apache.turbine.services.BaseService org.apache.turbine.services.TurbineBaseService org.apache.jetspeed.services.forward.JetspeedForwardService
This is the implementation of the Jetspeed Forward services. The interface defines methods for forwarding navigation to other pages or panes in the portal. The Forward service provides an abstraction, by removing the hard-coding of portal resources in your actions. Instead, all forward targets are defined in a centralized configuration file. By using the forward service, you use logical forward names in your java code.
Profile
Field Summary | |
protected static java.lang.String |
CONFIG_DIRECTORY
|
protected static java.lang.String |
CONFIG_MAPPING
|
protected java.lang.String |
directory
|
protected org.apache.xml.serialize.OutputFormat |
format
the output format for pretty printing when saving registries |
protected java.util.Map |
forwards
|
protected static java.lang.String |
KEY_DELIMITER
|
protected static JetspeedLogger |
logger
Static initialization of the logger for this class |
protected org.exolab.castor.mapping.Mapping |
mapper
the Castor mapping file name |
protected java.lang.String |
mapping
|
protected java.util.Map |
portletForwards
|
Fields inherited from class org.apache.turbine.services.BaseService |
configuration, name, properties, serviceBroker |
Fields inherited from class org.apache.turbine.services.BaseInitable |
initableBroker, isInitialized |
Fields inherited from interface org.apache.jetspeed.services.forward.ForwardService |
SERVICE_NAME |
Constructor Summary | |
JetspeedForwardService()
|
Method Summary | |
protected void |
dumpMap(java.lang.String mapName,
java.util.Map map)
|
org.apache.turbine.util.DynamicURI |
forward(org.apache.turbine.util.RunData rundata,
java.lang.String forwardName)
Forward to a specific forward by name. |
org.apache.turbine.util.DynamicURI |
forward(org.apache.turbine.util.RunData rundata,
java.lang.String portlet,
java.lang.String target)
For the given portlet and given action, forward to the target defined in the forward configuration for the portlet + action. |
org.apache.turbine.util.DynamicURI |
forwardDynamic(org.apache.turbine.util.RunData rundata,
java.lang.String forwardName,
java.util.Map parameters)
Forward to a specific forward by name. |
org.apache.turbine.util.DynamicURI |
forwardDynamic(org.apache.turbine.util.RunData rundata,
java.lang.String portlet,
java.lang.String target,
java.util.Map parameters)
For the given portlet and given action, forward to the target defined in the forward configuration for the portlet + action. |
protected org.apache.turbine.util.DynamicURI |
forwardInternal(org.apache.turbine.util.RunData rundata,
java.lang.String forwardName,
java.util.Map staticParams,
java.util.Map dynamicParams)
Internal implementation of Forward used by both forwards and portlet forwards. |
Forward |
getForward(java.lang.String forwardName)
Lookup a single forward definition by forward name |
java.util.Collection |
getForwards()
Get a collection of all forwards in the system. |
PortletForward |
getPortletForward(java.lang.String portlet,
java.lang.String target)
Lookup a single portlet forward definition by portlet name + target name |
java.util.Collection |
getPortletForwards()
Get a collection of all portlet forwards in the system. |
void |
init(javax.servlet.ServletConfig conf)
This is the early initialization method called by the Turbine Service framework |
protected void |
loadForwardConfiguration(java.io.File file)
Load and unmarshal a Forward Configuration from a file. |
protected void |
loadForwards()
Load all forward configuration files from forwards directory. |
protected java.lang.String |
makePortletForwardKey(java.lang.String portlet,
java.lang.String target)
|
protected void |
resyncParamMap(java.util.Map map)
|
protected org.apache.turbine.util.DynamicURI |
setQueryParams(org.apache.turbine.util.DynamicURI duri,
java.util.Map baseQueryParams,
java.util.Map staticParams,
java.util.Map dynamicParams)
Adds query parameters to the final URI. |
void |
shutdown()
This is the shutdown method called by the Turbine Service framework |
Methods inherited from class org.apache.turbine.services.TurbineBaseService |
init, 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.Service |
getConfiguration, getName, getProperties, setName, setServiceBroker |
Methods inherited from interface org.apache.turbine.services.Initable |
getInit, init, init, setInitableBroker |
Field Detail |
protected static final JetspeedLogger logger
protected static final java.lang.String CONFIG_MAPPING
protected static final java.lang.String CONFIG_DIRECTORY
protected java.lang.String mapping
protected java.lang.String directory
protected org.exolab.castor.mapping.Mapping mapper
protected org.apache.xml.serialize.OutputFormat format
protected java.util.Map forwards
protected java.util.Map portletForwards
protected static final java.lang.String KEY_DELIMITER
Constructor Detail |
public JetspeedForwardService()
Method Detail |
public void init(javax.servlet.ServletConfig conf) throws org.apache.turbine.services.InitializationException
Service
framework
conf
- The ServletConfig
throws
- a InitializationException
if the service
fails to initialize
org.apache.turbine.services.InitializationException
public void shutdown()
Service
framework
shutdown
in interface org.apache.turbine.services.Initable
public org.apache.turbine.util.DynamicURI forward(org.apache.turbine.util.RunData rundata, java.lang.String forwardName)
forward
in interface ForwardService
rundata
- The turbine rundata context for this request.forwardName
- Forward to this abstract forward name.
public org.apache.turbine.util.DynamicURI forwardDynamic(org.apache.turbine.util.RunData rundata, java.lang.String forwardName, java.util.Map parameters)
forwardDynamic
in interface ForwardService
rundata
- The turbine rundata context for this request.forwardName
- Forward to this abstract forward name.parameters
- The dynamic Validation Parameters used in creating validation forwards
protected org.apache.turbine.util.DynamicURI forwardInternal(org.apache.turbine.util.RunData rundata, java.lang.String forwardName, java.util.Map staticParams, java.util.Map dynamicParams)
rundata
- The turbine rundata context for this request.staticParams
- Map of static query parameters from PortletForward
overriding the static Forwards query parametersdynamicParams
- Map of dynamic query parameters overriding both
static PortletForward parameters and static Forwards query parameters
protected org.apache.turbine.util.DynamicURI setQueryParams(org.apache.turbine.util.DynamicURI duri, java.util.Map baseQueryParams, java.util.Map staticParams, java.util.Map dynamicParams)
duri
- The dynamic URI to have query parameters added to itbaseQueryParams
- The base query parameters from the forward definitionstaticParams
- Map of static query parameters from PortletForward
overriding the static Forwards query parametersdynamicParams
- Map of dynamic query parameters overriding both
static PortletForward parameters and static Forwards query parameters
protected void dumpMap(java.lang.String mapName, java.util.Map map)
public org.apache.turbine.util.DynamicURI forward(org.apache.turbine.util.RunData rundata, java.lang.String portlet, java.lang.String target)
forward
in interface ForwardService
portlet
- The name of the portlet for which we are forwarding.target
- A logical target name. Portlets can have 1 or more targets.
public org.apache.turbine.util.DynamicURI forwardDynamic(org.apache.turbine.util.RunData rundata, java.lang.String portlet, java.lang.String target, java.util.Map parameters)
forwardDynamic
in interface ForwardService
portlet
- The name of the portlet for which we are forwarding.target
- A logical target name. Portlets can have 1 or more targets.parameters
- The dynamic Validation Parameters used in creating validation forwards
public java.util.Collection getForwards()
getForwards
in interface ForwardService
public java.util.Collection getPortletForwards()
getPortletForwards
in interface ForwardService
public Forward getForward(java.lang.String forwardName)
getForward
in interface ForwardService
forwardName
- The name of the Forward to find
public PortletForward getPortletForward(java.lang.String portlet, java.lang.String target)
getPortletForward
in interface ForwardService
portlet
- The name of the portlet in the Portlet Forward to findtarget
- The name of the target in the Portlet Forward to find
protected void loadForwards() throws org.apache.turbine.services.InitializationException
org.apache.turbine.services.InitializationException
protected java.lang.String makePortletForwardKey(java.lang.String portlet, java.lang.String target)
protected void loadForwardConfiguration(java.io.File file)
file
- the absolute file path storing this fragmentprotected void resyncParamMap(java.util.Map map)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |