|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.jobmanager.persistence.DefinitionValidator
public class DefinitionValidator
Helper class for validating asynchronous workflow elements.
| Constructor Summary | |
|---|---|
DefinitionValidator(DefinitionAccessor definitionAccessor,
JobManager jobManager,
ObjectStoreService objectStoreService)
|
|
| Method Summary | |
|---|---|
void |
checkJobRemove(java.lang.String jobName)
Checks if the job can be removed. |
void |
checkRemoveBucket(java.lang.String name)
Check if the bucket can be safely removed without compromising data integrity. |
void |
checkRemoveWorkflow(java.lang.String name)
Check if the workflow can be safely removed without compromising data integrity. |
protected void |
fillUnresolvedVariables(Any parameter,
java.lang.String key,
java.lang.String container,
java.util.Map<java.lang.String,java.lang.String> variableReferencingParameters)
|
protected java.util.Map<java.lang.String,java.lang.String> |
removeDefinedVariables(AnyMap topLevelParameters,
java.util.Map<java.lang.String,java.lang.String> unresolvedParams)
|
void |
validateBucket(BucketDefinition bucketDefinition)
check if bucket definition is valid. |
void |
validateBucketWorkflows(BucketDefinition bucketDefinition)
Check if the bucket can be safely added without compromising data integrity. |
void |
validateJob(JobDefinition job)
check the the workflow referenced by this job. |
protected void |
validateParameterDefinitionForMap(ParameterDefinition paramDef,
Any parameter,
boolean allParametersResolved,
java.lang.String workflowName,
java.lang.String workerName)
Validates a MAP parameter against its definition. |
protected void |
validateParameterDefinitionForSimpleType(ParameterDefinition paramDef,
Any parameter,
java.lang.String workflowName,
java.lang.String workerName)
|
protected void |
validateParameterUndefined(ParameterDefinition paramDef,
Any parameter,
boolean allParametersResolved,
java.lang.String workflowName,
java.lang.String workerName)
Validates that parameter is not undefined unless the definition allows so. |
void |
validateWorkflow(WorkflowDefinition workflow)
check if workflow definition is valid. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefinitionValidator(DefinitionAccessor definitionAccessor,
JobManager jobManager,
ObjectStoreService objectStoreService)
definitionAccessor - accessor for reading user-submitted or configured definitions.jobManager - needed for accessing task generators needed for validationobjectStoreService - the reference to the object store service.| Method Detail |
|---|
public void validateJob(JobDefinition job)
throws InvalidConfigException,
PersistenceException
job - job definition
InvalidConfigException - validation error.
PersistenceException - error reading definition(s).
public void validateWorkflow(WorkflowDefinition workflow)
throws InvalidConfigException,
PersistenceException
workflow - workflow definition
InvalidConfigException - validation error.
PersistenceException - error accessing storage
public void validateBucket(BucketDefinition bucketDefinition)
throws InvalidConfigException,
PersistenceException
bucketDefinition - bucket definition
InvalidConfigException - validation error.
PersistenceException - the bucket names cannot be retrieved.
public void validateBucketWorkflows(BucketDefinition bucketDefinition)
throws PersistenceException,
InvalidConfigException
bucketDefinition - The bucket to check
PersistenceException - error reading workflow definition(s)
InvalidConfigException - error adding definition due to dependency constraints
protected void validateParameterDefinitionForMap(ParameterDefinition paramDef,
Any parameter,
boolean allParametersResolved,
java.lang.String workflowName,
java.lang.String workerName)
throws InvalidConfigException
paramDef - the parameterDefinition to check with the given parameterparameter - the parameter to check against the worker's parameter descriptionallParametersResolved - 'true' if all parameters are resolved and also missing parameters must be reported, 'false' if parameters
might still be resolved or incomplete.workflowName - the name of the workflowworkerName - the name of the worker
InvalidConfigException - parameter invalid
protected void validateParameterUndefined(ParameterDefinition paramDef,
Any parameter,
boolean allParametersResolved,
java.lang.String workflowName,
java.lang.String workerName)
throws InvalidConfigException
paramDef - the parameterDefinition to check with the given parameterparameter - the parameter to check against the worker's parameter descriptionallParametersResolved - 'true' if all parameters are resolved and also missing parameters must be reported, 'false' if parameters
might still be resolved or incomplete.workflowName - the name of the workflowworkerName - the name of the worker
InvalidConfigException - parameter invalid
protected void validateParameterDefinitionForSimpleType(ParameterDefinition paramDef,
Any parameter,
java.lang.String workflowName,
java.lang.String workerName)
throws InvalidConfigException
paramDef - the parameterDefinition to check with the given parameterparameter - the parameter to check against the worker's parameter descriptionworkflowName - the name of the workflowworkerName - the name of the worker
InvalidConfigException
protected java.util.Map<java.lang.String,java.lang.String> removeDefinedVariables(AnyMap topLevelParameters,
java.util.Map<java.lang.String,java.lang.String> unresolvedParams)
topLevelParameters - the parameters mapunresolvedParams - the map of unresolved parameters
protected void fillUnresolvedVariables(Any parameter,
java.lang.String key,
java.lang.String container,
java.util.Map<java.lang.String,java.lang.String> variableReferencingParameters)
parameter - the parameter (SEQ, MAP or value) that potentially references a variablevariableReferencingParameters - the parameters which are referencing variables
public void checkRemoveWorkflow(java.lang.String name)
throws InvalidConfigException,
PersistenceException
name - The name of the workflow to check
PersistenceException - error reading job definition(s)
InvalidConfigException - error deleting definition due to dependency constraints
public void checkRemoveBucket(java.lang.String name)
throws InvalidConfigException,
PersistenceException
name - The name of the bucket to check
PersistenceException - error reading workflow definition(s)
InvalidConfigException - error deleting definition due to dependency constraints
public void checkJobRemove(java.lang.String jobName)
throws JobManagerException
jobName - The name of the job to be removed.
JobManagerException - Some error occurred while checking if job is currently running.
|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||