org.apache.struts.config

Class ForwardConfig

Implemented Interfaces:
Serializable
Known Direct Subclasses:
ActionForward

public class ForwardConfig
extends java.lang.Object
implements Serializable

A JavaBean representing the configuration information of a <forward> element from a Struts configuration file.

Version:
$Revision: 1.9 $ $Date: 2002/10/18 14:34:24 $

Author:
Craig R. McClanahan

Since:
Struts 1.1

Field Summary

protected boolean
configured
Has this component been completely configured?
protected boolean
contextRelative
Should the value of the path property be considered context-relative if it starts with a slash (and therefore not prefixed with the module prefix?
protected String
name
The unique identifier of this forward, which is used to reference it in Action classes.
protected String
path
The URL to which this ForwardConfig entry points, which must start with a slash ("/") character.
protected boolean
redirect
Should a redirect be used to transfer control to the specified path?

Constructor Summary

ForwardConfig()
Construct a new instance with default values.
ForwardConfig(String name, String path, boolean redirect)
Construct a new instance with the specified values.
ForwardConfig(String name, String path, boolean redirect, boolean contextRelative)
Construct a new instance with the specified values.

Method Summary

void
freeze()
Freeze the configuration of this component.
boolean
getContextRelative()
String
getName()
String
getPath()
boolean
getRedirect()
void
setContextRelative(boolean contextRelative)
void
setName(String name)
void
setPath(String path)
void
setRedirect(boolean redirect)
String
toString()
Return a String representation of this object.

Field Details

configured

protected boolean configured
Has this component been completely configured?


contextRelative

protected boolean contextRelative
Should the value of the path property be considered context-relative if it starts with a slash (and therefore not prefixed with the module prefix?


name

protected String name
The unique identifier of this forward, which is used to reference it in Action classes.


path

protected String path


redirect

protected boolean redirect
Should a redirect be used to transfer control to the specified path?

Constructor Details

ForwardConfig

public ForwardConfig()
Construct a new instance with default values.


ForwardConfig

public ForwardConfig(String name,
                     String path,
                     boolean redirect)
Construct a new instance with the specified values.

Parameters:
name - Name of this forward
path - Path to which control should be forwarded or redirected
redirect - Should we do a redirect?


ForwardConfig

public ForwardConfig(String name,
                     String path,
                     boolean redirect,
                     boolean contextRelative)
Construct a new instance with the specified values.

Parameters:
name - Name of this forward
path - Path to which control should be forwarded or redirected
redirect - Should we do a redirect?
contextRelative - Is this path context relative?

Method Details

freeze

public void freeze()
Freeze the configuration of this component.


getContextRelative

public boolean getContextRelative()


getName

public String getName()


getPath

public String getPath()


getRedirect

public boolean getRedirect()


setContextRelative

public void setContextRelative(boolean contextRelative)


setName

public void setName(String name)


setPath

public void setPath(String path)


setRedirect

public void setRedirect(boolean redirect)


toString

public String toString()
Return a String representation of this object.


Copyright B) 2000-2005 - Apache Software Foundation