Class Innovator
Wraps a connection with a API which is compatible with Aras's IOM In particular, the Innovator class provides methods for connecting to Aras Innovator Server and for performing miscellaneous mostly non-Item related operations.
Inherited Members
Namespace: Innovator.Client.IOM
Assembly: Innovator.Client.dll
Syntax
public class Innovator : ElementFactory
Constructors
| Improve this Doc View SourceInnovator(IConnection)
Initializes a new instance of the Innovator class.
Declaration
public Innovator(IConnection conn)
Parameters
Type | Name | Description |
---|---|---|
IConnection | conn | The server connection to use |
Methods
| Improve this Doc View SourceapplyAML(String, Object[])
Sends request to Innovator server and returns server response as an item.
Declaration
public Item applyAML(string AML, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
System.String | AML | AML script to be sent to Innovator server. |
System.Object[] | args | Parameters to be injected into the query |
Returns
Type | Description |
---|---|
Item | Server response. |
Remarks
It's assumed that passed AML script has a root tag <AML>
that contains one or more <Item>
children elements. The method
send the AML script to the server and returns an Item object
containing the XML response returned from the server.
applyMethod(String, String)
Apply a method by name, passing a string value as its body.
Declaration
public Item applyMethod(string methodName, string body)
Parameters
Type | Name | Description |
---|---|---|
System.String | methodName | Name of the method. |
System.String | body | Context for the method (method item). |
Returns
Type | Description |
---|---|
Item | The Item response |
Remarks
The context for the method will be the method item, in the form:
<Item type="Method" action="{methodName}">{body}</Item>
Note, that only methods that use IOM namespace from .NET (C#, VBScript) can
be applied, and methods written in JavaScript cannot be applied.
applySQL(String)
Sends SQL request to Innovator server and returns server response as an Item.
Declaration
public Item applySQL(string sql)
Parameters
Type | Name | Description |
---|---|---|
System.String | sql | SQL to be sent to Innovator server. |
Returns
Type | Description |
---|---|
Item | Server response. |
Remarks
Uses ApplySQL type of server request. The returned Item object contains the XML returned from the server.
getConnection()
Returns the server connection set on the instance.
Declaration
public IConnection getConnection()
Returns
Type | Description |
---|---|
IConnection | Server connection object that implements IConnection interface. |
getItemById(String, String)
Returns an Item object that matches the
itemTypeName
and id
for the Item.
Declaration
public Item getItemById(string itemTypeName, string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | itemTypeName | Name of the ItemType. |
System.String | id | Item's ID. |
Returns
Type | Description |
---|---|
Item | If request to the server failed the method returns an "error" item; if no item with specified type and id found in the database the method returns 'null'; otherwise the method returns the found item. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
|
getItemByKeyedName(String, String)
Returns an Item object that matches the
itemTypeName
and keyedName
for the Item.
Declaration
public Item getItemByKeyedName(string itemTypeName, string keyedName)
Parameters
Type | Name | Description |
---|---|---|
System.String | itemTypeName | Name of the ItemType. |
System.String | keyedName | Keyed name for the searched item. |
Returns
Type | Description |
---|---|
Item | If request to the server failed the method returns an "error" item; if no item with specified type and id found in the database the method returns 'null'; otherwise the method returns the found item. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
|
getNewID()
Gets a new 32 character hex string based on a GUID.
Declaration
public string getNewID()
Returns
Type | Description |
---|---|
System.String | New GUID. |
getNextSequence(String)
Returns the next sequence value by sequence name.
Declaration
public string getNextSequence(string sequenceName)
Parameters
Type | Name | Description |
---|---|---|
System.String | sequenceName | Sequence name. |
Returns
Type | Description |
---|---|
System.String | New sequence value if request to the server succeeded,
|
Remarks
Method makes a request to Innovator server in order to get new sequence value.
getUserID()
Returns id of the user assosiated with a given instance of Innovator if this user is currently logged in
Declaration
public string getUserID()
Returns
Type | Description |
---|---|
System.String | User id. |
newError(String)
Returns a new "error" item.
Declaration
public Item newError(string explanation)
Parameters
Type | Name | Description |
---|---|---|
System.String | explanation | Is used to populate the |
Returns
Type | Description |
---|---|
Item |
newItem()
Returns a new Item.
Declaration
public Item newItem()
Returns
Type | Description |
---|---|
Item | Newly created instance of Item. |
Remarks
The new Item will have no properties.
newItem(String)
Returns a new Item with the specified type..
Declaration
public Item newItem(string itemTypeName)
Parameters
Type | Name | Description |
---|---|---|
System.String | itemTypeName | Name of the ItemType. |
Returns
Type | Description |
---|---|
Item | Newly created instance of Item. |
Remarks
The itemTypeName
is used to set the 'type' attribute.
The new Item will have no properties. In order to populate it with
default property values of its ItemType call fetchDefaultPropertyValues(Boolean)
on the item.
newItem(String, String)
Returns a new Item with the specified type and action.
Declaration
public Item newItem(string itemTypeName, string action)
Parameters
Type | Name | Description |
---|---|---|
System.String | itemTypeName | Name of the item type. |
System.String | action | Name of action (e.g. "get", "update", etc.) |
Returns
Type | Description |
---|---|
Item | Newly created instance of Item. |
Remarks
The itemTypeName
is used to set the 'type' attribute
and the action
name is used to set the 'action' attribute on the
Item. The new Item will have no properties. In order
to populate it with default property values of its ItemType call
fetchDefaultPropertyValues(Boolean) on the item.
newItemFromAml(String, Object[])
Returns a new Item with the AML body.
Declaration
public Item newItemFromAml(string aml, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
System.String | aml | AML to populate the item with |
System.Object[] | args | Parameters to be injected into the query |
Returns
Type | Description |
---|---|
Item |
newResult(String)
Returns an Item where the text passed in as the argument is the body for
the <Result>
tag.
Declaration
public Item newResult(string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | Text to be set as the body for the |
Returns
Type | Description |
---|---|
Item | Created item. |
ScalcMD5(String)
Computes the MD5 hash value for the specified string.
Declaration
public static string ScalcMD5(string val)
Parameters
Type | Name | Description |
---|---|---|
System.String | val | String to be encoded. |
Returns
Type | Description |
---|---|
System.String | MD5 hash value. |