Package com.isomorphic.tools

# Class ReifyDataSourceValidator

java.lang.Object
com.isomorphic.tools.ReifyDataSourceValidator

public class ReifyDataSourceValidator extends Object
A utility class that checks for discrepancies between a project's MockDataSources and their working, or "live", counterparts (e.g., SQLDataSources) commonly found during the Reify design / development cycle, and logs its findings per standard server logging configuration.

INFO level messages are logged when any of the following conditions are discovered:

- A field defined in "live" is not also present in mock
- A field defined in "live" has a declarative security setting not also present in mock
- A field defined in "live" has a different title than mock (fields using i18n titles are not checked)

WARN level messages are logged when any of the following conditions are discovered:

- A field defined in mock is not also present in "live"
- A field defined in mock has a different type than in live (and the live type is a not a sub-type of the mock type)
- A field defined in mock has a declarative security setting different than in "live"
- Fields in mock have a different order than in "live" (after ignoring any fields that mock lacks)
- An Operation Binding defined in mock has a declarative security setting different than in "live"

Commonly called from a Maven Plugin or Ant Task, this verification may also be invoked from a command line using the Java executable. For example

       java -cp :build/tools/reify/lib/*:src com.isomorphic.tools.ReifyDataSourceValidator -r /Users/you/dev/your-project/war/isomorphic -d /Users/you/dev/your-project/war/WEB-INF/ds/classic-models -m /Users/you/dev/your-project/war/WEB-INF/ds/mock

would check the MockDataSources in '/Users/you/dev/your-project/war/WEB-INF/ds/mock' against the working DataSources in '/Users/you/dev/your-project/war/WEB-INF/ds/classic-models', using the SmartClient runtime (as copied manually following download and unzip of a SmartClient SDK, automatically during e.g., a build step, etc.) found at '/Users/you/dev/your-project/war/isomorphic'.

       java -cp :build/tools/reify/lib/*:src com.isomorphic.tools.ReifyDataSourceValidator -h prints a help message explaining these options.

Note that the classpath in this case includes multiple entries so that

1. The isomorphic_m2pluginextras JAR and all of its dependencies can be found at 'build/tools/reify/lib/*'
2. The requisite log4j.isc.config.xml logging config can be found in 'src'

but your setup may of course vary.