Search in sources :

Example 36 with UserPatch

use of org.apache.syncope.common.lib.patch.UserPatch in project syncope by apache.

the class DefaultUserPullResultHandler method newPatch.

@Override
protected AnyPatch newPatch(final String key) {
    UserPatch patch = new UserPatch();
    patch.setKey(key);
    return patch;
}
Also used : UserPatch(org.apache.syncope.common.lib.patch.UserPatch)

Example 37 with UserPatch

use of org.apache.syncope.common.lib.patch.UserPatch in project syncope by apache.

the class LDAPPasswordPullActions method beforeUpdate.

@Transactional(readOnly = true)
@Override
public <M extends AnyPatch> void beforeUpdate(final ProvisioningProfile<?, ?> profile, final SyncDelta delta, final EntityTO entityTO, final M anyPatch) throws JobExecutionException {
    if (anyPatch instanceof UserPatch) {
        PasswordPatch modPassword = ((UserPatch) anyPatch).getPassword();
        parseEncodedPassword(modPassword == null ? null : modPassword.getValue());
    }
}
Also used : PasswordPatch(org.apache.syncope.common.lib.patch.PasswordPatch) UserPatch(org.apache.syncope.common.lib.patch.UserPatch) Transactional(org.springframework.transaction.annotation.Transactional)

Example 38 with UserPatch

use of org.apache.syncope.common.lib.patch.UserPatch in project syncope by apache.

the class DefaultUserPushResultHandler method newPatch.

@Override
protected AnyPatch newPatch(final String key) {
    UserPatch patch = new UserPatch();
    patch.setKey(key);
    return patch;
}
Also used : UserPatch(org.apache.syncope.common.lib.patch.UserPatch)

Example 39 with UserPatch

use of org.apache.syncope.common.lib.patch.UserPatch in project syncope by apache.

the class UserServiceImpl method newPatch.

@Override
protected UserPatch newPatch(final String key) {
    UserPatch patch = new UserPatch();
    patch.setKey(key);
    return patch;
}
Also used : UserPatch(org.apache.syncope.common.lib.patch.UserPatch)

Example 40 with UserPatch

use of org.apache.syncope.common.lib.patch.UserPatch in project syncope by apache.

the class DefaultUserProvisioningManager method internalSuspend.

@Override
public void internalSuspend(final String key) {
    Pair<WorkflowResult<String>, Boolean> updated = uwfAdapter.internalSuspend(key);
    // propagate suspension if and only if it is required by policy
    if (updated != null && updated.getRight()) {
        UserPatch userPatch = new UserPatch();
        userPatch.setKey(updated.getLeft().getResult());
        List<PropagationTaskTO> tasks = propagationManager.getUserUpdateTasks(new WorkflowResult<>(Pair.of(userPatch, Boolean.FALSE), updated.getLeft().getPropByRes(), updated.getLeft().getPerformedTasks()));
        taskExecutor.execute(tasks, false);
    }
}
Also used : WorkflowResult(org.apache.syncope.core.provisioning.api.WorkflowResult) PropagationTaskTO(org.apache.syncope.common.lib.to.PropagationTaskTO) UserPatch(org.apache.syncope.common.lib.patch.UserPatch)

Aggregations

UserPatch (org.apache.syncope.common.lib.patch.UserPatch)102 UserTO (org.apache.syncope.common.lib.to.UserTO)73 Test (org.junit.jupiter.api.Test)59 PasswordPatch (org.apache.syncope.common.lib.patch.PasswordPatch)37 SyncopeClientException (org.apache.syncope.common.lib.SyncopeClientException)18 AttrTO (org.apache.syncope.common.lib.to.AttrTO)17 MembershipTO (org.apache.syncope.common.lib.to.MembershipTO)17 Response (javax.ws.rs.core.Response)16 Map (java.util.Map)12 StringReplacePatchItem (org.apache.syncope.common.lib.patch.StringReplacePatchItem)12 ConnObjectTO (org.apache.syncope.common.lib.to.ConnObjectTO)11 GroupTO (org.apache.syncope.common.lib.to.GroupTO)11 PropagationByResource (org.apache.syncope.core.provisioning.api.PropagationByResource)11 WorkflowResult (org.apache.syncope.core.provisioning.api.WorkflowResult)11 JdbcTemplate (org.springframework.jdbc.core.JdbcTemplate)11 GenericType (javax.ws.rs.core.GenericType)10 Pair (org.apache.commons.lang3.tuple.Pair)10 PatchOperation (org.apache.syncope.common.lib.types.PatchOperation)10 List (java.util.List)9 AttrPatch (org.apache.syncope.common.lib.patch.AttrPatch)9