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.conversation.jsf.lib
Class _EndConversationMethodBindingFacade

    java.lang.Object
      javax.faces.el.MethodBinding
          org.apache.myfaces.orchestra.conversation.jsf.lib._EndConversationMethodBindingFacade

All Implemented Interfaces:
  javax.faces.component.StateHolder

    public class _EndConversationMethodBindingFacade

extends javax.faces.el.MethodBinding
implements javax.faces.component.StateHolder

A facade for the original method binding to deal with end conversation conditions.

This class implements MethodBinding, ie represents an EL expression string that specifies a method to call. It is expected to be used when invoking action methods when the current conversation should be closed upon certain results of the action.

This facade also enhances error-handling for action methods. If the invoked method throws an exception of any kind, and an errorOutcome value has been specified then the errorOutcome is returned instead of allowing the exception to propagate. The exception that occurred is reported to the ConversationMessager object associated with the conversation, so it can choose whether and how to present the error to the user.

Constructor Summary
`_EndConversationMethodBindingFacade()`
`_EndConversationMethodBindingFacade(String conversation, Collection onOutcomes, javax.faces.el.MethodBinding original, String errorOutcome)` Constructor.

Method Summary
`String` | `getConversationName()`
`String` | `getExpressionString()`
`Class` | `getType(javax.faces.context.FacesContext context)`
`Object` | `invoke(javax.faces.context.FacesContext context, Object[] values)`
`boolean` | `isTransient()` Required by StateHolder interface.
`void` | `restoreState(javax.faces.context.FacesContext context, Object states)`
`Object` | `saveState(javax.faces.context.FacesContext context)`
`void` | `setTransient(boolean newTransientValue)` Required by StateHolder interface.

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

Constructor Detail

### _EndConversationMethodBindingFacade

    public _EndConversationMethodBindingFacade()

### _EndConversationMethodBindingFacade

    public _EndConversationMethodBindingFacade(String conversation,
                                               Collection onOutcomes,
                                               javax.faces.el.MethodBinding original,
                                               String errorOutcome)

  Constructor.

  Parameters:
    `conversation` - is the name of the conversation to conditionally be closed.
    `onOutcomes` - is a collection of navigation strings that may be returned from the invoked method. One of the following rules is then used to determine whether the conversation is ended or not:
    - If there was no action to invoke, end the conversation, else
    - If the action returned null, do not end the conversation, else
    - If the onOutcomes list is null or empty then end the conversation, else
    - If the returned value is in the onOutcomes list, then end the conversation, else
    - do not end the conversation.
    `original` - is the EL expression to be invoked.
    `errorOutcome` - is a JSF navigation string to be returned if the action method throws an exception of any kind. This navigation value is checked against the onOutcomes values just as if the action method had actually returned this value. When not specified, then on exception the current conversation is not ended.

Method Detail

### getConversationName

    public String getConversationName()

### getExpressionString

    public String getExpressionString()

  Overrides:
    `getExpressionString` in class `javax.faces.el.MethodBinding`

### getType

    public Class getType(javax.faces.context.FacesContext context)
                  throws javax.faces.el.MethodNotFoundException

  Specified by:
    `getType` in class `javax.faces.el.MethodBinding`
  Throws:
    `javax.faces.el.MethodNotFoundException`

### invoke

    public Object invoke(javax.faces.context.FacesContext context,
                         Object[] values)
                  throws javax.faces.el.EvaluationException,
                         javax.faces.el.MethodNotFoundException

  Specified by:
    `invoke` in class `javax.faces.el.MethodBinding`
  Throws:
    `javax.faces.el.EvaluationException`
    `javax.faces.el.MethodNotFoundException`

### setTransient

    public void setTransient(boolean newTransientValue)

  Required by StateHolder interface.

  Specified by:
    `setTransient` in interface `javax.faces.component.StateHolder`

### isTransient

    public boolean isTransient()

  Required by StateHolder interface.

  Specified by:
    `isTransient` in interface `javax.faces.component.StateHolder`

### restoreState

    public void restoreState(javax.faces.context.FacesContext context,
                             Object states)

  Specified by:
    `restoreState` in interface `javax.faces.component.StateHolder`

### saveState

    public Object saveState(javax.faces.context.FacesContext context)

  Specified by:
    `saveState` in interface `javax.faces.component.StateHolder`

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.