Package org.apache.syncope.common.to

Examples of org.apache.syncope.common.to.UserTO.addAttribute()


        userTO.addAttribute(attributeTO("surname", "surname"));
        userTO.addAttribute(attributeTO("type", "a type"));
        userTO.addAttribute(attributeTO("userId", uid));
        userTO.addAttribute(attributeTO("email", uid));
        DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        userTO.addAttribute(attributeTO("loginDate", sdf.format(new Date())));
        userTO.addDerivedAttribute(attributeTO("cn", null));
        userTO.addVirtualAttribute(attributeTO("virtualdata", "virtualvalue"));
        return userTO;
    }
View Full Code Here


        UserTO userTO = new UserTO();
        String userId = getUUIDString() + "issue186@syncope.apache.org";
        userTO.setUsername(userId);
        userTO.setPassword("password");

        userTO.addAttribute(attributeTO("userId", userId));
        userTO.addAttribute(attributeTO("fullname", userId));
        userTO.addAttribute(attributeTO("surname", userId));

        userTO = createUser(userTO);
        assertNotNull(userTO);
View Full Code Here

        String userId = getUUIDString() + "issue186@syncope.apache.org";
        userTO.setUsername(userId);
        userTO.setPassword("password");

        userTO.addAttribute(attributeTO("userId", userId));
        userTO.addAttribute(attributeTO("fullname", userId));
        userTO.addAttribute(attributeTO("surname", userId));

        userTO = createUser(userTO);
        assertNotNull(userTO);
        assertTrue(userTO.getResources().isEmpty());
View Full Code Here

        userTO.setUsername(userId);
        userTO.setPassword("password");

        userTO.addAttribute(attributeTO("userId", userId));
        userTO.addAttribute(attributeTO("fullname", userId));
        userTO.addAttribute(attributeTO("surname", userId));

        userTO = createUser(userTO);
        assertNotNull(userTO);
        assertTrue(userTO.getResources().isEmpty());
View Full Code Here

        } catch (SyncopeClientCompositeErrorException scce) {
            sce = scce.getException(SyncopeClientExceptionType.RequiredValuesMissing);
        }
        assertNotNull(sce);

        userTO.addAttribute(type);
        userTO = createUser(userTO);
        assertNotNull(userTO);
    }

    @Test
View Full Code Here

    }

    @Test(expected = SyncopeClientCompositeErrorException.class)
    public void createWithException() {
        UserTO newUserTO = new UserTO();
        newUserTO.addAttribute(attributeTO("userId", "userId@nowhere.org"));
        createUser(newUserTO);
    }

    @Test
    @SuppressWarnings("unchecked")
View Full Code Here

        // add an attribute with no values: must be ignored
        membershipTO.addAttribute(attributeTO("subscriptionDate", null));

        // add an attribute with a non-existing schema: must be ignored
        AttributeTO attrWithInvalidSchemaTO = attributeTO("invalid schema", "a value");
        userTO.addAttribute(attrWithInvalidSchemaTO);

        // add an attribute with null value: must be ignored
        userTO.addAttribute(attributeTO("activationDate", null));

        // 1. create user
View Full Code Here

        // add an attribute with a non-existing schema: must be ignored
        AttributeTO attrWithInvalidSchemaTO = attributeTO("invalid schema", "a value");
        userTO.addAttribute(attrWithInvalidSchemaTO);

        // add an attribute with null value: must be ignored
        userTO.addAttribute(attributeTO("activationDate", null));

        // 1. create user
        UserTO newUserTO = createUser(userTO);

        assertNotNull(newUserTO);
View Full Code Here

        // -----------------------------
        UserTO inUserTO = new UserTO();
        inUserTO.setPassword("password123");
        String userName = "test9";
        inUserTO.setUsername(userName);
        inUserTO.addAttribute(attributeTO("firstname", "nome9"));
        inUserTO.addAttribute(attributeTO("surname", "cognome"));
        inUserTO.addAttribute(attributeTO("type", "a type"));
        inUserTO.addAttribute(attributeTO("fullname", "nome cognome"));
        inUserTO.addAttribute(attributeTO("userId", "puccini@syncope.apache.org"));
        inUserTO.addAttribute(attributeTO("email", "puccini@syncope.apache.org"));
View Full Code Here

        UserTO inUserTO = new UserTO();
        inUserTO.setPassword("password123");
        String userName = "test9";
        inUserTO.setUsername(userName);
        inUserTO.addAttribute(attributeTO("firstname", "nome9"));
        inUserTO.addAttribute(attributeTO("surname", "cognome"));
        inUserTO.addAttribute(attributeTO("type", "a type"));
        inUserTO.addAttribute(attributeTO("fullname", "nome cognome"));
        inUserTO.addAttribute(attributeTO("userId", "puccini@syncope.apache.org"));
        inUserTO.addAttribute(attributeTO("email", "puccini@syncope.apache.org"));
        inUserTO.addDerivedAttribute(attributeTO("csvuserid", null));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.