org.eclnt.jsfserver.managedbean

## Interface IDispatcher

- All Superinterfaces:
    java.util.Map<java.lang.String,java.lang.Object>
  All Known Subinterfaces:
    IWorkpageDispatcher
  All Known Implementing Classes:
    CCTDDispatcher, DefaultDispatcher, WorkpageDispatcher

      public interface IDispatcher
      extends java.util.Map<java.lang.String,java.lang.Object>

  Interface of a dispatcher that manages managed bean objects in the following way: for each managed bean class one object is kept.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface java.util.Map

      `java.util.Map.Entry<K,V>`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `checkIfDispatchedBeanIsLoaded(java.lang.Class dispatchedBeanClass)`
    `boolean` | `checkIfDispatchedBeanIsLoaded(java.lang.String dispatchedBeanName)`
    `ModalPopup` | `createModalPopup()` Create a modal popup instance within the workpage context.
    `ModelessPopup` | `createModelessPopup()` Create a modeless popup instance within the workpage context.
    `int` | `createSubDispatcherIndex()`
    `IDispatcher` | `createSubDispatcherInstance()` A dispatcher may have other dispatchers below.
    `void` | `destroy()` Destroys the dispatcher and its contained objects.
    `java.util.List<IDispatcher>` | `getChildDispatchers()` Returns a list of child dispatchers - if the dispatcher is hierarchized.
    `java.lang.String` | `getContentReplace()` Returns the content replace statement that is passed to included pages.
    `java.lang.Object` | `getDispatchedBean(java.lang.Class dispachtedBeanClass)` Find managed bean for class.
    `java.lang.Object` | `getDispatchedBean(java.lang.String dispatchedBeanName)` Find managed bean for name.
    `java.lang.String` | `getExpressionBase()` Each dispatcher is the entry point to its managed beans.
    `java.lang.String` | `getMyExpression(java.lang.Class cl)` Returns the expression for the object that is managed inside the dispatcher.
    `java.lang.String` | `getMyExpression(java.lang.Object o)` Returns the expression for the object that is managed inside the dispatcher.
    `IDispatcher` | `getOwner()` Passes back the dispatcher above.
    `IDispatcher` | `getTopOwner()` Passes back the top owner of the dispatcher hierarchy.
    `void` | `removeDispatchedBean(java.lang.Class dispatchedBeanClass)` Removes dispatched bean from dispatcher.
    `void` | `removeDispatchedBean(java.lang.String dispatchedBeanName)` Removes dispatched bean from dispatcher.
    `void` | `setOwner(IDispatcher owner)`
    `void` | `unregisterSubDispatcherInstance(IDispatcher subDispatcher)`
    `java.lang.String` | `updateExpression(java.lang.String expression)` Within the bean processing you may create components in a dynamic way, e.g. using the feature "componentbinding".

    - ### Methods inherited from interface java.util.Map

      `clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values`

- - ### Method Detail

    - #### getDispatchedBean

          java.lang.Object getDispatchedBean(java.lang.Class dispachtedBeanClass)

      Find managed bean for class. If the bean already exists then the bean is returned. If it does not exist yet then a new instance will be created.

    - #### removeDispatchedBean

          void removeDispatchedBean(java.lang.Class dispatchedBeanClass)

      Removes dispatched bean from dispatcher.

    - #### getDispatchedBean

          java.lang.Object getDispatchedBean(java.lang.String dispatchedBeanName)

      Find managed bean for name. If the bean already exists then the beans is returned. If it does not exist yet then a new instance will be created.
      Parameters:
        `dispatchedBeanName` - Name of the beans - this is the name that is used for binding the bean within the user interface, as well. E.g. if the bean's binding is "#{d.AbcdeUI. ...} then you may access the bean by passing "AbcdeUI".

    - #### removeDispatchedBean

          void removeDispatchedBean(java.lang.String dispatchedBeanName)

      Removes dispatched bean from dispatcher.

    - #### getExpressionBase

          java.lang.String getExpressionBase()

      Each dispatcher is the entry point to its managed beans. Dispatchers themselves may be nested. This method returns the expression of this dispatcher instance.

    - #### createSubDispatcherInstance

          IDispatcher createSubDispatcherInstance()

      A dispatcher may have other dispatchers below. This method creates a sub dispatcher.

    - #### destroy

          void destroy()

      Destroys the dispatcher and its contained objects.

    - #### updateExpression

          java.lang.String updateExpression(java.lang.String expression)

      Within the bean processing you may create components in a dynamic way, e.g. using the feature "componentbinding". When assigning expression to component you need to pay attention that the binding fits to the dispatcher environment in which your bean resides.
      This method builds an expression that is relative to the current dispatcher.
      Parameters:
        `expression` - The normal expression, e.g. "#{d.Car}".
      Returns:
        The relative expression, e.g. "#{d.d_1.Car}".

    - #### getContentReplace

          java.lang.String getContentReplace()

      Returns the content replace statement that is passed to included pages. Returns a value like "#{d.:#{d.d_1.".

    - #### getMyExpression

          java.lang.String getMyExpression(java.lang.Object o)

      Returns the expression for the object that is managed inside the dispatcher.
      Returns:
        Expression of object: "#{d.xyz}"

    - #### getMyExpression

          java.lang.String getMyExpression(java.lang.Class cl)

      Returns the expression for the object that is managed inside the dispatcher.
      Returns:
        Expression of object: "#{d.xyz}"

    - #### getOwner

          IDispatcher getOwner()

      Passes back the dispatcher above. Null is returned if the current instance is the top dispatcher

    - #### getTopOwner

          IDispatcher getTopOwner()

      Passes back the top owner of the dispatcher hierarchy. If the current dispatcher is the top owner itself, then the current dispatcher is returned.

    - #### createModalPopup

          ModalPopup createModalPopup()

      Create a modal popup instance within the workpage context.

    - #### createModelessPopup

          ModelessPopup createModelessPopup()

      Create a modeless popup instance within the workpage context.

    - #### setOwner

          void setOwner(IDispatcher owner)

    - #### unregisterSubDispatcherInstance

          void unregisterSubDispatcherInstance(IDispatcher subDispatcher)

    - #### createSubDispatcherIndex

          int createSubDispatcherIndex()

    - #### getChildDispatchers

          java.util.List<IDispatcher> getChildDispatchers()

      Returns a list of child dispatchers - if the dispatcher is hierarchized.

    - #### checkIfDispatchedBeanIsLoaded

          boolean checkIfDispatchedBeanIsLoaded(java.lang.Class dispatchedBeanClass)

    - #### checkIfDispatchedBeanIsLoaded

          boolean checkIfDispatchedBeanIsLoaded(java.lang.String dispatchedBeanName)

Copyright © CaptainCasa Gmbh. All Rights Reserved.