Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.portal.core.impl.coordination
Class CoordinationService

    java.lang.Object
      org.jboss.mx.util.JBossNotificationBroadcasterSupport
          org.jboss.system.ServiceMBeanSupport
              org.jboss.portal.jems.as.system.AbstractJBossService
                  org.jboss.portal.core.impl.coordination.CoordinationService

All Implemented Interfaces:
  javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, CoordinationConfigurator, CoordinationManager, org.jboss.system.Service, org.jboss.system.ServiceMBean

    public class CoordinationService

extends AbstractJBossService
implements CoordinationManager, CoordinationConfigurator

Version:
  : 0.1 $
Author:
  Boleslaw Dawidowicz, Chris Laprun

Field Summary
`static java.lang.String` | `BINDING`
`static java.lang.Boolean` | `DEFAULT_IMPLICIT_MODE`
`static java.lang.String` | `EVENT_IMPLICIT_MODE`
`protected EventConverter` | `eventConverter`
`static java.lang.String` | `PARAMETER_IMPLICIT_MODE`
`protected PortalObjectContainer` | `portalObjectContainer`
`static java.lang.String` | `PREFIX`
`static java.lang.String` | `PREFIX_EVENT`
`static java.lang.String` | `PREFIX_EVENT_NAME`
`static java.lang.String` | `PREFIX_EVENT_WIRING`
`static java.lang.String` | `PREFIX_PARAMETER`
`static java.lang.String` | `PREFIX_PARAMETER_ALIAS`
`static java.lang.String` | `PREFIX_PARAMETER_ALIAS_NAME`
`static java.lang.String` | `PREFIX_PARAMETER_BINDING`
`static java.lang.String` | `PREFIX_PARAMETER_NAME`
`static java.lang.String` | `QNAME_SEPARATOR`

Fields inherited from class org.jboss.system.ServiceMBeanSupport
`log, server, SERVICE_CONTROLLER_SIG, serviceName`

Fields inherited from interface org.jboss.system.ServiceMBean
`CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED`

Constructor Summary
`CoordinationService()`

