description = new SyndContentImpl(); description.setType( "text/plain" ); description.setValue( desc );
/** * {@inheritDoc} */ public SyndEntry getFeedEntry(ActivityEvent event, String suffix, XWikiContext context) { SyndEntry entry = new SyndEntryImpl(); String user = event.getUser(); String displayUser = context.getWiki().getUserName(user, null, false, context); entry.setAuthor(displayUser); event.setTitle(event.getTitle() + ".rss.title" + suffix); entry.setTitle(event.getDisplayTitle(context)); event.setBody(event.getBody() + ".rss.body" + suffix); SyndContentImpl sc = new SyndContentImpl(); sc.setValue(event.getDisplayBody(context)); sc.setType("text/html"); entry.setDescription(sc); String url; try { url = (new URL(context.getURL(), event.getUrl())).toString(); } catch (MalformedURLException e) { url = event.getUrl(); } entry.setLink(url); entry.setPublishedDate(event.getDate()); entry.setUpdatedDate(event.getDate()); return entry; }
/** * Sets the entry title. * <p> * @param title the entry title to set, <b>null</b> if none. * */ public void setTitle(String title) { if (_title == null) _title = new SyndContentImpl(); _title.setValue(title); }
/** * Sets the feed title. * <p> * @param title the feed title to set, <b>null</b> if none. * */ public void setTitle(String title) { if (_title == null) _title = new SyndContentImpl(); _title.setValue(title); }
/** * Sets the feed description. * <p> * @param description the feed description to set, <b>null</b> if none. * */ public void setDescription(String description) { if (_description == null) _description = new SyndContentImpl(); _description.setValue(description); }
/** * Sets the feed title. * <p> * @param title the feed title to set, <b>null</b> if none. * */ public void setTitle(String title) { if (_title == null) _title = new SyndContentImpl(); _title.setValue(title); }
/** * Sets the feed title. * <p> * @param title the feed title to set, <b>null</b> if none. * */ public void setTitle(String title) { if (_title == null) _title = new SyndContentImpl(); _title.setValue(title); }
/** * Sets the feed description. * <p> * @param description the feed description to set, <b>null</b> if none. * */ public void setDescription(String description) { if (_description == null) _description = new SyndContentImpl(); _description.setValue(description); }
/** * Sets the feed description. * <p> * @param description the feed description to set, <b>null</b> if none. * */ public void setDescription(String description) { if (_description == null) _description = new SyndContentImpl(); _description.setValue(description); }
/** * Sets the entry title. * <p> * @param title the entry title to set, <b>null</b> if none. * */ public void setTitle(String title) { if (_title == null) _title = new SyndContentImpl(); _title.setValue(title); }
/** * Sets the feed title. * <p> * @param title the feed title to set, <b>null</b> if none. * */ public void setTitle(String title) { if (_title == null) _title = new SyndContentImpl(); _title.setValue(title); }
entry = new SyndEntryImpl(); entry.setTitle("ROME v3.0"); entry.setLink("http://wiki.java.net/bin/view/Javawsxml/Rome03"); entry.setPublishedDate(DATE_PARSER.parse("2004-07-27")); description = new SyndContentImpl(); description.setType("text/html"); description.setValue("<p>More Bug fixes, mor API changes, some new features and some Unit testing</p>"+ "<p>For details check the <a href=\"http://wiki.java.net/bin/view/Javawsxml/RomeChangesLog#RomeV03\">Changes Log</a></p>"); entry.setDescription(description); entries.add(entry);
/** * Sets the entry title. * <p> * @param title the entry title to set, <b>null</b> if none. * */ public void setTitle(String title) { if (_title == null) _title = new SyndContentImpl(); _title.setValue(title); }
/** * Sets the entry title. * <p> * @param title the entry title to set, <b>null</b> if none. * */ public void setTitle(String title) { if (_title == null) _title = new SyndContentImpl(); _title.setValue(title); }
/** * Sets the feed description. * <p> * @param description the feed description to set, <b>null</b> if none. * */ public void setDescription(String description) { if (_description == null) _description = new SyndContentImpl(); _description.setValue(description); }
/** * Creates a new {@link SyndContent} instance for the given content type and value. * * @param type content type * @param value the content * @return a new {@link SyndContent} instance */ protected SyndContent getSyndContent(String type, String value) { SyndContent content = new SyndContentImpl(); content.setType(type); content.setValue(value); return content; }
protected SyndContent buildDescription(NexusArtifactEvent event) { SyndContent content = new SyndContentImpl(); content.setType(MediaType.TEXT_PLAIN.toString()); StringBuilder msg = new StringBuilder(); if (event.getMessage() != null) { msg.append(event.getMessage()); msg.append(' '); } msg.append(buildDescriptionMsgItem(event)); msg.append(buildDescriptionMsgAction(event)); msg.append(buildDescriptionMsgAuthor(event)); msg.append(buildDescriptionMsgAddress(event)); content.setValue(msg.toString()); return content; }
public static SyndContent content(String value, String mime, String mode) { final SyndContent c = new SyndContentImpl(); c.setValue(value); c.setType(mime); c.setMode(mode); return c; }
protected SyndContent createSyndContent(Content content) { SyndContent sContent = new SyndContentImpl(); sContent.setType(content.getType()); sContent.setValue(content.getValue()); return sContent; }
protected SyndContent createSyndContent(Content content) { SyndContent sContent = new SyndContentImpl(); sContent.setType(content.getType()); sContent.setValue(content.getValue()); return sContent; }