Package com.imc.iss.groovy.agreements
Class AgreementLine
java.lang.Object
com.imc.iss.groovy.agreements.AgreementLine
This is a class representing an agreement for use by groovy scripts
Inside the script, an instance of this class, containing the data of the agreement that the script will be run on, will be provided automatically and can be accessed as a variable named agreement
-
Method Summary
Modifier and TypeMethodDescriptionaddPartnerFunctions(Collection<PartnerFunctionRecord> partnerFunctionRecords) Add partner function records into agreementLine's Partner Function.deletePartnerFunctions(Collection<BusinessObject> partnerFunctionRecords) Remove partner function records into agreementLine's Partner Function.Retrieves the agreementHeader of this agreementLinegetAgreementLineDataAttributeValue(String attributeURI) Return agreementLine data attribute value by the attribute uriReturn agreementLine AgreementLinePolicyType URI by the uriReturn agreementLine agreementLinePolicyValue by the urigetAgreementLineRelationAttributeErpId(String attributeURI) Return agreementLine relation attribute's ERPID by the attribute urigetAgreementLineRelationAttributeObjectId(String attributeURI) Return agreementLine relation attribute's objectID by the attribute urigetAgreementLineRelationAttributeURI(String attributeURI) Return agreementLine relation attribute's URI by the attribute uriRetrieves the list of all AgreementLine directly under this objectRetrieves the object URI of agreementLine of this line itemReturn agreementLine LinksProductOrProductCategory URI by the uriRetrieves the parent of this agreementLinebooleanIndicates the context that AgreementLine object is linksProduct TypesetAgreementLineDataAttribute(String attributeURI, Object value) Set the immediate data attribute to AgreementLinesetAgreementLinePolicyTypeURI(String valueURI) Set the immediate AgreementLinePolicyType attribute to AgreementLinesetAgreementLinePolicyValue(String valueURI) Set the immediate AgreementLinePolicyType attribute to AgreementLinesetAgreementLineRelationAttribute(String attributeURI, String valueURI) Set the immediate relation attribute to AgreementLinevoidsetLinksProductOrProductCategory(String productOrProductCategoryURI) Set the immediate relation attribute to AgreementLinetoString()Returns a string representation of the agreementLine, which prints all the child agreementLine in hierarchical manner
-
Method Details
-
addPartnerFunctions
Add partner function records into agreementLine's Partner Function.- Parameters:
partnerFunctionRecords- . The partner function records to add into a agreementLine.- Returns:
- The
AgreementLineinstance.
-
deletePartnerFunctions
public AgreementLine deletePartnerFunctions(Collection<BusinessObject> partnerFunctionRecords) throws IMCException Remove partner function records into agreementLine's Partner Function.- Parameters:
partnerFunctionRecords- . The partner function records to remove into a agreementLine.- Returns:
- The {@link AgreementLine's} instance.
- Throws:
IMCException
-
getAgreementHeader
Retrieves the agreementHeader of this agreementLine- Returns:
- The
AgreementHeaderobject representing the top level parent of this agreementLine, agreementLine (i.e. the parent is theAgreementHeaderobject)
-
getAgreementLineDataAttributeValue
Return agreementLine data attribute value by the attribute uri- Parameters:
attributeURI- as String. The uri of the attribute- Returns:
- the value of the data attribute as Object
- Throws:
IMCException
-
getAgreementLinePolicyTypeURI
Return agreementLine AgreementLinePolicyType URI by the uri- Returns:
- the URI as String of the data attribute
- Throws:
IMCException
-
getAgreementLinePolicyValue
Return agreementLine agreementLinePolicyValue by the uri- Returns:
- the value of the data attribute as Object
- Throws:
IMCException
-
getAgreementLineRelationAttributeErpId
Return agreementLine relation attribute's ERPID by the attribute uri- Parameters:
attributeURI- as String. The uri of the attribute- Returns:
- the erpID of the data attribute as String
- Throws:
IMCException
-
getAgreementLineRelationAttributeObjectId
Return agreementLine relation attribute's objectID by the attribute uri- Parameters:
attributeURI- as String. The uri of the attribute- Returns:
- the objectID of the data attribute as String
- Throws:
IMCException
-
getAgreementLineRelationAttributeURI
Return agreementLine relation attribute's URI by the attribute uri- Parameters:
attributeURI- as String. The uri of the attribute- Returns:
- the URI as String of the data attribute
- Throws:
IMCException
-
getAgreementLines
Retrieves the list of all AgreementLine directly under this object- Returns:
- All
AgreementLineobjects directly under this object
-
getAgreementLineURI
Retrieves the object URI of agreementLine of this line item- Returns:
- The full path of the agreementLine URI of this line item
-
getLinksProductOrProductCategoryURI
Return agreementLine LinksProductOrProductCategory URI by the uri- Returns:
- the URI as String of the data attribute
- Throws:
IMCException
-
getParentAgreementLine
Retrieves the parent of this agreementLine- Returns:
- The
AgreementLineobject representing the parent of this agreementLine, or null if this is a top level agreementLine (i.e. the parent is theAgreementLineobject)
-
isLinkedToProduct
public boolean isLinkedToProduct()Indicates the context that AgreementLine object is linksProduct Type- Returns:
- the isLinkedToProduct as boolean. Return
TRUEif it is Product or ReturnFALSEif it is ProductCategory.
-
setAgreementLineDataAttribute
public AgreementLine setAgreementLineDataAttribute(String attributeURI, Object value) throws IMCException Set the immediate data attribute to AgreementLine- Parameters:
attributeURI- as String. The uri of the Business Data Attributevalue- as Object. The value of the object.- Returns:
- AgreementLine
- Throws:
IMCException
-
setAgreementLinePolicyTypeURI
Set the immediate AgreementLinePolicyType attribute to AgreementLine- Parameters:
attributeURI- as String. The uri of the Business Relation AttributeURI- as String. The uri of the object.- Returns:
- AgreementLine
- Throws:
IMCException
-
setAgreementLinePolicyValue
Set the immediate AgreementLinePolicyType attribute to AgreementLine- Parameters:
attributeURI- as String. The uri of the Business Relation AttributeURI- as String. The uri of the object.- Returns:
- AgreementLine
- Throws:
IMCException
-
setAgreementLineRelationAttribute
public AgreementLine setAgreementLineRelationAttribute(String attributeURI, String valueURI) throws IMCException Set the immediate relation attribute to AgreementLine- Parameters:
attributeURI- as String. The uri of the Business Relation AttributeURI- as String. The uri of the object.- Returns:
- AgreementLine
- Throws:
IMCException
-
setLinksProductOrProductCategory
public void setLinksProductOrProductCategory(String productOrProductCategoryURI) throws IMCException Set the immediate relation attribute to AgreementLine- Parameters:
productOrProductCategoryURI- as String. The URI of the Business Attribute, representing either a Product or a ProductCategory- Throws:
IMCException
-
toString
Returns a string representation of the agreementLine, which prints all the child agreementLine in hierarchical manner
-