/** * Returns the {@link EffectedPermissions} for the specified subject ID on the passed resource type and resource * path. * * @param label the label identifying the PolicyEntry to modify. * @param subjectId the Subject ID to get the effected permissions for. * @param resourceType the Resource type to get the effected permissions for. * @param resourcePath the Resource path to get the effected permissions for. * @return the effected permissions which are associated with {@code subject} on the passed {@code resourceType} and * {@code resourcePath}. The returned set is mutable but disjoint from this Policy; thus modifying the set does not * have an impact on this Policy. * @throws NullPointerException if any argument is {@code null}. * @throws IllegalArgumentException if {@code label} or {@code resourceType} is empty. */ default Optional<EffectedPermissions> getEffectedPermissionsFor(final CharSequence label, final SubjectId subjectId, final CharSequence resourceType, final CharSequence resourcePath) { return getEffectedPermissionsFor(label, subjectId, PoliciesModelFactory.newResourceKey(resourceType, resourcePath)); }