T - result typepublic abstract class AbstractRunnable<T> extends Object implements de.tsl2.nano.execution.IPRunnable<T,Map<String,Object>>
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Constraint<?>> |
constraints |
protected String |
name |
protected String |
operation |
protected String |
operationContent |
protected LinkedHashMap<String,ParType> |
parameter |
protected Collection<Specification> |
specifications |
| Constructor and Description |
|---|
AbstractRunnable() |
AbstractRunnable(String name,
String operation,
LinkedHashMap<String,ParType> parameter)
constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addConstraint(String parameterName,
Constraint<?> constraint)
addConstraint
|
Specification |
addSpecification(Specification s)
define test scenarios to be checked while loading by a factory. if no parameter were defined yet, the given
argments will be used to define the parameters.
|
Specification |
addSpecification(String name,
String description,
Object exptected,
Map<String,Object> arguments) |
static boolean |
asSequence(Map<String,Object> arguments) |
protected void |
checkConstraint(CharSequence par,
Object arg) |
Map<String,Object> |
checkedArguments(Map<String,Object> arguments,
boolean strict)
checks arguments against defined parameter and returns new map of arguments, defined by parameters.
|
protected void |
checkSpecification(Specification s)
checkSpecification
|
protected void |
createConstraints() |
protected Map<String,ParType> |
createParameters(Class declaringClass) |
protected static Map<String,ParType> |
createSimpleParameters(String... names) |
String |
getName() |
String |
getOperation() |
Map<String,ParType> |
getParameter()
getParameter
|
List<Class<?>> |
getParameterList()
getParameterList
|
protected void |
initDeserializing() |
static void |
markArgumentsAsSequence(Map args) |
static LinkedHashMap<String,ParType> |
parameters(String... names) |
String |
prefix()
prefix
|
protected void |
setOperation(String operation) |
String |
toString() |
protected String name
protected LinkedHashMap<String,ParType> parameter
protected Map<String,Constraint<?>> constraints
protected Collection<Specification> specifications
protected String operation
protected transient String operationContent
public AbstractRunnable()
public AbstractRunnable(String name, String operation, LinkedHashMap<String,ParType> parameter)
operation - parameter - public String getName()
public static LinkedHashMap<String,ParType> parameters(String... names)
public Map<String,Object> checkedArguments(Map<String,Object> arguments, boolean strict)
KEY_ARGUMENTS_AS_SEQUENCE to define a sequential iteration of arguments (without using key names)checkedArguments in interface de.tsl2.nano.execution.IPRunnable<T,Map<String,Object>>arguments - to be checked and collectedstrict - if true, arguments not defined as parameter will throw an IllegalArgumentException.protected void createConstraints()
protected void checkConstraint(CharSequence par, Object arg)
public String prefix()
public void addConstraint(String parameterName, Constraint<?> constraint)
parameterName - parameter name to add the constraint forconstraint - new constraintpublic Specification addSpecification(String name, String description, Object exptected, Map<String,Object> arguments)
public Specification addSpecification(Specification s)
s - specificationprotected void checkSpecification(Specification s)
s - public String getOperation()
protected void setOperation(String operation)
public static void markArgumentsAsSequence(Map args)
protected void initDeserializing()
Copyright © 2012–2018. All rights reserved.