Method Summary
`AliasBindingInfo` | `getAliasBinding(Page page, java.lang.String name)`
`java.util.Collection<AliasBindingInfo>` | `getAliasBindings(Page page)`
`java.util.Collection<java.lang.String>` | `getBindingNames(Window window, javax.xml.namespace.QName name)` Returns the list of bindings for a given window and a given name.
`EventConverter` | `getEventConverter()`
`java.util.Collection<EventWiringInfo>` | `getEventDestinationWirings(Window window)`
`java.util.Collection<EventWiringInfo>` | `getEventSourceWirings(Window window)`
`java.util.Map<Window,org.jboss.portal.portlet.controller.event.PortletWindowEvent>` | `getEventWindows(org.jboss.portal.portlet.controller.event.PortletWindowEvent event, ControllerPortletControllerContext context)`
`EventWiringInfo` | `getEventWiring(Page page, java.lang.String name)` Retrieves the event wiring found in the given page and identified with the specified name
`java.util.Collection<EventWiringInfo>` | `getEventWirings(Page page)`
`java.util.Collection<EventWiringInfo>` | `getEventWirings(Page page, javax.xml.namespace.QName eventQName)`
`PortalObjectContainer` | `getPortalObjectContainer()`
`WindowBindingInfo` | `getWindowBinding(Page page, java.lang.String name)`
`java.util.Collection<? extends WindowBindingInfo>` | `getWindowBindings(Page page)`
`java.util.Collection<? extends WindowBindingInfo>` | `getWindowBindings(Page page, javax.xml.namespace.QName parameterName)`
`java.util.Collection<WindowBindingInfo>` | `getWindowBindings(Window window)`
`java.lang.Boolean` | `isEventWiringImplicitModeEnabled(PageContainer pageContainer)` Checks if implicit event wiring is enabled for a given page container.
`java.lang.Boolean` | `isParameterBindingImplicitModeEnabled(PageContainer pageContainer)` Checks if implicit binding is enabled for a given page container.
`void` | `removeAliasBinding(AliasBindingInfo aliasInfo)` Removes an alias binding.
`void` | `removeAliasBinding(Page page, java.lang.String name)`
`void` | `removeEventWiring(EventWiringInfo info)` Remove wiring
`void` | `removeEventWiring(Page page, java.lang.String wiringName)` Removes the wiring found in the given page and identified with the given name
`void` | `removeEventWiringImplicitMode(PageContainer pageContainer)` Removes event wiring implicit mode entry for a given page container
`void` | `removeParameterBindingImplicitMode(PageContainer pageContainer)` Removes parameter binding implicit mode entry for a given page container
`void` | `removeWindowBinding(Page page, java.lang.String name)`
`void` | `removeWindowBinding(WindowBindingInfo info)` Removes given parameter binding
`void` | `renameAliasBinding(AliasBindingInfo aliasBinding, java.lang.String newName)` Renames the specified alias to the new name
`void` | `renameAliasBinding(Page page, java.lang.String bindingName, java.lang.String newName)`
`void` | `renameEventWiring(EventWiringInfo eventWiring, java.lang.String newName)` Renames the specified wiring to the new name
`void` | `renameEventWiring(Page page, java.lang.String wiringName, java.lang.String newName)` Renames the named wiring in the given Page to the spefified new name.
`void` | `renameWindowBinding(Page page, java.lang.String bindingName, java.lang.String newName)`
`void` | `renameWindowBinding(WindowBindingInfo windowBinding, java.lang.String newName)` Renames the specified window binding to the new name
`java.lang.Boolean` | `resolveEventWiringImplicitModeEnabled(PageContainer page)` Resolves wiring implicit mode.
`java.lang.Boolean` | `resolveParameterBindingImplicitModeEnabled(PageContainer pageContainer)` Resolves binding implicit mode.
`void` | `setAliasBinding(Page page, java.lang.String aliasName, java.util.Set<javax.xml.namespace.QName> qnames)` Set alias binding for a given page.
`void` | `setEventConverter(EventConverter eventConverter)`
`void` | `setEventWiring(java.util.Map<Window,javax.xml.namespace.QName> sources, java.util.Map<Window,javax.xml.namespace.QName> destinations, java.lang.String eventName)` Defines a wiring for a given even QName between multiple source and destination windows
`void` | `setEventWiringImplicitMode(PageContainer pageContainer, boolean mode)` Set event wiring implicit mode for a given page container.
`void` | `setParameterBindingImplicitMode(PageContainer pageContainer, boolean mode)` Set parameter binding implicit mode for a given page container.
`void` | `setPortalObjectContainer(PortalObjectContainer portalObjectContainer)`
`void` | `setWindowBinding(java.lang.String name, java.util.Map<Window,java.util.Set<javax.xml.namespace.QName>> mappings)` Defines shared parameter binding for a given collection of windows.
`protected void` | `startService()`

Methods inherited from class org.jboss.portal.jems.as.system.AbstractJBossService
`create, destroy, getState, getStateString, start, stop`

Methods inherited from class org.jboss.system.ServiceMBeanSupport
`createService, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, stopService`

Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
`addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification`

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

Field Detail

### BINDING

    public static final java.lang.String BINDING

See Also:
  Constant Field Values

### PREFIX

    public static final java.lang.String PREFIX

See Also:
  Constant Field Values

### QNAME_SEPARATOR

    public static final java.lang.String QNAME_SEPARATOR

See Also:
  Constant Field Values

### PREFIX_EVENT

    public static final java.lang.String PREFIX_EVENT

See Also:
  Constant Field Values

### EVENT_IMPLICIT_MODE

    public static final java.lang.String EVENT_IMPLICIT_MODE

