public interface BlogPostDao extends VersionedObjectDao<BlogPost>
Modifier and Type | Method and Description |
---|---|
int |
countBlogsWithUnpublishedChanges()
Counts the number of published blog posts that have unpublished changes.
|
int |
countCurrentBlogs()
Counts the total number of current blog posts across all spaces
|
int |
countDraftBlogs()
Counts the number of blog posts that are drafts.
|
@Nullable BlogPost |
getBlogPost(@NonNull Space space,
@NonNull String title,
@NonNull Calendar day,
boolean eagerLoadComments)
Get the blog post by name and date.
|
BlogPost |
getBlogPost(String spaceKey,
String title,
Calendar day)
Deprecated.
since 5.9.1. Use
getBlogPost(Space, String, Calendar, boolean) instead. |
BlogPost |
getBlogPost(String spaceKey,
String title,
Calendar day,
boolean eagerLoadComments)
Deprecated.
since 5.9.1. Use
getBlogPost(Space, String, Calendar, boolean) instead. |
BlogPost |
getBlogPostByTitle(String spaceKey,
String title)
Get a blog post by name.
|
int |
getBlogPostCount()
Counts the total number of blog posts, for all spaces and posting dates.
|
long |
getBlogPostCount(String spaceKey,
Calendar postingDate,
int period)
Get total number of blogPost.
|
List<Date> |
getBlogPostDates(@NonNull Space space)
Returns a list of creation dates for all the blog posts in a space.
|
List<Date> |
getBlogPostDates(String spaceKey)
Deprecated.
since 5.9.1. Use
getBlogPostDates(Space) instead. |
List<Date> |
getBlogPostDates(String spaceKey,
Calendar date,
int period)
Returns a list of creation dates for all the blog posts in a space for a particular period.
|
List<BlogPost> |
getBlogPosts(Space space,
boolean currentOnly)
Return an iterator for the specified space.
|
List<BlogPost> |
getBlogPosts(@NonNull Space space,
@NonNull Calendar date,
int period)
Get the blog posts in a space for a particular period.
|
List<BlogPost> |
getBlogPosts(@NonNull Space space,
@NonNull Calendar postingDate,
int period,
int startIndex,
int maxResultCount)
Get list of blogPost by Date.
|
List |
getBlogPosts(String spaceKey,
Calendar date,
int period)
Deprecated.
since 5.9.1. Use
getBlogPosts(Space, Calendar, int) instead. |
List |
getBlogPosts(String spaceKey,
Calendar postingDate,
int period,
int startIndex,
int maxResultCount)
Deprecated.
since 5.9.1. Use
getBlogPosts(Space, Calendar, int, int, int) instead. |
List<BlogPost> |
getBlogPostsInTrash(String spaceKey,
String title)
Gets a blog post that is in the trash for a given space that matches the given title.
|
Optional<BlogPostStatisticsDTO> |
getBlogPostStatistics()
Fetches statistics about blog posts
|
BlogPost |
getById(long id)
Get a blog post by id.
|
List<Long> |
getCurrentBlogPostIds()
Return a list of ids for all current blog posts.
|
BlogPost |
getFirstPostAfter(BlogPost post)
Used for finding the "previous" post to an existing post.
|
BlogPost |
getFirstPostAfter(String spaceKey,
Date creationDate)
Used for finding the "previous" post to an existing post
|
BlogPost |
getFirstPostBefore(BlogPost post)
Used for finding the "previous" post to an existing post.
|
BlogPost |
getFirstPostBefore(String spaceKey,
Date creationDate)
Used for finding the "previous" post to an existing post
|
BlogPost |
getMostRecentBlogPost(String spaceKey) |
List<BlogPost> |
getRecentlyAddedBlogPosts(int maxPosts,
Date timeSince,
String spaceKey) |
List<BlogPost> |
getRecentlyAddedBlogPosts(int maxCount,
@Nullable String spaceKey)
Get list of recently created blog posts.
|
findLatestVersionsCount, findLatestVersionsIterator, save
findAll, findAllSorted, findAllSorted, findByClassIds, getPersistentClass, refresh, remove, replicate, save, saveRaw
BlogPost getById(long id)
BlogPost getBlogPostByTitle(String spaceKey, String title)
spaceKey
- the spacetitle
- the title@Deprecated BlogPost getBlogPost(String spaceKey, String title, Calendar day)
getBlogPost(Space, String, Calendar, boolean)
instead.spaceKey
- the space to look for the post intitle
- the title of the post we are looking forday
- the DAY the post was created on. Any part of the calendar more specific than
a day will be ignoredList<BlogPost> getBlogPostsInTrash(String spaceKey, String title)
spaceKey
- The space key (case-insensitive) in which to look for the blogtitle
- The title (case-insensitive) of the blog to look for@Deprecated BlogPost getBlogPost(String spaceKey, String title, Calendar day, boolean eagerLoadComments)
getBlogPost(Space, String, Calendar, boolean)
instead.spaceKey
- the space to look for the post intitle
- the title of the post we are looking forday
- the DAY the post was created on. Any part of the calendar more specific than
a day will be ignored@Nullable BlogPost getBlogPost(@NonNull Space space, @NonNull String title, @NonNull Calendar day, boolean eagerLoadComments)
space
- the space to look for the post intitle
- the title of the post we are looking forday
- the DAY the post was created on. Any part of the calendar more specific than
a day will be ignored@Deprecated List getBlogPosts(String spaceKey, Calendar date, int period)
getBlogPosts(Space, Calendar, int)
instead.TODO: add Calendar.WEEK range support.
spaceKey
- the space to look for posts indate
- a calendar object representing the date range we are looking for. Any part of
the calendar more specific than the supplied period will be ignored.period
- one of the Calendar constants specifying the granularity of the search.
currently, only Calendar.MONTH and Calendar.DATE are supportedList<BlogPost> getBlogPosts(@NonNull Space space, @NonNull Calendar date, int period)
TODO: add Calendar.WEEK range support.
space
- the space to look for posts indate
- a calendar object representing the date range we are looking for. Any part of
the calendar more specific than the supplied period will be ignored.period
- one of the Calendar constants specifying the granularity of the search.
currently, only Calendar.MONTH and Calendar.DATE are supportedList<BlogPost> getBlogPosts(Space space, boolean currentOnly)
List<Long> getCurrentBlogPostIds()
@Deprecated List<Date> getBlogPostDates(String spaceKey)
getBlogPostDates(Space)
instead.List<Date> getBlogPostDates(@NonNull Space space)
List<Date> getBlogPostDates(String spaceKey, Calendar date, int period)
spaceKey
- the space to look for posts in.date
- a calendar object representing the date range we are looking for. Any part of
the calendar more specific than the supplied period will be ignored.period
- one of the Calendar constants specifying the granularity of the search.
currently, only Calendar.YEAR, Calendar.MONTH and Calendar.DATE are supportedList<BlogPost> getRecentlyAddedBlogPosts(int maxCount, @Nullable String spaceKey)
maxCount
- Maximum number of posts to returnspaceKey
- the spaceKey to look for the posts in. If this key is null, we look acrosns
all spacesBlogPost getFirstPostBefore(String spaceKey, Date creationDate)
spaceKey
- the space to look increationDate
- the date the post must be beforeBlogPost getFirstPostAfter(String spaceKey, Date creationDate)
spaceKey
- the space to look increationDate
- the date the post must be afterBlogPost getFirstPostBefore(BlogPost post)
post
- the blog post that this must preceedBlogPost getFirstPostAfter(BlogPost post)
post
- the blog post that this must be afterList<BlogPost> getRecentlyAddedBlogPosts(int maxPosts, Date timeSince, String spaceKey)
@Deprecated List getBlogPosts(String spaceKey, Calendar postingDate, int period, int startIndex, int maxResultCount)
getBlogPosts(Space, Calendar, int, int, int)
instead.spaceKey
- the space to look for posts inpostingDate
- a calendar object representing the date range we are looking for. Any part of
the calendar more specific than the supplied period will be ignored.period
- one of the Calendar constants specifying the granularity of the search.
currently, only Calendar.MONTH and Calendar.DATE are supportedstartIndex
- start number of postsmaxResultCount
- Maximum number of posts to returnList<BlogPost> getBlogPosts(@NonNull Space space, @NonNull Calendar postingDate, int period, int startIndex, int maxResultCount)
space
- the space to look for posts inpostingDate
- a calendar object representing the date range we are looking for. Any part of
the calendar more specific than the supplied period will be ignored.period
- one of the Calendar constants specifying the granularity of the search.
currently, only Calendar.MONTH and Calendar.DATE are supportedstartIndex
- start number of postsmaxResultCount
- Maximum number of posts to returnlong getBlogPostCount(String spaceKey, Calendar postingDate, int period)
spaceKey
- the space to look for posts inpostingDate
- a calendar object representing the date range we are looking for. Any part of
the calendar more specific than the supplied period will be ignored.period
- one of the Calendar constants specifying the granularity of the search.
currently, only Calendar.MONTH and Calendar.DATE are supportedint getBlogPostCount()
int countCurrentBlogs()
int countDraftBlogs()
int countBlogsWithUnpublishedChanges()
Optional<BlogPostStatisticsDTO> getBlogPostStatistics()
Copyright © 2003–2020 Atlassian. All rights reserved.