Package org.apache.abdera.factory

Examples of org.apache.abdera.factory.Factory.newEntry()


        Abdera abdera = new Abdera();
        Factory factory = abdera.getFactory();

        // Create the entry that will be posted
        Entry entry = factory.newEntry();
        entry.setId(FOMHelper.generateUuid());
        entry.setUpdated(new java.util.Date());
        entry.addAuthor("James");
        entry.setTitle("Posting to Roller");
        entry.setContentAsHtml("<p>This is an example post to Roller</p>");
View Full Code Here


        Abdera abdera = new Abdera();

        // Prepare the entry
        Factory factory = abdera.getFactory();
        Entry entry = factory.newEntry();
        entry.setId(FOMHelper.generateUuid());
        entry.setUpdated(new java.util.Date());
        entry.addAuthor("James");
        entry.setTitle("New Calendar Event");
        entry.setContentAsXhtml("<p>A new calendar event</p>");
View Full Code Here

    @Test
    public void testMedia() throws Exception {

        Abdera abdera = new Abdera();
        Factory factory = abdera.getFactory();
        Entry entry = factory.newEntry();
        MediaGroup group = entry.addExtension(GROUP);
        MediaContent content = group.addExtension(CONTENT);
        content.setUrl("http://example.org");
        content.setBitrate(123);
        content.setChannels(2);
View Full Code Here

    // MediaCollection role
    public Entry postMedia(String title, String slug, String contentType, InputStream media) {
        System.out.println(">>> MediaCollectionImpl.postMedia title=" + title + ", slug=" + slug + ", contentType=" + contentType );

        Factory factory = abdera.getFactory();
        Entry entry = factory.newEntry();
        // Must provide entry to media as per Atom Pub spec (http://tools.ietf.org/html/rfc5023#section-9.6)
        // <?xml version="1.0"?>
        // <entry xmlns="http://www.w3.org/2005/Atom">
        //   <title>The Beach</title> (REQUIRED)
        //   <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id> (REQUIRED)
View Full Code Here

    //        </entry>   
   
    // Testing of entry creation
    Factory factory = abdera.getFactory();
    String customerName = "Fred Farkle";
    Entry entry = factory.newEntry();
    entry.setTitle("customer " + customerName);
    entry.setUpdated(new Date());
    entry.addAuthor("Apache Tuscany");
    // ID created by collection.
        // entry.setId(id); // auto-provided
View Full Code Here

    //         <content>Update: it's a hoax!</content>
    //       </entry>
    // Testing of entry creation
    Factory factory = abdera.getFactory();
    String customerName = "Molly Ringwald";
    Entry entry = factory.newEntry();
    entry.setTitle("customer " + customerName);
    entry.setUpdated( new Date());
    entry.addAuthor("Apache Tuscany");
    String id = eTag.substring( 1, eTag.length()-1);
        entry.setId(id); // auto-provided
View Full Code Here

  public void testPost() throws Exception {
    System.out.println(">>>ContentNegotiationTest.testPost");
    // Testing of entry creation
    Factory factory = abdera.getFactory();
    String customerName = "Fred Farkle";
    Entry entry = factory.newEntry();
    entry.setTitle("customer " + customerName);
    entry.setUpdated(new Date());
    entry.addAuthor("Apache Tuscany");
    // ID created by collection.
    Content content = abdera.getFactory().newContent();
View Full Code Here

    public void testModifiedGetIfNoneMatch() throws Exception {   
    System.out.println(">>>ProviderFeedEntityTagsTestCase.testFeedModifiedGetIfNoneMatch");
    // Post some new content to the feed.
    Factory factory = abdera.getFactory();
    String customerName = "Fred Farkle";
    Entry entry = factory.newEntry();
    entry.setTitle("customer " + customerName);
    entry.setUpdated(new Date());
    entry.addAuthor("Apache Tuscany");
    Content content = abdera.getFactory().newContent();
    content.setContentType(Content.Type.TEXT);
View Full Code Here

    public void testModifiedGetIfNoneMatch() throws Exception {
        //System.out.println(">>>ProviderFeedEntityTagsTestCase.testFeedModifiedGetIfNoneMatch");
        // Post some new content to the feed.
        Factory factory = abdera.getFactory();
        String customerName = "Fred Farkle";
        Entry entry = factory.newEntry();
        entry.setTitle("customer " + customerName);
        entry.setUpdated(new Date());
        entry.addAuthor("Apache Tuscany");
        Content content = abdera.getFactory().newContent();
        content.setContentType(Content.Type.TEXT);
View Full Code Here

        //        </entry>

        // Testing of entry creation
        Factory factory = abdera.getFactory();
        String customerName = "Fred Farkle";
        Entry entry = factory.newEntry();
        entry.setTitle("customer " + customerName);
        entry.setUpdated(new Date());
        entry.addAuthor("Apache Tuscany");
        // ID created by collection.
        // entry.setId(id); // auto-provided
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.