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