Class AgreementLine

java.lang.Object
com.imc.iss.groovy.agreements.AgreementLine

public class AgreementLine extends Object
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 Details

    • addPartnerFunctions

      public AgreementLine addPartnerFunctions(Collection<PartnerFunctionRecord> partnerFunctionRecords)
      Add partner function records into agreementLine's Partner Function.
      Parameters:
      partnerFunctionRecords - . The partner function records to add into a agreementLine.
      Returns:
      The AgreementLine instance.
    • 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

      public AgreementHeader getAgreementHeader()
      Retrieves the agreementHeader of this agreementLine
      Returns:
      The AgreementHeader object representing the top level parent of this agreementLine, agreementLine (i.e. the parent is the AgreementHeader object)
    • getAgreementLineDataAttributeValue

      public Object getAgreementLineDataAttributeValue(String attributeURI) throws IMCException
      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

      public String getAgreementLinePolicyTypeURI() throws IMCException
      Return agreementLine AgreementLinePolicyType URI by the uri
      Returns:
      the URI as String of the data attribute
      Throws:
      IMCException
    • getAgreementLinePolicyValue

      public BigDecimal getAgreementLinePolicyValue() throws IMCException
      Return agreementLine agreementLinePolicyValue by the uri
      Returns:
      the value of the data attribute as Object
      Throws:
      IMCException
    • getAgreementLineRelationAttributeErpId

      public String getAgreementLineRelationAttributeErpId(String attributeURI) throws IMCException
      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

      public String getAgreementLineRelationAttributeObjectId(String attributeURI) throws IMCException
      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

      public String getAgreementLineRelationAttributeURI(String attributeURI) throws IMCException
      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

      public List<AgreementLine> getAgreementLines()
      Retrieves the list of all AgreementLine directly under this object
      Returns:
      All AgreementLine objects directly under this object
    • getAgreementLineURI

      public String getAgreementLineURI()
      Retrieves the object URI of agreementLine of this line item
      Returns:
      The full path of the agreementLine URI of this line item
    • getLinksProductOrProductCategoryURI

      public String getLinksProductOrProductCategoryURI() throws IMCException
      Return agreementLine LinksProductOrProductCategory URI by the uri
      Returns:
      the URI as String of the data attribute
      Throws:
      IMCException
    • getParentAgreementLine

      public AgreementLine getParentAgreementLine()
      Retrieves the parent of this agreementLine
      Returns:
      The AgreementLine object representing the parent of this agreementLine, or null if this is a top level agreementLine (i.e. the parent is the AgreementLine object)
    • isLinkedToProduct

      public boolean isLinkedToProduct()
      Indicates the context that AgreementLine object is linksProduct Type
      Returns:
      the isLinkedToProduct as boolean. Return TRUE if it is Product or Return FALSE if 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 Attribute
      value - as Object. The value of the object.
      Returns:
      AgreementLine
      Throws:
      IMCException
    • setAgreementLinePolicyTypeURI

      public AgreementLine setAgreementLinePolicyTypeURI(String valueURI) throws IMCException
      Set the immediate AgreementLinePolicyType attribute to AgreementLine
      Parameters:
      attributeURI - as String. The uri of the Business Relation Attribute
      URI - as String. The uri of the object.
      Returns:
      AgreementLine
      Throws:
      IMCException
    • setAgreementLinePolicyValue

      public AgreementLine setAgreementLinePolicyValue(String valueURI) throws IMCException
      Set the immediate AgreementLinePolicyType attribute to AgreementLine
      Parameters:
      attributeURI - as String. The uri of the Business Relation Attribute
      URI - 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 Attribute
      URI - 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

      public String toString()
      Returns a string representation of the agreementLine, which prints all the child agreementLine in hierarchical manner
      Overrides:
      toString in class Object
      Returns:
      A string representation of the agreementLine.