Package org.apache.syncope.common.to

Examples of org.apache.syncope.common.to.PropagationRequestTO


        // 2. request to change password only on testdb (no Syncope, no testdb2)
        UserMod userMod = new UserMod();
        userMod.setId(userTO.getId());
        userMod.setPassword(getUUIDString());
        PropagationRequestTO pwdPropRequest = new PropagationRequestTO();
        pwdPropRequest.addResource(RESOURCE_NAME_TESTDB);
        userMod.setPwdPropRequest(pwdPropRequest);

        userTO = userService.update(userMod.getId(), userMod);

        // 3a. Chech that only a single propagation took place
View Full Code Here


        // 3. request to change password only on testdb
        userMod = new UserMod();
        userMod.setId(userTO.getId());
        userMod.setPassword(getUUIDString());
        PropagationRequestTO pwdPropRequest = new PropagationRequestTO();
        pwdPropRequest.addResource(RESOURCE_NAME_TESTDB);
        userMod.setPwdPropRequest(pwdPropRequest);

        userTO = userService.update(userMod.getId(), userMod);
        assertEquals(RESOURCE_NAME_TESTDB, userTO.getResources().iterator().next());
        assertTrue(userTO.getPropagationStatusTOs().get(0).getStatus().isSuccessful());
View Full Code Here

    private Image newImage(final String imageStatus) {
        return new Image("icon", IMG_STATUES + imageStatus + Constants.PNG_EXT);
    }

    public PropagationRequestTO getPropagationRequestTO() {
        PropagationRequestTO result = null;

        Collection<StatusBean> statusBeans = checkGroup.getModel().getObject();
        if (statusBeans != null && !statusBeans.isEmpty()) {
            result = StatusUtils.buildPropagationRequestTO(statusBeans);
View Full Code Here

    private Image newImage(final String imageStatus) {
        return new Image("icon", IMG_STATUES + imageStatus + Constants.PNG_EXT);
    }

    public PropagationRequestTO getPropagationRequestTO() {
        PropagationRequestTO result = null;

        Collection<StatusBean> statusBeans = checkGroup.getModel().getObject();
        if (statusBeans != null && !statusBeans.isEmpty()) {
            result = StatusUtils.buildPropagationRequestTO(statusBeans);
View Full Code Here

                ? "active"
                : "created", userTO.getStatus());
        long userId = userTO.getId();

        // Suspend with effect on syncope, ldap and db => user should be suspended in syncope and all resources
        PropagationRequestTO propagationRequestTO = new PropagationRequestTO();
        propagationRequestTO.setOnSyncope(true);
        propagationRequestTO.addResource(RESOURCE_NAME_TESTDB);
        propagationRequestTO.addResource(RESOURCE_NAME_LDAP);
        userTO = userService.suspend(userId, propagationRequestTO);
        assertNotNull(userTO);
        assertEquals("suspended", userTO.getStatus());

        ConnObjectTO connObjectTO = readConnectorObject(RESOURCE_NAME_TESTDB, userId);
        assertFalse(getBooleanAttribute(connObjectTO, OperationalAttributes.ENABLE_NAME));

        connObjectTO = readConnectorObject(RESOURCE_NAME_LDAP, userId);
        assertNotNull(connObjectTO);

        // Suspend and reactivate only on ldap => db and syncope should still show suspended
        propagationRequestTO = new PropagationRequestTO();
        propagationRequestTO.setOnSyncope(false);
        propagationRequestTO.addResource(RESOURCE_NAME_LDAP);
        userTO = userService.suspend(userId, propagationRequestTO);
        userTO = userService.reactivate(userId, propagationRequestTO);
        assertNotNull(userTO);
        assertEquals("suspended", userTO.getStatus());

        connObjectTO = readConnectorObject(RESOURCE_NAME_TESTDB, userId);
        assertFalse(getBooleanAttribute(connObjectTO, OperationalAttributes.ENABLE_NAME));

        // Reactivate on syncope and db => syncope and db should show the user as active
        propagationRequestTO = new PropagationRequestTO();
        propagationRequestTO.setOnSyncope(true);
        propagationRequestTO.addResource(RESOURCE_NAME_TESTDB);

        userTO = userService.reactivate(userId, propagationRequestTO);
        assertNotNull(userTO);
        assertEquals("active", userTO.getStatus());
View Full Code Here

        // 2. request to change password only on testdb (no Syncope, no testdb2)
        UserMod userMod = new UserMod();
        userMod.setId(userTO.getId());
        userMod.setPassword(getUUIDString());
        PropagationRequestTO pwdPropRequest = new PropagationRequestTO();
        pwdPropRequest.addResource(RESOURCE_NAME_TESTDB);
        userMod.setPwdPropRequest(pwdPropRequest);

        userTO = userService.update(userMod.getId(), userMod);

        // 3a. Chech that only a single propagation took place
View Full Code Here

        // 3. request to change password only on testdb
        userMod = new UserMod();
        userMod.setId(userTO.getId());
        userMod.setPassword(getUUIDString());
        PropagationRequestTO pwdPropRequest = new PropagationRequestTO();
        pwdPropRequest.addResource(RESOURCE_NAME_TESTDB);
        userMod.setPwdPropRequest(pwdPropRequest);

        userTO = userService.update(userMod.getId(), userMod);
        assertEquals(RESOURCE_NAME_TESTDB, userTO.getResources().iterator().next());
        assertTrue(userTO.getPropagationStatusTOs().get(0).getStatus().isSuccessful());
View Full Code Here

                ? "active"
                : "created", userTO.getStatus());
        long userId = userTO.getId();

        // Suspend with effect on syncope, ldap and db => user should be suspended in syncope and all resources
        PropagationRequestTO propagationRequestTO = new PropagationRequestTO();
        propagationRequestTO.setOnSyncope(true);
        propagationRequestTO.addResource(RESOURCE_NAME_TESTDB);
        propagationRequestTO.addResource(RESOURCE_NAME_LDAP);
        userTO = userService.suspend(userId, propagationRequestTO);
        assertNotNull(userTO);
        assertEquals("suspended", userTO.getStatus());

        ConnObjectTO connObjectTO = readConnectorObject(RESOURCE_NAME_TESTDB, userId);
        assertFalse(getBooleanAttribute(connObjectTO, OperationalAttributes.ENABLE_NAME));

        connObjectTO = readConnectorObject(RESOURCE_NAME_LDAP, userId);
        assertNotNull(connObjectTO);

        // Suspend and reactivate only on ldap => db and syncope should still show suspended
        propagationRequestTO = new PropagationRequestTO();
        propagationRequestTO.setOnSyncope(false);
        propagationRequestTO.addResource(RESOURCE_NAME_LDAP);
        userTO = userService.suspend(userId, propagationRequestTO);
        userTO = userService.reactivate(userId, propagationRequestTO);
        assertNotNull(userTO);
        assertEquals("suspended", userTO.getStatus());

        connObjectTO = readConnectorObject(RESOURCE_NAME_TESTDB, userId);
        assertFalse(getBooleanAttribute(connObjectTO, OperationalAttributes.ENABLE_NAME));

        // Reactivate on syncope and db => syncope and db should show the user as active
        propagationRequestTO = new PropagationRequestTO();
        propagationRequestTO.setOnSyncope(true);
        propagationRequestTO.addResource(RESOURCE_NAME_TESTDB);

        userTO = userService.reactivate(userId, propagationRequestTO);
        assertNotNull(userTO);
        assertEquals("active", userTO.getStatus());
View Full Code Here

        // 2. request to change password only on testdb (no Syncope, no testdb2)
        UserMod userMod = new UserMod();
        userMod.setId(userTO.getId());
        userMod.setPassword(getUUIDString());
        PropagationRequestTO pwdPropRequest = new PropagationRequestTO();
        pwdPropRequest.addResource(RESOURCE_NAME_TESTDB);
        userMod.setPwdPropRequest(pwdPropRequest);

        userTO = userService.update(userMod.getId(), userMod);

        // 3a. Chech that only a single propagation took place
View Full Code Here

        // 3. request to change password only on testdb
        userMod = new UserMod();
        userMod.setId(userTO.getId());
        userMod.setPassword(getUUIDString());
        PropagationRequestTO pwdPropRequest = new PropagationRequestTO();
        pwdPropRequest.addResource(RESOURCE_NAME_TESTDB);
        userMod.setPwdPropRequest(pwdPropRequest);

        userTO = userService.update(userMod.getId(), userMod);
        assertEquals(RESOURCE_NAME_TESTDB, userTO.getResources().iterator().next());
        assertTrue(userTO.getPropagationStatusTOs().get(0).getStatus().isSuccessful());
View Full Code Here

TOP

Related Classes of org.apache.syncope.common.to.PropagationRequestTO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.