Apache Struts API Documentation: Class ActionMappings

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts.action
Class ActionMappings

    java.lang.Object
      |
      +--org.apache.struts.action.ActionMappings

All Implemented Interfaces:
  java.io.Serializable

public class ActionMappings
extends java.lang.Object
implements java.io.Serializable

Encapsulate a collection of ActionMapping objects that can be administered and searched, while hiding the internal implementation.

Version:
  $Revision: 1.1 $ $Date: 2001-09-17 21:13:30 +0100 (Mon, 17 Sep 2001) $
Author:
  Craig R. McClanahan
See Also:
  Serialized Form

Field Summary
`protected FastHashMap` | `mappings` The collection of ActionMapping instances, keyed by request path.
`protected ActionServlet` | `servlet` The ActionServlet instance of our owning application.
`protected ActionMapping` | `unknown` The ActionMapping that should handle unknown request paths, if any.

Constructor Summary
`ActionMappings()`

Method Summary
`void` | `addMapping(ActionMapping mapping)` Register a logical mapping to the set configured for this servlet.
`ActionMapping` | `findMapping(java.lang.String path)` Return the mapping associated with the specified logical name, if any; otherwise return `null`.
`java.lang.String[]` | `findMappings()` Return the set of paths for mappings defined in this collection.
`boolean` | `getFast()` Return the "fast" mode flag.
`ActionServlet` | `getServlet()` Return the `ActionServlet` instance of our owning application.
`ActionMapping` | `getUnknown(javax.servlet.http.HttpServletRequest request)` Return the Action that should handle unknown request paths, if any.
`ActionMapping` | `getUnknown(javax.servlet.ServletRequest request)` Return the Action that should handle unknown request paths, if any.
`void` | `removeMapping(ActionMapping mapping)` Deregister a mapping from the set configured for this servlet.
`void` | `setFast(boolean fast)` Set the "fast" mode flag.
`void` | `setServlet(ActionServlet servlet)` Set the `ActionServlet` instance of our owning application.

Methods inherited from class java.lang.Object
`, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait`

Field Detail

### mappings

    protected FastHashMap mappings

  The collection of ActionMapping instances, keyed by request path.

### servlet

    protected transient ActionServlet servlet

  The ActionServlet instance of our owning application.

### unknown

    protected ActionMapping unknown

  The ActionMapping that should handle unknown request paths, if any.

Constructor Detail

### ActionMappings

    public ActionMappings()

Method Detail

### getFast

    public boolean getFast()

  Return the "fast" mode flag.

### setFast

    public void setFast(boolean fast)

  Set the "fast" mode flag.
  Parameters:
    `fast` - The new fast mode flag

### getUnknown

    public ActionMapping getUnknown(javax.servlet.ServletRequest request)

  Return the Action that should handle unknown request paths, if any. The default implementation casts the request to HttpServletRequest and calls the corresponding version of this method.
  Parameters:
    `request` - The servlet request we are processing

### getUnknown

    public ActionMapping getUnknown(javax.servlet.http.HttpServletRequest request)

  Return the Action that should handle unknown request paths, if any.
  Parameters:
    `request` - The servlet request we are processing

### getServlet

    public ActionServlet getServlet()

  Return the `ActionServlet` instance of our owning application.

### setServlet

    public void setServlet(ActionServlet servlet)

  Set the `ActionServlet` instance of our owning application.
  Parameters:
    `servlet` - The new servlet instance

### addMapping

    public void addMapping(ActionMapping mapping)

  Register a logical mapping to the set configured for this servlet.
  Parameters:
    `mapping` - The mapping to be added

### findMapping

    public ActionMapping findMapping(java.lang.String path)

  Return the mapping associated with the specified logical name, if any; otherwise return `null`.
  Parameters:
    `path` - The request path for which to retrieve a mapping

### findMappings

    public java.lang.String[] findMappings()

  Return the set of paths for mappings defined in this collection. If there are no such mappings, a zero-length array is returned.

### removeMapping

    public void removeMapping(ActionMapping mapping)

  Deregister a mapping from the set configured for this servlet.
  Parameters:
    `mapping` - The mapping to be deregistered

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2001 - Apache Software Foundation