Modelers

org.topcased.modeler.evaluator.extension
Class EvaluatorsManager

java.lang.Object
  extended by AbstractExtensionManager
      extended by org.topcased.modeler.evaluator.extension.EvaluatorsManager

public final class EvaluatorsManager
extends AbstractExtensionManager

Class that stores the evaluators registered with the evaluators extension point. Creation 20 juin 06


Method Summary
protected  void addExtension(org.eclipse.core.runtime.IExtension extension)
           
 boolean evaluate(EObject eObject, java.lang.String rule, java.lang.String language)
          Evaluate an EObject along several kind of evaluation (EMF, OCL...)
 EvaluatorDescriptor find(java.lang.String id)
          Find a descriptor in the registry.
 EvaluatorDescriptor[] getEvaluators()
          Get an enumeration of evaluator descriptors.
static EvaluatorsManager getInstance()
          Get the shared instance.
protected  void removeExtension(org.eclipse.core.runtime.IExtension extension)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static EvaluatorsManager getInstance()
Get the shared instance.

Returns:
the evaluators manager

find

public EvaluatorDescriptor find(java.lang.String id)
Find a descriptor in the registry.

Parameters:
id - the searched evaluator id
Returns:
the evaluator or null if not found

evaluate

public boolean evaluate(EObject eObject,
                        java.lang.String rule,
                        java.lang.String language)
                 throws EvaluatorException
Evaluate an EObject along several kind of evaluation (EMF, OCL...)

Parameters:
eObject - the EObject to validate
rule - a String representing the rule to check
language - the language in which the rule is expressed
Returns:
true if the evaluation passed, false otherwise
Throws:
EvaluatorException - the constraint cannot be interpreted by the engine

getEvaluators

public EvaluatorDescriptor[] getEvaluators()
Get an enumeration of evaluator descriptors.

Returns:
The registered evaluators

addExtension

protected void addExtension(org.eclipse.core.runtime.IExtension extension)
See Also:
org.topcased.facilities.extensions.AbstractExtensionManager#addExtension(org.eclipse.core.runtime.IExtension)

removeExtension

protected void removeExtension(org.eclipse.core.runtime.IExtension extension)
See Also:
org.topcased.facilities.extensions.AbstractExtensionManager#removeExtension(org.eclipse.core.runtime.IExtension)

Modelers

Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.