&& (original.getPassword() == null || !original.getPassword().equals(updated.getPassword()))) { result.setPassword(new PasswordPatch.Builder(). value(updated.getPassword()). resources(updated.getResources()).build());
new PasswordPatch.Builder().onSyncope(true).value(password).resources(resources).build());
public Builder resources(final Collection<String> resources) { if (resources != null) { getInstance().getResources().addAll(resources); } return this; }
@PreAuthorize("hasRole('" + StandardEntitlement.USER_UPDATE + "')") @Override public ProvisioningResult<UserTO> assign( final String key, final Collection<String> resources, final boolean changepwd, final String password, final boolean nullPriorityAsync) { // security checks UserTO user = binder.getUserTO(key); Set<String> effectiveRealms = RealmUtils.getEffective( AuthContextUtils.getAuthorizations().get(StandardEntitlement.USER_UPDATE), user.getRealm()); securityChecks(effectiveRealms, user.getRealm(), user.getKey()); UserPatch patch = new UserPatch(); patch.setKey(key); patch.getResources().addAll(resources.stream().map(resource -> new StringPatchItem.Builder().operation(PatchOperation.ADD_REPLACE).value(resource).build()). collect(Collectors.toList())); if (changepwd) { patch.setPassword(new PasswordPatch.Builder(). value(password).onSyncope(false).resources(resources).build()); } return update(patch, nullPriorityAsync); }
public Builder onSyncope(final boolean onSyncope) { getInstance().setOnSyncope(onSyncope); return this; }
@Override protected AssociationPatch getInstance() { return (AssociationPatch) super.getInstance(); }
@Override public Builder onSyncope(final boolean onSyncope) { return (Builder) super.onSyncope(onSyncope); }
@Override public Builder onSyncope(final boolean onSyncope) { return (Builder) super.onSyncope(onSyncope); }
@Override public Builder resources(final Collection<String> resources) { return (Builder) super.resources(resources); }
public Builder resource(final String resource) { if (resource != null) { getInstance().getResources().add(resource); } return this; }
@Override public StatusPatch build() { return (StatusPatch) super.build(); }
@Override protected StatusPatch getInstance() { return (StatusPatch) super.getInstance(); }
public Builder resources(final String... resources) { getInstance().getResources().addAll(Arrays.asList(resources)); return this; }
@Override public Builder resources(final String... resources) { return (Builder) super.resources(resources); }
@Override public Builder value(final String value) { return (Builder) super.value(value); }
@Override public AssociationPatch build() { return (AssociationPatch) super.build(); }
@Override public Builder resources(final Collection<String> resources) { return (Builder) super.resources(resources); }
@Override public Builder resource(final String resource) { return (Builder) super.resource(resource); }
@Override public Builder resource(final String resource) { return (Builder) super.resource(resource); }
@Override public Builder resources(final String... resources) { return (Builder) super.resources(resources); }