jerryshao commented on code in PR #12549:
URL: https://github.com/apache/gravitino/pull/12549#discussion_r3843035013


##########
api/src/main/java/org/apache/gravitino/tag/TagOperations.java:
##########
@@ -115,4 +117,64 @@ Tag alterTag(String name, TagChange... changes)
    * @return True if the tag is deleted, false if the tag does not exist.
    */
   boolean deleteTag(String name);
+
+  /**
+   * Lists policy names directly associated with a tag.
+   *
+   * @param tagName The tag name.
+   * @return The directly associated policy names.
+   * @throws UnsupportedOperationException If listing policy-to-tag 
associations is not supported.
+   */
+  default String[] listPoliciesForTag(String tagName) {
+    throw new UnsupportedOperationException("Listing policies for a tag is not 
supported");
+  }
+
+  /**
+   * Lists detailed policy associations for a tag.
+   *
+   * @param tagName The tag name.
+   * @return The policy associations including selectors.
+   * @throws UnsupportedOperationException If listing policy-to-tag 
associations is not supported.
+   */
+  default PolicyTagAssociation[] listPolicyAssociationsForTag(String tagName) {
+    throw new UnsupportedOperationException(
+        "Listing policy associations for a tag is not supported");
+  }
+
+  /**
+   * Adds or updates one policy association for a tag without a selector.
+   *
+   * @param tagName The tag name.
+   * @param policyName The policy name.
+   * @return The resulting association.
+   * @throws UnsupportedOperationException If adding policy-to-tag 
associations is not supported.
+   */
+  default PolicyTagAssociation addPolicyForTag(String tagName, String 
policyName) {
+    throw new UnsupportedOperationException("Adding a policy for a tag is not 
supported");
+  }

Review Comment:
   What is the behavior if we don't specify the `PolicySelector`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to