ilog.tgo.model
Class IltAlarmSystem

java.lang.Object
  extended by ilog.tgo.model.internal.IltBaseSystem
      extended by ilog.tgo.model.IltAlarmSystem
All Implemented Interfaces:
ilog.tgo.model.internal.IltStateCollection, IlvBatchable, Cloneable

public class IltAlarmSystem
extends ilog.tgo.model.internal.IltBaseSystem
implements ilog.tgo.model.internal.IltStateCollection

This class defines the system of alarms used by a certain telecom object.

Users who are interested in customizing their own alarm systems, must create an instance of this class and define which are the alarm severities that will be considered.

For each configured alarm severity, an alarm state is created, that stores a counter of new alarms and a counter of acknowledged alarms.


Nested Class Summary
static class IltAlarmSystem.State
          This class provides a representation model for generic alarms carried by a telecom object.
 
Field Summary
static ilog.tgo.model.internal.IltAlarmSeverityStateFactory DefaultAlarmSeverityStateFactory
          Default factory used to create states which represents alarm severities counters.
 
Fields inherited from class ilog.tgo.model.internal.IltBaseSystem
_batchNestingCount, _listenerSupport, _mapper, _name
 
Constructor Summary
protected IltAlarmSystem(String name)
           
protected IltAlarmSystem(String name, ilog.tgo.mapper.state.IltAlarmSystemMapper mapper)
           
 
Method Summary
 boolean add(IltAlarmSeverity severity)
          Add a new severity in the system.
 boolean add(IltState state)
          Add a new state in the collection.
 Object clone()
          Return a copy of this model
protected  ilog.tgo.mapper.IltMapper createMapper()
          Creates the mapper for the system.
 void fireSeverityAdded(ilog.tgo.model.state.event.IltAlarmSystemEvent event)
          Notify all listeners that a given state was added to the alarm system.
 void fireSeverityRemoved(ilog.tgo.model.state.event.IltAlarmSystemEvent event)
          Notify all listeners that a given state was removed from the alarm system.
 ilog.tgo.model.internal.IltAlarmSeverityState get(IltAlarmSeverity severity)
          Retrieves the alarm state responsible for a certain severity.
 ilog.tgo.model.internal.IltStatePath getAcknowledgedAlarmPath(IltAlarmSeverity severity)
          Return the state path of the acknowledged alarms state for a given severity.
 ilog.tgo.model.internal.IltStatePath getAlarmStatePath()
          Return the path to the alarm aggregate state.
 ilog.tgo.model.internal.IltStatePath[] getAllPaths(IlpFilter filter)
          Return all the paths found which corresponds to the criteria given by the filter.
 ilog.tgo.mapper.state.IltStateMapper getMapper(IltAlarmSeverity severity)
          Return the alarm mapping created to the alarm severity state which represents the given severity in the system or null, if such a state does not exist.
 ilog.tgo.model.internal.IltStatePath getNewAlarmPath(IltAlarmSeverity severity)
          Return the state path of the new alarms state for a given severity.
 ilog.tgo.model.internal.IltStatePath getPath(IltAlarmSeverity severity)
          Return the path used to set the value of the alarm severity information.
 ilog.tgo.model.internal.IltStatePath getPath(String name)
          Return the state from the model that corresponds to the given name.
 boolean has(IltAlarmSeverity severity)
          Verifies if the given severity is part of the alarm model.
 boolean has(IltState state)
          Return true if the given state is part of the collection or subcollections.
 boolean has(ilog.tgo.model.internal.IltStatePath path)
          Return true if the state given by this path is present in the alarm system.
 boolean hasLocal(ilog.tgo.model.internal.IltStatePath path)
          Verifies if the given path is present only in this state system.
protected  void initialize()
           
 void map(IltObject object, IltCompositeGraphic graphic)
          Maps an entire IltObjectState.
 void mapState(IltObject object, IltCompositeGraphic graphic, ilog.tgo.model.internal.IltStatePath path, Object value)
          Maps a specific state in the system.
 void merge(IltAlarmSystem other)
          Created for serialization purposes.
static IltAlarmSystem New(String name)
          Static method which is responsible for creating a new state model instance, and registering this new instance in the controller.
