TPTP 4.5.0 Platform Project
Public API Specification

org.eclipse.tptp.logging.events.cbe.impl
Class SituationTypeImpl

java.lang.Object
  extended by org.eclipse.tptp.logging.events.cbe.impl.SituationTypeImpl
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, SituationType
Direct Known Subclasses:
AvailableSituationImpl, ConfigureSituationImpl, ConnectSituationImpl, CreateSituationImpl, DependencySituationImpl, DestroySituationImpl, FeatureSituationImpl, OtherSituationImpl, ReportSituationImpl, RequestSituationImpl, StartSituationImpl, StopSituationImpl

public abstract class SituationTypeImpl
extends java.lang.Object
implements SituationType

Interface representing a SituationType.

The following description is from the Common Base Event v1.0.1 specification entitled "Canonical Situation Data Format: The Common Base Event V1.0.1":

The situationType specifies the type or category of the situation that caused the event to be reported. The categorization of situations facilitates the building of tools that focus on implementing the analysis and planning functions rather than on product-specific data formats. The data type for this property is a complex type. The situation types or categories are defined below. SituationType is an abstract element that is used to define all supported situation types (for example, StartSituation, StopSituation, etc...).

The simplest way to understand the usefulness of categorization is by providing a use case. For example, assume that a problem has been detected with component 'A'. The first step in the root cause analysis might be to check to see if 'x' was actually started, since it is known that 'A' has a dependency on 'x'. One approach to determine if 'x' is running is to check the log file for 'x' to see if it has started. The problem from a programmatic perspective is that there is not standard way to check the log files to see if 'x' has started. 'x' might log "Component 'x' started" or it might log "Change server state from starting to running". The reality is that both of these messages provide the same information, but they provide it using different terminology, making it difficult for a program to use. Simple checks like this would be much easier if all components reported, for example, that they "started". Writing code to check dependencies would be much easier and would be, largely, component independent. For example, if product 'A' had dependencies on 'x' and 'y', the code to check the status of 'x' and the code to check the status of 'y' would be the same, in both cases, it would look for a 'started' message.

See Also:
Serialized Form

Method Summary
 java.lang.Object clone()
          Return a cloned (copy by value) object of this object.
 boolean equals(java.lang.Object object)
          Overrides the java.lang.Object's equals() API to determine if the parameter object is equal to this object.
 java.lang.String getReasoningScope()
           Returns the value of the 'Reasoning Scope' attribute.
 void init()
          Resets the object's properties to their initial (e.g. null) state.
 void setReasoningScope(java.lang.String newReasoningScope)
          Sets the value of the ' Reasoning Scope' attribute.
 java.lang.String toString()
           
 void validate()
          Checks whether the contents of the instance conform to the Common Base Event specification as described in "Canonical Situation Data Format: The Common Base Event V1.0.1".
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getReasoningScope

public java.lang.String getReasoningScope()
Description copied from interface: SituationType

Returns the value of the 'Reasoning Scope' attribute.

Specified by:
getReasoningScope in interface SituationType
Returns:
the value of the 'Reasoning Scope' attribute.
See Also:
SituationType.setReasoningScope(String)

setReasoningScope

public void setReasoningScope(java.lang.String newReasoningScope)
Description copied from interface: SituationType
Sets the value of the ' Reasoning Scope' attribute.

This property specifies the scope of the impact of the situation reported. The initial set of values is described following this table. This is a required property. The string length for this property must not exceed 64 characters.

Specified by:
setReasoningScope in interface SituationType
Parameters:
newReasoningScope - the new value of the 'Reasoning Scope' attribute.
See Also:
SituationType.getReasoningScope()

toString

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

validate

public void validate()
              throws ValidationException
Checks whether the contents of the instance conform to the Common Base Event specification as described in "Canonical Situation Data Format: The Common Base Event V1.0.1".

Specified by:
validate in interface SituationType
Throws:
ValidationException - If the event instance does not conform to the Common Base Event specification.

equals

public boolean equals(java.lang.Object object)
Overrides the java.lang.Object's equals() API to determine if the parameter object is equal to this object.

Overrides:
equals in class java.lang.Object
Parameters:
object - The java.lang.Object to be compared to this object.
Returns:
True, if this object is the same as the parameter object, otherwise false.
See Also:
Object.equals(java.lang.Object)

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Return a cloned (copy by value) object of this object.

This is a deep copy version, in which all the objects within this object will be copied by value.

Overrides:
clone in class java.lang.Object
Returns:
Object The cloned (copy by value) object of this object.
Throws:
java.lang.CloneNotSupportedException - If a instance variable of this object does not implement the Cloneable interface.

init

public void init()
Resets the object's properties to their initial (e.g. null) state. All components are initialized to either zero or null.

Specified by:
init in interface SituationType

TPTP 4.5.0 Platform Project
Public API Specification