|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.struts.action.ActionMapping
An ActionMapping represents the information that the
controller servlet, ActionServlet
, knows about the mapping
of a particular request to an instance of a particular action class.
The mapping is passed to the perform()
method of the action
class itself, enabling access to this information directly.
An ActionMapping
has the following minimal set of properties.
Additional properties can be added by a subclass, simply by
providing appropriate public "getter" and "setter" methods.
Action
implementation class used by this mapping. This
property is required. DEPRECATED - use type
instead.
formAttribute
property.
ActionForm
bean is created and/or updated for
this mapping. If not present, no ActionForm
bean will
be maintained automatically. DEPRECATED - use
attribute
instead.
ActionForm
implementation class used by this mapping
(if any). DEPRECATED - use the name
attribute
to look up the corresponding ActionFormBean information.
ActionForm
bean (if any). DEPRECATED - use prefix
instead.
scope
instead.
ActionForm
bean (if any). DEPRECATED - use suffix
instead.
RequestDispatcher.forward()
) instead of instantiating the
Action class specified by the type
property.
Exactly one of the forward
, include
, or
type
properties must be specified.
RequestDispatcher.include()
) instead of instantiating the
Action class specified by the type
property.
Exactly one of the forward
, include
, or
type
properties must be specified.inputForm
property.
input
instead.
ActionMappings
collection of which we are a part.
Action
selected by this ActionMapping
.
formPrefix
property.
formScope
attribute.
ActionForm
bean (if any). Replaces the old formSuffix
property.
Action
implementation class used by this mapping.
Replaces the old actionClass
property. Exactly one of
the forward
, include
, or type
properties must be specified.
true
if this action
should be configured as the default for this application, to handle
all requests not handled by another action. Only one action can be
defined as a default within a single application.
true
if the
validate()
method of the form bean (if any) associated
with this mapping should be called.
Field Summary | |
protected java.lang.String |
attribute
The name of the request-scope or session-scope attribute under which our form bean, if any, will be created. |
protected java.lang.String |
forward
The context relative path of the servlet or JSP resource (to be called via RequestDispatcher.forward() ) that will process this
request, rather than instantiating and calling the Action class that is
specified by the type attribute. |
protected ActionForwards |
forwards
The set of ActionForward objects associated with this mapping. |
protected java.lang.String |
include
The context relative path of the servlet or JSP resource (to be called via RequestDispatcher.include() ) that will process this
request, rather than instantiating and calling the Action class that is
specified by the type attribute. |
protected java.lang.String |
input
The context-relative path of the input form to which control should be returned if a validation error is encountered. |
protected Action |
instance
The initialized Action instance for this mapping. |
protected ActionMappings |
mappings
The ActionMappings collection of which we are a part. |
protected java.lang.String |
multipartClass
The fully qualified class name of the MultipartRequestHandler
implementation class used to process multipart request data for this mapping |
protected java.lang.String |
name
The name of the form bean, if any, associated with this action. |
protected java.lang.String |
parameter
General purpose configuration parameter for this mapping. |
protected java.lang.String |
path
The context-relative path of the submitted request, starting with a "/" character, and without the filename extension (if any), that is mapped to this action. |
protected java.lang.String |
prefix
The parameter name prefix used to select parameters for this action. |
protected java.lang.String |
scope
The identifier of the scope ("request" or "session") under which the form bean associated with this mapping, if any, should be created. |
protected java.lang.String |
suffix
The parameter name suffix used to select parameters for this action. |
protected java.lang.String |
type
The fully qualified Java class name of the Action
implementation class to be used to process requests for this mapping. |
protected boolean |
unknown
Should this action be the default for this application? |
protected boolean |
validate
Should the validate() method of our form bean be called? |
Constructor Summary | |
ActionMapping()
|
Method Summary | |
void |
addForward(ActionForward forward)
Add a new ActionForward associated with this mapping. |
ActionForm |
createFormInstance()
Deprecated. Creation of ActionForm instances is now the responsibility of the controller servlet |
ActionForward |
findForward(java.lang.String name)
Return the ActionForward with the specified name,
if any; otherwise return null . |
java.lang.String[] |
findForwards()
Return the logical names of all locally defined forwards for this mapping. |
java.lang.String |
getActionClass()
Deprecated. Use getType() instead |
java.lang.String |
getAttribute()
Return the attribute name for our form bean. |
java.lang.String |
getFormAttribute()
Deprecated. Use getAttribute() instead |
java.lang.String |
getFormClass()
Deprecated. Use the bean name to look up the corresponding ActionFormBean instead |
java.lang.String |
getFormPrefix()
Deprecated. Use getPrefix() instead |
java.lang.String |
getFormScope()
Deprecated. Use getScope() instead |
java.lang.String |
getFormSuffix()
Deprecated. Use getSuffix() instead |
java.lang.String |
getForward()
Return the forward path for this mapping. |
java.lang.String |
getInclude()
Return the include path for this mapping. |
java.lang.String |
getInput()
Return the input form path for this mapping. |
java.lang.String |
getInputForm()
Deprecated. Use getInput() instead |
ActionMappings |
getMappings()
Return the ActionMappings collection of which
we are a part. |
java.lang.String |
getMultipartClass()
Get the name of the class used to handle multipart request data |
java.lang.String |
getName()
Return the name of the form bean for this mapping. |
java.lang.String |
getParameter()
Return the general purpose configuation parameter for this mapping. |
java.lang.String |
getPath()
Return the request URI path used to select this mapping. |
java.lang.String |
getPrefix()
Return the parameter name prefix for this mapping. |
java.lang.String |
getScope()
Return the attribute scope for this mapping. |
java.lang.String |
getSuffix()
Return the parameter name suffix for this mapping. |
java.lang.String |
getType()
Return the fully qualified Action class name. |
boolean |
getUnknown()
Return the unknown flag for this mapping. |
boolean |
getValidate()
Return the validate flag for this mapping. |
void |
removeForward(ActionForward forward)
Remove a ActionForward associated with this mapping. |
void |
setActionClass(java.lang.String actionClass)
Deprecated. Use setType(String) instead |
void |
setAttribute(java.lang.String attribute)
Set the attribute name for our form bean. |
void |
setFormAttribute(java.lang.String formAttribute)
Deprecated. Use setAttribute(String) instead |
void |
setFormClass(java.lang.String formClass)
Deprecated. Modify the corresponding ActionFormBean instead |
void |
setFormPrefix(java.lang.String formPrefix)
Deprecated. Use setPrefix(String) instead |
void |
setFormScope(java.lang.String formScope)
Deprecated. Use setScope(String) instead |
void |
setFormSuffix(java.lang.String formSuffix)
Deprecated. Use setSuffix(String) instead |
void |
setForward(java.lang.String forward)
Set the forward path for this mapping. |
void |
setInclude(java.lang.String include)
Set the include path for this mapping. |
void |
setInput(java.lang.String input)
Set the input form path for this mapping. |
void |
setInputForm(java.lang.String inputForm)
Deprecated. Use setInput(String) instead |
void |
setMappings(ActionMappings mappings)
Set the ActionMappings collection of which
we are a part. |
void |
setMultipartClass(java.lang.String multipartClass)
Set the name of the class used to handle multipart request data |
void |
setName(java.lang.String name)
Set the name of the form bean for this mapping. |
void |
setParameter(java.lang.String parameter)
Set the general purpose configuration parameter for this mapping. |
void |
setPath(java.lang.String path)
Set the request URI path used to select this mapping. |
void |
setPrefix(java.lang.String prefix)
Set the parameter name prefix for this mapping. |
void |
setScope(java.lang.String scope)
Set the attribute scope for this mapping. |
void |
setSuffix(java.lang.String suffix)
Set the parameter name suffix for this mapping. |
void |
setType(java.lang.String type)
Set the fully qualified Action class name. |
void |
setUnknown(boolean unknown)
Set the unknown flag for this mapping. |
void |
setValidate(boolean validate)
Set the validate flag for this mapping. |
java.lang.String |
toString()
Return a String version of this mapping. |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected java.lang.String attribute
protected java.lang.String forward
RequestDispatcher.forward()
) that will process this
request, rather than instantiating and calling the Action class that is
specified by the type
attribute.protected ActionForwards forwards
protected java.lang.String include
RequestDispatcher.include()
) that will process this
request, rather than instantiating and calling the Action class that is
specified by the type
attribute.protected java.lang.String input
protected Action instance
Action
instance for this mapping.protected ActionMappings mappings
ActionMappings
collection of which we are a part.protected java.lang.String multipartClass
MultipartRequestHandler
implementation class used to process multipart request data for this mappingprotected java.lang.String name
protected java.lang.String parameter
protected java.lang.String path
protected java.lang.String prefix
protected java.lang.String scope
protected java.lang.String suffix
protected java.lang.String type
Action
implementation class to be used to process requests for this mapping.protected boolean unknown
protected boolean validate
Constructor Detail |
public ActionMapping()
Method Detail |
public java.lang.String getActionClass()
public void setActionClass(java.lang.String actionClass)
actionClass
- The new action class namepublic java.lang.String getAttribute()
public void setAttribute(java.lang.String attribute)
attribute
- The new attribute namepublic java.lang.String getFormAttribute()
public void setFormAttribute(java.lang.String formAttribute)
formAttribute
- The new form session attribute keypublic java.lang.String getFormClass()
public void setFormClass(java.lang.String formClass)
formClass
- The new form class namepublic java.lang.String getFormPrefix()
public void setFormPrefix(java.lang.String formPrefix)
formPrefix
- The new form prefixpublic java.lang.String getFormScope()
public void setFormScope(java.lang.String formScope)
formScope
- The new scope ("request" or "session")public java.lang.String getFormSuffix()
public void setFormSuffix(java.lang.String formSuffix)
formSuffix
- The new form suffixpublic java.lang.String getForward()
public void setForward(java.lang.String forward)
forward
- The forward path for this mappingpublic java.lang.String getInclude()
public void setInclude(java.lang.String include)
include
- The include path for this mappingpublic java.lang.String getInput()
public void setInput(java.lang.String input)
input
- The new input form pathpublic java.lang.String getInputForm()
public void setInputForm(java.lang.String inputForm)
inputForm
- The new input form URIpublic ActionMappings getMappings()
ActionMappings
collection of which
we are a part.public java.lang.String getMultipartClass()
public void setMappings(ActionMappings mappings)
ActionMappings
collection of which
we are a part.mappings
- The new ActionMappings collectionpublic void setMultipartClass(java.lang.String multipartClass)
multipartClass
- The fully qualified class name representing the
MultipartRequestHandler class to use. If null
,
the global class specified in "web.xml" will be used.public java.lang.String getName()
public void setName(java.lang.String name)
name
- The new namepublic java.lang.String getParameter()
public void setParameter(java.lang.String parameter)
parameter
- The new configuration parameterpublic java.lang.String getPath()
public void setPath(java.lang.String path)
path
- The new request URI pathpublic java.lang.String getPrefix()
public void setPrefix(java.lang.String prefix)
prefix
- The new parameter name prefixpublic java.lang.String getScope()
public void setScope(java.lang.String scope)
scope
- The new attribute scopepublic java.lang.String getSuffix()
public void setSuffix(java.lang.String suffix)
suffix
- The new parameter name suffixpublic java.lang.String getType()
public void setType(java.lang.String type)
type
- The new class namepublic boolean getUnknown()
public void setUnknown(boolean unknown)
unknown
- The new unknown flagpublic boolean getValidate()
public void setValidate(boolean validate)
validate
- The new validate flagpublic void addForward(ActionForward forward)
ActionForward
associated with this mapping.forward
- The ActionForward to be addedpublic ActionForm createFormInstance()
null
is returned.public ActionForward findForward(java.lang.String name)
ActionForward
with the specified name,
if any; otherwise return null
. If there is no locally
defined forwarding for the specified name, but a global forwards
collection has been associated with this mapping, the global
collection will also be searched before returning.name
- Name of the forward entry to be returnedpublic java.lang.String[] findForwards()
public void removeForward(ActionForward forward)
ActionForward
associated with this mapping.forward
- The ActionForward to be removedpublic java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |