org.palo.api
Class ConnectionEvent

java.lang.Object
  extended by org.palo.api.ConnectionEvent

public class ConnectionEvent
extends java.lang.Object

ConnectionEvent

Every action which alters the data of the palo server triggers an event. Therefore this class defines constants for different event types which describe the performed modification.

Version:
$Id: ConnectionEvent.html,v 1.24 2009/07/09 11:01:46 ArndHouben Exp $

Field Summary
static int CONNECTION_EVENT_ATTRIBUTES_ADDED
          Signals adding of attributes.
static int CONNECTION_EVENT_ATTRIBUTES_CHANGED
          Signals changing of attributes.
static int CONNECTION_EVENT_ATTRIBUTES_REMOVED
          Signals removing of attributes.
static int CONNECTION_EVENT_CONSOLIDATIONS_ADDED
          Signals adding of consolidations.
static int CONNECTION_EVENT_CONSOLIDATIONS_REMOVED
          Signals removing of consolidations.
static int CONNECTION_EVENT_CUBES_ADDED
          Signals adding of cubes.
static int CONNECTION_EVENT_CUBES_REMOVED
          Signals removing of cubes.
static int CONNECTION_EVENT_CUBES_RENAMED
          Signals renaming of cubes.
static int CONNECTION_EVENT_DATABASES_ADDED
          Signals adding of databases.
static int CONNECTION_EVENT_DATABASES_REMOVED
          Signals removing of databases.
static int CONNECTION_EVENT_DIMENSIONS_ADDED
          Signals adding of dimensions.
static int CONNECTION_EVENT_DIMENSIONS_REMOVED
          Signals removing of dimensions.
static int CONNECTION_EVENT_DIMENSIONS_RENAMED
          Signals renaming of dimensions.
static int CONNECTION_EVENT_ELEMENTS_ADDED
          Signals adding of elements.
static int CONNECTION_EVENT_ELEMENTS_REMOVED
          Signals removing of elements.
static int CONNECTION_EVENT_ELEMENTS_RENAMED
          Signals renaming of elements.
static int CONNECTION_EVENT_ELEMENTS_TYPE_CHANGED
          Signals changing of elements types.
static int CONNECTION_EVENT_RULES_ADDED
           
static int CONNECTION_EVENT_RULES_CHANGED
           
static int CONNECTION_EVENT_RULES_REMOVED
           
static int CONNECTION_EVENT_SERVER_DOWN
          Signals that the palo server is currently not available.
static int CONNECTION_EVENT_SERVER_STRUCTURE_CHANGED
          Signals a structural change within the palo server which is raised by an external application.
 java.lang.Object oldValue
          A general data field which holds a value before the connection event occurred.
 
Constructor Summary
ConnectionEvent(Connection source, java.lang.Object parent, int type, java.lang.Object[] items)
          Constructs a new ConnectionEvent with the given properties.
 
Method Summary
 Attribute[] getAttributes()
          Returns the affected Attributes of the event if the event is applicable to attributes, otherwise null is returned.
 Consolidation[] getConsolidation()
          Returns the affected Consolidations of the event if the event is applicable to consolidations, otherwise null is returned.
 Cube[] getCubes()
          Returns the affected Cubes of the event if the event is applicable to cubes, otherwise null is returned.
 Database[] getDatabases()
          Returns the affected Databases of the event if the event is applicable to databases, otherwise null is returned.
 Dimension[] getDimensions()
          Returns the affected Dimensions of the event if the event is applicable to dimensions, otherwise null is returned.
 Element[] getElements()
          Returns the affected Elements of the event if the event is applicable to elements, otherwise null is returned.
 java.lang.Object getParent()
          Returns the parent domain object of the event.
 Rule[] getRules()
          Returns the affected Rules of the event if the event is applicable to rules, otherwise null is returned.
 Connection getSource()
          Returns the source Connection of the event.
 int getType()
          Returns the type of the event as defined by the constants in this class.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONNECTION_EVENT_DATABASES_ADDED

public static final int CONNECTION_EVENT_DATABASES_ADDED
Signals adding of databases. Use getDatabases() to obtain the affected Databases

See Also:
Constant Field Values

CONNECTION_EVENT_DATABASES_REMOVED

public static final int CONNECTION_EVENT_DATABASES_REMOVED
Signals removing of databases. Use getDatabases() to obtain the affected Databases

See Also:
Constant Field Values

CONNECTION_EVENT_DIMENSIONS_ADDED

public static final int CONNECTION_EVENT_DIMENSIONS_ADDED
Signals adding of dimensions. Use getDimensions() to obtain the affected Dimensions

See Also:
Constant Field Values

CONNECTION_EVENT_DIMENSIONS_REMOVED

public static final int CONNECTION_EVENT_DIMENSIONS_REMOVED
Signals removing of dimensions. Use getDimensions() to obtain the affected Dimensions

See Also:
Constant Field Values

CONNECTION_EVENT_DIMENSIONS_RENAMED

public static final int CONNECTION_EVENT_DIMENSIONS_RENAMED
Signals renaming of dimensions. Use getDimensions() to obtain the affected Dimensions

See Also:
Constant Field Values

CONNECTION_EVENT_ELEMENTS_ADDED

public static final int CONNECTION_EVENT_ELEMENTS_ADDED
Signals adding of elements. Use getElements() to obtain the affected Elements

See Also:
Constant Field Values

CONNECTION_EVENT_ELEMENTS_REMOVED

public static final int CONNECTION_EVENT_ELEMENTS_REMOVED
Signals removing of elements. Use getElements() to obtain the affected Elements

See Also:
Constant Field Values

CONNECTION_EVENT_ELEMENTS_RENAMED