static IltAlarmSystem New(String name, ilog.tgo.mapper.state.IltAlarmSystemMapper mapper)
           
 boolean remove(IltAlarmSeverity severity)
          Remove the given severity from the alarm model.
 boolean remove(IltState state)
          Remove a state from the collection.
 void setAlarmSeverityStateFactory(ilog.tgo.model.internal.IltAlarmSeverityStateFactory factory)
          Sets the alarm state factory used to create the states that represent alarm severities.
 void setMapper(ilog.tgo.mapper.IltMapper mapper)
          Sets the mapper which will be responsible for mapping the state information into decorations.
 Enumeration severities()
          Return all the severities being handled by this alarm system.
 Enumeration severityStates()
          Return all the severity states being handled by this alarm system.
 Enumeration states()
          Return an enumeration with all the states that are part of this table
 String toString()
          Return the String representation of this IltStateModel's values.
protected  boolean validateListener(EventListener listener)
          This method should be overwritten by the subclasses to define which are the listeners which are allowed.
protected  boolean validateMapper(ilog.tgo.mapper.IltMapper mapper)
          Verifies if the given mapper can be used with the system.
 
Methods inherited from class ilog.tgo.model.internal.IltBaseSystem
addListener, createListenerSupport, endBatch, getMapper, getName, hasListeners, notify, notifyEndChangingSystem, removeListener, resetMapper, startBatch
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DefaultAlarmSeverityStateFactory

public static ilog.tgo.model.internal.IltAlarmSeverityStateFactory DefaultAlarmSeverityStateFactory
Default factory used to create states which represents alarm severities counters.

See Also:
IltAlarmSeverityState
Internal method or field: do not use!
Constructor Detail

IltAlarmSystem

protected IltAlarmSystem(String name)
Internal method or field: do not use!

IltAlarmSystem

protected IltAlarmSystem(String name,
                         ilog.tgo.mapper.state.IltAlarmSystemMapper mapper)
Internal method or field: do not use!
Method Detail

New

public static IltAlarmSystem New(String name)
Static method which is responsible for creating a new state model instance, and registering this new instance in the controller.

Internal method or field: do not use!

New

public static IltAlarmSystem New(String name,
                                 ilog.tgo.mapper.state.IltAlarmSystemMapper mapper)
Internal method or field: do not use!

initialize

protected void initialize()
Internal method or field: do not use!

getAlarmStatePath

public ilog.tgo.model.internal.IltStatePath getAlarmStatePath()
Return the path to the alarm aggregate state.

Internal method or field: do not use!

toString

public String toString()
Return the String representation of this IltStateModel's values.

Overrides:
toString in class Object

add

public boolean add(IltState state)
Add a new state in the collection.

Specified by:
add in interface ilog.tgo.model.internal.IltStateCollection
Parameters:
state - state to be added in the model.
Internal method or field: do not use!

remove

public boolean remove(IltState state)
Remove a state from the collection.

Specified by:
remove in interface ilog.tgo.model.internal.IltStateCollection
Parameters:
state - state to be removed from the model.
Internal method or field: do not use!

has

public boolean has(IltState state)
Return true if the given state is part of the collection or subcollections.

Specified by:
has in interface ilog.tgo.model.internal.IltStateCollection
Parameters:
state - state being queried.
Returns:
true when the state is part of the collection.
Internal method or field: do not use!

states

public Enumeration states()
Return an enumeration with all the states that are part of this table

Specified by:
states in interface ilog.tgo.model.internal.IltStateCollection
Internal method or field: do not use!

has

public boolean has(ilog.tgo.model.internal.IltStatePath path)
Return true if the state given by this path is present in the alarm system.

Internal method or field: do not use!

hasLocal

public boolean hasLocal(ilog.tgo.model.internal.IltStatePath path)
Verifies if the given path is present only in this state system.

Internal method or field: do not use!

getAllPaths

public ilog.tgo.model.internal.IltStatePath[] getAllPaths(IlpFilter filter)
Return all the paths found which corresponds to the criteria given by the filter.

Parameters:
filter - criteria to match the state instances.
Internal method or field: do not use!

severities

public Enumeration severities()
Return all the severities being handled by this alarm system.

Internal method or field: do not use!

severityStates

public Enumeration severityStates()
Return all the severity states being handled by this alarm system.

Internal method or field: do not use!

has

public boolean has(IltAlarmSeverity severity)
Verifies if the given severity is part of the alarm model. Return true if the severity is contained in the model.

Internal method or field: do not use!

add

public boolean add(IltAlarmSeverity severity)
Add a new severity in the system.

The alarm state factory is used to create a state which will represent an alarm severity in the state information of a telecom object.

Parameters:
severity - The severity to be added.
Internal method or field: do not use!

