org.apache.tiles.request

## Interface ApplicationContext

- All Known Implementing Classes:
    ServletApplicationContext, StrutsWildcardServletApplicationContext

      public interface ApplicationContext

  Defines a set of methods which tiles use to communicate to the tiles container and runtime environment. There is only one application context per container.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Map<String,Object>` | `getApplicationScope()` Returns a mutable Map that maps application scope attribute names to their values.
    `Object` | `getContext()` Returns the original, technology-dependent, context.
    `Map<String,String>` | `getInitParams()` Return an immutable Map that maps context application initialization parameters to their values.
    `ApplicationResource` | `getResource(ApplicationResource base, Locale locale)` Return a localized version of an ApplicationResource.
    `ApplicationResource` | `getResource(String localePath)` Return the application resource mapped to the specified path.
    `Collection<ApplicationResource>` | `getResources(String path)` Return the application resources mapped to the specified path.

- - ### Method Detail

    - #### getContext

          Object getContext()

      Returns the original, technology-dependent, context.
      Returns:
        The original application context.

    - #### getApplicationScope

          Map<String,Object> getApplicationScope()

      Returns a mutable Map that maps application scope attribute names to their values.
      Returns:
        Map of key value pairs.

    - #### getInitParams

          Map<String,String> getInitParams()

      Return an immutable Map that maps context application initialization parameters to their values.
      Returns:
        initialization parameters

    - #### getResource

          ApplicationResource getResource(String localePath)

      Return the application resource mapped to the specified path.
      Parameters:
        `localePath` - path to the desired resource, including the Locale suffix.
      Returns:
        the first located resource which matches the given path or null if no such resource exists.

    - #### getResource

          ApplicationResource getResource(ApplicationResource base,
                                          Locale locale)

      Return a localized version of an ApplicationResource.
      Parameters:
        `base` - the ApplicationResource.
        `locale` - the desired Locale.
      Returns:
        the first located resource which matches the given path or null if no such resource exists.

    - #### getResources

          Collection<ApplicationResource> getResources(String path)

      Return the application resources mapped to the specified path.
      Parameters:
        `path` - to the desired resource.
      Returns:
        all resources which match the given path.

Copyright © 2000–2024 Apache Software Foundation. All rights reserved.