ConfigHelperInterface (Apache Struts API Documentation)
Keywords: org.apache.struts.config.ConfigHelperInterface,ConfigHelperInterface interface

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

## org.apache.struts.config
Interface ConfigHelperInterface

All Known Implementing Classes:
  ConfigHelper

public interface ConfigHelperInterface

NOTE: THIS CLASS IS UNDER ACTIVE DEVELOPMENT. THE CURRENT CODE IS WRITTEN FOR CLARITY NOT EFFICIENCY. NOT EVERY API FUNCTION HAS BEEN IMPLEMENTED YET. A helper object to expose the Struts shared resources, which are be stored in the application, session, or request contexts, as appropriate. An instance should be created for each request processed. The methods which return resources from the request or session contexts are not thread-safe. Provided for use by other servlets in the application so they can easily access the Struts shared resources. The resources are stored under attributes in the application, session, or request contexts. The ActionConfig methods simply return the resources from under the context and key used by the Struts ActionServlet when the resources are created.

Since:
  1.1
Version:
  $Revision: 1.1 $ $Date: 2003-08-22 09:14:33 +0100 (Fri, 22 Aug 2003) $
Author:
  Ted Husted, Luis Arias

Method Summary
`java.lang.String` | `getAction(java.lang.String path)` Return the URL for the specified ActionMapping, otherwise return `null`.
`ActionErrors` | `getActionErrors()` The `org.apache.struts.action.ActionErrors` object, for this request.
`ActionForm` | `getActionForm()`
`ActionFormBeans` | `getActionFormBeans()` The `org.apache.struts.action.ActionFormBeans` collection for this application.
`ActionForward` | `getActionForward(java.lang.String name)` Return the forwarding associated with the specified logical name, if any; otherwise return `null`.
`ActionForwards` | `getActionForwards()` The `org.apache.struts.action.ActionForwards` collection for this application.
`ActionMapping` | `getActionMapping(java.lang.String path)` Return the mapping associated with the specified request path, if any; otherwise return `null`.
`java.lang.String` | `getActionMappingName(java.lang.String action)` Return the form action converted into an action mapping path.
`ActionMappings` | `getActionMappings()` The context attributes key under which our `org.apache.struts.action.ActionMappings` collection is normally stored, unless overridden when initializing our ActionServlet.
`java.lang.String` | `getActionMappingURL(java.lang.String action)` Return the form action converted into a server-relative URL.
`ActionMessages` | `getActionMessages()` The `org.apache.struts.action.ActionFormBeans` collection for this application.
`java.lang.String` | `getBaseRef()` Renders the reference for a HTML element
`javax.sql.DataSource` | `getDataSource()`
`java.lang.String` | `getEncodeURL(java.lang.String url)` Return the url encoded to maintain the user session, if any.
`java.lang.String` | `getErrorOutput()` Returns the errors.header, any errors, and the errors.footer.
`java.lang.String` | `getErrorOutput(java.lang.String property)` Returns the errors.header, any errors, and the errors.footer.
`java.util.Iterator` | `getErrors()` Return the error messages
`java.util.Iterator` | `getErrors(java.lang.String property)` Return an ActionError for a property
`boolean` | `getErrorsEmpty()` Return true if there are no errors queued
`int` | `getErrorSize()` Return the number of error messages.
`int` | `getErrorSize(java.lang.String property)` Return the number of error messages.
`java.lang.Throwable` | `getException()` The runtime JspException that may be been thrown by a Struts tag extension, or compatible presentation extension, and placed in the request.
`ActionFormBean` | `getFormBean(java.lang.String name)` Return the form bean definition associated with the specified logical name, if any; otherwise return `null`.
`java.lang.String` | `getLink(java.lang.String name)` Return the path for the specified forward, otherwise return `null`.
`java.util.Locale` | `getLocale()` The `java.util.Locale` for the user, if any.
`ActionMapping` | `getMapping()` The `org.apache.struts.ActionMapping` instance for this request.
`java.lang.String` | `getMessage(java.lang.String key)` Return the localized message for the specified key, otherwise return `null`.
`java.lang.String` | `getMessage(java.lang.String key, java.lang.Object[] args)` Look up and return a message string, based on the specified parameters.
`MessageResources` | `getMessageResources()` The application resources for this application.
`MultipartRequestWrapper` | `getMultipartRequestWrapper()` The multipart object for this request.
`java.lang.String` | `getOrigRef()` Renders the reference for a HTML element
`java.lang.String` | `getServletMapping()` The path-mapped pattern (`/action/*`) or extension mapped pattern ((`*.do`) used to determine our Action URIs in this application.
`java.lang.String` | `getToken()` The transaction token stored in this session, if it is used.
`boolean` | `isMessage(java.lang.String key)` Return true if a message string for the specified message key is present for the user's Locale.

Method Detail

### getDataSource

    public javax.sql.DataSource getDataSource()

### getActionMessages

    public ActionMessages getActionMessages()

  The `org.apache.struts.action.ActionFormBeans` collection for this application.

### getActionFormBeans

    public ActionFormBeans getActionFormBeans()

  The `org.apache.struts.action.ActionFormBeans` collection for this application.

### getActionForwards

    public ActionForwards getActionForwards()

  The `org.apache.struts.action.ActionForwards` collection for this application.

### getActionMappings

    public ActionMappings getActionMappings()

  The context attributes key under which our `org.apache.struts.action.ActionMappings` collection is normally stored, unless overridden when initializing our ActionServlet.

### getMessageResources

    public MessageResources getMessageResources()

  The application resources for this application.

### getServletMapping

    public java.lang.String getServletMapping()

  The path-mapped pattern (`/action/*`) or extension mapped pattern ((`*.do`) used to determine our Action URIs in this application.

### getLocale

    public java.util.Locale getLocale()

  The `java.util.Locale` for the user, if any. If a default locale object is not in the user's session, the system default locale is returned. If used, the user locale is typically set during login processing under the key `Globals.LOCALE_KEY`.

### getToken

    public java.lang.String getToken()

  The transaction token stored in this session, if it is used.

### getActionErrors

    public ActionErrors getActionErrors()

  The `org.apache.struts.action.ActionErrors` object, for this request.

### getException

    public java.lang.Throwable getException()

  The runtime JspException that may be been thrown by a Struts tag extension, or compatible presentation extension, and placed in the request.

### getMultipartRequestWrapper

    public MultipartRequestWrapper getMultipartRequestWrapper()

  The multipart object for this request.

### getMapping

    public ActionMapping getMapping()

  The `org.apache.struts.ActionMapping` instance for this request.

### isMessage

    public boolean isMessage(java.lang.String key)

  Return true if a message string for the specified message key is present for the user's Locale.

  Parameters:
    `key` - Message key

### getActionForm

    public ActionForm getActionForm()

### getFormBean

    public ActionFormBean getFormBean(java.lang.String name)

  Return the form bean definition associated with the specified logical name, if any; otherwise return `null`.

  Parameters:
    `name` - Logical name of the requested form bean definition

### getActionForward

    public ActionForward getActionForward(java.lang.String name)

  Return the forwarding associated with the specified logical name, if any; otherwise return `null`.

  Parameters:
    `name` - Logical name of the requested forwarding

### getActionMapping

    public ActionMapping getActionMapping(java.lang.String path)

  Return the mapping associated with the specified request path, if any; otherwise return `null`.

  Parameters:
    `path` - Request path for which a mapping is requested

### getActionMappingName

    public java.lang.String getActionMappingName(java.lang.String action)

  Return the form action converted into an action mapping path. The value of the `action` property is manipulated as follows in computing the name of the requested mapping:
  - Any filename extension is removed (on the theory that extension mapping is being used to select the controller servlet).
  - If the resulting value does not start with a slash, then a slash is prepended.
  :FIXME: Bad assumption =:o)

### getActionMappingURL

    public java.lang.String getActionMappingURL(java.lang.String action)

  Return the form action converted into a server-relative URL.

### getEncodeURL

    public java.lang.String getEncodeURL(java.lang.String url)

  Return the url encoded to maintain the user session, if any.

### getOrigRef

    public java.lang.String getOrigRef()

  Renders the reference for a HTML element

### getBaseRef

    public java.lang.String getBaseRef()

  Renders the reference for a HTML element

### getLink

    public java.lang.String getLink(java.lang.String name)

  Return the path for the specified forward, otherwise return `null`.

  Parameters:
    `name` - Name given to local or global forward.

### getMessage

    public java.lang.String getMessage(java.lang.String key)

  Return the localized message for the specified key, otherwise return `null`.

  Parameters:
    `key` - Message key

### getMessage

    public java.lang.String getMessage(java.lang.String key,
                                       java.lang.Object[] args)

  Look up and return a message string, based on the specified parameters.

  Parameters:
    `key` - Message key to be looked up and returned
    `args` - Replacement parameters for this message

### getAction

    public java.lang.String getAction(java.lang.String path)

  Return the URL for the specified ActionMapping, otherwise return `null`.

  Parameters:
    `path` - Name given to local or global forward.

### getErrorSize

    public int getErrorSize()

  Return the number of error messages.

### getErrorsEmpty

    public boolean getErrorsEmpty()

  Return true if there are no errors queued

### getErrors

    public java.util.Iterator getErrors()

  Return the error messages

### getErrorOutput

    public java.lang.String getErrorOutput()

  Returns the errors.header, any errors, and the errors.footer.

### getErrorSize

    public int getErrorSize(java.lang.String property)

  Return the number of error messages.

  Parameters:
    `property` - Property name

### getErrorOutput

    public java.lang.String getErrorOutput(java.lang.String property)

  Returns the errors.header, any errors, and the errors.footer.

  Parameters:
    `property` - Property name

### getErrors

    public java.util.Iterator getErrors(java.lang.String property)

  Return an ActionError for a property

  Parameters:
    `property` - Property name

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

Copyright © 2000-2003 - Apache Software Foundation