Package com.ads.services.webservice

# Class AssociationService

java.lang.Object
com.ads.services.webservice.AssociationService

public class AssociationService extends Object
Contains the methods which performs the operations like creation, update, deletion and retrieval of associations.
All the WebServices methods have return type String - meaning if the method is execution is successful, then it will return a string in the form of JSON or XML String based on the outputFormat parameter given by the user.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AssociationService()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `createAssociation(String userName, String password, String outputFormat, String association)`
  Creates the association for the given association object.
  `String`
  `createAssociations(String userName, String password, String outputFormat, String associations)`
  Creates the associations for the given list of association objects.
  `String`
  `deleteAssociation(String userName, String password, String outputFormat, int associationId)`
  Deletes the association with the specified associationId.
  `String`
  `deleteAssociations(String userName, String password, String outputFormat, String associationIds)`
  Deletes the associations with the specified list of associationIds.
  `String`
  `deleteAssociationsByObjectType(String userName, String password, String outputFormat, int objectId, int objectTypeId)`
  Deletes the associations with the specified objectId and objectTypeId.
  `String`
  `getAssociation(String userName, String password, String outputFormat, int associationId, boolean fillInfo)`
  Returns the association object for the specified associationId.
  `String`
  `getAssociations(String userName, String password, String outputFormat, String associationIds, boolean fillInfo)`
  Returns the list association objects for the specified list of associationIds.
  `String`
  `getAssociationsByObjectType(String userName, String password, String outputFormat, int objectId, int objectTypeId, boolean fillInfo)`
  Returns the list association objects for the specified objectId and objectTypeId.Specifying the objectId and objectTypeId is mandatory.
  `String`
  `updateAssociation(String userName, String password, String outputFormat, String association)`
  Updates the association for the given association object.
  `String`
  `updateAssociations(String userName, String password, String outputFormat, String associations)`
  Updates the associations for the given list of association objects.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### AssociationService

    public AssociationService()

