com.metamatrix.console.ui.views.deploy.event
Class ConfigurationChangeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.metamatrix.console.ui.views.deploy.event.ConfigurationChangeEvent
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ConfigurationTreeModelEvent

public class ConfigurationChangeEvent
extends java.util.EventObject

The ConfigurationChangeEvent is used to notify ConfigurationChangeListeners that a change in a Configuration has occurred.

Since:
Golden Gate
Version:
1.0
Author:
Dan Florian
See Also:
Serialized Form

Field Summary
protected  java.lang.Object[] ancestors
          Ancestor objects starting with the parent.
protected static int CONFIGURATION
          Source of the event is a configuration.
static int DELETED
          Indicates something in a configuration has been deleted.
protected static int DEPLOYED_PSC
          Source of the event is a deployed PSC.
protected static int DEPLOYED_SERVICE
          Source of the event is a deployed service.
protected static int HOST
          Source of the event is a host.
static int MODIFIED
          Indicates something in a configuration has been modified.
static int NEW
          Indicates something new has been added to a configuration.
protected static int PROCESS
          Source of the event is a process.
protected static int PRODUCT
          Source of the event is a product.
protected static int PSC_DEFN
          Source of the event is a PSC definition.
static int REFRESH_END
          Indicates the configuration refresh has ended.
static int REFRESH_START
          Indicates the configuration will be refreshed after notifying all listeners.
protected static int SERVICE_DEFN
          Source of the event is a service definition.
protected  int type
          The event type.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
  ConfigurationChangeEvent(int theRefreshType, java.lang.Object theSource)
          Constructs a refresh ConfigurationChangeEvent.
protected ConfigurationChangeEvent(int theType, java.lang.Object theChangedObject, Configuration theConfig)
          Constructs a ConfigurationChangeEvent of the given type.
  ConfigurationChangeEvent(int theType, java.lang.Object theChangedObject, Configuration theConfig, java.lang.Object[] theAncestors)
          Constructs a ConfigurationChangeEvent of the given type.
 
Method Summary
protected  int getAncestorIndex(int theAncestorType)
          Gets the ancestor index of the ancestor type.
 java.lang.Object[] getAncestors()
          Gets the ancestors of the changed object.
 Configuration getConfiguration()
          Gets the configuration where the change took place.
 ProductServiceConfig getDeployedPsc()
          Gets the deployed PSC if either a deployed PSC was the event source or an ancestor.
 DeployedComponent getDeployedService()
          Gets the deployed service if either a deployed service was the event source or an ancestor.
 Host getHost()
          Gets the host if either a host was the event source or an ancestor.
 VMComponentDefn getProcess()
          Gets the process if either a process was the event source or an ancestor.
 ProductType getProduct()
          Gets the product if either a product was the event source or an ancestor.
 ProductServiceConfig getPscDefinition()
          Gets the PSC definition if either a PSC definition was the event source or an ancestor.
 ServiceComponentDefn getServiceDefinition()
          Gets the service definition if either a service definition was the event source or an ancestor.
 int getType()
          Gets the event type.
 boolean isConfigurationChange()
          Indicates if the changed object was the configuration object.
 boolean isDeleted()
          Indicates if the changed object has been deleted.
 boolean isDeployedPscChange()
          Indicates if the changed object was a deployed PSC object.
 boolean isDeployedServiceChange()
          Indicates if the changed object was a deployed service object.
 boolean isHostChange()
          Indicates if the changed object was a host object.
 boolean isModified()
          Indicates if the changed object has been modified.
 boolean isNew()
          Indicates if the changed object is new.
 boolean isProcessChange()
          Indicates if the changed object was a process object.
 boolean isProductChange()
          Indicates if the changed object was a product object.
 boolean isPscDefinitionChange()
          Indicates if the changed object was a PSC definition object.
 boolean isRefreshEnd()
          Indicates if a refresh of the configuration is starting.
 boolean isRefreshStart()
          Indicates if a refresh of the configuration has just ended.
 boolean isServiceDefinitionChange()
          Indicates if the changed object was a service definition object.
 java.lang.String paramString()
          Gets a string representation of the event.
protected  void setAncestors(java.lang.Object[] theAncestors)
          Sets the ancestor object of the changed object.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DELETED

public static final int DELETED
Indicates something in a configuration has been deleted.

See Also:
Constant Field Values

MODIFIED

public static final int MODIFIED
Indicates something in a configuration has been modified.

See Also:
Constant Field Values

NEW

public static final int NEW
Indicates something new has been added to a configuration.

See Also:
Constant Field Values

REFRESH_START

public static final int REFRESH_START
Indicates the configuration will be refreshed after notifying all listeners.

See Also:
Constant Field Values

REFRESH_END

public static final int REFRESH_END
Indicates the configuration refresh has ended.

See Also:
Constant Field Values

CONFIGURATION

protected static final int CONFIGURATION
Source of the event is a configuration.

See Also:
Constant Field Values

HOST

protected static final int HOST
Source of the event is a host.

See Also:
Constant Field Values

PROCESS

protected static final int PROCESS
Source of the event is a process.

See Also:
Constant Field Values

DEPLOYED_PSC

protected static final int DEPLOYED_PSC
Source of the event is a deployed PSC.

See Also:
Constant Field Values

DEPLOYED_SERVICE

protected static final int DEPLOYED_SERVICE
Source of the event is a deployed service.

See Also:
Constant Field Values

PRODUCT

protected static final int PRODUCT
Source of the event is a product.

See Also:
Constant Field Values

PSC_DEFN

protected static final int PSC_DEFN
Source of the event is a PSC definition.

