/** * Returns the link that provides the URI that can be used to edit the entry. * * @return Link that provides the URI that can be used to edit the entry or * {@code null} for none. */ public Link getEditLink() { return getLink(Link.Rel.ENTRY_EDIT, Link.Type.ATOM); }
/** * 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); }
@SuppressWarnings("unchecked") @Override public List<BaseContentEntry<?>> getEntries(Query query, SitesService sitesService) throws IOException, ServiceException { checkNotNull(query, "query"); checkNotNull(sitesService, "sitesService"); List<BaseContentEntry> baseEntries = sitesService.getFeed(query, ContentFeed.class).getEntries(); List<BaseContentEntry<?>> adaptedEntries = Lists.newLinkedList(); for (BaseContentEntry entry : baseEntries) { BaseContentEntry<?> adaptedEntry = (BaseContentEntry<?>) entry.getAdaptedEntry(); if (adaptedEntry == null) { adaptedEntries.add(entry); } else { adaptedEntries.add(adaptedEntry); } } return adaptedEntries; } }
/** * 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 link that provides the URI that can be used to edit the entry. * * @return Link that provides the URI that can be used to edit the entry or * {@code null} for none. */ public Link getEditLink() { return getLink(Link.Rel.ENTRY_EDIT, Link.Type.ATOM); }