See Also:
  Constant Field Values

### PREFIX_EVENT_NAME

    public static final java.lang.String PREFIX_EVENT_NAME

See Also:
  Constant Field Values

### PREFIX_EVENT_WIRING

    public static final java.lang.String PREFIX_EVENT_WIRING

See Also:
  Constant Field Values

### PREFIX_PARAMETER

    public static final java.lang.String PREFIX_PARAMETER

See Also:
  Constant Field Values

### PARAMETER_IMPLICIT_MODE

    public static final java.lang.String PARAMETER_IMPLICIT_MODE

See Also:
  Constant Field Values

### PREFIX_PARAMETER_NAME

    public static final java.lang.String PREFIX_PARAMETER_NAME

See Also:
  Constant Field Values

### PREFIX_PARAMETER_BINDING

    public static final java.lang.String PREFIX_PARAMETER_BINDING

See Also:
  Constant Field Values

### PREFIX_PARAMETER_ALIAS

    public static final java.lang.String PREFIX_PARAMETER_ALIAS

See Also:
  Constant Field Values

### PREFIX_PARAMETER_ALIAS_NAME

    public static final java.lang.String PREFIX_PARAMETER_ALIAS_NAME

See Also:
  Constant Field Values

### DEFAULT_IMPLICIT_MODE

    public static final java.lang.Boolean DEFAULT_IMPLICIT_MODE

### eventConverter

    protected EventConverter eventConverter

### portalObjectContainer

    protected PortalObjectContainer portalObjectContainer

Constructor Detail

### CoordinationService

    public CoordinationService()

Method Detail

### startService

    protected void startService()
                         throws java.lang.Exception

  Overrides:
    `startService` in class `org.jboss.system.ServiceMBeanSupport`
  Throws:
    `java.lang.Exception`

### getEventWindows

    public java.util.Map<Window,org.jboss.portal.portlet.controller.event.PortletWindowEvent> getEventWindows(org.jboss.portal.portlet.controller.event.PortletWindowEvent event,
                                                                                                              ControllerPortletControllerContext context)
                                                                                                       throws IllegalCoordinationException

  Specified by:
    `getEventWindows` in interface `CoordinationManager`
  Returns:
    all windows that given event should be delivered to with current wirings and configuration
  Throws:
    `IllegalCoordinationException`

### getBindingNames

    public java.util.Collection<java.lang.String> getBindingNames(Window window,
                                                                  javax.xml.namespace.QName name)

  Description copied from interface: `CoordinationManager`
  Returns the list of bindings for a given window and a given name. The collection is an aggregation of window bindings and alias bindings.

  Specified by:
    `getBindingNames` in interface `CoordinationManager`
  Parameters:
    `window` - the target window
    `name` - the target name
  Returns:
    all parameter binding names with a given window/name mapping

### setEventWiring

    public void setEventWiring(java.util.Map<Window,javax.xml.namespace.QName> sources,
                               java.util.Map<Window,javax.xml.namespace.QName> destinations,
                               java.lang.String eventName)
                        throws IllegalCoordinationException

  Description copied from interface: `CoordinationConfigurator`
  Defines a wiring for a given even QName between multiple source and destination windows

  Specified by:
    `setEventWiring` in interface `CoordinationConfigurator`
  Throws:
    `IllegalCoordinationException`

### removeEventWiring

    public void removeEventWiring(EventWiringInfo info)
                           throws IllegalCoordinationException

  Description copied from interface: `CoordinationConfigurator`
  Remove wiring

  Specified by:
    `removeEventWiring` in interface `CoordinationConfigurator`
  Throws:
    `IllegalCoordinationException`

### removeEventWiring

    public void removeEventWiring(Page page,
                                  java.lang.String wiringName)

  Description copied from interface: `CoordinationConfigurator`
  Removes the wiring found in the given page and identified with the given name

  Specified by:
    `removeEventWiring` in interface `CoordinationConfigurator`

