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, java.lang.String conversationMessagerClass)`

Method Summary
`void` | `beginRequest(javax.servlet.ServletRequest req, javax.servlet.ServletResponse rsp)`
`boolean` | `containsRequestAttribute(java.lang.String key)`
`boolean` | `containsRequestParameterAttribute(java.lang.String key)`
`boolean` | `containsSessionAttribute(java.lang.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()`
`java.lang.Object` | `getBean(java.lang.String name)` Look in the request and session scopes for an entry with the specified name.
`java.lang.String` | `getInitParameter(java.lang.String key)` Return the global init parameter with the specified name.
`java.lang.Object` | `getRequestAttribute(java.lang.String key)` Get a request-scope variable.
`protected java.lang.String` | `getRequestContextPath()`
`java.lang.Object` | `getRequestParameterAttribute(java.lang.String key)` Get a value from the set of input parameters sent by the user as part of the request.
`java.lang.Object` | `getSessionAttribute(java.lang.String key)` Get a variable from the session-scope of the current user.
`void` | `invokeNavigation(java.lang.String navigationName)` Perform a redirect to the specified url.
`void` | `redirect(java.lang.String url)` Instruct the remote browser to fetch the specified URL.
`void` | `setRequestAttribute(java.lang.String key, java.lang.Object value)`
`void` | `setSessionAttribute(java.lang.String key, java.lang.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,
                                 java.lang.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 java.lang.String getInitParameter(java.lang.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 java.lang.Object getRequestParameterAttribute(java.lang.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(java.lang.String key)

  Specified by:
    `containsRequestParameterAttribute` in class `FrameworkAdapter`

### getRequestAttribute

    public java.lang.Object getRequestAttribute(java.lang.String key)

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

  Specified by:
    `getRequestAttribute` in class `FrameworkAdapter`

### setRequestAttribute

    public void setRequestAttribute(java.lang.String key,
                                    java.lang.Object value)

  Specified by:
    `setRequestAttribute` in class `FrameworkAdapter`

### containsRequestAttribute

    public boolean containsRequestAttribute(java.lang.String key)

  Specified by:
    `containsRequestAttribute` in class `FrameworkAdapter`

### getSessionAttribute

    public java.lang.Object getSessionAttribute(java.lang.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(java.lang.String key,
                                    java.lang.Object value)

  Specified by:
    `setSessionAttribute` in class `FrameworkAdapter`

### containsSessionAttribute

    public boolean containsSessionAttribute(java.lang.String key)

  Specified by:
    `containsSessionAttribute` in class `FrameworkAdapter`

### getRequestContextPath

    protected java.lang.String getRequestContextPath()

### redirect

    public void redirect(java.lang.String url)
                  throws java.io.IOException

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

  Specified by:
    `redirect` in class `FrameworkAdapter`
  Throws:
    `java.io.IOException`

### getBean

    public java.lang.Object getBean(java.lang.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(java.lang.String navigationName)
                          throws java.io.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:
    `java.io.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 © 2009 The Apache Software Foundation. All Rights Reserved.