java.lang.Object | |
↳ | com.datalogic.decode.VisualFormatter |
VisualFormatter
is a class used to install and manage the different
projects created from the Visual Formatter tool available inside Scan2Deploy Studio.
A project consists of a list of items of 2 types:
- FORMATTER
: Takes as input the barcode received from the scanner and transforms
it as desired, returning the modified barcode as output;
- DISPATCHER
: Takes as input the barcode received from the scanner and selects
the FORMATTER
items to execute.
After a project is installed, one of its items will be set as the active item.
When a new barcode is read its contents will be passed to the active item in order to be
managed. The active item can also be changed in any moment.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
VisualFormatter.Item | VisualFormatter.Item is a class representing a visual formatting item,
used to manipulate the input barcode data when set as active item. |
||||||||||
VisualFormatter.PersistenceType | VisualFormatter.PersistenceType is an enumeration representing the
persistence type of the installed visual formatter configuration. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Gets the currently active item if any, or null otherwise.
| |||||||||||
Gets the Visual Formatter feature level.
| |||||||||||
Gets an instance of the VisualFormatter, if it is supported but the platform.
| |||||||||||
Lists all available formatting items.
| |||||||||||
Gets the Visual Formatter script execution timeout.
| |||||||||||
Installs a new formatter project by specifying a zip file.
| |||||||||||
Checks if the Visual Formatter is enabled.
| |||||||||||
Remove the items of the specified project.
| |||||||||||
Remove the items of the specified persistence type.
| |||||||||||
Removes all items that are reboot or enterprise reset persistent.
| |||||||||||
Sets the item to make active.
| |||||||||||
Enables or disables the Visual Formatter.
| |||||||||||
Sets the Visual Formatter script execution timeout.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Gets the currently active item if any, or null otherwise.
DecodeException | in case of error, when exceptions are enabled through the ErrorManager singleton.
|
---|
Gets the Visual Formatter feature level.
DecodeException | in case of error, when exceptions are enabled through the ErrorManager singleton.
|
---|
Gets an instance of the VisualFormatter, if it is supported but the platform.
Lists all available formatting items.
DecodeException | in case of error, when exceptions are enabled through the ErrorManager singleton.
|
---|
Gets the Visual Formatter script execution timeout.
DecodeException | in case of error, when exceptions are enabled through the ErrorManager singleton.
|
---|
Installs a new formatter project by specifying a zip file. It also sets the active item to one of the items found inside the zip file.
path | The path to a zip file containing the formatter project. The file can contain multitple scripts corresponding to different formatting items. |
---|---|
persistenceType | The type of persistence required for this formatter configuration. Can only be reboot or enterprise reset persistent. |
overwriteExisting | Used when some items with the same project ID of the new project are already installed in the device. It will clear all items found with the same project ID of the new one before installing it. |
DecodeException | in case of error, when exceptions are enabled through the ErrorManager singleton.
|
---|
Checks if the Visual Formatter is enabled.
DecodeException | in case of error, when exceptions are enabled through the ErrorManager singleton.
|
---|
Remove the items of the specified project.
projectId | The project id. |
---|
DecodeException | in case of error, when exceptions are enabled through the ErrorManager singleton.
|
---|
Remove the items of the specified persistence type.
persistenceType | The persistence type of the items to remove. |
---|
DecodeException | in case of error, when exceptions are enabled through the ErrorManager singleton.
|
---|
Removes all items that are reboot or enterprise reset persistent.
SUCCESS
in case it succeeds, otherwise it returns an error code if the
exceptions are disabled or throws a DecodeException
in case the exceptions are enabled.DecodeException | in case of error, when exceptions are enabled through the ErrorManager singleton.
|
---|
Sets the item to make active.
activeItem | The item to make active. |
---|
SUCCESS
in case it succeeds, otherwise it returns an error code if the
exceptions are disabled or throws a DecodeException
in case the exceptions are enabled.DecodeException | in case of error, when exceptions are enabled through the ErrorManager singleton.
|
---|
Enables or disables the Visual Formatter. When enabled, the Visual Formatter will execute the script associated with the current active item. If no item is active it will not execute.
enable | True to enable the Visual Formatter, false to disable it. |
---|
SUCCESS
in case it succeeds, otherwise it returns an error code if the
exceptions are disabled or throws a DecodeException
in case the exceptions are enabled.DecodeException | in case of error, when exceptions are enabled through the ErrorManager singleton.
|
---|
Sets the Visual Formatter script execution timeout. If during the execution of a script the timeout is reached, an error is returned.
timeout | The timeout in milliseconds, with accepted values in range 10-1000. |
---|
SUCCESS
in case it succeeds, otherwise it returns an error code if the
exceptions are disabled or throws a DecodeException
in case the exceptions are enabled.DecodeException | in case of error, when exceptions are enabled through the ErrorManager singleton.
|
---|