Class TagService

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

public class TagService extends Object
Contains the methods which performs the operations like creation, update, deletion and retrieval of tags.
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 Details

    • TagService

      public TagService()
  • Method Details

    • addTag

      public String addTag(String userName, String password, String outputFormat, String tag)
      Inserts a new tag for the specified tag object. The specified tag object should contain all the details pertaining to tag such as tag name, description, scopeObjectTypes etc.. Specification of tag name and scopeObjectTypes list is mandatory The names of the objects in the scopeObjectTypes list should be the same as object names displayed in the master configuration of Enterprise tags.
      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
      tag - String
      Returns:
      String - If tag is added 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 'Tag' JSON :
      {
      "name": "",
      "endPointType":"NONE",
      "description": "",
      "objectTypeId":"",
      "published": true,
      "nodeType": "TAG",
      "nodeId": "",
      "scopeObjectTypes": ["System","Environment"],
      "auditHistory": null
      }
      }

      Since:
      12.1
    • addTags

      public String addTags(String userName, String password, String outputFormat, String tags)
      Inserts list of tags for the specified list of tag objects. Each tag object should contain all the details pertaining to tag such as tag name, description, scopeObjectTypes etc.. where Specification of tag name and scopeObjectTypes in each tag object is mandatory. The names of the objects in the scopeObjectTypes list should be the same as object names displayed in the master configuration of Enterprise tags.
      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
      tags - String
      Returns:
      String - If tags are added 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 'Tags' JSON : [
      {
      "name": "",
      "description": "",
      "published": true,
      "scopeObjectTypes": "",
      "auditHistory": null
      },
      {
      "name": "",
      "description": "",
      "published": true,
      "scopeObjectTypes": "",
      "auditHistory": null
      }
      ]

      Since:
      12.1
    • updateTag

      public String updateTag(String userName, String password, String outputFormat, String tag)
      Updates the tag for the specified tag object. All the information pertaining to the tag can be updated. Specifying the tag id and tag name and scopeObjectTypes list are mandatory to update the tag. The names of the objects in the scopeObjectTypes list should be the same as object names displayed in the master configuration of Enterprise tags.
      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
      tag - String
      Returns:
      String - If tag 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 'Tag' JSON :
      {
      "id": "",
      "name": "",
      "description": "",
      "published": true,
      "scopeObjectTypes": "",
      "auditHistory": null
      }

      Since:
      12.1
    • updateTags

      public String updateTags(String userName, String password, String outputFormat, String tags)
      Updates the list of tags for the specified list of tag objects. All the information pertaining to the tags can be updated. Specifying the tag id and tag name scopeObjectTypes list are mandatory in each tag object to update the tags. The names of the objects in the scopeObjectTypes list should be the same as object names displayed in the master configuration of Enterprise tags.
      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
      tags - String
      Returns:
      String - If tags 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 'Tag' JSON : [
      {
      "id": "",
      "name": "",
      "description": "",
      "published": true,
      "scopeObjectTypes": [],
      "auditHistory": null
      },
      {
      "id": "",
      "name": "",
      "description": "",
      "published": true,
      "scopeObjectTypes": "",
      "auditHistory": null
      }
      ]

      Since:
      12.1
    • deleteTag

      public String deleteTag(String userName, String password, String outputFormat, String tag)
      Removes tag for the specified tag object. Specification of tag id is mandatory in the given tag object. It deletes the tag only if it is not associated with any objects.
      If the tag 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
      tag - String
      Returns:
      String - If tag 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.1
    • deleteTagById

      public String deleteTagById(String userName, String password, String outputFormat, int id)
      Removes tag object for the specified tag id. It deletes the tag only if it is not associated with any objects.
      If the tag 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
      id - int
      Returns:
      String - If tag 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.1
    • deleteTags

      public String deleteTags(String userName, String password, String outputFormat, String ids)
      Removes tags for the specified list of tagIds. Specifying the list of tagIds is mandatory. Tags are deleted only if they are not associated with any objects.
      If the tags 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
      ids - String
      Returns:
      String - If tags 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.1
    • getTag

      public String getTag(String userName, String password, String outputFormat, String name)
      Returns the tag object for the specified tag name. Specifying the tag name is mandatory.
      The returned tag object contains all the details of tag such as tag id name, description, scopeObjectTypes, auditHistory 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
      name - String
      Returns:
      String - Tag object in the form of JSON or XML String.
      Since:
      12.1
    • getTags

      public String getTags(String userName, String password, String outputFormat, String names)
      Returns the list of tag objects for the specified list of tag names. Specifying the list of tag names is mandatory.
      Each returned tag object contains all the details of tag such as tag id name, description, scopeObjectTypes, auditHistory 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
      names - String
      Returns:
      String - Tag objects in the form of JSON or XML String.
      Since:
      12.1
    • getTagById

      public String getTagById(String userName, String password, String outputFormat, int id)
      Returns the tag object for the specified tag id. Specifying the tag id is mandatory.
      The returned tag object contains all the details of tag such as tag name id, description, scopeObjectTypes, auditHistory 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
      id - int
      Returns:
      String - Tag object in the form of JSON or XML String.
      Since:
      12.1
    • getTagsByIds

      public String getTagsByIds(String userName, String password, String outputFormat, String ids)
      Returns the list of tag objects for the specified list of tagIds. Specifying the list of tagIds is mandatory.
      The returned tag objects contains all the details of tag such as tag name, tag id, description, scopeObjectTypes, auditHistory 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
      ids - String
      Returns:
      String - Tag objects in the form of JSON or XML String.
      Since:
      12.1
    • getAllTags

      public String getAllTags(String userName, String password, String outputFormat)
      Returns the list of all tags present in the master configuration.
      The returned tag objects contains all the details of tag such as tag name, tag id, description, scopeObjectTypes, auditHistory 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
      Returns:
      String - Tag objects in the form of JSON or XML String.
      Since:
      12.1
    • getTagId

      public String getTagId(String userName, String password, String outputFormat, String name)
      Returns the tag id for the specified tag name. Specifying the tag name is mandatory, based on the tag name, method will return the tagId.
      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
      name - String
      Returns:
      String - TagId in the form of JSON or XML String.
      Since:
      12.1
    • publishTag

      public String publishTag(String userName, String password, String outputFormat, int id, boolean state)
      The tag is published or unpublished for the specified tagId and state. Specifying the tag id and state is mandatory. If the value of state is true the tag is published, if it is false the tag is unpublished
      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
      id - int
      state - boolean
      Returns:
      String - If tag is published or unpublished 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.1
    • publishTags

      public String publishTags(String userName, String password, String outputFormat, String ids, boolean state)
      The tags are published or unpublished for the specified list of tagIds and state. Specifying the tagIds list and state is mandatory. If the value of state is true the tags are published, if it is false the tags are unpublished
      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
      ids - String
      state - boolean
      Returns:
      String - If tags are published or unpublished 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.1
    • associateTag

      public String associateTag(String userName, String password, String outputFormat, String nodeType, int nodeId, String name)
      The tag is associated to the object for the specified nodeType and nodeId. Specification of nodeType, nodeId and tagName is mandatory.
      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
      nodeType - String
      nodeId - int
      name - String
      Returns:
      String - If tag is associated 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.1
    • associateTags

      public String associateTags(String userName, String password, String outputFormat, String nodeType, int nodeId, String names)
      List of tags are associated to the object for the specified nodeType and nodeId. Specification of nodeType, nodeId and list of tagNames is mandatory.
      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
      nodeType - String
      nodeId - int
      names - String
      Returns:
      String - If tags are associated 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.1
    • associateTagByIds

      public String associateTagByIds(String userName, String password, String outputFormat, String nodeType, String nodeIds, String name)
      The tag is associated to the objects for the specified nodeType and list of nodeIds. Specification of nodeType, list of nodeIds and tagName is mandatory.
      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
      nodeType - String
      nodeIds - String
      name - String
      Returns:
      String - If tag is associated 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.1
    • associateTagsByIds

      public String associateTagsByIds(String userName, String password, String outputFormat, String nodeType, String nodeIds, String names)
      List of tags are associated to the objects for the specified nodeType and list of nodeIds. Specification of nodeType, list of nodeIds and list of is tagNames mandatory.
      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
      nodeType - String
      nodeIds - String
      names - String
      Returns:
      String - If tags are associated 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.1
    • dissociateTag

      public String dissociateTag(String userName, String password, String outputFormat, String nodeType, int nodeId, String name)
      Tag is dissociated from the object for the specified nodeType and nodeId. Specification of nodeType, nodeId and tagName is mandatory.
      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
      nodeType - String
      nodeId - int
      name - String
      Returns:
      String - If tag is dissociated 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.1
    • dissociateTags

      public String dissociateTags(String userName, String password, String outputFormat, String nodeType, int nodeId, String names)
      List of tags are dissociated from the object for the specified nodeType, nodeId and list of tagNames. Specification of nodeType, nodeId and list of tagNames is mandatory.
      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
      nodeType - String
      nodeId - int
      names - String
      Returns:
      String - If tags are dissociated 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.1
    • dissociateTagByIds

      public String dissociateTagByIds(String userName, String password, String outputFormat, String nodeType, String nodeIds, String name)
      Tag is dissociated from the objects for the specified nodeType list of nodeIds and tagName. Specification of nodeType, list of nodeIds and tagName is mandatory.
      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
      nodeType - String
      nodeIds - String
      name - String
      Returns:
      String - If tag is dissociated 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.1
    • dissociateTagsByIds

      public String dissociateTagsByIds(String userName, String password, String outputFormat, String nodeType, String nodeIds, String names)
      List of tags are dissociated from the objects for the specified nodeType, list of nodeIds and list of tagNames. Specification of nodeType, list of nodeIds and list of tagNames is mandatory.
      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
      nodeType - String
      nodeIds - String
      names - String
      Returns:
      String - If tags are dissociated 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.1
    • clearTags

      public String clearTags(String userName, String password, String outputFormat, String nodeType, int nodeId)
      Clears the tags for the specified nodeType and nodeId. Specifying the nodeType and nodeId are mandatory to clear the tags. i.e.,it removes all the tags associated from the object.
      If the tags 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
      nodeType - String
      nodeId - int
      Returns:
      String - If tags are cleared 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.1
    • clearTagsByIds

      public String clearTagsByIds(String userName, String password, String outputFormat, String nodeType, String nodeIds)
      Clears the tags for the specified nodeType and list of nodeIds. Specifying the nodeType and list of nodeIds are mandatory to clear the tags. i.e.,it removes all the tags associated from the objects.
      If the tags are cleared 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
      nodeType - String
      nodeIds - String
      Returns:
      String - If tags are cleared 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.1
    • getTagAssociations

      public String getTagAssociations(String userName, String password, String outputFormat, String name, boolean fillInfo)
      Returns the list of associations of the tag object for the specified tag name. Specifying the tag name and fillInfo are mandatory.
      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
      name - String
      fillInfo - boolean
      Returns:
      String
      Since:
      12.1
    • getTagAssociationsById

      public String getTagAssociationsById(String userName, String password, String outputFormat, int id, boolean fillInfo)
      Returns the list of associations of the tag object for the specified tagId. Specifying the tagId and fillInfo are mandatory.
      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
      id - int
      fillInfo - boolean
      Returns:
      String
      Since:
      12.1
    • getAssociatedTags

      public String getAssociatedTags(String userName, String password, String outputFormat, String nodeType, int nodeId)
      Returns the list of associated tags of the specified nodeType and nodeId. Specifying the nodeType and nodeId are mandatory.
      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
      nodeType - String
      nodeId - int
      Returns:
      String
      Since:
      12.1