Class EngineApi
Namespace: Casewhere.Runtime.Engine
Assembly: Casewhere.Runtime.dll
Access engine built-in API that doesn't require a context e.g. configurations, system documents, plugins, schedulers, shared tokens... For access data objects, use a ContextService
public class EngineApi : IEngineApi
Inheritance
Implements
Inherited Members
object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()
Extension Methods
ObjectExtension.ConvertToBsonValue(object), EnumExtensions.DeepClone<EngineApi>(EngineApi)
Constructors
EngineApi(IDocumentApiService, IPluginApiService, IFileStorage)
public EngineApi(IDocumentApiService documentApiService, IPluginApiService pluginApiService, IFileStorage fileStorage)
Parameters
documentApiService
IDocumentApiService
pluginApiService
IPluginApiService
fileStorage
IFileStorage
Methods
GetDocument(Guid)
[Obsolete]
public byte[] GetDocument(Guid id)
Parameters
id
Guid
Returns
byte[]
GetDocument(DocumentInfo)
public byte[] GetDocument(DocumentInfo documentInfo)
Parameters
documentInfo
DocumentInfo
Returns
byte[]
GetDocumentMetadata(Guid)
[Obsolete]
public DynamicDataObject GetDocumentMetadata(Guid id)
Parameters
id
Guid
Returns
DynamicDataObject
GetSystemDocument(string)
public byte[] GetSystemDocument(string documentName)
Parameters
documentName
string
Returns
byte[]
PluginExecute(string, string, Dictionary<string, string>)
[C] Invoke a plugin based on the plugin name and return no value.
public object PluginExecute(string pluginName, string method, Dictionary<string, string> parameters)
Parameters
pluginName
string
The plugin name
method
string
The method will be invoked
parameters
Dictionary<string, string>
The parameters of the method
Returns
Exceptions
When is not found in the database OR when or is invalid (empty or null)
PluginException
When there is an exception during invoking plugin.
PluginQueryPagedList(string, string, Dictionary<string, string>)
[C] Invoke a plugin based on the plugin name and return the array of values.
public PagedList PluginQueryPagedList(string pluginName, string method, Dictionary<string, string> parameters)
Parameters
pluginName
string
The plugin name
method
string
The method will be invoked to get data
parameters
Dictionary<string, string>
The parameters of the method
Returns
PagedList
Exceptions
When is not found in the database OR when or is invalid (empty or null)
PluginException
When there is an exception during invoking plugin.
SaveDocument(string, byte[])
[Obsolete]
public DocumentMetadata SaveDocument(string fileName, byte[] content)
Parameters
fileName
string
content
byte[]
Returns
DocumentMetadata
SaveDocumentData(string, byte[])
public DocumentInfo SaveDocumentData(string fileName, byte[] data)
Parameters
fileName
string
data
byte[]
Returns
DocumentInfo