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

## com.opensymphony.xwork2.inject
Interface Scope.Strategy

Enclosing class:
  Scope

    public static interface Scope.Strategy

Pluggable scoping strategy. Enables users to provide custom implementations of request, session, and wizard scopes. Implement and pass to `Container.setScopeStrategy(com.opensymphony.xwork2.inject.Scope.Strategy)`.

Method Summary
`
`<T> T`
` | `findInRequest(Class<T> type, String name, Callable<? extends T> factory)` Finds an object for the given type and name in the request scope.
`
`<T> T`
` | `findInSession(Class<T> type, String name, Callable<? extends T> factory)` Finds an object for the given type and name in the session scope.
`
`<T> T`
` | `findInWizard(Class<T> type, String name, Callable<? extends T> factory)` Finds an object for the given type and name in the wizard scope.

Method Detail

### findInRequest

    <T> T findInRequest(Class<T> type,
                        String name,
                        Callable<? extends T> factory)
                    throws Exception

  Finds an object for the given type and name in the request scope. Creates a new object if necessary using the given factory.

  Throws:
    `Exception`

### findInSession

    <T> T findInSession(Class<T> type,
                        String name,
                        Callable<? extends T> factory)
                    throws Exception

  Finds an object for the given type and name in the session scope. Creates a new object if necessary using the given factory.

  Throws:
    `Exception`

### findInWizard

    <T> T findInWizard(Class<T> type,
                       String name,
                       Callable<? extends T> factory)
                   throws Exception

  Finds an object for the given type and name in the wizard scope. Creates a new object if necessary using the given factory.

  Throws:
    `Exception`

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–2018 Apache Software Foundation. All rights reserved.