### renameEventWiring

    public void renameEventWiring(EventWiringInfo eventWiring,
                                  java.lang.String newName)
                           throws IllegalCoordinationException

  Description copied from interface: `CoordinationConfigurator`
  Renames the specified wiring to the new name

  Specified by:
    `renameEventWiring` in interface `CoordinationConfigurator`
  Parameters:
    `eventWiring` - the wiring to be renamed
    `newName` - the wiring new name
  Throws:
    `IllegalCoordinationException`

### renameEventWiring

    public void renameEventWiring(Page page,
                                  java.lang.String wiringName,
                                  java.lang.String newName)
                           throws IllegalCoordinationException

  Description copied from interface: `CoordinationConfigurator`
  Renames the named wiring in the given Page to the spefified new name.

  Specified by:
    `renameEventWiring` in interface `CoordinationConfigurator`
  Parameters:
    `page` - the Page in which the wiring is supposed to be found
    `wiringName` - the name of the wiring to be renamed
    `newName` - the new name for the wiring
  Throws:
    `IllegalCoordinationException`

### setEventWiringImplicitMode

    public void setEventWiringImplicitMode(PageContainer pageContainer,
                                           boolean mode)
                                    throws IllegalCoordinationException

  Description copied from interface: `CoordinationConfigurator`
  Set event wiring implicit mode for a given page container. This will be inherited recursively by all children page containers

  Specified by:
    `setEventWiringImplicitMode` in interface `CoordinationConfigurator`
  Throws:
    `IllegalCoordinationException`

### removeEventWiringImplicitMode

    public void removeEventWiringImplicitMode(PageContainer pageContainer)
                                       throws IllegalCoordinationException

  Description copied from interface: `CoordinationConfigurator`
  Removes event wiring implicit mode entry for a given page container

  Specified by:
    `removeEventWiringImplicitMode` in interface `CoordinationConfigurator`
  Throws:
    `IllegalCoordinationException`

### isEventWiringImplicitModeEnabled

    public java.lang.Boolean isEventWiringImplicitModeEnabled(PageContainer pageContainer)

  Description copied from interface: `CoordinationConfigurator`
  Checks if implicit event wiring is enabled for a given page container. May return null if no implicit mode is not set for this portal object

  Specified by:
    `isEventWiringImplicitModeEnabled` in interface `CoordinationConfigurator`
  Returns:

### resolveEventWiringImplicitModeEnabled

    public java.lang.Boolean resolveEventWiringImplicitModeEnabled(PageContainer page)

  Description copied from interface: `CoordinationManager`
  Resolves wiring implicit mode. If there is no strategy defined for this page container method will browse parent object to resolve inherited modes. If no mode is set this method will return default one

  Specified by:
    `resolveEventWiringImplicitModeEnabled` in interface `CoordinationManager`
  Returns:

### getEventWirings

    public java.util.Collection<EventWiringInfo> getEventWirings(Page page,
                                                                 javax.xml.namespace.QName eventQName)

  Specified by:
    `getEventWirings` in interface `CoordinationConfigurator`
  Returns:
    all wirings defined for a given qname

### getEventWiring

    public EventWiringInfo getEventWiring(Page page,
                                          java.lang.String name)
                                   throws IllegalCoordinationException

  Description copied from interface: `CoordinationConfigurator`
  Retrieves the event wiring found in the given page and identified with the specified name

  Specified by:
    `getEventWiring` in interface `CoordinationConfigurator`
  Returns:
  Throws:
    `IllegalCoordinationException`

### getEventWirings

    public java.util.Collection<EventWiringInfo> getEventWirings(Page page)

  Specified by:
    `getEventWirings` in interface `CoordinationConfigurator`
  Returns:
    all wirings defined in the scope of a given page

