Click or drag to resize

Item Class

The class provides interface to AML structure in memory as well as means of communication with Innovator server. Depending of Item's dom internal structure, as well as its node and nodeList values the instance of this class may represents one of the following:
  • Single Innovator Item of an arbitrary ItemType. In this case Item.node!=null, and inside of Item.dom this node can refer to any XmlNode with localName <Item>. Notice that in case of Single item the Item.node.OuterXml will look like this
    <Item  />
    or this
    <Item >
      <prop1>a</prop1>
      <prop2>b</prop2>
    </Item>
  • A collection of Innovator Items, as in a case when more then one Innovator Business Item being returned by the Server on a single request from client. In this case Item.nodeList!=null and Item.dom.OuterXml should comply with one of two following formats: (1) AML wrapper
    <AML>
        <Item ... />
         ...
        <Item ... />
    </AML>
    or (2) SOAP-Result wrapper
    <SOAP-ENV:Envelope xmlns:SOAP-ENV=.../>
        <SOAP-ENV:Body>
            <Result>
                <Item  />
                ...
                <Item  />
            </Result>
        </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
  • Error as in the case when a client request results in error from the Server. In this case both Item.node and Item.nodeList are set to null, while Item.dom.OuterXml complies with the folowing format:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV=.../>
     <SOAP-ENV:Body>
        <SOAP-ENV:Fault>
           <faultcode>...</faultcode>
           <faultactor>...</faultactor>
           <detail><...></detail>
        </SOAP-ENV:Fault>
     </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
  • Result to represent an arbitrary text wrapped by <SOAP-ENV> <Result> tags. Again, both Item.node and Item.nodeList are set to null in this case, while Item.dom.OuterXml complies with the following format:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV=.../>
     <SOAP-ENV:Body>
        <Result>[text]</Result>
     </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
  • Logical to represent a set of Innovator Item's property-nodes wrapped in logical statement by one of three logical tags: <or>, <and>, or <not> usually used to specify the search criteria for the action "get". Because in this case one of three logical tags is the root tag for the logical Item.node its OuterXml may look like this:
    <and>
     <prop1>a</prop1>
     <prop2>b</prop2>
    </and>
Methods of the class allow:
  • get\set\add\remove attributes and\or properties of an item or an error, i.e. modify AML in memory
  • send requests to server (instance of the class is interpreted as an AML request; note that server response is also returned in a form of an instance of the class, i.e. response AML is encapsulated as an Item).
Inheritance Hierarchy
SystemObject
  Aras.IOMItem

Namespace:  Aras.IOM
Assembly:  IOM (in IOM.dll) Version: 14.0.20.39432
Syntax
public class Item

The Item type exposes the following members.

Properties
  NameDescription
