Class ValidationScriptRunner
- java.lang.Object
-
- ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.validation.ValidationScriptRunner
-
- Direct Known Subclasses:
ValidationScriptRunner.NullValidationScriptRunner
public class ValidationScriptRunner extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ValidationScriptRunner.NullValidationScriptRunner
-
Constructor Summary
Constructors Modifier Constructor Description protected
ValidationScriptRunner(boolean scriptIsNull)
Protected constructor for the null script runner.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ValidationScriptRunner
createValidatorFromScriptPaths(java.lang.String[] scriptPaths)
Factory method for creating a ValidationScriptRunner given a path to a script.static ValidationScriptRunner
createValidatorFromScriptPaths(java.lang.String[] scriptPaths, boolean isolateJythonSystemState)
Factory method for creating a ValidationScriptRunner given a path to a script.static ValidationScriptRunner
createValidatorFromScriptString(java.lang.String scriptString)
Factory method for creating a ValidationScriptRunner given the script as a string.static ValidationScriptRunner
createValidatorFromScriptString(java.lang.String scriptString, boolean isolateJythonSystemState)
Factory method for creating a ValidationScriptRunner given the script as a string.java.util.Map<java.lang.String,java.lang.String>
extractMetadata(java.io.File dataSetFile)
java.lang.String
getScriptString()
java.util.List<ValidationError>
validate(java.io.File dataSetFile)
-
-
-
Method Detail
-
createValidatorFromScriptPaths
public static ValidationScriptRunner createValidatorFromScriptPaths(java.lang.String[] scriptPaths)
Factory method for creating a ValidationScriptRunner given a path to a script.Use this on the server-side.
-
createValidatorFromScriptPaths
public static ValidationScriptRunner createValidatorFromScriptPaths(java.lang.String[] scriptPaths, boolean isolateJythonSystemState)
Factory method for creating a ValidationScriptRunner given a path to a script.- Parameters:
isolateJythonSystemState
- Iftrue
, create a jython interpreter with an isolated system state. Use this on the server side where multiple Jython interpreters may run in different threads. Note, however, that the re module has some restrictions in this mode.
-
createValidatorFromScriptString
public static ValidationScriptRunner createValidatorFromScriptString(java.lang.String scriptString)
Factory method for creating a ValidationScriptRunner given the script as a string.Use this on the server-side.
-
createValidatorFromScriptString
public static ValidationScriptRunner createValidatorFromScriptString(java.lang.String scriptString, boolean isolateJythonSystemState)
Factory method for creating a ValidationScriptRunner given the script as a string.- Parameters:
isolateJythonSystemState
- Iftrue
, create a jython interpreter with an isolated system state. Use this on the server side where multiple Jython interpreters may run in different threads. Note, however, that the re module has some restrictions in this mode.
-
validate
public java.util.List<ValidationError> validate(java.io.File dataSetFile)
-
extractMetadata
public java.util.Map<java.lang.String,java.lang.String> extractMetadata(java.io.File dataSetFile)
-
getScriptString
public java.lang.String getScriptString()
-
-