org.figure8.join.businessfacades.reporting
Class DefaultEventPublicationManager

java.lang.Object
  extended by org.figure8.join.businessfacades.reporting.DefaultEventPublicationManager
All Implemented Interfaces:
EventPublicationManager

public class DefaultEventPublicationManager
extends java.lang.Object
implements EventPublicationManager

This is the default implementation of EventPublicationManager.
Event publication is made using 2 differents channels : a synchronous one that is information messages creation (used by home page and RSS streams) and an asynchronous one that is JMS message publication.

Version:
$Revision: 1.2 $
Author:
Laurent Broudoux

Field Summary
static java.lang.String ASSEMBLY_PRODUCER_KEY
          Constant representing the key within assembly related messages producer is registered
static java.lang.String BUILD_PRODUCER_KEY
          Constant representing the key within build related messages producer is registered
static int DEFAULT_MESSAGE_DURATION
          Constant representing the default duration of a published message in day.
static java.lang.String DELIVERY_PRODUCER_KEY
          Constant representing the key within delivery related messages producer is registered
static java.lang.String DEPLOYMENT_PRODUCER_KEY
          Constant representing the key within deployment related messages producer is registered
 
Constructor Summary
DefaultEventPublicationManager()
          Creates a new instance of DefaultEventPublicationManager
 
Method Summary
protected  Message createEventMessageForObject(java.lang.Object object, Event event, java.lang.String resourceId)
          Create an Event message on Join frontend when a domain model object has raise a specified event.
 void publishAssemblyCreationEvent(Assembly assembly)
          Publish an event corresponding to an aasembly creation (ie: the aggregation of amny deliverables)
 void publishBuildCreationEvent(Build build)
          Publish an event corresponding to a build creation (ie: the packaging of components)
 void publishDeliveryEvent(Deliverable deliverable)
          Publish an event corresponding to a delivery (ie: a deliverable creation)
 void publishDeploymentDemandEvent(Deployment deployment)
          Publish an event corresponding to the creation of a deployment demand
 void publishDeploymentEndEvent(Deployment deployment)
          Publish an event corresponding to the end of the deployment realization process
 void publishDeploymentPreparationEvent(Deployment deployment)
          Publish an event corresponding to the beginning of a deployment preparation
 void publishDeploymentRealizationEvent(Deployment deployment)
          Publish an event corresponding to the begining of a deployment realization
 void setMessageDuration(int duration)
           
 void setProducersMap(java.util.Map producers)
           
 void setReportingManager(ReportingManager manager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MESSAGE_DURATION

public static final int DEFAULT_MESSAGE_DURATION
Constant representing the default duration of a published message in day.

See Also:
Constant Field Values

DELIVERY_PRODUCER_KEY

public static final java.lang.String DELIVERY_PRODUCER_KEY
Constant representing the key within delivery related messages producer is registered

See Also:
Constant Field Values

ASSEMBLY_PRODUCER_KEY

public static final java.lang.String ASSEMBLY_PRODUCER_KEY
Constant representing the key within assembly related messages producer is registered

See Also:
Constant Field Values

DEPLOYMENT_PRODUCER_KEY

public static final java.lang.String DEPLOYMENT_PRODUCER_KEY
Constant representing the key within deployment related messages producer is registered

See Also:
Constant Field Values

BUILD_PRODUCER_KEY

public static final java.lang.String BUILD_PRODUCER_KEY
Constant representing the key within build related messages producer is registered

See Also:
Constant Field Values
Constructor Detail

DefaultEventPublicationManager

public DefaultEventPublicationManager()
Creates a new instance of DefaultEventPublicationManager

Method Detail

setMessageDuration

public void setMessageDuration(int duration)
Parameters:
duration - Duration of a published message in day

setProducersMap

public void setProducersMap(java.util.Map producers)
Parameters:
producers - A map containing all the registered JMS producers

setReportingManager

public void setReportingManager(ReportingManager manager)
Parameters:
manager - The ReportingManager implementation to use

publishDeliveryEvent

public void publishDeliveryEvent(Deliverable deliverable)
Publish an event corresponding to a delivery (ie: a deliverable creation)

Specified by:
publishDeliveryEvent in interface EventPublicationManager
Parameters:
deliverable - The deliverable that has just been supplied

publishBuildCreationEvent

public void publishBuildCreationEvent(Build build)
Publish an event corresponding to a build creation (ie: the packaging of components)

Specified by:
publishBuildCreationEvent in interface EventPublicationManager
Parameters:
build - The build model object that has just been created

publishAssemblyCreationEvent

public void publishAssemblyCreationEvent(Assembly assembly)
Publish an event corresponding to an aasembly creation (ie: the aggregation of amny deliverables)

Specified by:
publishAssemblyCreationEvent in interface EventPublicationManager
Parameters:
assembly - The assembly model object that has just been created

publishDeploymentDemandEvent

public void publishDeploymentDemandEvent(Deployment deployment)
Publish an event corresponding to the creation of a deployment demand

Specified by:
publishDeploymentDemandEvent in interface EventPublicationManager
Parameters:
deployment - The deployment that has just been created and asked

publishDeploymentPreparationEvent

public void publishDeploymentPreparationEvent(Deployment deployment)
Publish an event corresponding to the beginning of a deployment preparation

Specified by:
publishDeploymentPreparationEvent in interface EventPublicationManager
Parameters:
deployment - The deployment that has been picked for being prepared

publishDeploymentRealizationEvent

public void publishDeploymentRealizationEvent(Deployment deployment)
Publish an event corresponding to the begining of a deployment realization

Specified by:
publishDeploymentRealizationEvent in interface EventPublicationManager
Parameters:
deployment - The deployment that has been picked for being realized

publishDeploymentEndEvent

public void publishDeploymentEndEvent(Deployment deployment)
Publish an event corresponding to the end of the deployment realization process

Specified by:
publishDeploymentEndEvent in interface EventPublicationManager
Parameters:
deployment - The deployment that has just been realized

createEventMessageForObject

protected Message createEventMessageForObject(java.lang.Object object,
                                              Event event,
                                              java.lang.String resourceId)
Create an Event message on Join frontend when a domain model object has raise a specified event. Best efforts are done, but there may be exceptions that will be not propagated (nothing to do to fix that at the moment in workflow progress). We trace this exceptions with log messages and hope administrator will fix message templates defined into mailing list content templates.

Returns:
The newly created message (if succeed)


Copyright © 2005-2008 Join. All Rights Reserved.