- ## Method Details

  - ### createAssociation

    public String createAssociation(String userName, String password, String outputFormat, String association)
    Creates the association for the given association object. Specifying the sourceObjectId, sourceObjectTypeId, targetObjectId, targetObjectTypeId are mandatory, while creating the association.
    OutputFormat can be either JSON or XML. If outputFormat is not specified, by default the method will return the JSON String.
    Parameters:
      `userName` - String
      `password` - String
      `outputFormat` - String- Valid values: JSON or XML
      `association` - String
    Returns:
      String - If association is created successfully, it will return requestStatus object consisting of request success flag, status message and userObject etc... in the form of JSON or XML String.

      Sample 'Association' JSON :
      {
      "id": 0,
      "sourceObjectId": 0,
      "sourceObjectTypeId": 0,
      "targetObjectId": 0,
      "targetObjectTypeId": 0,
      "qualifierObjectId": 0,
      "qualifierObjectTypeId": 0,
      "fields": {},
      "relationship":{
      "id": "",
      "masterId": "",
      "titleForward": "",
      "titleReverse": "",
      "description":"",
      "definedBy": "SYSTEM",
      "relationshipType": "FORWARD"
      }
      }

    Since:
      12.0

  - ### createAssociations

    public String createAssociations(String userName, String password, String outputFormat, String associations)
    Creates the associations for the given list of association objects. Specifying the sourceObjectId, sourceObjectTypeId, targetObjectId, targetObjectTypeId in each association object are mandatory, while creating the associations.
    OutputFormat can be either JSON or XML. If outputFormat is not specified, by default the method will return the JSON String.
    Parameters:
      `userName` - String
      `password` - String
      `outputFormat` - String- Valid values: JSON or XML
      `associations` - String
    Returns:
      String - If associations are created successfully, it will return requestStatus object consisting of request success flag, status message and userObject etc... in the form of JSON or XML String.

      Sample 'Associations' JSON :
      [
      {
      "id": 0,
      "sourceObjectId": 0,
      "sourceObjectTypeId": 0,
      "targetObjectId": 0,
      "targetObjectTypeId": 0,
      "qualifierObjectId": 0,
      "qualifierObjectTypeId": 0,
      "fields": {},
      "relationship":{
      "id": "",
      "masterId": "",
      "titleForward": "",
      "titleReverse": "",
      "description":"",
      "definedBy": "SYSTEM",
      "relationshipType": "FORWARD"
      }
      },
      {
      " id": 0,
      "sourceObjectId": 0,
      "sourceObjectTypeId": 0,
      "targetObjectId": 0,
      "targetObjectTypeId": 0,
      "qualifierObjectId": 0,
      "qualifierObjectTypeId": 0,
      "fields": {},
      "relationship":{
      "id": "",
      "masterId": "",
      "titleForward": "",
      "titleReverse": "",
      "description":"",
      "definedBy": "SYSTEM",
      "relationshipType": "FORWARD"
      }
      }
      ]

    Since:
      12.0

  - ### updateAssociation

    public String updateAssociation(String userName, String password, String outputFormat, String association)
    Updates the association for the given association object. Specifying the sourceObjectId, sourceObjectTypeId, targetObjectId, targetObjectTypeId are mandatory, to update the association.
    OutputFormat can be either JSON or XML. If outputFormat is not specified, by default the method will return the JSON String.
    Parameters:
      `userName` - String
      `password` - String
      `outputFormat` - String- Valid values: JSON or XML
      `association` -
    Returns:
      String - If association is updated successfully, it will return requestStatus object consisting of request success flag, status message and userObject etc... in the form of JSON or XML String.

      Sample 'Association' JSON :
      {
      "id": 0,
      "sourceObjectId": 0,
      "sourceObjectTypeId": 0,
      "targetObjectId": 0,
      "targetObjectTypeId": 0,
      "qualifierObjectId": 0,
      "qualifierObjectTypeId": 0,
      "fields": {},
      "relationship":{
      "id": "",
      "masterId": "",
      "titleForward": "",
      "titleReverse": "",
      "description":"",
      "definedBy": "SYSTEM",
      "relationshipType": "FORWARD"
      }
      }

    Since:
      12.0

  - ### updateAssociations

    public String updateAssociations(String userName, String password, String outputFormat, String associations)
    Updates the associations for the given list of association objects. Specifying the sourceObjectId, sourceObjectTypeId, targetObjectId, targetObjectTypeId in each association object are mandatory, to update the associations.
    OutputFormat can be either JSON or XML. If outputFormat is not specified, by default the method will return the JSON String.
    Parameters:
      `userName` - String
      `password` - String
      `outputFormat` - String- Valid values: JSON or XML
      `associations` - String - List of association objects
    Returns:
      String - If associations are updated successfully, it will return requestStatus object consisting of request success flag, status message and userObject etc... in the form of JSON or XML String.

      Sample 'Associations' JSON :
      [
      {
      "id": 0,
      "sourceObjectId": 0,
      "sourceObjectTypeId": 0,
      "targetObjectId": 0,
      "targetObjectTypeId": 0,
      "qualifierObjectId": 0,
      "qualifierObjectTypeId": 0,
      "fields": {},
      "relationship":{
      "id": "",
      "masterId": "",
      "titleForward": "",
      "titleReverse": "",
      "description":"",
      "definedBy": "SYSTEM",
      "relationshipType": "FORWARD"
      }
      },
      {
      " id": 0,
      "sourceObjectId": 0,
      "sourceObjectTypeId": 0,
      "targetObjectId": 0,
      "targetObjectTypeId": 0,
      "qualifierObjectId": 0,
      "qualifierObjectTypeId": 0,
      "fields": {},
      "relationship":{
      "id": "",
      "masterId": "",
      "titleForward": "",
      "titleReverse": "",
      "description":"",
      "definedBy": "SYSTEM",
      "relationshipType": "FORWARD"
      }
      }
      ]

    Since:
      12.0

  - ### deleteAssociation

    public String deleteAssociation(String userName, String password, String outputFormat, int associationId)
    Deletes the association with the specified associationId. Specifying the associationId is mandatory to delete a particular association.
    If the association is deleted all its associated data will also be deleted.
    OutputFormat can be either JSON or XML. If outputFormat is not specified, by default the method will return the JSON String.
    Parameters:
      `userName` - String
      `password` - String
      `outputFormat` - String- Valid values: JSON or XML
      `associationId` - int
    Returns:
      String - If association is deleted successfully, it will return requestStatus object consisting of request success flag, status message and userObject etc... in the form of JSON or XML String.
    Since:
      12.0

  - ### deleteAssociations

    public String deleteAssociations(String userName, String password, String outputFormat, String associationIds)
    Deletes the associations with the specified list of associationIds. Specifying the associationIds list is mandatory.
    If the associations are deleted all its associated data will also be deleted.
    OutputFormat can be either JSON or XML. If outputFormat is not specified, by default the method will return the JSON String.
    Parameters:
      `userName` - String
      `password` - String
      `outputFormat` - String- Valid values: JSON or XML
      `associationIds` - String - List
    Returns:
      String - If associations are deleted successfully, it will return requestStatus object consisting of request success flag, status message and userObject etc... in the form of JSON or XML String.
    Since:
      12.0

  - ### deleteAssociationsByObjectType

    public String deleteAssociationsByObjectType(String userName, String password, String outputFormat, int objectId, int objectTypeId)
    Deletes the associations with the specified objectId and objectTypeId. Specifying the objectId and objectTypeId are mandatory.
    If the associations are deleted all its associated data will also be deleted.
    OutputFormat can be either JSON or XML. If outputFormat is not specified, by default the method will return the JSON String.
    Parameters:
      `userName` - String
      `password` - String
      `outputFormat` - String- Valid values: JSON or XML
      `objectId` - int
      `objectTypeId` - int
    Returns:
      String - If associations are deleted successfully, it will return requestStatus object consisting of request success flag, status message and userObject etc... in the form of JSON or XML String.
    Since:
      12.0

  - ### getAssociation

    public String getAssociation(String userName, String password, String outputFormat, int associationId, boolean fillInfo)
    Returns the association object for the specified associationId. Specifying the associationId is mandatory. FillInfo takes the values as true or false. If fillInfo is true it returns the association object filled with source and target object details. If it is false it return only the association details.
    It returns all the details like association name, description, auditHistory details etc..
    OutputFormat can be either JSON or XML. If outputFormat is not specified, by default the method will return the JSON String.
    Parameters:
      `userName` - String
      `password` - String
      `outputFormat` - String- Valid values: JSON or XML
      `associationId` - int
      `fillInfo` - boolean
    Returns:
      String - Association object in the form of JSON or XML.
    Since:
      12.0

  - ### getAssociations

    public String getAssociations(String userName, String password, String outputFormat, String associationIds, boolean fillInfo)
    Returns the list association objects for the specified list of associationIds. Specifying the list of associationIds is mandatory.
    FillInfo takes the values as true or false. If fillInfo is true it returns the association object filled with source and target object details. If it is false it return only the association details.
    It returns all the details like association name, description, auditHistory details etc..
    OutputFormat can be either JSON or XML. If outputFormat is not specified, by default the method will return the JSON String.
    Parameters:
      `userName` - String
      `password` - String
      `outputFormat` - String- Valid values: JSON or XML
      `associationIds` - String - List
      `fillInfo` - boolean
    Returns:
      String - List of Association objects in the form of JSON or XML.
    Since:
      12.0

  - ### getAssociationsByObjectType

    public String getAssociationsByObjectType(String userName, String password, String outputFormat, int objectId, int objectTypeId, boolean fillInfo)
    Returns the list association objects for the specified objectId and objectTypeId.Specifying the objectId and objectTypeId is mandatory.
    FillInfo takes the values as true or false. If fillInfo is true it returns the association object filled with source and target object details. If it is false it return only the association details.
    It returns all the details like association name, description, auditHistory details etc..
    OutputFormat can be either JSON or XML. If outputFormat is not specified, by default the method will return the JSON String.
    Parameters:
      `userName` - String
      `password` - String
      `outputFormat` - String- Valid values: JSON or XML
      `objectId` - int
      `objectTypeId` - int
      `fillInfo` - boolean
    Returns:
      String - List of Association objects in the form of JSON or XML.
    Since:
      12.0