Examples of UserEntry


Examples of org.apache.roller.webservices.adminapi.sdk.UserEntry

        me.setPermission(MemberEntry.Permissions.AUTHOR);
        return me;
    }
   
    protected static UserEntry updateSampleUserEntry(UserEntry ue) {
        UserEntry ueUpdate = new UserEntry(ue.getName(), getEndpointUrl());
        ueUpdate.setEmailAddress("billy@bob.org");
        ueUpdate.setFullName("Billy Bob");
        ueUpdate.setLocale(new Locale("ms", "MY"));
        ueUpdate.setTimezone(TimeZone.getTimeZone("Asia/Kuala_Lumpur"));
        ueUpdate.setPassword("billy");
       
        return ueUpdate;
    }
View Full Code Here

Examples of org.apache.roller.webservices.adminapi.sdk.UserEntry

       
        return meUpdate;
    }
   
    protected static UserEntrySet updateSampleUserEntrySet(UserEntrySet ues) {
        UserEntry ue = (UserEntry)ues.getEntries()[0];
        UserEntry ueUpdated = updateSampleUserEntry(ue);       
        UserEntrySet uesUpdated = new UserEntrySet(getEndpointUrl());
        uesUpdated.setEntries(new UserEntry[] { ueUpdated });
       
        return uesUpdated;
    }
View Full Code Here

Examples of org.apache.roller.webservices.adminapi.sdk.UserEntry

       
        return we;
    }   
   
    protected static UserEntrySet getSampleUserEntrySet() {
        UserEntry ue = getSampleUserEntry();
        UserEntrySet ues = new UserEntrySet(getEndpointUrl());
        ues.setEntries(new UserEntry[] { ue });
       
        return ues;
    }
View Full Code Here

Examples of org.apache.roller.webservices.adminapi.sdk.UserEntry

       
        return mesResponse;
    }
   
    protected UserEntrySet deleteSampleUser() throws IOException, JDOMException, MissingElementException, UnexpectedRootElementException {
        UserEntry ue = getSampleUserEntry();
       
        HttpResponse res = delete(ue.getHref(), getUser(), getPassword());
        assertEquals(200, res.getStatus());
       
        UserEntrySet uesResponse = null;
        InputStream responseBody = res.getResponseBody();
        if (responseBody != null) {
View Full Code Here

Examples of org.apache.roller.webservices.adminapi.sdk.UserEntry

       
        return uesResponse;
    }

    protected UserEntrySet fetchSampleUser() throws IOException, JDOMException, MissingElementException, UnexpectedRootElementException {
        UserEntry ue = getSampleUserEntry();
       
        HttpResponse res = get(ue.getHref(), getUser(), getPassword());
        assertEquals(200, res.getStatus());
       
        UserEntrySet uesResponse = null;
        InputStream responseBody = res.getResponseBody();
        if (responseBody != null) {
View Full Code Here

Examples of org.apache.roller.webservices.adminapi.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.webservices.adminapi.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());
                }
                UserData ud = toUserData(entry);
                mgr.addUser(ud);
                userDatas.add(ud);
            }
View Full Code Here

Examples of org.apache.roller.webservices.adminapi.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];
                UserData ud = mgr.getUserByUsername(entry.getName());
                if (ud == null) {
                    throw new NotFoundException("ERROR: Unknown user: " + entry.getName());
                }
                updateUserData(ud, entry);
               
                mgr.saveUser(ud);
                CacheManager.invalidate(ud);
View Full Code Here

Examples of org.apache.roller.webservices.adminapi.sdk.UserEntry

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

Examples of org.apache.roller.webservices.adminapi.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
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.