### getEventSourceWirings

    public java.util.Collection<EventWiringInfo> getEventSourceWirings(Window window)

  Specified by:
    `getEventSourceWirings` in interface `CoordinationConfigurator`
  Returns:
    all wirings where given window is a source

### getEventDestinationWirings

    public java.util.Collection<EventWiringInfo> getEventDestinationWirings(Window window)

  Specified by:
    `getEventDestinationWirings` in interface `CoordinationConfigurator`
  Returns:
    all wirings where given window is a destination

### setWindowBinding

    public void setWindowBinding(java.lang.String name,
                                 java.util.Map<Window,java.util.Set<javax.xml.namespace.QName>> mappings)
                          throws IllegalCoordinationException

  Description copied from interface: `CoordinationConfigurator`
  Defines shared parameter binding for a given collection of windows.

  Specified by:
    `setWindowBinding` in interface `CoordinationConfigurator`
  Throws:
    `IllegalCoordinationException`

### removeWindowBinding

    public void removeWindowBinding(WindowBindingInfo info)
                             throws IllegalCoordinationException

  Description copied from interface: `CoordinationConfigurator`
  Removes given parameter binding

  Specified by:
    `removeWindowBinding` in interface `CoordinationConfigurator`
  Throws:
    `IllegalCoordinationException`

### removeWindowBinding

    public void removeWindowBinding(Page page,
                                    java.lang.String name)

  Specified by:
    `removeWindowBinding` in interface `CoordinationConfigurator`

### renameWindowBinding

    public void renameWindowBinding(WindowBindingInfo windowBinding,
                                    java.lang.String newName)
                             throws IllegalCoordinationException

  Description copied from interface: `CoordinationConfigurator`
  Renames the specified window binding to the new name

  Specified by:
    `renameWindowBinding` in interface `CoordinationConfigurator`
  Parameters:
    `windowBinding` - the window binding to be renamed
    `newName` - the binding new name
  Throws:
    `IllegalCoordinationException`

### renameWindowBinding

    public void renameWindowBinding(Page page,
                                    java.lang.String bindingName,
                                    java.lang.String newName)
                             throws IllegalCoordinationException

  Specified by:
    `renameWindowBinding` in interface `CoordinationConfigurator`
  Throws:
    `IllegalCoordinationException`

### getWindowBinding

    public WindowBindingInfo getWindowBinding(Page page,
                                              java.lang.String name)
                                       throws IllegalCoordinationException

  Specified by:
    `getWindowBinding` in interface `CoordinationConfigurator`
  Returns:
  Throws:
    `IllegalCoordinationException`

### isParameterBindingImplicitModeEnabled

    public java.lang.Boolean isParameterBindingImplicitModeEnabled(PageContainer pageContainer)

  Description copied from interface: `CoordinationConfigurator`
  Checks if implicit binding is enabled for a given page container. May return null if implicit mode is not set for this portal object

  Specified by:
    `isParameterBindingImplicitModeEnabled` in interface `CoordinationConfigurator`
  Returns:

### setParameterBindingImplicitMode

    public void setParameterBindingImplicitMode(PageContainer pageContainer,
                                                boolean mode)
                                         throws IllegalCoordinationException

  Description copied from interface: `CoordinationConfigurator`
  Set parameter binding implicit mode for a given page container. This will be inherited recursively by all children page containers

  Specified by:
    `setParameterBindingImplicitMode` in interface `CoordinationConfigurator`
  Throws:
    `IllegalCoordinationException`

### resolveParameterBindingImplicitModeEnabled

    public java.lang.Boolean resolveParameterBindingImplicitModeEnabled(PageContainer pageContainer)

  Description copied from interface: `CoordinationManager`
  Resolves binding implicit mode. If there is no mode defined for this page container method will browse parent object to resolve inherited modes. If no mode is set this method will return default one

  Specified by:
    `resolveParameterBindingImplicitModeEnabled` in interface `CoordinationManager`
  Parameters:
    `pageContainer` - the page container
  Returns:

