Interface SupportsTags

All Known Implementing Classes:
GenericColumn

@Evolving public interface SupportsTags
Interface for supporting getting or associate tags to objects. This interface will be mixed with metadata objects to provide tag operations.
  • Method Summary

    Modifier and Type
    Method
    Description
    associateTags(String[] tagsToAdd, String[] tagsToRemove)
    Associate tags to the specific object.
    getTag(String name)
    Get a tag by its name for the specific object.
    List all the tag names for the specific object.
    Tag[]
    List all the tags with details for the specific object.
  • Method Details

    • listTags

      String[] listTags()
      List all the tag names for the specific object.
      Returns:
      The list of tag names.
    • listTagsInfo

      Tag[] listTagsInfo()
      List all the tags with details for the specific object.
      Returns:
      The list of tags.
    • getTag

      Tag getTag(String name) throws NoSuchTagException
      Get a tag by its name for the specific object.
      Parameters:
      name - The name of the tag.
      Returns:
      The tag.
      Throws:
      NoSuchTagException - If the tag does not associate with the object.
    • associateTags

      String[] associateTags(String[] tagsToAdd, String[] tagsToRemove) throws TagAlreadyAssociatedException
      Associate tags to the specific object. The tagsToAdd will be added to the object, and the tagsToRemove will be removed from the object. Note that: 1) Adding or removing tags that are not existed will be ignored. 2) If the same name tag is in both tagsToAdd and tagsToRemove, it will be ignored. 3) If the tag is already associated with the object, it will throw TagAlreadyAssociatedException
      Parameters:
      tagsToAdd - The arrays of tag name to be added to the object.
      tagsToRemove - The array of tag name to be removed from the object.
      Returns:
      The array of tag names that are associated with the object.
      Throws:
      TagAlreadyAssociatedException - If the tag is already associated with the object.