See Also:
Constant Field Values

SERVICE_DEFN

protected static final int SERVICE_DEFN
Source of the event is a service definition.

See Also:
Constant Field Values

type

protected int type
The event type.


ancestors

protected java.lang.Object[] ancestors
Ancestor objects starting with the parent.

Constructor Detail

ConfigurationChangeEvent

protected ConfigurationChangeEvent(int theType,
                                   java.lang.Object theChangedObject,
                                   Configuration theConfig)
Constructs a ConfigurationChangeEvent of the given type.

Parameters:
theType - the event type
theChangedObject - the object whose state has changed
theConfig - the configuration where the change occurred
Throws:
java.lang.IllegalArgumentException - if type is not valid, if the changed object is null, or if the configuration is null.

ConfigurationChangeEvent

public ConfigurationChangeEvent(int theType,
                                java.lang.Object theChangedObject,
                                Configuration theConfig,
                                java.lang.Object[] theAncestors)
Constructs a ConfigurationChangeEvent of the given type.

Parameters:
theType - the event type
theChangedObject - the object whose state has changed
theConfig - the configuration where the change occurred
theAncestors - the ancestor objects starting with the parent
Throws:
java.lang.IllegalArgumentException - if type is not valid, if the changed object is null, or if the configuration is null.

ConfigurationChangeEvent

public ConfigurationChangeEvent(int theRefreshType,
                                java.lang.Object theSource)
Constructs a refresh ConfigurationChangeEvent. The type must be either REFRESH_START or REFRESH_END. This event has no configuration and no ancestors.

Parameters:
theType - the refresh event type
theSource - the object whose state has changed
Throws:
java.lang.IllegalArgumentException - if type is not a refresh type
Method Detail

getAncestors

public java.lang.Object[] getAncestors()
Gets the ancestors of the changed object.

Returns:
the ancestors

getConfiguration

public Configuration getConfiguration()
Gets the configuration where the change took place.

Returns:
the configuration

getDeployedPsc

public ProductServiceConfig getDeployedPsc()
Gets the deployed PSC if either a deployed PSC was the event source or an ancestor.

Returns:
the deployed PSC or null

getDeployedService

public DeployedComponent getDeployedService()
Gets the deployed service if either a deployed service was the event source or an ancestor.

Returns:
the deployed service or null

getHost

public Host getHost()
Gets the host if either a host was the event source or an ancestor.

Returns:
the host or null

getProcess

public VMComponentDefn getProcess()
Gets the process if either a process was the event source or an ancestor.

Returns:
the process or null

getProduct

public ProductType getProduct()
Gets the product if either a product was the event source or an ancestor.

Returns:
the product or null

getPscDefinition

public ProductServiceConfig getPscDefinition()
Gets the PSC definition if either a PSC definition was the event source or an ancestor.

Returns:
the PSC definition or null

getServiceDefinition

public ServiceComponentDefn getServiceDefinition()
Gets the service definition if either a service definition was the event source or an ancestor.

Returns:
the service definition or null

getType

public int getType()
Gets the event type.

Returns:
the event type

isConfigurationChange

public boolean isConfigurationChange()
Indicates if the changed object was the configuration object.

Returns:
true if the changed object was the configuration object; false otherwise.

isDeleted

public boolean isDeleted()
Indicates if the changed object has been deleted.

Returns:
true if the changed object has been deleted; false otherwise.

isDeployedPscChange

public boolean isDeployedPscChange()
Indicates if the changed object was a deployed PSC object.

Returns:
true if the changed object was a deployed PSC object; false otherwise.

isDeployedServiceChange

public boolean isDeployedServiceChange()
Indicates if the changed object was a deployed service object.

Returns:
true if the changed object was a deployed service object; false otherwise.

isModified

public boolean isModified()
Indicates if the changed object has been modified.

Returns:
true if the changed object has been modified; false otherwise.

isNew

public boolean isNew()
Indicates if the changed object is new.

Returns:
true if the changed object is new; false otherwise.

isHostChange

public boolean isHostChange()
Indicates if the changed object was a host object.

Returns:
true if the changed object was a host object; false otherwise.

isRefreshEnd

public boolean isRefreshEnd()
Indicates if a refresh of the configuration is starting.

Returns:
true if a configuration refresh is starting; false otherwise.

isRefreshStart

public boolean isRefreshStart()
Indicates if a refresh of the configuration has just ended.

Returns:
true if a configuration refresh has just ended; false otherwise.

isProcessChange

public boolean isProcessChange()
Indicates if the changed object was a process object.

Returns:
true if the changed object was a process object; false otherwise.

isProductChange

public boolean isProductChange()
Indicates if the changed object was a product object.

Returns:
true if the changed object was a product object; false otherwise.

isPscDefinitionChange

public boolean isPscDefinitionChange()
Indicates if the changed object was a PSC definition object.

Returns:
true if the changed object was a PSC definition object; false otherwise.

isServiceDefinitionChange

public boolean isServiceDefinitionChange()
Indicates if the changed object was a service definition object.

Returns:
true if the changed object was a service Definition object; false otherwise.

paramString

public java.lang.String paramString()
Gets a string representation of the event.

Returns:
the string representation of the event

setAncestors

protected void setAncestors(java.lang.Object[] theAncestors)
Sets the ancestor object of the changed object.

Parameters:
theAncestors - the ancestor objects

getAncestorIndex

protected int getAncestorIndex(int theAncestorType)
Gets the ancestor index of the ancestor type.

Returns:
the ancestor index or -1 if no ancestor of that type


Copyright © 2009. All Rights Reserved.