Examples of UserEntry


Examples of com.google.gdata.data.appsforyourdomain.provisioning.UserEntry

    public boolean setPassword(String username, String passwd) throws AppsForYourDomainException, ServiceException, IOException {
        ShaPasswordEncoder pwe = new ShaPasswordEncoder();
        String passwordHashFunction = pwe.getAlgorithm();
        passwd = pwe.encodePassword(passwd, null);

        UserEntry entry = retrieveUser(username);
        Login login = entry.getLogin();

        login.setPassword(passwd);
        if (passwordHashFunction != null) {
            login.setHashFunctionName(passwordHashFunction);
        }
        login.setChangePasswordAtNextLogin(false);

        @SuppressWarnings("unused")
    UserEntry result = updateUser(username, entry);
        return true;
    }
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.examples.blog.domain.UserEntry

                .assembleDto(dto, user, converters, bf);
        return dto;
    }

    public UserEntryDTO findEntry(final Long entryId) {
        final UserEntry entry = dao.findEntry(entryId);
        final UserEntryDTO dto = (UserEntryDTO) bf.get("UserEntryDTO");
        DTOAssembler.newAssembler(dto.getClass(), bf.getClazz("UserEntry"))
                .assembleDto(dto, entry, converters, bf);
        return dto;
    }
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.examples.blog.domain.UserEntry

     */
    public void setupUsers() {

        final User bob = dao.create("Bob");

        final UserEntry entry = bob.createEntry();
        entry.setTitle("GeDA");
        entry.setBody("Hey all, This GeDA stuff really works!!!");

        final User john = dao.create("John");
        final UserEntryReply reply = entry.createReply(john);
        reply.getReplyEntry().setBody("Awesome!");

    }
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.examples.blog.domain.UserEntry

    public void setEntries(final Collection<UserEntry> entries) {
        this.entries = entries;
    }

    public UserEntry createEntry() {
        final UserEntry entry = new UserEntryImpl(this);
        entries.add(entry);
        return entry;
    }
View Full Code Here

Examples of org.apache.roller.weblogger.webservices.adminprotocol.sdk.UserEntry

    }

    public void testEnabled() {
        try {
            UserEntrySet ues = createSampleUser();
            UserEntry ue = (UserEntry)ues.getEntries()[0];
            assertEquals(Boolean.TRUE, ue.getEnabled());
           
            ues = updateSampleUser();
            ue = (UserEntry)ues.getEntries()[0];
            assertEquals(Boolean.FALSE, ue.getEnabled());

            ues = fetchSampleUser();
            ue = (UserEntry)ues.getEntries()[0];
            assertEquals(Boolean.FALSE, ue.getEnabled());
           
        } catch (IOException ioe) {
            fail(ioe.getMessage());
            ioe.printStackTrace();
        } catch (JDOMException je) {
View Full Code Here

Examples of org.apache.roller.weblogger.webservices.adminprotocol.sdk.UserEntry

        }
        if (c.getEntries().length > 1) {
            throw new BadRequestException("ERROR: Cannot put >1 entries per request");
        }
       
        UserEntry entry = (UserEntry)c.getEntries()[0];
        if (entry.getName() != null && !entry.getName().equals(getUri().getEntryId())) {
            throw new BadRequestException("ERROR: Content name does not match URI name");
        }
        entry.setName(getUri().getEntryId());
        c = updateUsers((UserEntrySet)c);
       
        return c;
    }
View Full Code Here

Examples of org.apache.roller.weblogger.webservices.adminprotocol.sdk.UserEntry

        try {
            UserManager mgr = getRoller().getUserManager();
           
            List userDatas = new ArrayList();
            for (int i = 0; i < c.getEntries().length; i++) {
                UserEntry entry = (UserEntry)c.getEntries()[i];
                if (entry.getDateCreated() == null) {
                    // if no creation date supplied, add it
                    entry.setDateCreated(new Date());
                }
                User ud = toUserData(entry);
                mgr.addUser(ud);
                getRoller().flush();
                CacheManager.invalidate(ud);
View Full Code Here

Examples of org.apache.roller.weblogger.webservices.adminprotocol.sdk.UserEntry

    }
       
    private UserEntrySet updateUsers(UserEntrySet c) throws HandlerException {
        List userDatas = new ArrayList();
        for (int i = 0; i < c.getEntries().length; i++) {
            UserEntry entry = (UserEntry)c.getEntries()[i];
            User ud = getUserData(entry.getName());
            updateUserData(ud, entry);
            userDatas.add(ud);
        }
        return toUserEntrySet((User[])userDatas.toArray(new User[0]));
    }
View Full Code Here

Examples of org.apache.roller.weblogger.webservices.adminprotocol.sdk.UserEntry

        }
       
        // password field is not set
        // we never return password field
       
        UserEntry ue = new UserEntry(ud.getUserName(), getUrlPrefix());
        ue.setScreenName(ud.getScreenName());
        ue.setFullName(ud.getFullName());
        ue.setLocale(ud.getLocale());
        ue.setTimezone(ud.getTimeZone());
        ue.setEmailAddress(ud.getEmailAddress());
        ue.setDateCreated(ud.getDateCreated());
        ue.setEnabled(ud.getEnabled());
       
        return ue;
    }
View Full Code Here

Examples of org.apache.roller.weblogger.webservices.adminprotocol.sdk.UserEntry

       
        return mesResponse;
    }
   
    protected UserEntrySet deleteSampleUser(boolean test) throws IOException, JDOMException, UnexpectedRootElementException {
        UserEntry ue = getSampleUserEntry();
       
        HttpResponse res = delete(ue.getHref(), getUser(), getPassword());
        if (test) {
            assertEquals(200, res.getStatus());
        } else if (res.getStatus() != 200) {
            return 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.