Package com.logicaldoc.core.automation

# Class Automation

java.lang.Object
com.logicaldoc.core.automation.Automation

public class Automation extends Object
Represents the automation scripting engine

Author:
  Marco Meschieri - LogicalDOC

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`CONTEXT`
`static final String`
`CURRENT_DATE`
`static final String`
`DICTIONARY`
`static final String`
`KEYS`
`static final String`
`LOCALE`
`static final String`
`PARAMETERS`
`static final String`
`PARAMETERS_NAMES`
`static final String`
`PRODUCT`
`static final String`
`SERVER_URL`
`static final String`
`SYSTEM_DICTIONARY`
`static final String`
`TENANT_ID`

## Constructor Summary

Constructors
Constructor
Description
`Automation()`
`Automation(String logTag)`
`Automation(String logTag, Locale locale, long tenantId)`

## Method Summary

Modifier and Type
Method
Description
`String`
`evaluate(String expression, Map<String,Object> clientDictionary)`
Evaluate a given expression.
`void`
`evaluate(Map<String,Object> clientDictionary, Reader reader, Writer writer)`
Evaluate a given expression.
`static void`
`initialize()`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### SYSTEM_DICTIONARY

public static final String SYSTEM_DICTIONARY

See Also:
  - Constant Field Values

### CURRENT_DATE

public static final String CURRENT_DATE

See Also:
  - Constant Field Values

### PRODUCT

public static final String PRODUCT

See Also:
  - Constant Field Values

### LOCALE

public static final String LOCALE

See Also:
  - Constant Field Values

### SERVER_URL

public static final String SERVER_URL

See Also:
  - Constant Field Values

### TENANT_ID

public static final String TENANT_ID

See Also:
  - Constant Field Values

### DICTIONARY

public static final String DICTIONARY

See Also:
  - Constant Field Values

### KEYS

public static final String KEYS

See Also:
  - Constant Field Values

### CONTEXT

public static final String CONTEXT

See Also:
  - Constant Field Values

### PARAMETERS

public static final String PARAMETERS

See Also:
  - Constant Field Values

### PARAMETERS_NAMES

public static final String PARAMETERS_NAMES

See Also:
  - Constant Field Values

## Constructor Details

### Automation

public Automation()

### Automation

public Automation(String logTag)

### Automation

public Automation(String logTag, Locale locale, long tenantId)

## Method Details

### initialize

public static void initialize()

### evaluate

public String evaluate(String expression, Map<String,Object> clientDictionary) throws AutomationException
Evaluate a given expression. The given dictionary will be integrated by `prepareDictionary(Map)`:

Parameters:
  `expression` - The string expression to process
  `clientDictionary` - The dictionary to use
Returns:
  The processed result
Throws:
  `AutomationException` - the script has been evaluated but produced an error

### evaluate

public void evaluate(Map<String,Object> clientDictionary, Reader reader, Writer writer) throws IOException, AutomationException
Evaluate a given expression. The given dictionary will be integrated by `prepareDictionary(Map)`

Parameters:
  `clientDictionary` - dictionary to be passed to the engine
  `reader` - the reader on the automation code
  `writer` - the writer that will receive the output
Throws:
  `IOException` - cannot read from reader
  `AutomationException` - the script has been evaluated but produced an error