Package org.apache.roller.webservices.adminapi.sdk

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


        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


       
        return mes;
    }

    protected UserEntrySet createSampleUser() throws IOException, JDOMException, MissingElementException, UnexpectedRootElementException {
        UserEntrySet ues = getSampleUserEntrySet();
       
        String url = ues.getHref();
        String user = getUser();
        String password = getPassword();
       
        String body = ues.toString();
       
        HttpResponse res = post(url, user, password, body);
        assertEquals(201, res.getStatus());
       
        UserEntrySet uesResponse = null;
        InputStream responseBody = res.getResponseBody();
        if (responseBody != null) {
           uesResponse = new UserEntrySet(responseBody, getEndpointUrl());
        }
       
        return uesResponse;
    }
View Full Code Here

       
        return uesResponse;
    }

    protected UserEntrySet updateSampleUser() throws IOException, JDOMException, MissingElementException, UnexpectedRootElementException {
        UserEntrySet ues = updateSampleUserEntrySet(getSampleUserEntrySet());
       
        String url = ues.getHref();
        String user = getUser();
        String password = getPassword();
       
        String body = ues.toString();
       
        HttpResponse res = put(url, user, password, body);
        assertEquals(200, res.getStatus());
       
        UserEntrySet uesResponse = null;
        InputStream responseBody = res.getResponseBody();
        if (responseBody != null) {
           uesResponse = new UserEntrySet(responseBody, getEndpointUrl());
        }
       
        return uesResponse;
    }
View Full Code Here

        UserEntry ue = getSampleUserEntry();
       
        HttpResponse res = delete(ue.getHref(), getUser(), getPassword());
        assertEquals(200, res.getStatus());
       
        UserEntrySet uesResponse = null;
        InputStream responseBody = res.getResponseBody();
        if (responseBody != null) {
           uesResponse = new UserEntrySet(responseBody, getEndpointUrl());
        }
       
        return uesResponse;
    }
View Full Code Here

        UserEntry ue = getSampleUserEntry();
       
        HttpResponse res = get(ue.getHref(), getUser(), getPassword());
        assertEquals(200, res.getStatus());
       
        UserEntrySet uesResponse = null;
        InputStream responseBody = res.getResponseBody();
        if (responseBody != null) {
           uesResponse = new UserEntrySet(responseBody, getEndpointUrl());
        }
       
        return uesResponse;
    }
View Full Code Here

    public RollerUserHandler(HttpServletRequest request) throws HandlerException {
        super(request);
    }
   
    protected EntrySet getEntrySet(Document d) throws MissingElementException, UnexpectedRootElementException {
        return new UserEntrySet(d, getUrlPrefix());
    }
View Full Code Here

   
    private UserEntrySet toUserEntrySet(UserData[] uds) {
        if (uds == null) {
            throw new NullPointerException("ERROR: Null user data not allowed");
        }
        UserEntrySet ues = new UserEntrySet(getUrlPrefix());
       
        List entries = new ArrayList();
        for (int i = 0; i < uds.length; i++) {
            UserData ud = uds[i];
            Entry entry = toUserEntry(ud);
            entries.add(entry);
        }
        ues.setEntries((Entry[])entries.toArray(new Entry[0]));
       
        return ues;
    }
View Full Code Here

TOP

Related Classes of org.apache.roller.webservices.adminapi.sdk.UserEntrySet

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.