View Javadoc

1   /*
2    * $Id: EntryEventPublisher.java 20321 2010-11-24 15:21:24Z dfeist $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  package org.mule.module.atom.event;
11  
12  import java.util.Date;
13  
14  import org.apache.abdera.Abdera;
15  import org.apache.abdera.factory.Factory;
16  import org.apache.abdera.model.Entry;
17  
18  public class EntryEventPublisher
19  {
20      public Entry newEvent()
21      {
22          Factory factory = Abdera.getInstance().getFactory();
23  
24          Entry entry = factory.newEntry();
25          entry.setTitle("Some Event");
26          entry.setContent("Foo bar");
27          entry.setUpdated(new Date());
28          entry.setId(factory.newUuidUri());
29          entry.addAuthor("Dan Diephouse");
30  
31          return entry;
32      }
33  }