public static final int CONNECTION_EVENT_ELEMENTS_RENAMED
Signals renaming of elements. Use getElements() to obtain the affected Elements

See Also:
Constant Field Values

CONNECTION_EVENT_ELEMENTS_TYPE_CHANGED

public static final int CONNECTION_EVENT_ELEMENTS_TYPE_CHANGED
Signals changing of elements types. Use getElements() to obtain the affected Elements

See Also:
Constant Field Values

CONNECTION_EVENT_CUBES_ADDED

public static final int CONNECTION_EVENT_CUBES_ADDED
Signals adding of cubes. Use getCubes() to obtain the affected Cubes

See Also:
Constant Field Values

CONNECTION_EVENT_CUBES_REMOVED

public static final int CONNECTION_EVENT_CUBES_REMOVED
Signals removing of cubes. Use getCubes() to obtain the affected Cubes

See Also:
Constant Field Values

CONNECTION_EVENT_CONSOLIDATIONS_ADDED

public static final int CONNECTION_EVENT_CONSOLIDATIONS_ADDED
Signals adding of consolidations. Use getConsolidation() to obtain the affected Consolidations

See Also:
Constant Field Values

CONNECTION_EVENT_CONSOLIDATIONS_REMOVED

public static final int CONNECTION_EVENT_CONSOLIDATIONS_REMOVED
Signals removing of consolidations. Use getConsolidation() to obtain the affected Consolidations

See Also:
Constant Field Values

CONNECTION_EVENT_SERVER_STRUCTURE_CHANGED

public static final int CONNECTION_EVENT_SERVER_STRUCTURE_CHANGED
Signals a structural change within the palo server which is raised by an external application. So called structural changes occur when the palo objects like Database, Dimension, Cube or Element are altered, e.g. by deleting, adding or renaming. Changing the values of cube cells will not raise such an event.

NOTE: This event is neither raised on changes of subset definitions nor on changes of cube views content, because internally subsets and views are stored in cube cells and the changing of cube cells do not raise an event by definition.

See Also:
Constant Field Values

CONNECTION_EVENT_SERVER_DOWN

public static final int CONNECTION_EVENT_SERVER_DOWN
Signals that the palo server is currently not available.

See Also:
Constant Field Values

CONNECTION_EVENT_ATTRIBUTES_ADDED

public static final int CONNECTION_EVENT_ATTRIBUTES_ADDED
Signals adding of attributes. Use getAttributes() to obtain the affected Attributes

See Also:
Constant Field Values

CONNECTION_EVENT_ATTRIBUTES_REMOVED

public static final int CONNECTION_EVENT_ATTRIBUTES_REMOVED
Signals removing of attributes. Use getAttributes() to obtain the affected Attributes

See Also:
Constant Field Values

CONNECTION_EVENT_ATTRIBUTES_CHANGED

public static final int CONNECTION_EVENT_ATTRIBUTES_CHANGED
Signals changing of attributes. Use getAttributes() to obtain the affected Attributes

See Also:
Constant Field Values

CONNECTION_EVENT_CUBES_RENAMED

public static final int CONNECTION_EVENT_CUBES_RENAMED
Signals renaming of cubes. Use getCubes() to obtain the affected Cubes

See Also:
Constant Field Values

CONNECTION_EVENT_RULES_ADDED

public static final int CONNECTION_EVENT_RULES_ADDED
See Also:
Constant Field Values

CONNECTION_EVENT_RULES_REMOVED

public static final int CONNECTION_EVENT_RULES_REMOVED
See Also:
Constant Field Values

CONNECTION_EVENT_RULES_CHANGED

public static final int CONNECTION_EVENT_RULES_CHANGED
See Also:
Constant Field Values

oldValue

public java.lang.Object oldValue
A general data field which holds a value before the connection event occurred. The content of this field depends on the event type, e.g. for a rename event this field holds the old name or for a type change event the old type. However it is not guaranteed that this field is set and even null is permitted.

Constructor Detail

ConnectionEvent

public ConnectionEvent(Connection source,
                       java.lang.Object parent,
                       int type,
                       java.lang.Object[] items)
Constructs a new ConnectionEvent with the given properties.

Parameters:
source - the source Connection of the event.
parent - the parent domain object of the event.
type - the type of the event.
items - the affected domain objects.
Method Detail

getSource

public Connection getSource()
Returns the source Connection of the event.

Returns:
the source Connection of the event.

getParent

public java.lang.Object getParent()
Returns the parent domain object of the event.

Returns:
the parent domain object of the event.

getType

public int getType()
Returns the type of the event as defined by the constants in this class.

Returns:
the type of the event as defined by the

getDatabases

public Database[] getDatabases()
Returns the affected Databases of the event if the event is applicable to databases, otherwise null is returned.

Returns:
the affected Databases.

getDimensions

public Dimension[] getDimensions()
Returns the affected Dimensions of the event if the event is applicable to dimensions, otherwise null is returned.

Returns:
the affected Dimensions.

getElements

public Element[] getElements()
Returns the affected Elements of the event if the event is applicable to elements, otherwise null is returned.

Returns:
the affected Elements.

getAttributes

public Attribute[] getAttributes()
Returns the affected Attributes of the event if the event is applicable to attributes, otherwise null is returned.

Returns:
the affected Attributes.

getConsolidation

public Consolidation[] getConsolidation()
Returns the affected Consolidations of the event if the event is applicable to consolidations, otherwise null is returned.

Returns:
the affected Consolidations.

getCubes

public Cube[] getCubes()
Returns the affected Cubes of the event if the event is applicable to cubes, otherwise null is returned.

Returns:
the affected Cubes.

getRules

public final Rule[] getRules()
Returns the affected Rules of the event if the event is applicable to rules, otherwise null is returned.

Returns:
the affected Rules.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object