### removeParameterBindingImplicitMode

    public void removeParameterBindingImplicitMode(PageContainer pageContainer)
                                            throws IllegalCoordinationException

  Description copied from interface: `CoordinationConfigurator`
  Removes parameter binding implicit mode entry for a given page container

  Specified by:
    `removeParameterBindingImplicitMode` in interface `CoordinationConfigurator`
  Throws:
    `IllegalCoordinationException`

### setAliasBinding

    public void setAliasBinding(Page page,
                                java.lang.String aliasName,
                                java.util.Set<javax.xml.namespace.QName> qnames)
                         throws IllegalCoordinationException

  Description copied from interface: `CoordinationConfigurator`
  Set alias binding for a given page. If alias with given name already exists it will be overwritten

  Specified by:
    `setAliasBinding` in interface `CoordinationConfigurator`
  Throws:
    `IllegalCoordinationException`

### removeAliasBinding

    public void removeAliasBinding(AliasBindingInfo aliasInfo)
                            throws IllegalCoordinationException

  Description copied from interface: `CoordinationConfigurator`
  Removes an alias binding.

  Specified by:
    `removeAliasBinding` in interface `CoordinationConfigurator`
  Throws:
    `IllegalCoordinationException`

### removeAliasBinding

    public void removeAliasBinding(Page page,
                                   java.lang.String name)

  Specified by:
    `removeAliasBinding` in interface `CoordinationConfigurator`

### renameAliasBinding

    public void renameAliasBinding(AliasBindingInfo aliasBinding,
                                   java.lang.String newName)
                            throws IllegalCoordinationException

  Description copied from interface: `CoordinationConfigurator`
  Renames the specified alias to the new name

  Specified by:
    `renameAliasBinding` in interface `CoordinationConfigurator`
  Parameters:
    `aliasBinding` - the alias binding to be renamed
    `newName` - the alias new name
  Throws:
    `IllegalCoordinationException`

### renameAliasBinding

    public void renameAliasBinding(Page page,
                                   java.lang.String bindingName,
                                   java.lang.String newName)
                            throws IllegalCoordinationException

  Specified by:
    `renameAliasBinding` in interface `CoordinationConfigurator`
  Throws:
    `IllegalCoordinationException`

### getAliasBindings

    public java.util.Collection<AliasBindingInfo> getAliasBindings(Page page)

  Specified by:
    `getAliasBindings` in interface `CoordinationConfigurator`
  Returns:
    collection of alias bindings connected to the given page

### getAliasBinding

    public AliasBindingInfo getAliasBinding(Page page,
                                            java.lang.String name)

  Specified by:
    `getAliasBinding` in interface `CoordinationConfigurator`
  Returns:

### getWindowBindings

    public java.util.Collection<? extends WindowBindingInfo> getWindowBindings(Page page,
                                                                               javax.xml.namespace.QName parameterName)

  Specified by:
    `getWindowBindings` in interface `CoordinationConfigurator`
  Returns:
    window bindings for a given parameter qname

### getWindowBindings

    public java.util.Collection<WindowBindingInfo> getWindowBindings(Window window)

  Specified by:
    `getWindowBindings` in interface `CoordinationConfigurator`
  Returns:
    window bindings where given window is involved

### getWindowBindings

    public java.util.Collection<? extends WindowBindingInfo> getWindowBindings(Page page)

  Specified by:
    `getWindowBindings` in interface `CoordinationConfigurator`
  Returns:
    window bindings define in the scope of a given page

### getPortalObjectContainer

    public PortalObjectContainer getPortalObjectContainer()

### setPortalObjectContainer

    public void setPortalObjectContainer(PortalObjectContainer portalObjectContainer)

### getEventConverter

    public EventConverter getEventConverter()

### setEventConverter

    public void setEventConverter(EventConverter eventConverter)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD