Package com.imc.iss.groovy.product
Class Product
java.lang.Object
com.imc.iss.groovy.product.Product
This is a class representing a Product for use by groovy scripts
Inside the script, an instance of this class, containing the data of the Product that the script will be run on, will be provided automatically and can be accessed as a variable Product
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionaddSalesInfo(Collection<SalesInfo> salesInfo) voiddeleteProductSalesInfo(Collection<BusinessObject> slaesInfoBOs) deleteSalesInfo(Collection<BusinessObject> salesInfo) getAttachmentFilesByType(String fileType) Get the list of the attachement file by file type.getAttachmentFolder(String folderName) Get an attachement folder by folder name.Get the list of the attachment folder.getProductDataAttributeValue(String attributeURI) To get the value of a Product data attribute by attribute URI.Retrieves the erp id of the country that the Product belongs to The relationship is as follows: Product -> includesAddress -> hasCountryRetrieves the ID of the ProductgetProductRelationAttributeErpId(String attributeURI) To get the ERPID of a Product relation attribute by attribute URI.getProductRelationAttributeObjectId(String attributeURI) To get the object Id of a Product relation attribute by attribute URI.getProductRelationAttributeObjectName(String attributeURI) To get the object name of a Product relation attribute by attribute URI.getProductRelationAttributeURI(String attributeURI) To get the URI of a Product relation attribute by attribute URI.Retrieves the title of this ProductRetrieves the URI of this ProductgetSalesInfo(SalesInfo salesInfoRecord) setProductDataAttribute(String attributeURI, Object value) To set a value for the Product data attribute.setProductRelationAttribute(String attributeURI, String valueURI) To set a value for the Product relation attribute.toString()Returns a string representation of the Product, which prints all the line items in hierarchical manner
-
Method Details
-
addSalesInfo
-
deleteProductSalesInfo
- Throws:
IMCException
-
deleteSalesInfo
-
getAttachmentFilesByType
Get the list of the attachement file by file type. @seeAttachmentData.- Parameters:
fileType- as String. The file type.- Returns:
AttachmentDatain List.- Throws:
IMCException
-
getAttachmentFolder
Get an attachement folder by folder name. @seeAttachmentFolderData.- Parameters:
folderName- the name of the folder.- Returns:
AttachmentFolderData.- Throws:
IMCException
-
getAttachmentFolders
Get the list of the attachment folder.- Returns:
AttachmentFolderDatain List.- Throws:
IMCException
-
getProductDataAttributeValue
To get the value of a Product data attribute by attribute URI.- Parameters:
attributeURI- as String. The URI of the Product data attribute.- Returns:
- the value of the Product data attribute as Object.
- Throws:
IMCException
-
getProductErpId
Retrieves the erp id of the country that the Product belongs to The relationship is as follows: Product -> includesAddress -> hasCountry- Returns:
- The country erp id
- Throws:
IMCException
-
getProductID
Retrieves the ID of the Product- Returns:
- The Product ID
- Throws:
IMCException
-
getProductRelationAttributeErpId
To get the ERPID of a Product relation attribute by attribute URI.- Parameters:
attributeURI- as String. The URI of the Product relation attribute.- Returns:
- the ERPId of the Product relation attribute as String.
- Throws:
IMCException
-
getProductRelationAttributeObjectId
To get the object Id of a Product relation attribute by attribute URI.- Parameters:
attributeURI- as String. The URI of the Product relation attribute.- Returns:
- the objectId of the Product relation attribute as String.
- Throws:
IMCException
-
getProductRelationAttributeObjectName
To get the object name of a Product relation attribute by attribute URI.- Parameters:
attributeURI- as String. The URI of the Product relation attribute.- Returns:
- the object name of the Product relation attribute as String.
- Throws:
IMCException
-
getProductRelationAttributeURI
To get the URI of a Product relation attribute by attribute URI.- Parameters:
attributeURI- as String. The URI of the Product relation attribute.- Returns:
- the object URI of the Product relation attribute as String.
- Throws:
IMCException
-
getProductTitle
Retrieves the title of this Product- Returns:
- The Product title as String
- Throws:
IMCException
-
getProductURI
Retrieves the URI of this Product- Returns:
- The Product URI as String
-
getSalesInfo
- Throws:
IMCException
-
setProductDataAttribute
To set a value for the Product data attribute.- Parameters:
attributeURI- as String. The URI of the Product data attribute.value- as Object. The value for the Product data attribute.- Returns:
- The
Product - Throws:
IMCException- the platform exception
-
setProductRelationAttribute
public Product setProductRelationAttribute(String attributeURI, String valueURI) throws IMCException To set a value for the Product relation attribute.- Parameters:
attributeURI- as String. The URI of the Product relation attribute.valueURI- as Object. The value for the Product relation attribute.- Returns:
- The
Product - Throws:
IMCException- the platform exception
-
toString
Returns a string representation of the Product, which prints all the line items in hierarchical manner
-