Package yarfraw.core.datamodel

Examples of yarfraw.core.datamodel.ChannelFeed


  
   @SuppressWarnings("unchecked")
   @Override
   public void encodeBegin(FacesContext facesContext) throws IOException
   {
      ChannelFeed channelFeed = (ChannelFeed) Contexts.getEventContext().get(FEED_IMPL_KEY);

      ItemEntry itemEntry = new ItemEntry();
      itemEntry.setUid(getUid());
      itemEntry.setTitle(makeText(getTitle()));
      itemEntry.addLink(getLink());
      String author = getAuthor();
      if (author != null)
      {
         Person authorPerson = new Person();
         authorPerson.setName(author);
         itemEntry.addAuthorOrCreator(authorPerson);
      }
      itemEntry.setDescriptionOrSummary(makeText(getSummary()));
      if (getUpdated() != null) {
         itemEntry.setUpdatedDate(getUpdated(), new SimpleDateFormat(ATOM_DATE_FORMAT));
      }
      if (getPublished() != null) {
         itemEntry.setPubDate(getPublished(), new SimpleDateFormat(ATOM_DATE_FORMAT));
      }

      channelFeed.addItem(itemEntry);
   }
View Full Code Here


   @SuppressWarnings("unchecked")
   @Override
   public void encodeBegin(FacesContext facesContext) throws IOException
   {
      ChannelFeed channelFeed = new ChannelFeed();
      channelFeed.setUid(getUid());
      channelFeed.setTitle(getTitle());
      channelFeed.setDescriptionOrSubtitle(getSubtitle());
      if (getUpdated() != null)
      {
         channelFeed.setPubDate(getUpdated(), new SimpleDateFormat(ATOM_DATE_FORMAT));
      }
      channelFeed.addLink(getLink());
      Contexts.getEventContext().set(FEED_IMPL_KEY, channelFeed);
   }
View Full Code Here

   }

   @Override
   public void encodeEnd(FacesContext facesContext) throws IOException
   {
      ChannelFeed channelFeed = (ChannelFeed) Contexts.getEventContext().get(FEED_IMPL_KEY);
      ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
      try
      {
         FeedWriter.writeChannel(feedFormat, channelFeed, byteStream);
      }
View Full Code Here

TOP

Related Classes of yarfraw.core.datamodel.ChannelFeed

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.