Public propertydom
A reference to the instance of ArasXmlDocument that holds the data for the Item in the AML format. ArasXmlDocument is an alias that represents System.Xml.XmlDocument when IOM namespace is used from .NET (C#, VBScript) and MSXML2.IXMLDOMDocument when it used from COM (JavaScript).
Public propertynode
A reference to the <Item> node in the dom for this Item instance. The type of node is System.Xml.XmlElement when IOM namespace is used from .NET (C#, VBScript) and MSXML2.IXMLDOMElement when it used from COM (JavaScript).
Public propertynodeList
List of <Item> nodes from the dom for this Item instance. The type of nodeList is System.Xml.XmlNodeList when IOM namespace is used from .NET (C#, VBScript) and MSXML2.IXMLDOMNodeList when it used from COM (JavaScript).
Top
Methods
  NameDescription
Public methodaddRelationship
Add specified item as a relationship item to the instance.
Public methodappendItem
Appends passed item to this.nodeList.
Public methodapply
Applies the AML, which is the XML of this.dom.
Public methodapply(Hashtable)
Sets specified properties and applies the AML, which is the XML of this.dom.
Public methodapply(String)
Sets action attribute on the item and applies the AML, which is the XML of this.dom.
Public methodapply(String, Hashtable)
Sets action attribute on the item; sets specified properties and applies the AML, which is the XML of this.dom.
Public methodapply(String, Hashtable, String) Obsolete.
Applies the AML, which is the XML of 'this.dom'.
Public methodapplyStylesheet
Performs XSL transformation of the item's DOM and returns the result of the transformation. IMPORTANT: Be very carefull when using slylesheets from untrusted urls, there's a possibility to use scripts in the stylesheets with the code that can cause damage. Make sure that the stylesheet doesn't contain intrader's script code before using.
Public methodattachPhysicalFile(String)
Attach physical file to the item. Calling the method means that the physical will be streamed to the server when apply() is called on the item.
Public methodattachPhysicalFile(String, String) Obsolete.
Attach physical file to the item. Calling the method means that the physical will be streamed to the server when apply() is called on the item.
Public methodattachPhysicalFileViaStream
Attach physical file as a stream to the item. Calling the method means that the physical will be streamed to the server when apply() is called on the item.
Public methodcancelWorkflow Obsolete.
Cancels the workflow process. Item's type must be "Workflow Process".
Public methodCode examplecheckout
Checkout physical file from the vault to the specified local directory.
Public methodclone
Clones the item.
Public methodcloseWorkflow Obsolete.
Closes the workflow process. Item's type must be "Workflow Process".
Public methodcreatePropertyItem
Creates an item with the specified type and action and sets it as the specified property of this item.
Public methodcreateRelatedItem
Creates an item with the specified type and action and sets it as the related item on this item.
Public methodcreateRelationship
Creates new <Item> node with specified 'type' and 'action' under <Relationships> node inside this.node.
Public methodemail
Send e-mail to the specified identity. In order to do so, the method sends a special request to the Innovator server.
Public methodfetchDefaultPropertyValues
Fetches from server default values for all properties of the item's ItemType and sets them on the item.
Public methodfetchFileProperty
Downloads a file to target path.
Public methodfetchFilePropertyWithStream
Downloads a file to target path via stream
Public methodfetchLockStatus
Fetches from the server the locked status of the item using the item's ID.
Public methodfetchRelationships(String)
Fetches relationships of specified type from the server and sets them on the item.
Public methodfetchRelationships(String, String)
Fetches relationships of specified type from the server and sets them on the item. Specified select list will be set on the request AML.
Public methodfetchRelationships(String, String, String)
Fetches relationships of specified type from the server and sets them on the item. Specified select list and order are set on the request AML.
Public methodgetAction
Returns the 'action' attribute from the Item node.
Public methodgetAttribute(String)
Returns value of the attribute with the specified name on the item's node.
Public methodgetAttribute(String, String)
Returns value of the attribute with the specified name on the item's node.
Public methodgetErrorCode
Gets error code of the "error" item.
Public methodgetErrorDetail
Returns details of the error item.
Public methodgetErrorSource
Returns the content of the <faultactor> element of SOAP Fault element.
Public methodgetErrorString
Returns the error message.
Public methodgetErrorWho Obsolete.
Same as getErrorCode().
Public methodgetFileName Obsolete.
Returns the filename for the attached file. This is only is meaningful if the type="File", otherwise throws an exception.
Public methodgetID
Returns ID of the Item node. According to AML standard ID could be set on <Item> either as the attribute with name 'id' or as a sub-tag <id> (i.e. item property) or both.
Public methodgetInnovator
Returns instance of Innovator this Item "belongs" to.
Public methodgetItemByIndex
Gets an item by index.
Public methodgetItemCount
Returns the number of items that the instance represents.
Public methodgetItemsByXPath
Gets an item (single or collection) resolving xpath specified.
Public methodgetLockStatus
Gets item's lock status based on the property locked_by_id.
Public methodgetLogicalChildren
Returns Item object with the nodeList containing logical nodes that are children of the this.node.
Public methodgetLogicalItems Obsolete.
Returns the Item object with the nodeList containing all logical nodes of this.node.
Public methodgetNewID
Generate new 32 character hex string globally unique identifier.
Public methodgetParentItem
Returns a parent item of the instance.
Public methodgetProperty(String)
Gets value of the property with the specified name.
Public methodgetProperty(String, String)
Gets value of the property with the specified name.
Public methodgetProperty(String, String, String)
Gets value of the property with the specified name.
Public methodgetPropertyAttribute(String, String)
Gets the specified attribute of the property with the specified name.
Public methodgetPropertyAttribute(String, String, String)
Gets the specified attribute of the property with the specified name.
Public methodgetPropertyAttribute(String, String, String, String)
Gets the specified attribute of the property with the specified name and language.
Public methodgetPropertyCondition(String)
Gets the 'condition' attribute of the property with the specified name.
Public methodgetPropertyCondition(String, String)
Gets the 'condition' attribute of the property with the specified name and language.
Public methodgetPropertyItem
Gets item-property by name.
Public methodgetRelatedItem
Gets related item of the relationship.
Public methodgetRelatedItemID
Tries to find related item (xpath: "./related_id") on item's node and returns its ID.
Public methodgetRelationships
Returns an item that is a collection of all relationships items available on the instance.
Public methodgetRelationships(String)
Returns an item that is a collection of relationships item with specified type available on the instance.
Public methodgetRelationships(String, String) Obsolete.
Returns an item that is a collection of relationship item with specified type; each relationship item has only properties specified in the select list.
Public methodgetRelationships(String, String, String) Obsolete.
Returns an item that is a collection of relationship item with specified type; each relationship item has only properties specified in the select list.
Public methodgetResult
Returns 'InnerText' property of ArasXmlNode with xpath = Item.XPathResult from the item's dom.
Public methodgetType
Returns value of the 'type' attribute of the Item node.
Public methodinstantiateWorkflow
Instantiates workflow for the item using specified workflow map.
Public methodisCollection
Checks if the instance represents a set of items and not a single item.
Public methodisEmpty
This is the replacement for the old hasFault() function with the Boolean argument of false to indicate to ignore the zero based faults.
Public methodisError
Checks if the item is an "error item".
Public methodisLocked Obsolete.
Fetches from the server the locked status of the item using the item's ID.
Public methodisLogical
Find out if the item's node is a "logical" node ("AND", "OR", "NOT").
Public methodisNew
Checks the attribute 'isNew' on the item.
Public methodisRoot
Checks if this.node is the root item in this.dom.
Public methodloadAML
This loads the dom property for the Item object with the passed AML. The method will also set the node and nodeList properties for the Item object according to the content of the loaded AML.
Public methodlockItem
Applies the 'lock' action on the item and returns the server response.
Public methodCode examplenewAND
Inserts logical node with tag <and> under the parent node, which can be Item or Logical, and returns an Item Object that represents a newly inserted logical node.
Public methodnewInnovator Obsolete.
Creates a new Innovator object.
Public methodnewItem
Returns a new Item.
Public methodnewItem(String)
Returns a new Item with the specified type.
Public methodnewItem(String, String)
Returns a new Item with the specified type and action.
Public methodCode examplenewNOT
Inserts logical node with tag <not> under the parent node, which can be Item or Logical, and returns an Item Object that represents a newly inserted logical node.
Public methodCode examplenewOR
Inserts logical node with tag <or> under the parent node, which can be Item or Logical, and returns an Item Object that represents a newly inserted logical node.
Public methodnewXMLDocument
Creates new ArasXmlDocument.
Public methodpromote
Promote item to the specified state.
Public methodremoveAttribute
Removes the specified attribute if the attribute exist; does nothing otherwise.
Public methodremoveItem
Remove specified item from the this.dom
Public methodremoveLogical
Removes logical node referenced by the passed item from this.node.
Public methodremoveProperty(String)
Removes the property tag with the specified name from the item's dom.
Public methodremoveProperty(String, String)
Removes the property tag with the specified name and language from the item's dom.
Public methodremovePropertyAttribute(String, String)
Modifies item's node by removing attribute on the specified property.
Public methodremovePropertyAttribute(String, String, String)
Modifies item's node by removing attribute on the specified property with the specified xml:lang attribute.
Public methodremoveRelationship
Removes the passed item's node from the 'Relationships' node of the item.
Public methodsetAction
Set the 'action' attribute on this.node.
Public methodsetAttribute
Set the value of the attribute with the specified name on the item's node.
Public methodsetErrorCode
Sets error code on the "error" item.
Public methodsetErrorDetail
Sets the detailed error message of the error item.
Public methodsetErrorSource
Sets the <faultactor> of the SOAP Fault element. If the instance is not an error item, the method does nothing.
Public methodsetErrorString
Sets the error message of the error item.
Public methodsetErrorWho Obsolete.
Same as setErrorCode().
Public methodsetFileName Obsolete.
Set the filename for the attached file. This is only is meaningful if the type="File" and will cause the apply() to submit multipart/form-data to the VaultServer.
Public methodsetFileProperty
Set a file to an item reference.
Public methodsetFilePropertyViaStream
Set a file stream to an item reference.
Public methodsetID
Set the id attribute on the Item node. If the item has the property id as well, the property is set too.
Public methodsetNewID
Gets new ID by calling getNewID() then passes obtained ID to setID(id).
Public methodsetProperty(String, String)
Set the property with the specified name. If property doesn't exist on the item, create it first and then set.
Public methodsetProperty(String, String, String)
Set the property with the specified name and language. If property doesn't exist on the item, create it first and then set.
Public methodsetPropertyAttribute(String, String, String)
Set the attribute for the specified property.
Public methodsetPropertyAttribute(String, String, String, String)
Set the attribute for the specified property and language.
Public methodsetPropertyCondition(String, String)
Sets the attribute 'condition' on the specified property.
Public methodsetPropertyCondition(String, String, String)
Sets the attribute 'condition' on the specified property with the specified language.
Public methodsetPropertyItem
Sets a property to an item reference.
Public methodsetRelatedItem
Sets the 'related_id' property to an item reference.
Public methodsetType
Set the 'type' attribute on the Item node.
Public methodstartWorkflow Obsolete.
Starts the workflow process. Item's type must be "Workflow Process".
Public methodToString
Returns AML string that represents the current Item.
(Overrides ObjectToString.)
Public methodunlockItem
Applies the 'unlock' action on the item and returns the server response.
Top
Fields
  NameDescription
Public fieldStatic memberCode exampleXPathFault
XPath to the root <Fault> node in case the instance represents an "error" item.
Public fieldStatic memberCode exampleXPathResult
XPath to the <Result> tag in server response XML.
Public fieldStatic memberCode exampleXPathResultItem
XPath to the top_level <Item> tag(s) in item's internal AML.
Top
Remarks
  • There are two major types of methods in the class: methods that only work with item's AML in memory and methods that communicate with Innovator server, i.e. send request(s) to and get response(s) from the server. All get\set type of methods as well as isXXX(...) (e.g. isError(), isCollection(), etc.) and add\remove methods (e.g. addRelationship(...), removeProperty(...), etc.) belong to the former group. Methods like fetchXXX(...) (e.g. fetchLockStatus()), apply(...), email(...), promote(...), lock\unlockItem(...), etc. belong to the later group. In case method sends a request to the server it must be explicitly mentioned in the method comments.
  • If instance of the class is an "error" item, it contains a single <Fault> node that is SOAP Fault element. The SOAP Fault element is used to carry error and/or status information within a SOAP message. If present, the SOAP Fault element MUST appear as a body entry and MUST NOT appear more than once within a Body element. According to SOAP 1.1 specification the Fault element itself must contain a 'faultcode' element and a 'faultstring' element, and optionally 'faultactor' and 'detail' elements.
  • In case of multilingual property AML may contain more than one tag for the same property where each tag will have a different value of the attribute xml:lang. Multilingual property tag without xml:lang denotes the property value for the language of the session; so, if the session language is French (language code is 'fr') then the following tags are equivalent: <name>Andre</name> and <name xml:lang='fr'>Andre</name>.
See Also