remove

public boolean remove(IltAlarmSeverity severity)
Remove the given severity from the alarm model.

Internal method or field: do not use!

get

public ilog.tgo.model.internal.IltAlarmSeverityState get(IltAlarmSeverity severity)
Retrieves the alarm state responsible for a certain severity.

Internal method or field: do not use!

getPath

public ilog.tgo.model.internal.IltStatePath getPath(IltAlarmSeverity severity)
Return the path used to set the value of the alarm severity information. This path is used when setting the state value directly in the IltObjectState, using method set.

Internal method or field: do not use!

getPath

public ilog.tgo.model.internal.IltStatePath getPath(String name)
Return the state from the model that corresponds to the given name. The name can be a compound string separated by '.', like "Alarm.Critical.New".

Parameters:
name - complete state name, formed by the concatenation of the states which compose the path inside the model, separated by the character '.'
Internal method or field: do not use!

getNewAlarmPath

public ilog.tgo.model.internal.IltStatePath getNewAlarmPath(IltAlarmSeverity severity)
Return the state path of the new alarms state for a given severity. This path is used when setting the new alarm count directly in the IltObjectState, using method set.

Internal method or field: do not use!

getAcknowledgedAlarmPath

public ilog.tgo.model.internal.IltStatePath getAcknowledgedAlarmPath(IltAlarmSeverity severity)
Return the state path of the acknowledged alarms state for a given severity. This path is used when setting the acknowledged alarm count directly in the IltObjectState, using method set.

Internal method or field: do not use!

setAlarmSeverityStateFactory

public void setAlarmSeverityStateFactory(ilog.tgo.model.internal.IltAlarmSeverityStateFactory factory)
Sets the alarm state factory used to create the states that represent alarm severities.

Internal method or field: do not use!

fireSeverityAdded

public void fireSeverityAdded(ilog.tgo.model.state.event.IltAlarmSystemEvent event)
Notify all listeners that a given state was added to the alarm system.

Internal method or field: do not use!

fireSeverityRemoved

public void fireSeverityRemoved(ilog.tgo.model.state.event.IltAlarmSystemEvent event)
Notify all listeners that a given state was removed from the alarm system.

Internal method or field: do not use!

setMapper

public void setMapper(ilog.tgo.mapper.IltMapper mapper)
               throws IllegalArgumentException
Sets the mapper which will be responsible for mapping the state information into decorations.

Overrides:
setMapper in class ilog.tgo.model.internal.IltBaseSystem
Throws:
IllegalArgumentException
Internal method or field: do not use!

validateMapper

protected boolean validateMapper(ilog.tgo.mapper.IltMapper mapper)
Verifies if the given mapper can be used with the system.

Specified by:
validateMapper in class ilog.tgo.model.internal.IltBaseSystem
Internal method or field: do not use!

createMapper

protected ilog.tgo.mapper.IltMapper createMapper()
Creates the mapper for the system.

Specified by:
createMapper in class ilog.tgo.model.internal.IltBaseSystem
Internal method or field: do not use!

getMapper

public ilog.tgo.mapper.state.IltStateMapper getMapper(IltAlarmSeverity severity)
Return the alarm mapping created to the alarm severity state which represents the given severity in the system or null, if such a state does not exist.

Internal method or field: do not use!

map

public void map(IltObject object,
                IltCompositeGraphic graphic)
Maps an entire IltObjectState.

Parameters:
object - the telecom object containing this semantic state
graphic - a graphic object representing the telecom object
Internal method or field: do not use!

mapState

public void mapState(IltObject object,
                     IltCompositeGraphic graphic,
                     ilog.tgo.model.internal.IltStatePath path,
                     Object value)
Maps a specific state in the system.

Parameters:
object - the telecom object containing this semantic state
graphic - a graphic object representing the telecom object
path - the path
value - the value
Internal method or field: do not use!

validateListener

protected boolean validateListener(EventListener listener)
This method should be overwritten by the subclasses to define which are the listeners which are allowed.

Specified by:
validateListener in class ilog.tgo.model.internal.IltBaseSystem
Internal method or field: do not use!

clone

public Object clone()
Return a copy of this model

Overrides:
clone in class ilog.tgo.model.internal.IltBaseSystem
Internal method or field: do not use!

merge

public void merge(IltAlarmSystem other)
Created for serialization purposes. Add all the states which are in the other state system and are not in this state system.

Internal method or field: do not use!


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.