org.apache.jetspeed.services.forward
Interface ForwardService

All Superinterfaces:
org.apache.turbine.services.Initable, org.apache.turbine.services.Service
All Known Implementing Classes:
JetspeedForwardService

public interface ForwardService
extends org.apache.turbine.services.Service

This is the interface to 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.

Version:
$Id: ForwardService.java,v 1.5 2004/02/23 03:51:09 jford Exp $
Author:
David Sean Taylor

Field Summary
static java.lang.String SERVICE_NAME
          The name of this service
 
Method Summary
 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.
 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.
 
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, shutdown
 

Field Detail

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
The name of this service

See Also:
Constant Field Values
Method Detail

forward

public org.apache.turbine.util.DynamicURI forward(org.apache.turbine.util.RunData rundata,
                                                  java.lang.String forwardName)
Forward to a specific forward by name. All parameters are resolved statically (via the forward definition)

Parameters:
rundata - The turbine rundata context for this request.
forwardName - Forward to this abstract forward name.
Returns:
DynamicURI the full link to the referenced page

forward

public 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. All parameters are resolved statically (via the forward definition)

Parameters:
portlet - The name of the portlet for which we are forwarding.
target - A logical target name. Portlets can have 1 or more targets.
Returns:
DynamicURI the full link to the referenced page

forwardDynamic

public 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. Parameters are resolved both statically and dynamically, with the dynamic parameter overriding the static parameter definitions.

Parameters:
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
Returns:
DynamicURI the full link to the referenced page

forwardDynamic

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)
For the given portlet and given action, forward to the target defined in the forward configuration for the portlet + action. Parameters are resolved both statically and dynamically, with the dynamic parameter overriding the static parameter definitions.

Parameters:
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
Returns:
DynamicURI the full link to the referenced page

getForwards

public java.util.Collection getForwards()
Get a collection of all forwards in the system.

Returns:
Collection of all forward definitions

getPortletForwards

public java.util.Collection getPortletForwards()
Get a collection of all portlet forwards in the system.

Returns:
Collection of all portlet forward definitions

getForward

public Forward getForward(java.lang.String forwardName)
Lookup a single forward definition by forward name

Parameters:
forwardName - The name of the Forward to find
Returns:
Forward The found forward definition or null if not found

getPortletForward

public PortletForward getPortletForward(java.lang.String portlet,
                                        java.lang.String target)
Lookup a single portlet forward definition by portlet name + target name

Parameters:
portlet - The name of the portlet in the Portlet Forward to find
target - The name of the target in the Portlet Forward to find
Returns:
Forward The found portlet forward definition or null if not found


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.