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

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


       
        return ueUpdate;
    }
   
    protected static WeblogEntry updateSampleWeblogEntry(WeblogEntry we) {
        WeblogEntry weUpdate = new WeblogEntry(we.getHandle(), getEndpointUrl());
        weUpdate.setEmailAddress("billy@bob.org");
        weUpdate.setName("Billy Bob Weblog Name");
        weUpdate.setLocale(new Locale("ms", "MY"));
        weUpdate.setTimezone(TimeZone.getTimeZone("Asia/Kuala_Lumpur"));
        weUpdate.setDescription("Billy Bob Weblog Description");
        weUpdate.setCreatingUser(we.getCreatingUser());
        weUpdate.setEnabled(Boolean.FALSE);
       
        return weUpdate;
    }
View Full Code Here


       
        return uesUpdated;
    }
   
    protected static WeblogEntrySet updateSampleWeblogEntrySet(WeblogEntrySet wes) {
        WeblogEntry we = (WeblogEntry)wes.getEntries()[0];
        WeblogEntry weUpdated = updateSampleWeblogEntry(we);
        WeblogEntrySet wesUpdated = new WeblogEntrySet(getEndpointUrl());
        wesUpdated.setEntries(new WeblogEntry[] { weUpdated });
       
        return wesUpdated;
    }
View Full Code Here

       
        return mesUpdated;
    }
   
    protected static WeblogEntry getSampleWeblogEntry() {
        WeblogEntry we = new WeblogEntry("fooblog", getEndpointUrl());
        we.setEmailAddress("foo@bar.org");
        we.setCreatingUser("foo");
        we.setDescription("Foo Weblog Description");
        we.setLocale(Locale.getDefault());
        we.setTimezone(TimeZone.getDefault());
        we.setName("Foo Weblog Name");
        we.setEnabled(Boolean.TRUE);
       
        return we;
    }
View Full Code Here

       
        return ues;
    }
   
    protected static WeblogEntrySet getSampleWeblogEntrySet() {
        WeblogEntry we = getSampleWeblogEntry();
        WeblogEntrySet wes = new WeblogEntrySet(getEndpointUrl());
        wes.setEntries(new WeblogEntry[] { we });
       
        return wes;
    }
View Full Code Here

    public void testEnabled() {
        try {
            createSampleUser();
            WeblogEntrySet wes = createSampleWeblog();
            WeblogEntry we = (WeblogEntry)wes.getEntries()[0];
            assertEquals(we.getEnabled(), Boolean.TRUE);
           
            wes = updateSampleWeblog();
            we = (WeblogEntry)wes.getEntries()[0];
            assertEquals(Boolean.FALSE, we.getEnabled());

            wes = fetchSampleWeblog();
            we = (WeblogEntry)wes.getEntries()[0];
            assertEquals(Boolean.FALSE, we.getEnabled());
        } catch (IOException ioe) {
            fail(ioe.getMessage());
            ioe.printStackTrace();
        } catch (JDOMException je) {
            fail(je.getMessage());
View Full Code Here

       
        return ueUpdate;
    }

    protected static WeblogEntry updateSampleWeblogEntry(WeblogEntry we) {
        WeblogEntry weUpdate = new WeblogEntry(we.getHandle(), getEndpointUrl());
        weUpdate.setEmailAddress("billy@bob.org");
        weUpdate.setName("Billy Bob Weblog Name");
        weUpdate.setLocale(new Locale("ms", "MY"));
        weUpdate.setTimezone(TimeZone.getTimeZone("Asia/Kuala_Lumpur"));
        weUpdate.setDescription("Billy Bob Weblog Description");
        weUpdate.setCreatingUser(we.getCreatingUser());
       
        return weUpdate;
    }
View Full Code Here

       
        return uesUpdated;
    }
   
    protected static WeblogEntrySet updateSampleWeblogEntrySet(WeblogEntrySet wes) {
        WeblogEntry we = (WeblogEntry)wes.getEntries()[0];
        WeblogEntry weUpdated = updateSampleWeblogEntry(we);       
        WeblogEntrySet wesUpdated = new WeblogEntrySet(getEndpointUrl());
        wesUpdated.setEntries(new WeblogEntry[] { weUpdated });
       
        return wesUpdated;
    }
View Full Code Here

       
        return mesUpdated;
    }

    protected static WeblogEntry getSampleWeblogEntry() {
        WeblogEntry we = new WeblogEntry("fooblog", getEndpointUrl());
        we.setEmailAddress("foo@bar.org");
        we.setCreatingUser("foo");
        we.setDescription("Foo Weblog Description");
        we.setLocale(Locale.getDefault());
        we.setTimezone(TimeZone.getDefault());
        we.setName("Foo Weblog Name");
       
        return we;
    }   
View Full Code Here

       
        return ues;
    }
   
    protected static WeblogEntrySet getSampleWeblogEntrySet() {
        WeblogEntry we = getSampleWeblogEntry();
        WeblogEntrySet wes = new WeblogEntrySet(getEndpointUrl());
        wes.setEntries(new WeblogEntry[] { we });
       
        return wes;
    }
View Full Code Here

       
        return uesResponse;
    }

    protected WeblogEntrySet fetchSampleWeblog() throws IOException, JDOMException, MissingElementException, UnexpectedRootElementException {
        WeblogEntry we = getSampleWeblogEntry();
       
        HttpResponse res = get(we.getHref(), getUser(), getPassword());
        assertEquals(200, res.getStatus());
       
        WeblogEntrySet wesResponse = null;
        InputStream responseBody = res.getResponseBody();
        if (responseBody != null) {
View Full Code Here

TOP

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

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.