org.apache.struts.config

Class ForwardConfig

public class ForwardConfig extends Object implements Serializable

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

Since: Struts 1.1

Version: $Rev: 55980 $ $Date: 2004-10-29 16:34:55 +0100 (Fri, 29 Oct 2004) $

Field Summary
protected booleanconfigured
Has this component been completely configured?
protected booleancontextRelative
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 Stringmodule

The prefix of the module to which this ForwardConfig entry points, which must start with a slash ("/") character.

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

The URL to which this ForwardConfig entry points, which must start with a slash ("/") character.

protected booleanredirect
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.
ForwardConfig(String name, String path, boolean redirect, String module)

Construct a new instance with the specified values.

Method Summary
voidfreeze()
Freeze the configuration of this component.
booleangetContextRelative()
StringgetModule()
StringgetName()
StringgetPath()
booleangetRedirect()
voidsetContextRelative(boolean contextRelative)
voidsetModule(String module)
voidsetName(String name)
voidsetPath(String path)
voidsetRedirect(boolean redirect)
StringtoString()
Return a String representation of this object.

Field Detail

configured

protected boolean configured
Has this component been completely configured?

contextRelative

protected boolean contextRelative

Deprecated: Use module property instead; will be removed in a release following 1.2.0.

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?

module

protected String module

The prefix of the module to which this ForwardConfig entry points, which must start with a slash ("/") character.

Usage note: If a forward config is used in a hyperlink, and a module is specified, the path must lead to another action and not directly to a page. This is in keeping with rule that in a modular application all links must be to an action rather than a page.

name

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

path

protected String path

The URL to which this ForwardConfig entry points, which must start with a slash ("/") character. It is interpreted according to the following rules:

redirect

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

Constructor Detail

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)

Deprecated: Use module rather than 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?

ForwardConfig

public ForwardConfig(String name, String path, boolean redirect, String module)

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? module Module prefix, if any

Method Detail

freeze

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

getContextRelative

public boolean getContextRelative()

Deprecated: Use module property instead; will be removed in a release following 1.2.0.

getModule

public String getModule()

getName

public String getName()

getPath

public String getPath()

getRedirect

public boolean getRedirect()

setContextRelative

public void setContextRelative(boolean contextRelative)

Deprecated: Use module property instead; will be removed in a release following 1.2.0.

setModule

public void setModule(String module)

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-2007 - The Apache Software Foundation