Class BlogService
java.lang.Object
fr.paris.lutece.plugins.blog.service.BlogService
This Service manages document actions (create, update, delete, validate ...) .
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateBlog(Blog blog) Create an blogvoidcreateBlog(Blog blog, List<DocContent> docContent) Create an blogvoiddeleteBlog(int nId) Remove an blogvoiddeleteBlogVersion(int nIdBlog, int nVersion) Delete the specified version from a blog's historyfindByFilter(BlogFilter filter) Returns a collection of blog objectsfindByPrimaryKeyWithoutBinaries(int nIdDocument) Returns an instance of a blog without binairie file whose identifier is specified in parametervoidfireCreateBlogEvent(int blogId) voidfireDeleteBlogEvent(int blogId) voidfireUpdateBlogEvent(int blogId) static BlogServiceGet the unique instance of the servicegetLastBlogVersionsList(int nIdBlog, int nLimit) Retrieve the last nLimit versions of a specific blog and returns them as a listgetLastModifiedBlogsList(int nLimit) Load the data of nLimit last modified Blog objects and returns them as a listLoad the data of all the blog objects and returns them as a listReturns a list of a blog without binairie file whose identifier is specified in parameterloadBlog(int nIdDocument) Returns an instance of a blog whose identifier is specified in parameterloadBlogByVersion(int nIdDocument, int nVersion) Returns an instance of a blog whose identifier and version is specified in parametervoidRevert the content of a blog to its previous version's content, and delete the one currently used (no new version is created)searchListBlogByTag(int nIdTag) Load the data of all the blog objects whose tag is specified in parametervoidupdateBlog(Blog blog) Update an BlogvoidupdateBlog(Blog blog, List<DocContent> docContent) Update an BlogvoidupdateBlogWithoutVersion(Blog blog, List<DocContent> docContent) Update an Blog
-
Constructor Details
-
BlogService
public BlogService()
-
-
Method Details
-
getInstance
Get the unique instance of the service- Returns:
- The unique instance
-
createBlog
Create an blog- Parameters:
blog- The Blog
-
updateBlog
Update an Blog- Parameters:
blog- The Blog
-
deleteBlog
public void deleteBlog(int nId) Remove an blog- Parameters:
nId- The blog id
-
deleteBlogVersion
public void deleteBlogVersion(int nIdBlog, int nVersion) Delete the specified version from a blog's history- Parameters:
nIdBlog- The ID of the blog to processnIdVersion- The value of the version to delete
-
revertBlogToPreviousVersion
Revert the content of a blog to its previous version's content, and delete the one currently used (no new version is created)- Parameters:
blog- The Blog Object that will be processed
-
getLastBlogVersionsList
Retrieve the last nLimit versions of a specific blog and returns them as a list- Parameters:
nIdBlog- The ID of the blog to processnLimit- Maximum amount of Blog Object versions to return- Returns:
- The list which contains the data of nLimit last modified Blog objects
-
createBlog
Create an blog- Parameters:
blog- The BlogdocContent- The Doc content
-
updateBlog
Update an Blog- Parameters:
blog- The BlogdocContent- The Doc Content
-
updateBlogWithoutVersion
Update an Blog- Parameters:
blog- The blogdocContent- The Doc Content
-
loadBlog
Returns an instance of a blog whose identifier is specified in parameter- Parameters:
nIdDocument- The blog primary key- Returns:
- an instance of blog
-
loadBlogByVersion
Returns an instance of a blog whose identifier and version is specified in parameter- Parameters:
nIdDocument- The blog primary keynIdDocument- The blog primary key- Returns:
- an instance of blog
-
findByPrimaryKeyWithoutBinaries
Returns an instance of a blog without binairie file whose identifier is specified in parameter- Parameters:
nIdDocument- The blog primary key- Returns:
- an instance of blog
-
getListBlogWhithBinaries
Load the data of all the blog objects and returns them as a list- Returns:
- the list which contains the data of all the blog objects
-
getListBlogWithoutBinaries
Returns a list of a blog without binairie file whose identifier is specified in parameter- Returns:
- the list which contains the data of all the blog objects
-
searchListBlogByTag
Load the data of all the blog objects whose tag is specified in parameter- Parameters:
nIdTag- idTag param- Returns:
- the list which contains the data of all the blog objects
-
findByFilter
Returns a collection of blog objects- Parameters:
filter- The filter- Returns:
- The list of blog post
-
getLastModifiedBlogsList
Load the data of nLimit last modified Blog objects and returns them as a list- Parameters:
nLimit- number of Blog to load- Returns:
- The list which contains the data of of nLimit last modified Blog objects
-
fireCreateBlogEvent
public void fireCreateBlogEvent(int blogId) -
fireUpdateBlogEvent
public void fireUpdateBlogEvent(int blogId) -
fireDeleteBlogEvent
public void fireDeleteBlogEvent(int blogId)
-