@@ -339,51 +339,48 @@ default Optional<UserTagInfo> getUserTagInfo(String policyName, String username)
339339 }
340340
341341 /**
342- * Applies the given policy to the given namespace.
342+ * Creates a namespace policy with the given policy and the given namespace.
343343 *
344+ * @param namespacePolicyName the namespace policy name
344345 * @param policyName the policy name
345346 * @param namespaceName the namespace name
346347 * @throws ExecutionException if the operation fails
347348 */
348- default void applyPolicyToNamespace (String policyName , String namespaceName )
349+ default void createNamespacePolicy (
350+ String namespacePolicyName , String policyName , String namespaceName )
349351 throws ExecutionException {
350352 throw new UnsupportedOperationException (CoreError .ABAC_NOT_ENABLED .buildMessage ());
351353 }
352354
353355 /**
354- * Enables the given policy for the given namespace .
356+ * Enables a namespace policy that has the given name .
355357 *
356- * @param policyName the policy name
357- * @param namespaceName the namespace name
358+ * @param namespacePolicyName the namespace policy name
358359 * @throws ExecutionException if the operation fails
359360 */
360- default void enableNamespacePolicy (String policyName , String namespaceName )
361- throws ExecutionException {
361+ default void enableNamespacePolicy (String namespacePolicyName ) throws ExecutionException {
362362 throw new UnsupportedOperationException (CoreError .ABAC_NOT_ENABLED .buildMessage ());
363363 }
364364
365365 /**
366- * Disables the given policy for the given namespace .
366+ * Disables a namespace policy that has the given name .
367367 *
368- * @param policyName the policy name
369- * @param namespaceName the namespace name
368+ * @param namespacePolicyName the namespace policy name
370369 * @throws ExecutionException if the operation fails
371370 */
372- default void disableNamespacePolicy (String policyName , String namespaceName )
373- throws ExecutionException {
371+ default void disableNamespacePolicy (String namespacePolicyName ) throws ExecutionException {
374372 throw new UnsupportedOperationException (CoreError .ABAC_NOT_ENABLED .buildMessage ());
375373 }
376374
377375 /**
378- * Retrieves the namespace policy for the given namespace .
376+ * Retrieves a namespace policy that has the given name .
379377 *
380- * @param policyName the policy name
381- * @param namespaceName the namespace name
378+ * @param namespacePolicyName the namespace policy name
382379 * @return the namespace policy. If the policy is not applied to the namespace, returns an empty
383380 * optional
384381 * @throws ExecutionException if the operation fails
385382 */
386- default Optional <NamespacePolicy > getNamespacePolicy (String policyName , String namespaceName )
383+ default Optional <NamespacePolicy > getNamespacePolicy (String namespacePolicyName )
387384 throws ExecutionException {
388385 throw new UnsupportedOperationException (CoreError .ABAC_NOT_ENABLED .buildMessage ());
389386 }
@@ -399,55 +396,48 @@ default List<NamespacePolicy> getNamespacePolicies() throws ExecutionException {
399396 }
400397
401398 /**
402- * Applies the given policy to the given table of the given namespace .
399+ * Creates a table policy with the given policy and the given table .
403400 *
401+ * @param tablePolicyName the table policy name
404402 * @param policyName the policy name
405403 * @param namespaceName the namespace name
406404 * @param tableName the table name
407405 * @throws ExecutionException if the operation fails
408406 */
409- default void applyPolicyToTable (String policyName , String namespaceName , String tableName )
407+ default void createTablePolicy (
408+ String tablePolicyName , String policyName , String namespaceName , String tableName )
410409 throws ExecutionException {
411410 throw new UnsupportedOperationException (CoreError .ABAC_NOT_ENABLED .buildMessage ());
412411 }
413412
414413 /**
415- * Enables the given policy of the given table of the given namespace .
414+ * Enables a table policy that has the given name .
416415 *
417- * @param policyName the policy name
418- * @param namespaceName the namespace name
419- * @param tableName the table name
416+ * @param tablePolicyName the table policy name
420417 * @throws ExecutionException if the operation fails
421418 */
422- default void enableTablePolicy (String policyName , String namespaceName , String tableName )
423- throws ExecutionException {
419+ default void enableTablePolicy (String tablePolicyName ) throws ExecutionException {
424420 throw new UnsupportedOperationException (CoreError .ABAC_NOT_ENABLED .buildMessage ());
425421 }
426422
427423 /**
428- * Disables the given policy of the given table of the given namespace .
424+ * Disables a table policy that has the given name .
429425 *
430- * @param policyName the policy name
431- * @param namespaceName the namespace name
432- * @param tableName the table name
426+ * @param tablePolicyName the table policy name
433427 * @throws ExecutionException if the operation fails
434428 */
435- default void disableTablePolicy (String policyName , String namespaceName , String tableName )
436- throws ExecutionException {
429+ default void disableTablePolicy (String tablePolicyName ) throws ExecutionException {
437430 throw new UnsupportedOperationException (CoreError .ABAC_NOT_ENABLED .buildMessage ());
438431 }
439432
440433 /**
441- * Retrieves the table policy for the given table of the given namespace .
434+ * Retrieves a table policy that has the given name .
442435 *
443- * @param policyName the policy name
444- * @param namespaceName the namespace name
445- * @param tableName the table name
436+ * @param tablePolicyName the table policy name
446437 * @return the table policy. If the policy is not applied to the table, returns an empty optional
447438 * @throws ExecutionException if the operation fails
448439 */
449- default Optional <TablePolicy > getTablePolicy (
450- String policyName , String namespaceName , String tableName ) throws ExecutionException {
440+ default Optional <TablePolicy > getTablePolicy (String tablePolicyName ) throws ExecutionException {
451441 throw new UnsupportedOperationException (CoreError .ABAC_NOT_ENABLED .buildMessage ());
452442 }
453443
@@ -731,6 +721,13 @@ interface GroupInfo {
731721
732722 /** The namespace policy. */
733723 interface NamespacePolicy {
724+ /**
725+ * Returns the namespace policy name.
726+ *
727+ * @return the namespace policy name
728+ */
729+ String getName ();
730+
734731 /**
735732 * Returns the policy name.
736733 *
@@ -755,6 +752,13 @@ interface NamespacePolicy {
755752
756753 /** The table policy. */
757754 interface TablePolicy {
755+ /**
756+ * Returns the table policy name.
757+ *
758+ * @return the table policy name
759+ */
760+ String getName ();
761+
758762 /**
759763 * Returns the policy name.
760764 *
0 commit comments