VCSSL/VNANO PLUGIN INTERFACE SPECIFICATION

# Engine Connector Interface 1 (ECI1)
Specification Document
(org.vcssl.connect.EngineConnectorInterface1)

## Abstract

Engine Connector Interface 1 (ECI1) is an interface for mediate communication of some information between scripting engines and plug-ins.

Scripting engines pass an object implementing this interface to arguments of initialization/finalization methods of plug-ins.

## Status

The status of this interface is "FINALIZED".

The specification of this interface had been finalized at 2022/08/31. No modifications will be applied for this interface, excluding documents/comments.

This interface is currently supported by the scripting engine of Vnano. You can use this interface for development of plug-ins of applications equipped with the Vnano engine.

## License

This interface is published under CC0, which is almost the same as the so-called "copyright-free" (domain).

## List of Fields/Methods

INTERFACE_TYPE_ID
  The type ID of this interface (value: "ECI") referred when the plug-in will be loaded.
INTERFACE_GENERATION
  The generation of this interface (value: "1").
boolean hasOptionValue(String optionName)
  Returns whether the engine has the value of the option with the specified name.
Object getOptionValue(String optionName)
  Gets the value of the specified option.
void requestPermission(String permissionName, Object requester, Object metaInformation)
  Requests the specified permission.
isOtherEngineConnectorAvailable(Class<?> engineConnectorClass)
  Returns whether the other type of engine connector is available.
<T> T getOtherEngineConnector(Class<T> engineConnectorClass)
  Gets the other type of engine connector.

## Fields

Name | INTERFACE_TYPE_ID
--- | ---
Value | The type ID of this interface (value: "ECI") referred when the plug-in will be loaded.
Type | static final String

Name | INTERFACE_GENERATION
--- | ---
Value | The generation of this interface (value: "1").
Type | static final String

## Methods

Name | hasOptionValue
--- | ---
Signature | boolean hasOptionValue(String optionName)
Description | Returns whether the engine has the value of the option with the specified name.
Parameters | optionName: The name of the option.
Return | Returns true if the engine has the value of the specified option.
Exception | None

Name | getOptionValue
--- | ---
Signature | Object getOptionValue(String optionName)
Description | Gets the value of the specified option. Before calling this method, check that the value of the specified option exists and is accessible, by hasOptionValue(String optionName) method.
Parameters | optionName: The name of the option.
Return | The value of the specified option.
Exception | ConnectorFatalException (Unchecked): Thrown when the value of the specified option does not exist, or is not accessible.

Name | requestPermission
--- | ---
Signature | void requestPermission(String permissionName, Object requester, Object metaInformation) throws ConnectorException
Description | Requests the specified permission. If the requested permission is allowed, nothing will occur. On the other hand, when the requested permission has been denied, this method throws a ConnectorException. Whether the request will be allowed or denied depends on settings of an application, or decision of its user. Hence, in principle, it is necessary to assume that any request may be denied. So it requires to catch (or rethrow) the exception explicitly.
Parameters | permissionName: The name of the permission item to request. requester: The plug-in requesting the permission. metaInformation: The information to be notified to the user (especially when the current value of the permission is set to "ASK").
Return | None
Exception | ConnectorException: Thrown when the requested permission has been denied.

Name | isOtherEngineConnectorAvailable
--- | ---
Signature | boolean isOtherEngineConnectorAvailable(Class<?> engineConnectorClass)
Description | Returns whether the other type of engine connector is available.
Parameters | engineConnectorClass: The class of the engine connector you want to use.
Return | Returns true if the specified engine connector is available.
Exception | None

Name | getOtherEngineConnector
--- | ---
Signature | <T> T getOtherEngineConnector(Class<T> engineConnectorClass)
Description | Gets the other type of engine connector. Before calling this method, check that the specified type of the engine connector is available, by isOtherEngineConnectorAvailable(Class<?> engineConnectorClass) method.
Parameters | engineConnectorClass: The class of the engine connector you want to use.
Return | The specified type of engine connector.
Exception | ConnectorFatalException (Unchecked): Thrown if the specified engine connector is not available.