/** * Set the given {@link EffectedPermissions} on the specified resource key in the specified label. * * @param label the label identifying the PolicyEntry to modify. * @param resourceKey the ResourceKey to set the effected permissions on. * @param effectedPermissions the EffectedPermissions to set on the resource in the label. * @return a copy of this Policy with the changed state. * @throws NullPointerException if any argument is {@code null}. * @throws IllegalArgumentException if {@code label} is empty. */ default Policy setEffectedPermissionsFor(final CharSequence label, final ResourceKey resourceKey, final EffectedPermissions effectedPermissions) { return setResourceFor(label, PoliciesModelFactory.newResource(resourceKey, effectedPermissions)); }
if (optionalEntry.isPresent()) { final PoliciesValidator validator = PoliciesValidator.newInstance(policy.setResourceFor(label, resource));
if (optionalEntry.isPresent()) { final PoliciesValidator validator = PoliciesValidator.newInstance(policy.setResourceFor(label, resource));