@Override public ImmutablePolicyBuilderLabelScoped setGrantedPermissionsFor(final CharSequence label, final ResourceKey resourceKey, final String grantedPermission, final String... furtherGrantedPermissions) { delegate.setGrantedPermissionsFor(label, resourceKey, grantedPermission, furtherGrantedPermissions); return this; }
@Override public ImmutablePolicyBuilderLabelScoped setGrantedPermissionsFor(final CharSequence label, final ResourceKey resourceKey, final Permissions grantedPermissions) { delegate.setGrantedPermissionsFor(label, resourceKey, grantedPermissions); return this; }
/** * Set the given permissions on the specified {@code resourcePath} in the specified {@code label} * as "granted" to this builder. * * @param label the label identifying the PolicyEntry to modify. * @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 label} or {@code resourceType} is empty. */ default PolicyBuilder setGrantedPermissionsFor(final CharSequence label, final String resourceType, final CharSequence resourcePath, final Permissions grantedPermissions) { return setGrantedPermissionsFor(label, ResourceKey.newInstance(resourceType, resourcePath), grantedPermissions); }
/** * Set the given permissions on the specified {@code resourceKey} in the specified {@code label} * as "granted" to this builder. * * @param label the label identifying the PolicyEntry to modify. * @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}. * @throws IllegalArgumentException if {@code label} is empty. */ default PolicyBuilder setGrantedPermissionsFor(final CharSequence label, final ResourceKey resourceKey, final String grantedPermission, final String... furtherGrantedPermissions) { return setGrantedPermissionsFor(label, resourceKey, Permissions.newInstance(grantedPermission, furtherGrantedPermissions)); }
/** * Set the given permissions on the specified {@code resourceType} and {@code resourcePath} in the specified * {@code label} as "granted" to this builder. * * @param label the label identifying the PolicyEntry to modify. * @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 label} or {@code resourceType} is empty. */ default PolicyBuilder setGrantedPermissionsFor(final CharSequence label, final String resourceType, final CharSequence resourcePath, final String grantedPermission, final String... furtherGrantedPermissions) { return setGrantedPermissionsFor(label, ResourceKey.newInstance(resourceType, resourcePath), Permissions.newInstance(grantedPermission, furtherGrantedPermissions)); }