/** * 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); }
/** * Default mutable constructor. */ public CommentEntry() { super(); getCategories().add(CATEGORY); }
/** * Returns the in reply to. * * @return in reply to */ public InReplyTo getInReplyTo() { return getExtension(InReplyTo.class); }
/** * Sets the in reply to. * * @param inReplyTo in reply to or <code>null</code> to reset */ public void setInReplyTo(InReplyTo inReplyTo) { if (inReplyTo == null) { removeExtension(InReplyTo.class); } else { setExtension(inReplyTo); } }
/** * 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); }
entry = new AttachmentEntry(); } else if (hasClass(element, "comment")) { entry = new CommentEntry(); } else if (hasClass(element, "filecabinet")) { entry = new FileCabinetPageEntry();
/** * Returns whether it has the in reply to. * * @return whether it has the in reply to */ public boolean hasInReplyTo() { return hasExtension(InReplyTo.class); }
((CommentEntry) (BaseContentEntry) entry).setInReplyTo(inReplyTo); } else if (getType(entry) == LIST_ITEM) { if (getType(parent) != LIST_PAGE) {
/** * 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); }
/** * Sets the in reply to. * * @param inReplyTo in reply to or <code>null</code> to reset */ public void setInReplyTo(InReplyTo inReplyTo) { if (inReplyTo == null) { removeExtension(InReplyTo.class); } else { setExtension(inReplyTo); } }
/** * Returns whether it has the in reply to. * * @return whether it has the in reply to */ public boolean hasInReplyTo() { return hasExtension(InReplyTo.class); }
/** * 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); }
/** * Default mutable constructor. */ public CommentEntry() { super(); getCategories().add(CATEGORY); }
/** * Returns the in reply to. * * @return in reply to */ public InReplyTo getInReplyTo() { return getExtension(InReplyTo.class); }
EntryUtils.getXhtmlContent(comment)); ContentQuery query = new ContentQuery(feedUrl); String parentId = comment.getLink(SitesLink.Rel.PARENT, ILink.Type.ATOM) .getHref(); query.setParent(parentId.substring(parentId.lastIndexOf('/') + 1));