jerryshao commented on code in PR #12549:
URL: https://github.com/apache/gravitino/pull/12549#discussion_r3850543184
##########
api/src/main/java/org/apache/gravitino/policy/PolicyOperations.java:
##########
@@ -106,4 +106,27 @@ Policy alterPolicy(String name, PolicyChange... changes)
* @return True if the policy is deleted, false if the policy does not exist.
*/
boolean deletePolicy(String name);
+
+ /**
+ * Lists tag names directly associated with a policy.
+ *
+ * @param policyName The policy name.
+ * @return The directly associated tag names.
+ * @throws UnsupportedOperationException If listing policy-to-tag
associations is not supported.
+ */
+ default String[] listTagsForPolicy(String policyName) {
+ throw new UnsupportedOperationException("Listing tags for a policy is not
supported");
+ }
+
+ /**
+ * Lists detailed tag associations for a policy.
+ *
+ * @param policyName The policy name.
+ * @return The tag associations including selectors.
+ * @throws UnsupportedOperationException If listing policy-to-tag
associations is not supported.
+ */
+ default PolicyTagAssociation[] listTagAssociationsForPolicy(String
policyName) {
+ throw new UnsupportedOperationException(
+ "Listing tag associations for a policy is not supported");
Review Comment:
Will this returned tag be filtered out by the selector? If so, can you add
the comments to clarify the behavior?
--
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]