Class JournalArticleServiceWrapper
- All Implemented Interfaces:
JournalArticleService
,com.liferay.portal.kernel.service.BaseService
,com.liferay.portal.kernel.service.ServiceWrapper<JournalArticleService>
JournalArticleService
.- See Also:
- Generated:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddArticle
(String externalReferenceCode, long groupId, long folderId, long classNameId, long classPK, String articleId, boolean autoArticleId, Map<Locale, String> titleMap, Map<Locale, String> descriptionMap, Map<Locale, String> friendlyURLMap, String content, long ddmStructureId, String ddmTemplateKey, String layoutUuid, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, int reviewDateMonth, int reviewDateDay, int reviewDateYear, int reviewDateHour, int reviewDateMinute, boolean neverReview, boolean indexable, boolean smallImage, long smallImageId, int smallImageSource, String smallImageURL, File smallFile, Map<String, byte[]> images, String articleURL, com.liferay.portal.kernel.service.ServiceContext serviceContext) Adds a web content article with additional parameters.addArticle
(String externalReferenceCode, long groupId, long folderId, Map<Locale, String> titleMap, Map<Locale, String> descriptionMap, String content, long ddmStructureId, String ddmTemplateKey, com.liferay.portal.kernel.service.ServiceContext serviceContext) Adds a web content article.addArticleDefaultValues
(long groupId, long classNameId, long classPK, Map<Locale, String> titleMap, Map<Locale, String> descriptionMap, String content, long ddmStructureId, String ddmTemplateKey, String layoutUuid, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, int reviewDateMonth, int reviewDateDay, int reviewDateYear, int reviewDateHour, int reviewDateMinute, boolean neverReview, boolean indexable, boolean smallImage, long smallImageId, int smallImageSource, String smallImageURL, File smallImageFile, com.liferay.portal.kernel.service.ServiceContext serviceContext) copyArticle
(long groupId, String sourceArticleId, String targetArticleId, boolean autoArticleId, double version) Copies the web content article matching the group, article ID, and version.void
deleteArticle
(long groupId, String articleId, double version, String articleURL, com.liferay.portal.kernel.service.ServiceContext serviceContext) Deletes the web content article and its resources matching the group, article ID, and version, optionally sending email notifying denial of the web content article if it had not yet been approved.void
deleteArticle
(long groupId, String articleId, String articleURL, com.liferay.portal.kernel.service.ServiceContext serviceContext) Deletes all web content articles and their resources matching the group and article ID, optionally sending email notifying denial of article if it had not yet been approved.void
deleteArticleDefaultValues
(long groupId, String articleId, long ddmStructureId) expireArticle
(long groupId, String articleId, double version, String articleURL, com.liferay.portal.kernel.service.ServiceContext serviceContext) Expires the web content article matching the group, article ID, and version.void
expireArticle
(long groupId, String articleId, String articleURL, com.liferay.portal.kernel.service.ServiceContext serviceContext) Expires the web content article matching the group and article ID, expiring all of its versions if thejournal.article.expire.all.versions
portal property istrue
, otherwise expiring only its latest approved version.fetchArticle
(long groupId, String articleId) fetchLatestArticleByExternalReferenceCode
(long groupId, String externalReferenceCode) Returns the latest web content article matching the group and the external reference code.getArticle
(long id) Returns the web content article with the ID.getArticle
(long groupId, String articleId) Returns the latest approved web content article, or the latest unapproved article if none are approved.getArticle
(long groupId, String articleId, double version) Returns the web content article matching the group, article ID, and version.getArticle
(long groupId, String className, long classPK) Returns the web content article matching the group, class name, and class PK.getArticleByUrlTitle
(long groupId, String urlTitle) Returns the latest web content article that is approved, or the latest unapproved article if none are approved.getArticleContent
(long groupId, String articleId, double version, String languageId, com.liferay.portal.kernel.portlet.PortletRequestModel portletRequestModel, com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) Returns the web content from the web content article matching the group, article ID, and version.getArticleContent
(long groupId, String articleId, String languageId, com.liferay.portal.kernel.portlet.PortletRequestModel portletRequestModel, com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) Returns the latest web content from the web content article matching the group and article ID.getArticles
(long groupId, long folderId, Locale locale) getArticles
(long groupId, long folderId, Locale locale, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator) getArticlesByArticleId
(long groupId, String articleId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator) getArticlesByArticleId
(long groupId, String articleId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator) Returns an ordered range of all the web content articles matching the group and article ID.getArticlesByLayoutUuid
(long groupId, String layoutUuid) Returns all the web content articles matching the group and layout UUID.getArticlesByLayoutUuid
(long groupId, String layoutUuid, int start, int end) Returns all the web content articles that the user has permission to view matching the group and layout UUID.int
getArticlesByLayoutUuidCount
(long groupId, String layoutUuid) Returns the number of web content articles that the user has permission to view matching the group and layout UUID.getArticlesByStructureId
(long groupId, long ddmStructureId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator) Returns an ordered range of all the web content articles matching the group, default class name ID, and DDM structure key.getArticlesByStructureId
(long groupId, long ddmStructureId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator) Returns an ordered range of all the web content articles matching the group, default class name ID, and DDM structure key.getArticlesByStructureId
(long groupId, long classNameId, long ddmStructureId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator) Returns an ordered range of all the web content articles matching the group, class name ID, DDM structure key, and workflow status.getArticlesByStructureId
(long groupId, long folderId, long classNameId, long ddmStructureId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator) getArticlesByStructureId
(long groupId, long classNameId, long ddmStructureId, Locale locale, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator) Returns an ordered range of all the web content articles matching the group, class name ID, DDM structure key, and workflow status.getArticlesByStructureId
(long groupId, long ddmStructureId, Locale locale, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator) Returns an ordered range of all the web content articles matching the group, default class name ID, and DDM structure key.int
getArticlesCount
(long groupId, long folderId) Returns the number of web content articles matching the group and folder.int
getArticlesCount
(long groupId, long folderId, int status) Returns the number of web content articles matching the group, folder, and status.int
getArticlesCountByArticleId
(long groupId, String articleId) Returns the number of web content articles matching the group and article ID.int
getArticlesCountByArticleId
(long groupId, String articleId, int status) int
getArticlesCountByStructureId
(long groupId, long ddmStructureId) Returns the number of web content articles matching the group, default class name ID, and DDM structure key.int
getArticlesCountByStructureId
(long groupId, long ddmStructureId, int status) Returns the number of web content articles matching the group, default class name ID, and DDM structure key.int
getArticlesCountByStructureId
(long groupId, long classNameId, long ddmStructureId, int status) Returns the number of web content articles matching the group, class name ID, DDM structure key, and workflow status.int
getArticlesCountByStructureId
(long groupId, long folderId, long classNameId, long ddmStructureId, int status) getDisplayArticleByUrlTitle
(long groupId, String urlTitle) Returns the web content article matching the URL title that is currently displayed or next to be displayed if no article is currently displayed.int
getFoldersAndArticlesCount
(long groupId, List<Long> folderIds) Returns the number of folders containing web content articles belonging to the group.getGroupArticles
(long groupId, long userId, long rootFolderId, int status, boolean includeOwner, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator) Returns an ordered range of all the web content articles matching the group, user, the root folder or any of its subfolders.getGroupArticles
(long groupId, long userId, long rootFolderId, int status, boolean includeOwner, Locale locale, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator) Returns an ordered range of all the web content articles matching the group, user, the root folder or any of its subfolders.getGroupArticles
(long groupId, long userId, long rootFolderId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator) Returns an ordered range of all the web content articles matching the group, user, the root folder or any of its subfolders.getGroupArticles
(long groupId, long userId, long rootFolderId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator) Returns an ordered range of all the web content articles matching the group, user, the root folder or any of its subfolders.int
getGroupArticlesCount
(long groupId, long userId, long rootFolderId) Returns the number of web content articles matching the group, user, and the root folder or any of its subfolders.int
getGroupArticlesCount
(long groupId, long userId, long rootFolderId, int status) Returns the number of web content articles matching the group, user, and the root folder or any of its subfolders.int
getGroupArticlesCount
(long groupId, long userId, long rootFolderId, int status, boolean includeOwner) Returns the number of web content articles matching the group, user, the root folder or any of its subfolders.getLatestArticle
(long resourcePrimKey) Returns the latest web content article matching the resource primary key, preferring articles with approved workflow status.getLatestArticle
(long groupId, String articleId, int status) Returns the latest web content article matching the group, article ID, and workflow status.getLatestArticle
(long groupId, String className, long classPK) Returns the latest web content article matching the group, class name ID, and class PK.getLatestArticleByExternalReferenceCode
(long groupId, String externalReferenceCode) Returns the latest web content article matching the group and the external reference code.getLatestArticles
(long groupId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator) int
getLatestArticlesCount
(long groupId, int status) getLayoutArticles
(long groupId) Returns all the web content articles that the user has permission to view matching the group.getLayoutArticles
(long groupId, int start, int end) Returns all the web content articles that the user has permission to view matching the group.int
getLayoutArticlesCount
(long groupId) Returns the number of web content articles that the user has permission to view matching the group.Returns the OSGi service identifier.void
moveArticle
(long groupId, String articleId, long newFolderId, com.liferay.portal.kernel.service.ServiceContext serviceContext) Moves all versions of the web content article matching the group and article ID to the folder.moveArticleFromTrash
(long groupId, long resourcePrimKey, long newFolderId, com.liferay.portal.kernel.service.ServiceContext serviceContext) Moves the web content article from the Recycle Bin to the folder.moveArticleFromTrash
(long groupId, String articleId, long newFolderId, com.liferay.portal.kernel.service.ServiceContext serviceContext) Moves the web content article from the Recycle Bin to the folder.moveArticleToTrash
(long groupId, String articleId) Moves the latest version of the web content article matching the group and article ID to the recycle bin.void
removeArticleLocale
(long companyId, String languageId) Removes the web content of all the company's web content articles matching the language.removeArticleLocale
(long groupId, String articleId, double version, String languageId) Removes the web content of the web content article matching the group, article ID, and version, and language.void
restoreArticleFromTrash
(long resourcePrimKey) Restores the web content article associated with the resource primary key from the Recycle Bin.void
restoreArticleFromTrash
(long groupId, String articleId) Restores the web content article from the Recycle Bin.void
setWrappedService
(JournalArticleService journalArticleService) void
subscribe
(long groupId, long articleId) void
subscribeStructure
(long groupId, long userId, long ddmStructureId) Subscribes the user to changes in elements that belong to the web content article's DDM structure.void
unsubscribe
(long groupId, long articleId) void
unsubscribeStructure
(long groupId, long userId, long ddmStructureId) Unsubscribes the user from changes in elements that belong to the web content article's DDM structure.updateArticle
(long userId, long groupId, long folderId, String articleId, double version, Map<Locale, String> titleMap, Map<Locale, String> descriptionMap, String content, String layoutUuid, com.liferay.portal.kernel.service.ServiceContext serviceContext) Updates the web content article matching the version, replacing its folder, title, description, content, and layout UUID.updateArticle
(long groupId, long folderId, String articleId, double version, String content, com.liferay.portal.kernel.service.ServiceContext serviceContext) Updates the web content article matching the version, replacing its folder and content.updateArticle
(long groupId, long folderId, String articleId, double version, Map<Locale, String> titleMap, Map<Locale, String> descriptionMap, Map<Locale, String> friendlyURLMap, String content, String ddmTemplateKey, String layoutUuid, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, int reviewDateMonth, int reviewDateDay, int reviewDateYear, int reviewDateHour, int reviewDateMinute, boolean neverReview, boolean indexable, boolean smallImage, long smallImageId, int smallImageSource, String smallImageURL, File smallFile, Map<String, byte[]> images, String articleURL, com.liferay.portal.kernel.service.ServiceContext serviceContext) Updates the web content article with additional parameters.updateArticleDefaultValues
(long groupId, String articleId, Map<Locale, String> titleMap, Map<Locale, String> descriptionMap, String content, String ddmTemplateKey, String layoutUuid, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, int reviewDateMonth, int reviewDateDay, int reviewDateYear, int reviewDateHour, int reviewDateMinute, boolean neverReview, boolean indexable, boolean smallImage, long smallImageId, int smallImageSource, String smallImageURL, File smallImageFile, com.liferay.portal.kernel.service.ServiceContext serviceContext) updateArticleTranslation
(long groupId, String articleId, double version, Locale locale, String title, String description, String content, Map<String, byte[]> images, com.liferay.portal.kernel.service.ServiceContext serviceContext) Updates the translation of the web content article.updateStatus
(long groupId, String articleId, double version, int status, String articleURL, com.liferay.portal.kernel.service.ServiceContext serviceContext) Updates the workflow status of the web content article matching the group, article ID, and version.
-
Constructor Details
-
JournalArticleServiceWrapper
public JournalArticleServiceWrapper() -
JournalArticleServiceWrapper
-
-
Method Details
-
addArticle
public JournalArticle addArticle(String externalReferenceCode, long groupId, long folderId, long classNameId, long classPK, String articleId, boolean autoArticleId, Map<Locale, String> titleMap, Map<Locale, throws com.liferay.portal.kernel.exception.PortalExceptionString> descriptionMap, Map<Locale, String> friendlyURLMap, String content, long ddmStructureId, String ddmTemplateKey, String layoutUuid, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, int reviewDateMonth, int reviewDateDay, int reviewDateYear, int reviewDateHour, int reviewDateMinute, boolean neverReview, boolean indexable, boolean smallImage, long smallImageId, int smallImageSource, String smallImageURL, File smallFile, Map<String, byte[]> images, String articleURL, com.liferay.portal.kernel.service.ServiceContext serviceContext) Adds a web content article with additional parameters. All scheduling parameters (display date, expiration date, and review date) use the current user's timezone.- Specified by:
addArticle
in interfaceJournalArticleService
- Parameters:
externalReferenceCode
- the external reference code of the web content articlegroupId
- the primary key of the web content article's groupfolderId
- the primary key of the web content article folderclassNameId
- the primary key of the DDMStructure class if the web content article is related to a DDM structure, the primary key of the class name associated with the article, or JournalArticleConstants.CLASS_NAME_ID_DEFAULT in the journal-api module otherwiseclassPK
- the primary key of the DDM structure, if the primary key of the DDMStructure class is given as theclassNameId
parameter, the primary key of the class associated with the web content article, or0
otherwisearticleId
- the primary key of the web content articleautoArticleId
- whether to auto generate the web content article IDtitleMap
- the web content article's locales and localized titlesdescriptionMap
- the web content article's locales and localized descriptionsfriendlyURLMap
- the web content article's locales and localized friendly URLscontent
- the HTML content wrapped in XML. For more information, see the content example in theupdateArticle(long, long, String, double, String, ServiceContext)
description.ddmStructureId
- the primary key of the web content article's DDM structure, if the article is related to a DDM structure, or0
otherwiseddmTemplateKey
- the primary key of the web content article's DDM templatelayoutUuid
- the unique string identifying the web content article's display pagedisplayDateMonth
- the month the web content article is set to displaydisplayDateDay
- the calendar day the web content article is set to displaydisplayDateYear
- the year the web content article is set to displaydisplayDateHour
- the hour the web content article is set to displaydisplayDateMinute
- the minute the web content article is set to displayexpirationDateMonth
- the month the web content article is set to expireexpirationDateDay
- the calendar day the web content article is set to expireexpirationDateYear
- the year the web content article is set to expireexpirationDateHour
- the hour the web content article is set to expireexpirationDateMinute
- the minute the web content article is set to expireneverExpire
- whether the web content article is not set to auto expirereviewDateMonth
- the month the web content article is set for reviewreviewDateDay
- the calendar day the web content article is set for reviewreviewDateYear
- the year the web content article is set for reviewreviewDateHour
- the hour the web content article is set for reviewreviewDateMinute
- the minute the web content article is set for reviewneverReview
- whether the web content article is not set for reviewindexable
- whether the web content article is searchablesmallImage
- whether the web content article has a small imagesmallImageSource
- the web content article's small image sourcesmallImageURL
- the web content article's small image URLsmallFile
- the web content article's small image fileimages
- the web content's imagesarticleURL
- the web content article's accessible URLserviceContext
- the service context to be applied. Can set the UUID, creation date, modification date, expando bridge attributes, guest permissions, group permissions, asset category IDs, asset tag names, asset link entry IDs, asset priority, URL title, and workflow actions for the web content article. Can also set whether to add the default guest and group permissions.- Returns:
- the web content article
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
addArticle
public JournalArticle addArticle(String externalReferenceCode, long groupId, long folderId, Map<Locale, String> titleMap, Map<Locale, throws com.liferay.portal.kernel.exception.PortalExceptionString> descriptionMap, String content, long ddmStructureId, String ddmTemplateKey, com.liferay.portal.kernel.service.ServiceContext serviceContext) Adds a web content article.- Specified by:
addArticle
in interfaceJournalArticleService
- Parameters:
externalReferenceCode
- the external reference code of the web content articlegroupId
- the primary key of the web content article's groupfolderId
- the primary key of the web content article foldertitleMap
- the web content article's locales and localized titlesdescriptionMap
- the web content article's locales and localized descriptionscontent
- the HTML content wrapped in XML. For more information, see the content example in theupdateArticle(long, long, String, double, String, ServiceContext)
description.ddmStructureId
- the primary key of the web content article's DDM structure, if the article is related to a DDM structure, or0
otherwiseddmTemplateKey
- the primary key of the web content article's DDM templateserviceContext
- the service context to be applied. Can set the UUID, creation date, modification date, expando bridge attributes, guest permissions, group permissions, asset category IDs, asset tag names, asset link entry IDs, asset priority, URL title, and workflow actions for the web content article. Can also set whether to add the default guest and group permissions.- Returns:
- the web content article
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
addArticleDefaultValues
public JournalArticle addArticleDefaultValues(long groupId, long classNameId, long classPK, Map<Locale, String> titleMap, Map<Locale, throws com.liferay.portal.kernel.exception.PortalExceptionString> descriptionMap, String content, long ddmStructureId, String ddmTemplateKey, String layoutUuid, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, int reviewDateMonth, int reviewDateDay, int reviewDateYear, int reviewDateHour, int reviewDateMinute, boolean neverReview, boolean indexable, boolean smallImage, long smallImageId, int smallImageSource, String smallImageURL, File smallImageFile, com.liferay.portal.kernel.service.ServiceContext serviceContext) - Specified by:
addArticleDefaultValues
in interfaceJournalArticleService
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
copyArticle
public JournalArticle copyArticle(long groupId, String sourceArticleId, String targetArticleId, boolean autoArticleId, double version) throws com.liferay.portal.kernel.exception.PortalException Copies the web content article matching the group, article ID, and version. This method creates a new article, extracting all the values from the old one and updating its article ID.- Specified by:
copyArticle
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupsourceArticleId
- the primary key of the old web content articletargetArticleId
- the primary key of the new web content articleautoArticleId
- whether to auto-generate the web content article IDversion
- the web content article's version- Returns:
- the new web content article
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
deleteArticle
public void deleteArticle(long groupId, String articleId, double version, String articleURL, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException Deletes the web content article and its resources matching the group, article ID, and version, optionally sending email notifying denial of the web content article if it had not yet been approved.- Specified by:
deleteArticle
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's grouparticleId
- the primary key of the web content articleversion
- the web content article's versionarticleURL
- the web content article's accessible URLserviceContext
- the service context to be applied. Can set the portlet preferences that include email information to notify recipients of the unapproved web content article's denial.- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
deleteArticle
public void deleteArticle(long groupId, String articleId, String articleURL, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException Deletes all web content articles and their resources matching the group and article ID, optionally sending email notifying denial of article if it had not yet been approved.- Specified by:
deleteArticle
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's grouparticleId
- the primary key of the web content articlearticleURL
- the web content article's accessible URLserviceContext
- the service context to be applied. Can set the portlet preferences that include email information to notify recipients of the unapproved web content article's denial.- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
deleteArticleDefaultValues
public void deleteArticleDefaultValues(long groupId, String articleId, long ddmStructureId) throws com.liferay.portal.kernel.exception.PortalException - Specified by:
deleteArticleDefaultValues
in interfaceJournalArticleService
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
expireArticle
public JournalArticle expireArticle(long groupId, String articleId, double version, String articleURL, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException Expires the web content article matching the group, article ID, and version.- Specified by:
expireArticle
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's grouparticleId
- the primary key of the web content articleversion
- the web content article's versionarticleURL
- the web content article's accessible URLserviceContext
- the service context to be applied. Can set the modification date, status date, portlet preferences, and can set whether to add the default command update for the web content article. With respect to social activities, by setting the service context's command toConstants.UPDATE
, the invocation is considered a web content update activity; otherwise it is considered a web content add activity.- Returns:
- the web content article
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
expireArticle
public void expireArticle(long groupId, String articleId, String articleURL, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException Expires the web content article matching the group and article ID, expiring all of its versions if thejournal.article.expire.all.versions
portal property istrue
, otherwise expiring only its latest approved version.- Specified by:
expireArticle
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's grouparticleId
- the primary key of the web content articlearticleURL
- the web content article's accessible URLserviceContext
- the service context to be applied. Can set the modification date, status date, portlet preferences, and can set whether to add the default command update for the web content article. With respect to social activities, by setting the service context's command toConstants.UPDATE
, the invocation is considered a web content update activity; otherwise it is considered a web content add activity.- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
fetchArticle
public JournalArticle fetchArticle(long groupId, String articleId) throws com.liferay.portal.kernel.exception.PortalException - Specified by:
fetchArticle
in interfaceJournalArticleService
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
fetchLatestArticleByExternalReferenceCode
public JournalArticle fetchLatestArticleByExternalReferenceCode(long groupId, String externalReferenceCode) throws com.liferay.portal.kernel.exception.PortalException Returns the latest web content article matching the group and the external reference code.- Specified by:
fetchLatestArticleByExternalReferenceCode
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupexternalReferenceCode
- the external reference code of the web content article- Returns:
- the latest matching web content article, or
null
if no matching web content article could be found - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getArticle
public JournalArticle getArticle(long id) throws com.liferay.portal.kernel.exception.PortalException Returns the web content article with the ID.- Specified by:
getArticle
in interfaceJournalArticleService
- Parameters:
id
- the primary key of the web content article- Returns:
- the web content article with the ID
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
getArticle
public JournalArticle getArticle(long groupId, String articleId) throws com.liferay.portal.kernel.exception.PortalException Returns the latest approved web content article, or the latest unapproved article if none are approved. Both approved and unapproved articles must match the group and article ID.- Specified by:
getArticle
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's grouparticleId
- the primary key of the web content article- Returns:
- the matching web content article
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
getArticle
public JournalArticle getArticle(long groupId, String articleId, double version) throws com.liferay.portal.kernel.exception.PortalException Returns the web content article matching the group, article ID, and version.- Specified by:
getArticle
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's grouparticleId
- the primary key of the web content articleversion
- the web content article's version- Returns:
- the matching web content article
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
getArticle
public JournalArticle getArticle(long groupId, String className, long classPK) throws com.liferay.portal.kernel.exception.PortalException Returns the web content article matching the group, class name, and class PK.- Specified by:
getArticle
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupclassName
- the DDMStructure class name if the web content article is related to a DDM structure, the primary key of the class name associated with the article, or JournalArticleConstants.CLASS_NAME_ID_DEFAULT in the journal-api module otherwiseclassPK
- the primary key of the DDM structure, if the DDMStructure class name is given as theclassName
parameter, the primary key of the class associated with the web content article, or0
otherwise- Returns:
- the matching web content article
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
getArticleByUrlTitle
public JournalArticle getArticleByUrlTitle(long groupId, String urlTitle) throws com.liferay.portal.kernel.exception.PortalException Returns the latest web content article that is approved, or the latest unapproved article if none are approved. Both approved and unapproved articles must match the group and URL title.- Specified by:
getArticleByUrlTitle
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupurlTitle
- the web content article's accessible URL title- Returns:
- the matching web content article
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
getArticleContent
public String getArticleContent(long groupId, String articleId, double version, String languageId, com.liferay.portal.kernel.portlet.PortletRequestModel portletRequestModel, com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) throws com.liferay.portal.kernel.exception.PortalException Returns the web content from the web content article matching the group, article ID, and version.- Specified by:
getArticleContent
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's grouparticleId
- the primary key of the web content articleversion
- the web content article's versionlanguageId
- the primary key of the language translation to getportletRequestModel
- the portlet request modelthemeDisplay
- the theme display- Returns:
- the matching web content
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
getArticleContent
public String getArticleContent(long groupId, String articleId, String languageId, com.liferay.portal.kernel.portlet.PortletRequestModel portletRequestModel, com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) throws com.liferay.portal.kernel.exception.PortalException Returns the latest web content from the web content article matching the group and article ID.- Specified by:
getArticleContent
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's grouparticleId
- the primary key of the web content articlelanguageId
- the primary key of the language translation to getportletRequestModel
- the portlet request modelthemeDisplay
- the theme display- Returns:
- the matching web content
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
getArticles
- Specified by:
getArticles
in interfaceJournalArticleService
-
getArticles
public List<JournalArticle> getArticles(long groupId, long folderId, Locale locale, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator) - Specified by:
getArticles
in interfaceJournalArticleService
-
getArticlesByArticleId
public List<JournalArticle> getArticlesByArticleId(long groupId, String articleId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator) - Specified by:
getArticlesByArticleId
in interfaceJournalArticleService
-
getArticlesByArticleId
public List<JournalArticle> getArticlesByArticleId(long groupId, String articleId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator) Returns an ordered range of all the web content articles matching the group and article ID.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil.ALL_POS
will return the full result set.- Specified by:
getArticlesByArticleId
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's grouparticleId
- the primary key of the web content articlestart
- the lower bound of the range of web content articles to returnend
- the upper bound of the range of web content articles to return (not inclusive)orderByComparator
- the comparator to order the web content articles- Returns:
- the range of matching web content articles ordered by the comparator
-
getArticlesByLayoutUuid
Returns all the web content articles matching the group and layout UUID.- Specified by:
getArticlesByLayoutUuid
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's grouplayoutUuid
- the unique string identifying the web content article's display page- Returns:
- the matching web content articles
-
getArticlesByLayoutUuid
public List<JournalArticle> getArticlesByLayoutUuid(long groupId, String layoutUuid, int start, int end) Returns all the web content articles that the user has permission to view matching the group and layout UUID.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil.ALL_POS
will return the full result set.- Specified by:
getArticlesByLayoutUuid
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's grouplayoutUuid
- the unique string identifying the web content article's display pagestart
- the lower bound of the range of web content articles to returnend
- the upper bound of the range of web content articles to return (not inclusive)- Returns:
- the range of matching web content articles
-
getArticlesByLayoutUuidCount
Returns the number of web content articles that the user has permission to view matching the group and layout UUID.- Specified by:
getArticlesByLayoutUuidCount
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's grouplayoutUuid
- the unique string identifying the web content article's display page- Returns:
- the matching web content articles
-
getArticlesByStructureId
public List<JournalArticle> getArticlesByStructureId(long groupId, long ddmStructureId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator) Returns an ordered range of all the web content articles matching the group, default class name ID, and DDM structure key.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil.ALL_POS
will return the full result set.- Specified by:
getArticlesByStructureId
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupddmStructureId
- the primary key of the web content article's DDM structurestatus
- the web content article's workflow status. For more information seeWorkflowConstants
for constants starting with the "STATUS_" prefix.start
- the lower bound of the range of web content articles to returnend
- the upper bound of the range of web content articles to return (not inclusive)orderByComparator
- the comparator to order the web content articles- Returns:
- the range of matching web content articles ordered by the comparator
-
getArticlesByStructureId
public List<JournalArticle> getArticlesByStructureId(long groupId, long ddmStructureId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator) Returns an ordered range of all the web content articles matching the group, default class name ID, and DDM structure key.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil.ALL_POS
will return the full result set.- Specified by:
getArticlesByStructureId
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupddmStructureId
- the primary key of the web content article's DDM structurestart
- the lower bound of the range of web content articles to returnend
- the upper bound of the range of web content articles to return (not inclusive)orderByComparator
- the comparator to order the web content articles- Returns:
- the range of matching web content articles ordered by the comparator
-
getArticlesByStructureId
public List<JournalArticle> getArticlesByStructureId(long groupId, long ddmStructureId, Locale locale, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator) Returns an ordered range of all the web content articles matching the group, default class name ID, and DDM structure key.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil.ALL_POS
will return the full result set.- Specified by:
getArticlesByStructureId
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupddmStructureId
- the primary key of the web content article's DDM structurelocale
- web content articles localestatus
- the web content article's workflow status. For more information seeWorkflowConstants
for constants starting with the "STATUS_" prefix.start
- the lower bound of the range of web content articles to returnend
- the upper bound of the range of web content articles to return (not inclusive)orderByComparator
- the comparator to order the web content articles- Returns:
- the range of matching web content articles ordered by the comparator
-
getArticlesByStructureId
public List<JournalArticle> getArticlesByStructureId(long groupId, long classNameId, long ddmStructureId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator) Returns an ordered range of all the web content articles matching the group, class name ID, DDM structure key, and workflow status.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil.ALL_POS
will return the full result set.- Specified by:
getArticlesByStructureId
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupclassNameId
- the primary key of the DDMStructure class if the web content article is related to a DDM structure, the primary key of the class name associated with the article, or JournalArticleConstants.CLASS_NAME_ID_DEFAULT in the journal-api module otherwiseddmStructureId
- the primary key of the web content article's DDM structurestatus
- the web content article's workflow status. For more information seeWorkflowConstants
for constants starting with the "STATUS_" prefix.start
- the lower bound of the range of web content articles to returnend
- the upper bound of the range of web content articles to return (not inclusive)orderByComparator
- the comparator to order the web content articles- Returns:
- the range of matching web content articles ordered by the comparator
-
getArticlesByStructureId
public List<JournalArticle> getArticlesByStructureId(long groupId, long classNameId, long ddmStructureId, Locale locale, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator) Returns an ordered range of all the web content articles matching the group, class name ID, DDM structure key, and workflow status.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil.ALL_POS
will return the full result set.- Specified by:
getArticlesByStructureId
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupclassNameId
- the primary key of the DDMStructure class if the web content article is related to a DDM structure, the primary key of the class name associated with the article, or JournalArticleConstants.CLASS_NAME_ID_DEFAULT in the journal-api module otherwiseddmStructureId
- the primary key of the web content article's DDM structurestatus
- the web content article's workflow status. For more information seeWorkflowConstants
for constants starting with the "STATUS_" prefix.start
- the lower bound of the range of web content articles to returnend
- the upper bound of the range of web content articles to return (not inclusive)orderByComparator
- the comparator to order the web content articles- Returns:
- the range of matching web content articles ordered by the comparator
-
getArticlesByStructureId
public List<JournalArticle> getArticlesByStructureId(long groupId, long folderId, long classNameId, long ddmStructureId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator) - Specified by:
getArticlesByStructureId
in interfaceJournalArticleService
-
getArticlesCount
public int getArticlesCount(long groupId, long folderId) Returns the number of web content articles matching the group and folder.- Specified by:
getArticlesCount
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupfolderId
- the primary key of the web content article folder- Returns:
- the number of matching web content articles
-
getArticlesCount
public int getArticlesCount(long groupId, long folderId, int status) Returns the number of web content articles matching the group, folder, and status.- Specified by:
getArticlesCount
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupfolderId
- the primary key of the web content article's folderstatus
- the web content article's workflow status. For more information seeWorkflowConstants
for constants starting with the "STATUS_" prefix.- Returns:
- the number of matching web content articles
-
getArticlesCountByArticleId
Returns the number of web content articles matching the group and article ID.- Specified by:
getArticlesCountByArticleId
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's grouparticleId
- the primary key of the web content article- Returns:
- the number of matching web content articles
-
getArticlesCountByArticleId
- Specified by:
getArticlesCountByArticleId
in interfaceJournalArticleService
-
getArticlesCountByStructureId
public int getArticlesCountByStructureId(long groupId, long ddmStructureId) Returns the number of web content articles matching the group, default class name ID, and DDM structure key.- Specified by:
getArticlesCountByStructureId
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupddmStructureId
- the primary key of the web content article's DDM structure- Returns:
- the number of matching web content articles
-
getArticlesCountByStructureId
public int getArticlesCountByStructureId(long groupId, long ddmStructureId, int status) Returns the number of web content articles matching the group, default class name ID, and DDM structure key.- Specified by:
getArticlesCountByStructureId
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupddmStructureId
- the primary key of the web content article's DDM structurestatus
- the web content article's workflow status. For more information seeWorkflowConstants
for constants starting with the "STATUS_" prefix.- Returns:
- the number of matching web content articles
-
getArticlesCountByStructureId
public int getArticlesCountByStructureId(long groupId, long classNameId, long ddmStructureId, int status) Returns the number of web content articles matching the group, class name ID, DDM structure key, and workflow status.- Specified by:
getArticlesCountByStructureId
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupclassNameId
- the primary key of the DDMStructure class if the web content article is related to a DDM structure, the primary key of the class name associated with the article, or JournalArticleConstants.CLASS_NAME_ID_DEFAULT in the journal-api module otherwiseddmStructureId
- the primary key of the web content article's DDM structurestatus
- the web content article's workflow status. For more information seeWorkflowConstants
for constants starting with the "STATUS_" prefix.- Returns:
- the number of matching web content articles
-
getArticlesCountByStructureId
public int getArticlesCountByStructureId(long groupId, long folderId, long classNameId, long ddmStructureId, int status) - Specified by:
getArticlesCountByStructureId
in interfaceJournalArticleService
-
getDisplayArticleByUrlTitle
public JournalArticle getDisplayArticleByUrlTitle(long groupId, String urlTitle) throws com.liferay.portal.kernel.exception.PortalException Returns the web content article matching the URL title that is currently displayed or next to be displayed if no article is currently displayed.- Specified by:
getDisplayArticleByUrlTitle
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupurlTitle
- the web content article's accessible URL title- Returns:
- the web content article matching the URL title that is currently displayed, or next one to be displayed if no version of the article is currently displayed
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
getFoldersAndArticlesCount
Returns the number of folders containing web content articles belonging to the group.- Specified by:
getFoldersAndArticlesCount
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupfolderIds
- the primary keys of the web content article folders (optionallyCollections#EMPTY_LIST
)- Returns:
- the number of matching folders containing web content articles
-
getGroupArticles
public List<JournalArticle> getGroupArticles(long groupId, long userId, long rootFolderId, int status, boolean includeOwner, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException Returns an ordered range of all the web content articles matching the group, user, the root folder or any of its subfolders.- Specified by:
getGroupArticles
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupuserId
- the primary key of the user (optionally0
)rootFolderId
- the primary key of the root folder to begin the searchstatus
- the web content article's workflow status. For more information seeWorkflowConstants
for constants starting with the "STATUS_" prefix.includeOwner
- whether to include the user's web contentstart
- the lower bound of the range of web content articles to returnend
- the upper bound of the range of web content articles to return (not inclusive)orderByComparator
- the comparator to order the web content articles- Returns:
- the range of matching web content articles ordered by the comparator
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
getGroupArticles
public List<JournalArticle> getGroupArticles(long groupId, long userId, long rootFolderId, int status, boolean includeOwner, Locale locale, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException Returns an ordered range of all the web content articles matching the group, user, the root folder or any of its subfolders.- Specified by:
getGroupArticles
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupuserId
- the primary key of the user (optionally0
)rootFolderId
- the primary key of the root folder to begin the searchstatus
- the web content article's workflow status. For more information seeWorkflowConstants
for constants starting with the "STATUS_" prefix.includeOwner
- whether to include the user's web contentlocale
- web content articles localestart
- the lower bound of the range of web content articles to returnend
- the upper bound of the range of web content articles to return (not inclusive)orderByComparator
- the comparator to order the web content articles- Returns:
- the range of matching web content articles ordered by the comparator
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
getGroupArticles
public List<JournalArticle> getGroupArticles(long groupId, long userId, long rootFolderId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException Returns an ordered range of all the web content articles matching the group, user, the root folder or any of its subfolders.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil.ALL_POS
will return the full result set.- Specified by:
getGroupArticles
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupuserId
- the primary key of the user (optionally0
)rootFolderId
- the primary key of the root folder to begin the searchstatus
- the web content article's workflow status. For more information seeWorkflowConstants
for constants starting with the "STATUS_" prefix.start
- the lower bound of the range of web content articles to returnend
- the upper bound of the range of web content articles to return (not inclusive)orderByComparator
- the comparator to order the web content articles- Returns:
- the range of matching web content articles ordered by the comparator
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
getGroupArticles
public List<JournalArticle> getGroupArticles(long groupId, long userId, long rootFolderId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException Returns an ordered range of all the web content articles matching the group, user, the root folder or any of its subfolders.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil.ALL_POS
will return the full result set.- Specified by:
getGroupArticles
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupuserId
- the primary key of the user (optionally0
)rootFolderId
- the primary key of the root folder to begin the searchstart
- the lower bound of the range of web content articles to returnend
- the upper bound of the range of web content articles to return (not inclusive)orderByComparator
- the comparator to order the web content articles- Returns:
- the range of matching web content articles ordered by the comparator
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
getGroupArticlesCount
public int getGroupArticlesCount(long groupId, long userId, long rootFolderId) throws com.liferay.portal.kernel.exception.PortalException Returns the number of web content articles matching the group, user, and the root folder or any of its subfolders.- Specified by:
getGroupArticlesCount
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupuserId
- the primary key of the user (optionally0
)rootFolderId
- the primary key of the root folder to begin the search- Returns:
- the number of matching web content articles
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
getGroupArticlesCount
public int getGroupArticlesCount(long groupId, long userId, long rootFolderId, int status) throws com.liferay.portal.kernel.exception.PortalException Returns the number of web content articles matching the group, user, and the root folder or any of its subfolders.- Specified by:
getGroupArticlesCount
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupuserId
- the primary key of the user (optionally0
)rootFolderId
- the primary key of the root folder to begin the searchstatus
- the web content article's workflow status. For more information seeWorkflowConstants
for constants starting with the "STATUS_" prefix.- Returns:
- the number of matching web content articles
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
getGroupArticlesCount
public int getGroupArticlesCount(long groupId, long userId, long rootFolderId, int status, boolean includeOwner) throws com.liferay.portal.kernel.exception.PortalException Returns the number of web content articles matching the group, user, the root folder or any of its subfolders.- Specified by:
getGroupArticlesCount
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupuserId
- the primary key of the user (optionally0
)rootFolderId
- the primary key of the root folder to begin the searchstatus
- the web content article's workflow status. For more information seeWorkflowConstants
for constants starting with the "STATUS_" prefix.includeOwner
- whether to include the user's web content- Returns:
- the range of matching web content articles ordered by the comparator
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
getLatestArticle
public JournalArticle getLatestArticle(long resourcePrimKey) throws com.liferay.portal.kernel.exception.PortalException Returns the latest web content article matching the resource primary key, preferring articles with approved workflow status.- Specified by:
getLatestArticle
in interfaceJournalArticleService
- Parameters:
resourcePrimKey
- the primary key of the resource instance- Returns:
- the latest web content article matching the resource primary key, preferring articles with approved workflow status
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
getLatestArticle
public JournalArticle getLatestArticle(long groupId, String articleId, int status) throws com.liferay.portal.kernel.exception.PortalException Returns the latest web content article matching the group, article ID, and workflow status.- Specified by:
getLatestArticle
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's grouparticleId
- the primary key of the web content articlestatus
- the web content article's workflow status. For more information seeWorkflowConstants
for constants starting with the "STATUS_" prefix.- Returns:
- the latest matching web content article
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
getLatestArticle
public JournalArticle getLatestArticle(long groupId, String className, long classPK) throws com.liferay.portal.kernel.exception.PortalException Returns the latest web content article matching the group, class name ID, and class PK.- Specified by:
getLatestArticle
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupclassName
- the DDMStructure class name if the web content article is related to a DDM structure, the class name associated with the article, or JournalArticleConstants.CLASS_NAME_ID_DEFAULT in the journal-api module otherwiseclassPK
- the primary key of the DDM structure, if the DDMStructure class name is given as theclassName
parameter, the primary key of the class associated with the web content article, or0
otherwise- Returns:
- the latest matching web content article
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
getLatestArticleByExternalReferenceCode
public JournalArticle getLatestArticleByExternalReferenceCode(long groupId, String externalReferenceCode) throws com.liferay.portal.kernel.exception.PortalException Returns the latest web content article matching the group and the external reference code.- Specified by:
getLatestArticleByExternalReferenceCode
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupexternalReferenceCode
- the external reference code of the web content article- Returns:
- the latest matching web content article
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
getLatestArticles
public List<JournalArticle> getLatestArticles(long groupId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator) - Specified by:
getLatestArticles
in interfaceJournalArticleService
-
getLatestArticlesCount
public int getLatestArticlesCount(long groupId, int status) - Specified by:
getLatestArticlesCount
in interfaceJournalArticleService
-
getLayoutArticles
Returns all the web content articles that the user has permission to view matching the group.- Specified by:
getLayoutArticles
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's group- Returns:
- The matching web content articles
-
getLayoutArticles
Returns all the web content articles that the user has permission to view matching the group.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil.ALL_POS
will return the full result set.- Specified by:
getLayoutArticles
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupstart
- the lower bound of the range of web content articles to returnend
- the upper bound of the range of web content articles to return (not inclusive)- Returns:
- the range of matching web content articles
-
getLayoutArticlesCount
public int getLayoutArticlesCount(long groupId) Returns the number of web content articles that the user has permission to view matching the group.- Specified by:
getLayoutArticlesCount
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's group- Returns:
- the number of matching web content articles
-
getOSGiServiceIdentifier
Returns the OSGi service identifier.- Specified by:
getOSGiServiceIdentifier
in interfaceJournalArticleService
- Returns:
- the OSGi service identifier
-
moveArticle
public void moveArticle(long groupId, String articleId, long newFolderId, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException Moves all versions of the web content article matching the group and article ID to the folder.- Specified by:
moveArticle
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's grouparticleId
- the primary key of the web content articlenewFolderId
- the primary key of the web content article's new folderserviceContext
- the service context to be applied. Can set the user ID, language ID, portlet preferences, portlet request, portlet response, theme display, and can set whether to add the default command update for the web content article. With respect to social activities, by setting the service context's command toConstants.UPDATE
, the invocation is considered a web content update activity; otherwise it is considered a web content add activity.- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
moveArticleFromTrash
public JournalArticle moveArticleFromTrash(long groupId, long resourcePrimKey, long newFolderId, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException Moves the web content article from the Recycle Bin to the folder.- Specified by:
moveArticleFromTrash
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupresourcePrimKey
- the primary key of the resource instancenewFolderId
- the primary key of the web content article's new folderserviceContext
- the service context to be applied. Can set the modification date, portlet preferences, and can set whether to add the default command update for the web content article. With respect to social activities, by setting the service context's command toConstants.UPDATE
, the invocation is considered a web content update activity; otherwise it is considered a web content add activity.- Returns:
- the updated web content article, which was moved from the Recycle Bin to the folder
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
moveArticleFromTrash
public JournalArticle moveArticleFromTrash(long groupId, String articleId, long newFolderId, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException Moves the web content article from the Recycle Bin to the folder.- Specified by:
moveArticleFromTrash
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's grouparticleId
- the primary key of the web content articlenewFolderId
- the primary key of the web content article's new folderserviceContext
- the service context to be applied. Can set the modification date, portlet preferences, and can set whether to add the default command update for the web content article. With respect to social activities, by setting the service context's command toConstants.UPDATE
, the invocation is considered a web content update activity; otherwise it is considered a web content add activity.- Returns:
- the updated web content article, which was moved from the Recycle Bin to the folder
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
moveArticleToTrash
public JournalArticle moveArticleToTrash(long groupId, String articleId) throws com.liferay.portal.kernel.exception.PortalException Moves the latest version of the web content article matching the group and article ID to the recycle bin.- Specified by:
moveArticleToTrash
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's grouparticleId
- the primary key of the web content article- Returns:
- the moved web content article or
null
if no matching article was found - Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
removeArticleLocale
public void removeArticleLocale(long companyId, String languageId) throws com.liferay.portal.kernel.exception.PortalException Removes the web content of all the company's web content articles matching the language.- Specified by:
removeArticleLocale
in interfaceJournalArticleService
- Parameters:
companyId
- the primary key of the web content article's companylanguageId
- the primary key of the language locale to remove- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
removeArticleLocale
public JournalArticle removeArticleLocale(long groupId, String articleId, double version, String languageId) throws com.liferay.portal.kernel.exception.PortalException Removes the web content of the web content article matching the group, article ID, and version, and language.- Specified by:
removeArticleLocale
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's grouparticleId
- the primary key of the web content articleversion
- the web content article's versionlanguageId
- the primary key of the language locale to remove- Returns:
- the updated web content article with the locale removed
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
restoreArticleFromTrash
public void restoreArticleFromTrash(long resourcePrimKey) throws com.liferay.portal.kernel.exception.PortalException Restores the web content article associated with the resource primary key from the Recycle Bin.- Specified by:
restoreArticleFromTrash
in interfaceJournalArticleService
- Parameters:
resourcePrimKey
- the primary key of the resource instance- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
restoreArticleFromTrash
public void restoreArticleFromTrash(long groupId, String articleId) throws com.liferay.portal.kernel.exception.PortalException Restores the web content article from the Recycle Bin.- Specified by:
restoreArticleFromTrash
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's grouparticleId
- the primary key of the web content article- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
subscribe
public void subscribe(long groupId, long articleId) throws com.liferay.portal.kernel.exception.PortalException - Specified by:
subscribe
in interfaceJournalArticleService
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
subscribeStructure
public void subscribeStructure(long groupId, long userId, long ddmStructureId) throws com.liferay.portal.kernel.exception.PortalException Subscribes the user to changes in elements that belong to the web content article's DDM structure.- Specified by:
subscribeStructure
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the folder's groupuserId
- the primary key of the user to be subscribedddmStructureId
- the primary key of the structure to subscribe to- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
unsubscribe
public void unsubscribe(long groupId, long articleId) throws com.liferay.portal.kernel.exception.PortalException - Specified by:
unsubscribe
in interfaceJournalArticleService
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
unsubscribeStructure
public void unsubscribeStructure(long groupId, long userId, long ddmStructureId) throws com.liferay.portal.kernel.exception.PortalException Unsubscribes the user from changes in elements that belong to the web content article's DDM structure.- Specified by:
unsubscribeStructure
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the folder's groupuserId
- the primary key of the user to be subscribedddmStructureId
- the primary key of the structure to subscribe to- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
updateArticle
public JournalArticle updateArticle(long userId, long groupId, long folderId, String articleId, double version, Map<Locale, String> titleMap, Map<Locale, throws com.liferay.portal.kernel.exception.PortalExceptionString> descriptionMap, String content, String layoutUuid, com.liferay.portal.kernel.service.ServiceContext serviceContext) Updates the web content article matching the version, replacing its folder, title, description, content, and layout UUID.- Specified by:
updateArticle
in interfaceJournalArticleService
- Parameters:
userId
- the primary key of the user updating the web content articlegroupId
- the primary key of the web content article's groupfolderId
- the primary key of the web content article folderarticleId
- the primary key of the web content articleversion
- the web content article's versiontitleMap
- the web content article's locales and localized titlesdescriptionMap
- the web content article's locales and localized descriptionscontent
- the HTML content wrapped in XML. For more information, see the content example in theupdateArticle(long, long, String, double, String, ServiceContext)
description.layoutUuid
- the unique string identifying the web content article's display pageserviceContext
- the service context to be applied. Can set the modification date, expando bridge attributes, asset category IDs, asset tag names, asset link entry IDs, asset priority, workflow actions, URL title, and can set whether to add the default command update for the web content article. With respect to social activities, by setting the service context's command toConstants.UPDATE
, the invocation is considered a web content update activity; otherwise it is considered a web content add activity.- Returns:
- the updated web content article
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
updateArticle
public JournalArticle updateArticle(long groupId, long folderId, String articleId, double version, Map<Locale, String> titleMap, Map<Locale, throws com.liferay.portal.kernel.exception.PortalExceptionString> descriptionMap, Map<Locale, String> friendlyURLMap, String content, String ddmTemplateKey, String layoutUuid, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, int reviewDateMonth, int reviewDateDay, int reviewDateYear, int reviewDateHour, int reviewDateMinute, boolean neverReview, boolean indexable, boolean smallImage, long smallImageId, int smallImageSource, String smallImageURL, File smallFile, Map<String, byte[]> images, String articleURL, com.liferay.portal.kernel.service.ServiceContext serviceContext) Updates the web content article with additional parameters. All scheduling parameters (display date, expiration date, and review date) use the current user's timezone.- Specified by:
updateArticle
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupfolderId
- the primary key of the web content article folderarticleId
- the primary key of the web content articleversion
- the web content article's versiontitleMap
- the web content article's locales and localized titlesdescriptionMap
- the web content article's locales and localized descriptionsfriendlyURLMap
- the web content article's locales and localized friendly URLscontent
- the HTML content wrapped in XML. For more information, see the content example in theupdateArticle(long, long, String, double, String, ServiceContext)
description.ddmTemplateKey
- the primary key of the web content article's DDM templatelayoutUuid
- the unique string identifying the web content article's display pagedisplayDateMonth
- the month the web content article is set to displaydisplayDateDay
- the calendar day the web content article is set to displaydisplayDateYear
- the year the web content article is set to displaydisplayDateHour
- the hour the web content article is set to displaydisplayDateMinute
- the minute the web content article is set to displayexpirationDateMonth
- the month the web content article is set to expireexpirationDateDay
- the calendar day the web content article is set to expireexpirationDateYear
- the year the web content article is set to expireexpirationDateHour
- the hour the web content article is set to expireexpirationDateMinute
- the minute the web content article is set to expireneverExpire
- whether the web content article is not set to auto expirereviewDateMonth
- the month the web content article is set for reviewreviewDateDay
- the calendar day the web content article is set for reviewreviewDateYear
- the year the web content article is set for reviewreviewDateHour
- the hour the web content article is set for reviewreviewDateMinute
- the minute the web content article is set for reviewneverReview
- whether the web content article is not set for reviewindexable
- whether the web content is searchablesmallImage
- whether to update web content article's a small image. A file must be passed in assmallImageFile
value, otherwise the current small image is deleted.smallImageSource
- the web content article's small image source (optionallynull
)smallImageURL
- the web content article's small image URL (optionallynull
)smallFile
- the web content article's new small image file (optionallynull
). Must pass insmallImage
value oftrue
to replace the article's small image file.images
- the web content's images (optionallynull
)articleURL
- the web content article's accessible URL (optionallynull
)serviceContext
- the service context to be applied. Can set the modification date, expando bridge attributes, asset category IDs, asset tag names, asset link entry IDs, asset priority, workflow actions, URL title, and can set whether to add the default command update for the web content article. With respect to social activities, by setting the service context's command toConstants.UPDATE
, the invocation is considered a web content update activity; otherwise it is considered a web content add activity.- Returns:
- the updated web content article
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
updateArticle
public JournalArticle updateArticle(long groupId, long folderId, String articleId, double version, String content, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException Updates the web content article matching the version, replacing its folder and content.The web content articles hold HTML content wrapped in XML. The XML lets you specify the article's default locale and available locales. Here is a content example:
<?xml version='1.0' encoding='UTF-8'?> <root default-locale="en_US" available-locales="en_US"> <static-content language-id="en_US"> <![CDATA[<p><b><i>test<i> content<b></p>]]> </static-content> </root>
- Specified by:
updateArticle
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's groupfolderId
- the primary key of the web content article folderarticleId
- the primary key of the web content articleversion
- the web content article's versioncontent
- the HTML content wrapped in XML.serviceContext
- the service context to be applied. Can set the modification date, expando bridge attributes, asset category IDs, asset tag names, asset link entry IDs, asset priority, workflow actions, URL title, and can set whether to add the default command update for the web content article. With respect to social activities, by setting the service context's command toConstants.UPDATE
, the invocation is considered a web content update activity; otherwise it is considered a web content add activity.- Returns:
- the updated web content article
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
updateArticleDefaultValues
public JournalArticle updateArticleDefaultValues(long groupId, String articleId, Map<Locale, String> titleMap, Map<Locale, throws com.liferay.portal.kernel.exception.PortalExceptionString> descriptionMap, String content, String ddmTemplateKey, String layoutUuid, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, int reviewDateMonth, int reviewDateDay, int reviewDateYear, int reviewDateHour, int reviewDateMinute, boolean neverReview, boolean indexable, boolean smallImage, long smallImageId, int smallImageSource, String smallImageURL, File smallImageFile, com.liferay.portal.kernel.service.ServiceContext serviceContext) - Specified by:
updateArticleDefaultValues
in interfaceJournalArticleService
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateArticleTranslation
public JournalArticle updateArticleTranslation(long groupId, String articleId, double version, Locale locale, String title, String description, String content, Map<String, byte[]> images, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalExceptionUpdates the translation of the web content article.- Specified by:
updateArticleTranslation
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's grouparticleId
- the primary key of the web content articleversion
- the web content article's versionlocale
- the locale of the web content article's display templatetitle
- the translated web content article titledescription
- the translated web content article descriptioncontent
- the HTML content wrapped in XML. For more information, see the content example in theupdateArticle(long, long, String, double, String, ServiceContext)
description.images
- the web content's imagesserviceContext
- the service context to be applied. Can set the modification date and URL title for the web content article.- Returns:
- the updated web content article
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
updateStatus
public JournalArticle updateStatus(long groupId, String articleId, double version, int status, String articleURL, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException Updates the workflow status of the web content article matching the group, article ID, and version.- Specified by:
updateStatus
in interfaceJournalArticleService
- Parameters:
groupId
- the primary key of the web content article's grouparticleId
- the primary key of the web content articleversion
- the web content article's versionstatus
- the web content article's workflow status. For more information seeWorkflowConstants
for constants starting with the "STATUS_" prefix.articleURL
- the web content article's accessible URLserviceContext
- the service context to be applied. Can set the modification date, portlet preferences, and can set whether to add the default command update for the web content article.- Returns:
- the updated web content article
- Throws:
PortalException
- if a portal exception occurredcom.liferay.portal.kernel.exception.PortalException
-
getWrappedService
- Specified by:
getWrappedService
in interfacecom.liferay.portal.kernel.service.ServiceWrapper<JournalArticleService>
-
setWrappedService
- Specified by:
setWrappedService
in interfacecom.liferay.portal.kernel.service.ServiceWrapper<JournalArticleService>
-