/** * Default mutable constructor. */ public AnnouncementEntry() { super(); getCategories().add(CATEGORY); }
/** * Returns the replies sites link. * * @return Replies sites link or {@code null} for none. */ public Link getHtmlRepliesLink() { return getLink(SitesLink.Rel.REPLIES, Link.Type.HTML); }
/** * Declare the extensions of the feeds for the Google Sites Data API. */ private void declareExtensions() { extProfile.setAutoExtending(true); new ActivityFeed().declareExtensions(extProfile); new AnnouncementEntry().declareExtensions(extProfile); new AnnouncementsPageEntry().declareExtensions(extProfile); new AttachmentEntry().declareExtensions(extProfile); new CommentEntry().declareExtensions(extProfile); new ContentFeed().declareExtensions(extProfile); new CreationActivityEntry().declareExtensions(extProfile); new DeletionActivityEntry().declareExtensions(extProfile); new EditActivityEntry().declareExtensions(extProfile); new FileCabinetPageEntry().declareExtensions(extProfile); new ListItemEntry().declareExtensions(extProfile); new ListPageEntry().declareExtensions(extProfile); new MoveActivityEntry().declareExtensions(extProfile); new RecoveryActivityEntry().declareExtensions(extProfile); new RevisionFeed().declareExtensions(extProfile); new WebAttachmentEntry().declareExtensions(extProfile); new WebPageEntry().declareExtensions(extProfile); BatchUtils.declareExtensions(extProfile); }
BaseContentEntry<?> entry = null; if (hasClass(element, "announcement")) { entry = new AnnouncementEntry(); } else if (hasClass(element, "announcementspage")) { entry = new AnnouncementsPageEntry();
@Override public XmlElement renderAnnouncements( List<AnnouncementEntry> announcements) { XmlElement div = new XmlElement("div"); for (AnnouncementEntry announcement : announcements) { div.addElement(new XmlElement("hr")); XmlElement announceDiv = RendererUtils.getEntryElement(announcement, "blockquote"); XmlElement title = new XmlElement("b"); String href = announcement.getPageName().getValue() + "/index.html"; XmlElement titleLink = new XmlElement("a").addElement( RendererUtils.getTitleElement(announcement)); titleLink.setAttribute("href", href); title.addElement(titleLink); announceDiv.addElement(title).addElement(new XmlElement("br")); XmlElement info = new XmlElement("small"); XmlElement author = RendererUtils.getAuthorElement(announcement); info.addText("posted by ").addElement(author); XmlElement updated = RendererUtils.getUpdatedElement(announcement); info.addText(" on ").addElement(updated); announceDiv.addElement(info).addElement(new XmlElement("br")); XmlElement mainHtml = RendererUtils.getXhtmlContentElement(announcement); announceDiv.addElement(mainHtml); div.addElement(announceDiv); } return div; } }
/** * Declare the extensions of the feeds for the Google Sites Data API. */ private void declareExtensions() { new AclFeed().declareExtensions(extProfile); new SiteFeed().declareExtensions(extProfile); /* Declarations for extensions that need to be handled as specific type * should be done before call to {@see ExtensionProfile#setAutoExtending}. * Order of declaration is important. */ extProfile.setAutoExtending(true); new ActivityFeed().declareExtensions(extProfile); new AnnouncementEntry().declareExtensions(extProfile); new AnnouncementsPageEntry().declareExtensions(extProfile); new AttachmentEntry().declareExtensions(extProfile); new CommentEntry().declareExtensions(extProfile); new ContentFeed().declareExtensions(extProfile); new CreationActivityEntry().declareExtensions(extProfile); new DeletionActivityEntry().declareExtensions(extProfile); new EditActivityEntry().declareExtensions(extProfile); new FileCabinetPageEntry().declareExtensions(extProfile); new ListItemEntry().declareExtensions(extProfile); new ListPageEntry().declareExtensions(extProfile); new MoveActivityEntry().declareExtensions(extProfile); new RecoveryActivityEntry().declareExtensions(extProfile); new RevisionFeed().declareExtensions(extProfile); new WebAttachmentEntry().declareExtensions(extProfile); new WebPageEntry().declareExtensions(extProfile); BatchUtils.declareExtensions(extProfile); }
/** * Returns the attachments sites link. * * @return Attachments sites link or {@code null} for none. */ public Link getHtmlAttachmentsLink() { return getLink(SitesLink.Rel.ATTACHMENTS, Link.Type.HTML); }
/** * Default mutable constructor. */ public AnnouncementEntry() { super(); getCategories().add(CATEGORY); }
/** * Returns the attachments sites link. * * @return Attachments sites link or {@code null} for none. */ public Link getHtmlAttachmentsLink() { return getLink(SitesLink.Rel.ATTACHMENTS, Link.Type.HTML); }
/** * Returns the parent sites link. * * @return Parent sites link or {@code null} for none. */ public Link getParentLink() { return getLink(SitesLink.Rel.PARENT, Link.Type.ATOM); }
/** * Returns the attachments sites link. * * @return Attachments sites link or {@code null} for none. */ public Link getAtomAttachmentsLink() { return getLink(SitesLink.Rel.ATTACHMENTS, Link.Type.ATOM); }
/** * Returns the replies sites link. * * @return Replies sites link or {@code null} for none. */ public Link getHtmlRepliesLink() { return getLink(SitesLink.Rel.REPLIES, Link.Type.HTML); }
/** * Returns the attachments sites link. * * @return Attachments sites link or {@code null} for none. */ public Link getAtomAttachmentsLink() { return getLink(SitesLink.Rel.ATTACHMENTS, Link.Type.ATOM); }
/** * Returns the replies sites link. * * @return Replies sites link or {@code null} for none. */ public Link getAtomRepliesLink() { return getLink(SitesLink.Rel.REPLIES, Link.Type.ATOM); }
/** * Returns the parent sites link. * * @return Parent sites link or {@code null} for none. */ public Link getParentLink() { return getLink(SitesLink.Rel.PARENT, Link.Type.ATOM); }
/** * Returns the replies sites link. * * @return Replies sites link or {@code null} for none. */ public Link getAtomRepliesLink() { return getLink(SitesLink.Rel.REPLIES, Link.Type.ATOM); }