@@ -258,13 +258,13 @@ default void revokeAdminOptionFromUser(String username, String roleName)
258258 }
259259
260260 /**
261- * Retrieves a list of {@link GranteeUser }s for the given role.
261+ * Retrieves a list of {@link GranteeUserRef }s for the given role.
262262 *
263263 * @param roleName the role name
264- * @return a list of {@link GranteeUser }s for the given role
264+ * @return a list of {@link GranteeUserRef }s for the given role
265265 * @throws ExecutionException if the operation fails
266266 */
267- default List <GranteeUser > getGranteeUsersForRole (String roleName ) throws ExecutionException {
267+ default List <GranteeUserRef > getGranteeUsersForRole (String roleName ) throws ExecutionException {
268268 throw new UnsupportedOperationException (CoreError .AUTH_NOT_ENABLED .buildMessage ());
269269 }
270270
@@ -399,12 +399,22 @@ default void revokePrivilegeFromRole(
399399
400400 /** Represents a user. */
401401 interface User {
402+ /**
403+ * Returns the username.
404+ *
405+ * @return the username
406+ */
402407 String getName ();
403408
409+ /**
410+ * Returns whether the user is a superuser.
411+ *
412+ * @return whether the user is a superuser
413+ */
404414 boolean isSuperuser ();
405415 }
406416
407- /** Represents a role, including its granted member roles. */
417+ /** Represents a role, including its granted roles. */
408418 interface Role {
409419 /**
410420 * Returns the role name.
@@ -414,11 +424,11 @@ interface Role {
414424 String getName ();
415425
416426 /**
417- * Returns the member roles granted to the role.
427+ * Returns the roles granted to the role.
418428 *
419- * @return the member roles granted to the role
429+ * @return the roles granted to the role
420430 */
421- List <MemberRole > getMemberRoles ();
431+ List <GrantedRoleRef > getGrantedRoles ();
422432 }
423433
424434 /**
@@ -435,8 +445,8 @@ interface RoleForUser extends Role {
435445 boolean hasAdminOptionOnUser ();
436446 }
437447
438- /** Represents a user-role assignment . */
439- interface GranteeUser {
448+ /** A reference to a grantee user of a role . */
449+ interface GranteeUserRef {
440450 /**
441451 * Returns the username.
442452 *
@@ -452,19 +462,19 @@ interface GranteeUser {
452462 boolean hasAdminOption ();
453463 }
454464
455- /** Represents a role hierarchy (role-to-role assignment) . */
456- interface MemberRole {
465+ /** A reference to a granted role . */
466+ interface GrantedRoleRef {
457467 /**
458- * Returns the member role name granted to the role .
468+ * Returns the granted role name.
459469 *
460- * @return the member role name granted to the role
470+ * @return the granted role name
461471 */
462472 String getName ();
463473
464474 /**
465- * Returns whether admin option is granted for this hierarchy .
475+ * Returns whether admin option is granted for this role grant .
466476 *
467- * @return whether admin option is granted for this hierarchy
477+ * @return whether admin option is granted for this role grant
468478 */
469479 boolean hasAdminOption ();
470480 }
0 commit comments