Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2006 BEA Systems, Inc. All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.portal.tools.common
Class ResourceContext

    java.lang.Object
      com.bea.portal.tools.common.ResourceContext

    public class ResourceContext

extends Object

Encapsulates information needed for tools controls.

Method Summary
`static ResourceContext` | `createResourceContext(Collection<Locale> locales, HttpServletRequest request, boolean visitorMode)` Create a ResourceContext using the specified locales.
`static ResourceContext` | `createResourceContext(HttpServletRequest request, boolean visitorMode)` Create a ResourceContext using the default locale specified in the request.
`static ResourceContext` | `createResourceContext(Locale locale, HttpServletRequest request, boolean visitorMode)` Create a ResourceContext using the specified locale.
`String[]` | `getDaCapabilities()` Returns the delegated administration capabilities to check when calling some (usually paginated) methods.
`Collection<Locale>` | `getLocales()`
`Locale` | `getPrimaryLocale()`
`HttpServletRequest` | `getRequest()`
`boolean` | `getVisitorMode()`
`String` | `getWebApp()` Returns the web app
`boolean` | `isRetrieveResultsIfNoLocale()`
`void` | `setDaCapabilities(String[] daCapabilities)` Specifies delegated administration capabilities to check when calling some (usually paginated) methods.
`void` | `setRetrieveResultsIfNoLocale(boolean retrieveResultsIfNoLocale)`
`void` | `setVisitorMode(boolean visitorMode)`
`void` | `setWebApp(String webApp)` Specifies the current web app

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

Method Detail

### createResourceContext

    public static ResourceContext createResourceContext(HttpServletRequest request,
                                                        boolean visitorMode)

  Create a ResourceContext using the default locale specified in the request.

  Parameters
    `request` - the user's request
    `visitorMode` - true for visitor tools / false for admin tools

### createResourceContext

    public static ResourceContext createResourceContext(Locale locale,
                                                        HttpServletRequest request,
                                                        boolean visitorMode)

  Create a ResourceContext using the specified locale.

  Parameters
    `locale` - the user's locale
    `request` - the user's request
    `visitorMode` - true for visitor tools / false for admin tools

### createResourceContext

    public static ResourceContext createResourceContext(Collection<Locale> locales,
                                                        HttpServletRequest request,
                                                        boolean visitorMode)

  Create a ResourceContext using the specified locales.

  Parameters
    `locales` - the user's preferred locales
    `request` - the user's request. Cannot be null.
    `visitorMode` - true for visitor tools / false for admin tools

### getLocales

    public Collection<Locale> getLocales()

  Returns
    the user's preferred locales

### getPrimaryLocale

    public Locale getPrimaryLocale()

### getRequest

    public HttpServletRequest getRequest()

  Returns
    the user's request

### getVisitorMode

    public boolean getVisitorMode()

  Returns
    true for visitor tools / false for admin tools

### isRetrieveResultsIfNoLocale

    public boolean isRetrieveResultsIfNoLocale()

### setRetrieveResultsIfNoLocale

    public void setRetrieveResultsIfNoLocale(boolean retrieveResultsIfNoLocale)

### setVisitorMode

    public void setVisitorMode(boolean visitorMode)

  Parameters
    `visitorMode` - true for visitor tools / false for admin tools

### setDaCapabilities

    public void setDaCapabilities(String[] daCapabilities)

  Specifies delegated administration capabilities to check when calling some (usually paginated) methods. The system will grant access if access is allowed for at least one of these capabilities.

### getDaCapabilities

    public String[] getDaCapabilities()

  Returns the delegated administration capabilities to check when calling some (usually paginated) methods. The system will grant access if access is allowed for at least one of these capabilities.

### setWebApp

    public void setWebApp(String webApp)

  Specifies the current web app

### getWebApp

    public String getWebApp()

  Returns the web app

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

Copyright © 2006 BEA Systems, Inc. All Rights Reserved