Class CoreRevisionCheckResource

java.lang.Object
com.zfabrik.resources.provider.Resource
com.zfabrik.impl.dev.CoreRevisionCheckResource
All Implemented Interfaces:
IDependencyComponent

public class CoreRevisionCheckResource extends Resource implements IDependencyComponent
Core revision checking resource implementing the component type com.zfabrik.coreRevisionCheck.

The purpose of this component type is to enable a core revision requirement checking before attaining a particular system state. Currently the core build no (see Foundation.getCoreBuildVersion() is used is core revision. Using this component type an expectation of a certain core build no can be tested.

When the present core revision is found to be too old, the revision checker may respond in two ways: Either

  • Terminate the local VM (default)
  • Throw an exception that effectively makes sure a given system state cannot be reached

Supported properties:

coreRevision.min
The minimum core revision (build no. actually) expected
coreRevision.failAction
Specifies how to respond to a missed requirement. Either terminate (default) or error. The former leads to a termination of the local VM, the latter to an exception thrown by the checker.

A typical revision checker is declared like this:

 com.zfabrik.component.type=com.zfabrik.coreRevisionCheck
 #
 # current version
 #
 coreRevision.min=201012122022
 #
 # We throw an error
 #
 coreRevision.failAction=error
 #
 # make sure every process is checked
 #
 com.zfabrik.systemStates.participation=com.zfabrik.boot.main/process_up