org.eclipse.emf.emfstore.internal.server.startup
Class EmfStoreValidator

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.server.startup.EmfStoreValidator

public class EmfStoreValidator
extends Object

Validates the serverspace in three different ways. First it resolves all proxies, then checks whether all ME have ids and it is checked whether the changes generate the corret projectstate.

Author:
wesendon

Field Summary
static int MODELELEMENTID
          Option for checking all modelelement ids in projecstate and changes.
static int PROJECTGENERATION
          Option for the change test.
static int RESOLVEALL
          Option for resolving all proxies.
 
Constructor Summary
EmfStoreValidator(ServerSpace serverSpace)
          Default constructor.
 
Method Summary
 void setExcludedProjects(List<String> excludedProjects)
          Allows to exclude projects from validation aside from RESOLVEALL.
 void validate(int options)
          Runs the validation.
 void validate(int options, boolean throwException)
          Runs the validation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOLVEALL

public static final int RESOLVEALL
Option for resolving all proxies. The validation therefore uses EcoreUtil.resolveAll(org.eclipse.emf.ecore.EObject)

See Also:
Constant Field Values

MODELELEMENTID

public static final int MODELELEMENTID
Option for checking all modelelement ids in projecstate and changes. Every modelelement and changeoperation has to have a modelelement id.

See Also:
Constant Field Values

PROJECTGENERATION

public static final int PROJECTGENERATION
Option for the change test. The initial projecstate is loaded and all changes are applied, until the next projecstate is reached. Then the calculated state and the saved state are comparesd.

See Also:
Constant Field Values
Constructor Detail

EmfStoreValidator

public EmfStoreValidator(ServerSpace serverSpace)
Default constructor.

Parameters:
serverSpace - serverspace
Method Detail

validate

public void validate(int options,
                     boolean throwException)
              throws FatalESException
Runs the validation. You can configure the validation by a bitmask, therefore use the value: RESOLVEALL, MODELELEMENTID and PROJECTGENERATION.

Parameters:
options - options
throwException - allows you to prevent that an exception is thrown if validation failes
Throws:
FatalESException - in case of failure

validate

public void validate(int options)
              throws FatalESException
Runs the validation. You can configure the validation by a bitmask, therefore use the value: RESOLVEALL, MODELELEMENTID and PROJECTGENERATION.

Parameters:
options - options
Throws:
FatalESException - in case of failure

setExcludedProjects

public void setExcludedProjects(List<String> excludedProjects)
Allows to exclude projects from validation aside from RESOLVEALL.

Parameters:
excludedProjects - list of project id as string


Copyright © 2015. All Rights Reserved.