Class AgreementHeader

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

public class AgreementHeader extends Object
This is a class representing an agreementHeader for use by groovy scripts

Inside the script, an instance of this class, containing the data of the agreementHeader that the script will be run on, will be provided automatically and can be accessed as a variable named agreementHeader

  • Method Details

    • addPartnerFunctions

      public AgreementHeader addPartnerFunctions(Collection<PartnerFunctionRecord> partnerFunctionRecords)
      Add partner function records into agreementHeader's Partner Function.
      Parameters:
      partnerFunctionRecords - . The partner function records to add into a agreementHeader.
      Returns:
      The AgreementHeader instance.
    • deletePartnerFunctions

      public AgreementHeader deletePartnerFunctions(Collection<BusinessObject> partnerFunctionRecords)
      remove partner function records into agreementHeader's Partner Function.
      Parameters:
      partnerFunctionRecords - . The partner function records to remove into a agreementHeader.
      Returns:
      The AgreementHeader instance.
    • getAgreementHeaderDataAttributeValue

      public Object getAgreementHeaderDataAttributeValue(String attributeURI) throws IMCException
      To get the value of a agreementHeader data attribute by attribute URI.
      Parameters:
      attributeURI - as String. The URI of the agreementHeader data attribute.
      Returns:
      the value of the agreementHeader data attribute as Object.
      Throws:
      IMCException
    • getAgreementHeaderRelationAttributeErpId

      public String getAgreementHeaderRelationAttributeErpId(String attributeURI) throws IMCException
      To get the ERPID of a agreementHeader relation attribute by attribute URI.
      Parameters:
      attributeURI - as String. The URI of the agreementHeader relation attribute.
      Returns:
      the ERPId of the agreementHeader relation attribute as String.
      Throws:
      IMCException
    • getAgreementHeaderRelationAttributeObjectId

      public String getAgreementHeaderRelationAttributeObjectId(String attributeURI) throws IMCException
      To get the object Id of a agreementHeader relation attribute by attribute URI.
      Parameters:
      attributeURI - as String. The URI of the agreementHeader relation attribute.
      Returns:
      the objectId of the agreementHeader relation attribute as String.
      Throws:
      IMCException
    • getAgreementHeaderRelationAttributeObjectName

      public String getAgreementHeaderRelationAttributeObjectName(String attributeURI) throws IMCException
      To get the object name of a agreementHeader relation attribute by attribute URI.
      Parameters:
      attributeURI - as String. The URI of the agreementHeader relation attribute.
      Returns:
      the object name of the agreementHeader relation attribute as String.
      Throws:
      IMCException
    • getAgreementHeaderRelationAttributeURI

      public String getAgreementHeaderRelationAttributeURI(String attributeURI) throws IMCException
      To get the URI of a agreementHeader relation attribute by attribute URI.
      Parameters:
      attributeURI - as String. The URI of the agreementHeader relation attribute.
      Returns:
      the object URI of the agreementHeader relation attribute as String.
      Throws:
      IMCException
    • getAgreementHeaderRevision

      public Integer getAgreementHeaderRevision() throws IMCException
      Retrieves the latest revision of this agreementHeader
      Returns:
      The agreementHeader version as Integer
      Throws:
      IMCException
    • getAgreementHeaderTitle

      public String getAgreementHeaderTitle() throws IMCException
      Retrieves the title of this agreementHeader
      Returns:
      The agreementHeader title as String
      Throws:
      IMCException
    • getAgreementHeaderURI

      public String getAgreementHeaderURI()
      Retrieves the URI of this agreementHeader
      Returns:
      The agreementHeader URI as String
    • getAgreementLines

      public List<AgreementLine> getAgreementLines()
      Retrieves the immediate AgreementLines.
      Returns:
      All AgreementLine objects directly under this object
    • getPartnerObjectId

      public String getPartnerObjectId(String partnerFunctionURI) throws IMCException
      To get the object Id of the partner function by partner function URI.
      Parameters:
      partnerFunctionURI - the URI of the partner function.
      Returns:
      The partner function object Id as String. null if not found.
      Throws:
      IMCException
    • getPartnerObjectName

      public String getPartnerObjectName(String partnerFunctionURI) throws IMCException
      To get the object Name of the partner function by partner function URI.
      Parameters:
      partnerFunctionURI - the URI of the partner function.
      Returns:
      The partner function object Id as String. null if not found.
      Throws:
      IMCException
    • getPartners

      public Map<String,List<AbstractObjectDTO>> getPartners() throws IMCException
      Retrieves the partner functions of the agreementHeader.
      Returns:
      The partners as Map<String, List<AbstractObjectDTO>> with the uri of the partner function as key (eg: http://www.inmindcloud.com/application/schema.owl#BUYER_PARTY)
      Throws:
      IMCException
    • getPartnersErpId

      public List<String> getPartnersErpId(String partnerFunctionURI) throws IMCException
      To get all the ERPId for a type of partner function.
      Parameters:
      partnerFunctionURI - the URI of the partner function.
      Returns:
      List of erpId in String.
      Throws:
      IMCException
    • getPartnersObjectId

      public List<String> getPartnersObjectId(String partnerFunctionURI) throws IMCException
      To get all the object Id for a type of partner function.
      Parameters:
      partnerFunctionURI - the URI of the partner function.
      Returns:
      List of object Id in String.
      Throws:
      IMCException
    • getPartnersObjectName

      public List<String> getPartnersObjectName(String partnerFunctionURI) throws IMCException
      To get all the object names for a type of partner function.
      Parameters:
      partnerFunctionURI - the URI of the partner function.
      Returns:
      List of object name in String.
      Throws:
      IMCException
    • getPartnersURI

      public List<String> getPartnersURI(String partnerFunctionURI) throws IMCException
      To get all the object URI for a type of partner function.
      Parameters:
      partnerFunctionURI - the URI of the partner function.
      Returns:
      List of object URI in String.
      Throws:
      IMCException
    • getPartnerURI

      public String getPartnerURI(String PartnerFunctionURI) throws IMCException
      To get the object URI of a partner function
      Parameters:
      PartnerFunctionURI - as String. The URI of the type of partner function.
      Returns:
      The object URI of the partner function as String. null if not found.
      Throws:
      IMCException
    • setAgreementHeaderDataAttribute

      public AgreementHeader setAgreementHeaderDataAttribute(String attributeURI, Object value) throws IMCException
      To set a value for the agreementHeader data attribute.
      Parameters:
      attributeURI - as String. The URI of the agreementHeader data attribute.
      value - as Object. The value for the agreementHeader data attribute.
      Returns:
      The AgreementHeader
      Throws:
      IMCException - the platform exception
    • setAgreementHeaderRelationAttribute

      public AgreementHeader setAgreementHeaderRelationAttribute(String attributeURI, String valueURI) throws IMCException
      To set a value for the agreementHeader relation attribute.
      Parameters:
      attributeURI - as String. The URI of the agreementHeader relation attribute.
      valueURI - as Object. The value for the agreementHeader relation attribute.
      Returns:
      The AgreementHeader
      Throws:
      IMCException - the platform exception
    • toString

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