org.apache.myfaces.trinidad.context

## Class WindowManager

- java.lang.Object
- - org.apache.myfaces.trinidad.context.WindowManager

-     public abstract class WindowManager
      extends Object

  Manages the set of Windows currently in the Session and allows listeners on the Windows' lifecycles to be registered.

  See Also:
    `RequestContext.getWindowManager()`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `WindowManager()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `addWindowLifecycleListener(javax.faces.context.ExternalContext extContext, WindowLifecycleListener windowListener)` Registers a listener that will be informed of changes to the Lifecylce state of any of the known Windows.
    `abstract Window` | `getCurrentWindow(javax.faces.context.ExternalContext extContext)`
    `abstract Map<String,? extends Window>` | `getWindows(javax.faces.context.ExternalContext extContext)`
    `abstract void` | `removeWindowLifecycleListener(javax.faces.context.ExternalContext extContext, WindowLifecycleListener windowListener)` Removes a listener that will be informed of changes to the Lifecylce state of any of the known Windows
    `abstract void` | `writeState(javax.faces.context.FacesContext context)` Performs any necessary action to embed the current window identifier into the output

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### WindowManager

          public WindowManager()

  - ### Method Detail

    - #### getCurrentWindow

          public abstract Window getCurrentWindow(javax.faces.context.ExternalContext extContext)

      Parameters:
        `extContext` - ExternalContext so that the WindowManager may be called before the FacesContext is available
      Returns:
        The Window that contains the document making the current request

    - #### getWindows

          public abstract Map<String,? extends Window> getWindows(javax.faces.context.ExternalContext extContext)

      Parameters:
        `extContext` - ExternalContext so that the WindowManager may be called before the FacesContext is available
      Returns:
        The Unmodifiable Map of WindowIds to Windows

    - #### addWindowLifecycleListener

          public abstract void addWindowLifecycleListener(javax.faces.context.ExternalContext extContext,
                                        WindowLifecycleListener windowListener)

      Registers a listener that will be informed of changes to the Lifecylce state of any of the known Windows.

      WindowLifecycleListener may be registered automatically by adding a file containing the names of the classes implementing the WindowListener in a file named `org.apache.myfaces.trinidad.event.WindowListener` inside of the `META_INF/services` directory.

      Parameters:
        `extContext` - ExternalContext so that the WindowManager may be called before the FacesContext is available
        `windowListener` -

    - #### removeWindowLifecycleListener

          public abstract void removeWindowLifecycleListener(javax.faces.context.ExternalContext extContext,
                                           WindowLifecycleListener windowListener)

      Removes a listener that will be informed of changes to the Lifecylce state of any of the known Windows
      Parameters:
        `extContext` - ExternalContext so that the WindowManager may be called before the FacesContext is available
        `windowListener` -

    - #### writeState

          public abstract void writeState(javax.faces.context.FacesContext context)
                                   throws IOException

      Performs any necessary action to embed the current window identifier into the output
      Parameters:
        `context` - FacesContext to use to write the output
      Throws:
        `IOException` - if an output exception occurs

Copyright © 2001-2016 The Apache Software Foundation. All Rights Reserved.