@Override public ImmutablePolicyBuilderLabelScoped setSubjectFor(final CharSequence label, final Subject subject) { delegate.setSubjectFor(label, subject); return this; }
/** * Sets the given {@link Subject} to the specified {@code label} to this builder. A previous entry with the same * {@code subjectIssuerWithId} in the {@link Label} is replaced by the specified one. * * @param label the Label identifying the PolicyEntry to modify. * @param subjectIssuerWithId the Subject issuer + Subject ID (separated with a "{@value * SubjectId#ISSUER_DELIMITER}") of the Subject to set. * @param subjectType the type of the subject to set. * @return this builder to allow method chaining. * @throws NullPointerException if any argument is {@code null}. * @throws IllegalArgumentException if {@code label} is empty. */ default PolicyBuilder setSubjectFor(final CharSequence label, final CharSequence subjectIssuerWithId, final SubjectType subjectType) { return setSubjectFor(label, Subject.newInstance(subjectIssuerWithId, subjectType)); }
/** * Sets the given {@link Subject} to the specified {@code label} to this builder. A previous entry with the same * {@code issuer} and {@code subject} in the {@link Label} is replaced by the specified one. * * @param label the Label identifying the PolicyEntry to modify. * @param issuer the SubjectId's {@code issuer}. * @param subject the character sequence for the SubjectId's {@code subject}. * @param subjectType the type of the subject to set. * @return this builder to allow method chaining. * @throws NullPointerException if any argument is {@code null}. * @throws IllegalArgumentException if {@code label} is empty. */ default PolicyBuilder setSubjectFor(final CharSequence label, final SubjectIssuer issuer, final CharSequence subject, final SubjectType subjectType) { return setSubjectFor(label, Subject.newInstance(issuer, subject, subjectType)); }