/** * Set the given permissions on the specified {@code resourcePath} as "granted" to this * builder. * * @param resourceType the type of the Resource to set the permissions on. * @param resourcePath the path of the Resource to set the permissions on. * @param grantedPermission the Permission to set as "grant"ed on the Resource in the label. * @param furtherGrantedPermissions further Permissions to set as "grant"ed on the Resource in the label. * @return this builder to allow method chaining. * @throws NullPointerException if any argument is {@code null}. * @throws IllegalArgumentException if {@code resourceType} is empty. */ default LabelScoped setGrantedPermissions(final String resourceType, final JsonPointer resourcePath, final String grantedPermission, final String... furtherGrantedPermissions) { setGrantedPermissionsFor(getLabel(), resourceType, resourcePath, grantedPermission, furtherGrantedPermissions); return this; }
/** * Set the given {@link Permissions} on the specified {@code resourceType} and {@code resourcePath} as "granted" * to this builder. * * @param resourceType the type of the Resource to set the permissions on. * @param resourcePath the path of the Resource to set the permissions on. * @param grantedPermissions the Permissions to set as "grant"ed on the Resource in the label. * @return this builder to allow method chaining. * @throws NullPointerException if any argument is {@code null}. * @throws IllegalArgumentException if {@code resourceType} is empty. */ default LabelScoped setGrantedPermissions(final String resourceType, final JsonPointer resourcePath, final Permissions grantedPermissions) { setGrantedPermissionsFor(getLabel(), resourceType, resourcePath, grantedPermissions); return this; }
/** * Set the given {@link String}s on the specified {@code resourceKey} * as "granted" to this builder. * * @param resourceKey the ResourceKey to set the permissions on. * @param grantedPermission the Permission to set as "grant"ed on the Resource in the label. * @param furtherGrantedPermissions further Permissions to set as "grant"ed on the Resource in the label. * @return this builder to allow method chaining. * @throws NullPointerException if any argument is {@code null}. */ default LabelScoped setGrantedPermissions(final ResourceKey resourceKey, final String grantedPermission, final String... furtherGrantedPermissions) { setGrantedPermissionsFor(getLabel(), resourceKey, grantedPermission, furtherGrantedPermissions); return this; }
/** * Set the given {@link Permissions} on the specified {@code resourceKey} * as "granted" to this builder. * * @param resourceKey the ResourceKey to set the permissions on. * @param grantedPermissions the Permissions to set as "grant"ed on the resource in the label. * @return this builder to allow method chaining. * @throws NullPointerException if any argument is {@code null}. */ default LabelScoped setGrantedPermissions(final ResourceKey resourceKey, final Permissions grantedPermissions) { setGrantedPermissionsFor(getLabel(), resourceKey, grantedPermissions); return this; }