Examples of UserTO


Examples of com.founder.fix.fixflow.core.impl.identity.UserTo

   * com.founder.fix.fixflow.service.FlowIdentityService#getUserTo(java.lang
   * .String)
   */
  public UserTo getUserTo(String userId) {
    ProcessEngine engine = null;
    UserTo userTo = null;
   
    try {
      engine = getProcessEngine(userId);
      userTo = engine.getIdentityService()
          .getUserTo(userId);
View Full Code Here

Examples of com.moreemrecife.dto.UserTO

            //            ctx = new InitialContext();
            //            EntityManager entityManager = (EntityManager) ctx.lookup("RealEstateJPA");
            EntityManagerHelper.set(entityManager);

            User u = AccessControlDao.selectUser(login);
            UserTO to = convertUserTO(u);

            return to;
        } catch (Exception e) {
            logger.log(Level.SEVERE, "Error on call to retrieveUserInfo()", e);
        }
View Full Code Here

Examples of cz.muni.fi.pa165.library.api.UserTO

   
    public static UserTO convertUserEntityToTO(User user) {
        if (user == null) {
            return null;
        }
        UserTO userTO = new UserTO(user.getEmail(), user.getPassword(), user.getFirstName(), user.getLastName());
        userTO.setUserID(user.getUserID());
        return userTO;
    }
View Full Code Here

Examples of cz.muni.fi.pa165.stis.dto.UserTO

        } catch (IllegalArgumentException ex) {
            // ok
        }

        User u = createUser("mrkvicka", "345sac", false);
        UserTO uto = mapper.map(u, UserTO.class);
        try {
            service.update(uto);
            fail("null id exception should be thrown");
        } catch (IllegalArgumentException ex) {
            // ok
        }
        try {
            service.remove(uto);
            fail("null id exception should be thrown");
        } catch (IllegalArgumentException ex) {
            // ok
        }
        uto.setId(5L);
        try {
            service.create(uto);
            fail("not null id - exception should be thrown");
        } catch (IllegalArgumentException ex) {
            //ok
View Full Code Here

Examples of org.apache.syncope.client.to.UserTO

        return SyncopeSession.get().getRestTemplate().getForObject(baseURL + "user/delete/{userId}", UserTO.class, id);
    }

    public UserTO read(Long id) {
        UserTO userTO = null;
        try {
            userTO = SyncopeSession.get().getRestTemplate().getForObject(
                    baseURL + "user/read/{userId}.json", UserTO.class, id);
        } catch (SyncopeClientCompositeErrorException e) {
            LOG.error("While reading a user", e);
View Full Code Here

Examples of org.apache.syncope.client.to.UserTO

        Fragment editProfileFrag;
        if ("admin".equals(SyncopeSession.get().getUserId())) {
            editProfileFrag = new Fragment("editProfile", "adminEmptyFrag", this);
        } else {
            final UserTO userTO = SyncopeSession.get().isAuthenticated()
                    ? profileRestClient.readProfile()
                    : new UserTO();

            editProfileFrag = new Fragment("editProfile", "editProfileFrag", this);

            final AjaxLink editProfileLink = new IndicatingAjaxLink("link") {
View Full Code Here

Examples of org.apache.syncope.client.to.UserTO

        }

        confDAO.flush();

        // 3. create user
        UserTO userTO = UserTestITCase.getSampleTO(mailAddress);
        MembershipTO membershipTO = new MembershipTO();
        membershipTO.setRoleId(7);
        userTO.addMembership(membershipTO);

        try {
            userController.create(new MockHttpServletResponse(), userTO);
        } catch (Exception e) {
            LOG.error("Unexpected exception", e);
View Full Code Here

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

        }
    }

    @Test
    public void issueSYNCOPE111() {
        UserTO userTO = getUniqueSampleTO("syncope111@syncope.apache.org");
        userTO.getResources().clear();
        userTO.getMemberships().clear();
        userTO.getDerivedAttributes().clear();
        userTO.getVirtualAttributes().clear();
        userTO.addDerivedAttribute(attributeTO("csvuserid", null));

        MembershipTO memb12 = new MembershipTO();
        memb12.setRoleId(12L);
        memb12.addAttribute(attributeTO("postalAddress", "postalAddress"));
        userTO.addMembership(memb12);

        MembershipTO memb13 = new MembershipTO();
        memb13.setRoleId(13L);
        userTO.addMembership(memb13);

        userTO.addResource(RESOURCE_NAME_LDAP);

        UserTO actual = createUser(userTO);
        assertNotNull(actual);
        assertEquals(2, actual.getMemberships().size());

        ConnObjectTO connObjectTO = readConnectorObject(RESOURCE_NAME_LDAP, actual.getId());
        assertNotNull(connObjectTO);

        AttributeTO postalAddress = connObjectTO.getAttributeMap().get("postalAddress");
        assertNotNull(postalAddress);
        assertEquals(1, postalAddress.getValues().size());
        assertEquals("postalAddress", postalAddress.getValues().get(0));

        AttributeTO title = connObjectTO.getAttributeMap().get("title");
        assertNotNull(title);
        assertEquals(2, title.getValues().size());
        assertTrue(title.getValues().contains("r12") && title.getValues().contains("r13"));

        // -----------------------------------
        // Remove the first membership and check for membership attr propagation and role attr propagation
        // -----------------------------------
        UserMod userMod = new UserMod();
        userMod.setId(actual.getId());

        MembershipTO membershipTO = actual.getMemberships().get(0).getRoleId() == 12L
                ? actual.getMemberships().get(0)
                : actual.getMemberships().get(1);

        userMod.addMembershipToBeRemoved(membershipTO.getId());

        actual = userService.update(userMod.getId(), userMod);
        assertNotNull(actual);
        assertEquals(1, actual.getMemberships().size());

        connObjectTO = readConnectorObject(RESOURCE_NAME_LDAP, actual.getId());
        assertNotNull(connObjectTO);

        postalAddress = connObjectTO.getAttributeMap().get("postalAddress");
        assertTrue(postalAddress == null || postalAddress.getValues().isEmpty()
                || StringUtils.hasText(postalAddress.getValues().get(0)));
View Full Code Here

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

    }

    @Test
    public void issueSYNCOPE185() {
        // 1. create user with LDAP resource, succesfully propagated
        UserTO userTO = getSampleTO("syncope185@syncope.apache.org");
        userTO.getVirtualAttributes().clear();
        userTO.addResource(RESOURCE_NAME_LDAP);

        userTO = createUser(userTO);
        assertNotNull(userTO);
        assertFalse(userTO.getPropagationStatusTOs().isEmpty());
        assertEquals(RESOURCE_NAME_LDAP, userTO.getPropagationStatusTOs().get(0).getResource());
        assertEquals(PropagationTaskExecStatus.SUCCESS, userTO.getPropagationStatusTOs().get(0).getStatus());

        // 2. delete this user
        userService.delete(userTO.getId());

        // 3. try (and fail) to find this user on the external LDAP resource
        try {
            readConnectorObject(RESOURCE_NAME_LDAP, userTO.getId());
            fail("This entry should not be present on this resource");
        } catch (SyncopeClientCompositeErrorException sccee) {
            SyncopeClientException sce = sccee.getException(SyncopeClientExceptionType.NotFound);
            assertNotNull(sce);
        }
View Full Code Here

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

        configurationService.update(configurationTO.getKey(), configurationTO);
        ConfigurationTO newConfTO = configurationService.read(configurationTO.getKey());

        assertEquals(configurationTO, newConfTO);

        UserTO userTO = getSampleTO("syncope51@syncope.apache.org");
        userTO.setPassword("password");

        try {
            createUser(userTO);
            fail("Create user should not succeed");
        } catch (SyncopeClientCompositeErrorException e) {
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.