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.myfaces.orchestra.frameworkAdapter.basic
Class BasicFrameworkAdapter

    java.lang.Object
      org.apache.myfaces.orchestra.frameworkAdapter.FrameworkAdapter
          org.apache.myfaces.orchestra.frameworkAdapter.basic.BasicFrameworkAdapter

Direct Known Subclasses:
  SpringBasicFrameworkAdapter

    public class BasicFrameworkAdapter

extends FrameworkAdapter

An implementation of the FrameworkAdapter for plain servlet environments.

This class requires the BasicFrameworkAdapterFilter to be configured to run for every request.

## Configuring the ConversationMessager

This class allows the concrete ConversationMessager instance returned by the getConversationMessager method to be configured in a number of ways:

- By calling an explicit setter, passing an instance.
- By specifying a conversationMessagerName parameter to the constructor of this method which matches a bean name defined in the dependency injection framework.
- By specifying a conversationMessagerName that is the fully-qualified name of a ConversationMessager class to be instantiated
- Otherwise, method createDefaultConversationMessager is called which returns a LogConversationMessager instance (unless overridden in a subclass).

See also the BasicFrameworkAdapterFilter class.

Constructor Summary
`BasicFrameworkAdapter(javax.servlet.ServletContext context, String conversationMessagerClass)`

Method Summary
`void` | `beginRequest(javax.servlet.ServletRequest req, javax.servlet.ServletResponse rsp)`
`boolean` | `containsRequestAttribute(String key)`
`boolean` | `containsRequestParameterAttribute(String key)`
`boolean` | `containsSessionAttribute(String key)`
`protected ConversationMessager` | `createConversationMessager()` If this method is not overridden by a subclass, then method setConversationMessager must be used to explicitly provide an instance.
`protected ConversationMessager` | `createDefaultConversationMessager()`
`void` | `endRequest()`
`Object` | `getBean(String name)` Look in the request and session scopes for an entry with the specified name.
`String` | `getInitParameter(String key)` Return the global init parameter with the specified name.
`Object` | `getRequestAttribute(String key)` Get a request-scope variable.
`protected String` | `getRequestContextPath()`
`Object` | `getRequestParameterAttribute(String key)` Get a value from the set of input parameters sent by the user as part of the request.
`Object` | `getSessionAttribute(String key)` Get a variable from the session-scope of the current user.
`void` | `invokeNavigation(String navigationName)` Perform a redirect to the specified url.
`void` | `redirect(String url)` Instruct the remote browser to fetch the specified URL.
`void` | `setRequestAttribute(String key, Object value)`
`void` | `setSessionAttribute(String key, Object value)`

Methods inherited from class org.apache.myfaces.orchestra.frameworkAdapter.FrameworkAdapter
`getConversationMessager, getCurrentInstance, getCurrentViewId, prepare, setConversationMessager, setCurrentInstance`

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

Constructor Detail

### BasicFrameworkAdapter

    public BasicFrameworkAdapter(javax.servlet.ServletContext context,
                                 String conversationMessagerClass)

Method Detail

### createConversationMessager

    protected ConversationMessager createConversationMessager()

  Description copied from class: `FrameworkAdapter`
  If this method is not overridden by a subclass, then method setConversationMessager must be used to explicitly provide an instance.

  Overrides:
    `createConversationMessager` in class `FrameworkAdapter`

### createDefaultConversationMessager

    protected ConversationMessager createDefaultConversationMessager()

### beginRequest

    public void beginRequest(javax.servlet.ServletRequest req,
                             javax.servlet.ServletResponse rsp)

### endRequest

    public void endRequest()

### getInitParameter

    public String getInitParameter(String key)

  Description copied from class: `FrameworkAdapter`
  Return the global init parameter with the specified name. In most cases this is expected to return data from the ServletContext.

  Specified by:
    `getInitParameter` in class `FrameworkAdapter`

### getRequestParameterAttribute

    public Object getRequestParameterAttribute(String key)

  Description copied from class: `FrameworkAdapter`
  Get a value from the set of input parameters sent by the user as part of the request.

  Specified by:
    `getRequestParameterAttribute` in class `FrameworkAdapter`

### containsRequestParameterAttribute

    public boolean containsRequestParameterAttribute(String key)

  Specified by:
    `containsRequestParameterAttribute` in class `FrameworkAdapter`

### getRequestAttribute

    public Object getRequestAttribute(String key)

  Description copied from class: `FrameworkAdapter`
  Get a request-scope variable.

  Specified by:
    `getRequestAttribute` in class `FrameworkAdapter`

### setRequestAttribute

    public void setRequestAttribute(String key,
                                    Object value)

  Specified by:
    `setRequestAttribute` in class `FrameworkAdapter`

### containsRequestAttribute

    public boolean containsRequestAttribute(String key)

  Specified by:
    `containsRequestAttribute` in class `FrameworkAdapter`

### getSessionAttribute

    public Object getSessionAttribute(String key)

  Description copied from class: `FrameworkAdapter`
  Get a variable from the session-scope of the current user.

  Specified by:
    `getSessionAttribute` in class `FrameworkAdapter`

### setSessionAttribute

    public void setSessionAttribute(String key,
                                    Object value)

  Specified by:
    `setSessionAttribute` in class `FrameworkAdapter`

### containsSessionAttribute

    public boolean containsSessionAttribute(String key)

  Specified by:
    `containsSessionAttribute` in class `FrameworkAdapter`

### getRequestContextPath

    protected String getRequestContextPath()

### redirect

    public void redirect(String url)
                  throws IOException

  Description copied from class: `FrameworkAdapter`
  Instruct the remote browser to fetch the specified URL.

  Specified by:
    `redirect` in class `FrameworkAdapter`
  Throws:
    `IOException`

### getBean

    public Object getBean(String name)

  Look in the request and session scopes for an entry with the specified name.

  This basic adapter class does not support invoking the JSP expression evaluator; no "variable resolver" will ever be used to look up the specified name.

  TODO: also look in the application scope.

  TODO: investigate invoking the jsp.ExpressionFactory class to look up the variable. Possibly that could be done in a different JspFrameworkAdapter class.

  Specified by:
    `getBean` in class `FrameworkAdapter`

### invokeNavigation

    public void invokeNavigation(String navigationName)
                          throws IOException

  Perform a redirect to the specified url.

  A redirect is done rather than a forward so that the remote browser has its current url updated appropriately. Note that a redirect does cause any request-scoped variables to be discarded.

  Specified by:
    `invokeNavigation` in class `FrameworkAdapter`
  Throws:
    `IOException`

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 © 2012 The Apache Software Foundation. All Rights Reserved.