org.scribble.protocol.conformance
Class LoggingConformanceHandler

java.lang.Object
  extended by org.scribble.protocol.conformance.LoggingConformanceHandler
All Implemented Interfaces:
ConformanceHandler

public class LoggingConformanceHandler
extends Object
implements ConformanceHandler

This implementation records conformance related information to the logging journal. WARNING: This component is still in the EXPERIMENTAL stage, so its API could change.


Field Summary
static String CONFORMANCE_MODEL_OBJECT
          Conformance model object.
static String CONFORMANCE_REFERENCE_INDEX
          Conformance model object.
static String CONFORMANCE_REFERENCE_OBJECT
          Conformance model object.
static String CONFORMANCE_REFERENCE_PARENT
          Conformance model object.
 
Constructor Summary
LoggingConformanceHandler(org.scribble.common.logging.Journal logger)
          This constructor initialises the conformance handler with the journal.
 
Method Summary
 void added(ModelObject modelObject, ModelObject refParent, int index)
          This method indicates that a new model object has been detected in the model.
 void removed(ModelObject refObject)
          This method indicates that a model object within the reference model does not exist in the model being conformance checked.
 void updated(ModelObject modelObject, ModelObject refObject)
          This method indicates that a change has been detected between equivalent model objects found in the primary and reference models.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFORMANCE_MODEL_OBJECT

public static final String CONFORMANCE_MODEL_OBJECT
Conformance model object.

See Also:
Constant Field Values

CONFORMANCE_REFERENCE_PARENT

public static final String CONFORMANCE_REFERENCE_PARENT
Conformance model object.

See Also:
Constant Field Values

CONFORMANCE_REFERENCE_INDEX

public static final String CONFORMANCE_REFERENCE_INDEX
Conformance model object.

See Also:
Constant Field Values

CONFORMANCE_REFERENCE_OBJECT

public static final String CONFORMANCE_REFERENCE_OBJECT
Conformance model object.

See Also:
Constant Field Values
Constructor Detail

LoggingConformanceHandler

public LoggingConformanceHandler(org.scribble.common.logging.Journal logger)
This constructor initialises the conformance handler with the journal.

Parameters:
logger - The journal
Method Detail

added

public void added(ModelObject modelObject,
                  ModelObject refParent,
                  int index)
This method indicates that a new model object has been detected in the model. The position of the new object, relative to the reference model, is provided by the parent model object in the reference model and optionally the index (where relevant).

Specified by:
added in interface ConformanceHandler
Parameters:
modelObject - The new model object, from the model being checked
refParent - The 'parent' model object, from the reference model, that would contain the new object
index - The child index, in the reference model, where the new model object would be positioned

updated

public void updated(ModelObject modelObject,
                    ModelObject refObject)
This method indicates that a change has been detected between equivalent model objects found in the primary and reference models.

Specified by:
updated in interface ConformanceHandler
Parameters:
modelObject - The model object, from the model being checked
refObject - The model object, from the reference model

removed

public void removed(ModelObject refObject)
This method indicates that a model object within the reference model does not exist in the model being conformance checked.

Specified by:
removed in interface ConformanceHandler
Parameters:
refObject - The model object, not found in the primary model, as defined in the reference model


Copyright © 2008-Present Scribble.org. All Rights Reserved.