Interface JournalArticleLocalService

All Superinterfaces:
com.liferay.portal.kernel.service.BaseLocalService, com.liferay.portal.kernel.service.change.tracking.CTService<JournalArticle>, com.liferay.portal.kernel.service.PersistedModelLocalService, com.liferay.portal.kernel.service.PersistedResourcedModelLocalService
All Known Implementing Classes:
JournalArticleLocalServiceWrapper

@CTAware @ProviderType @Transactional(isolation=PORTAL, rollbackFor={com.liferay.portal.kernel.exception.PortalException.class,com.liferay.portal.kernel.exception.SystemException.class}) public interface JournalArticleLocalService extends com.liferay.portal.kernel.service.BaseLocalService, com.liferay.portal.kernel.service.change.tracking.CTService<JournalArticle>, com.liferay.portal.kernel.service.PersistedModelLocalService, com.liferay.portal.kernel.service.PersistedResourcedModelLocalService
Provides the local service interface for JournalArticle. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
See Also:
Generated:
  • Method Details

    • addArticle

      @Indexable(type=REINDEX) JournalArticle addArticle(String externalReferenceCode, long userId, long groupId, long folderId, long classNameId, long classPK, String articleId, boolean autoArticleId, double version, 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 smallImageFile, Map<String,byte[]> images, String articleURL, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Adds a web content article with additional parameters. All scheduling parameters (display date, expiration date, and review date) use the current user's timezone.

      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>
       
       

      Parameters:
      externalReferenceCode - the external reference code of the web content article
      userId - the primary key of the web content article's creator/owner
      groupId - the primary key of the web content article's group
      folderId - the primary key of the web content article folder
      classNameId - 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 otherwise
      classPK - the primary key of the DDM structure, if the primary key of the DDMStructure class is given as the classNameId parameter, the primary key of the class associated with the web content article, or 0 otherwise
      articleId - the primary key of the web content article
      autoArticleId - whether to auto generate the web content article ID
      version - the web content article's version
      titleMap - the web content article's locales and localized titles
      descriptionMap - the web content article's locales and localized descriptions
      friendlyURLMap - the web content article's locales and localized friendly URLs
      content - the HTML content wrapped in XML
      ddmStructureId - the primary key of the web content article's DDM structure, if the article is related to a DDM structure, or 0 otherwise
      ddmTemplateKey - the primary key of the web content article's DDM template
      layoutUuid - the unique string identifying the web content article's display page
      displayDateMonth - the month the web content article is set to display
      displayDateDay - the calendar day the web content article is set to display
      displayDateYear - the year the web content article is set to display
      displayDateHour - the hour the web content article is set to display
      displayDateMinute - the minute the web content article is set to display
      expirationDateMonth - the month the web content article is set to expire
      expirationDateDay - the calendar day the web content article is set to expire
      expirationDateYear - the year the web content article is set to expire
      expirationDateHour - the hour the web content article is set to expire
      expirationDateMinute - the minute the web content article is set to expire
      neverExpire - whether the web content article is not set to auto expire
      reviewDateMonth - the month the web content article is set for review
      reviewDateDay - the calendar day the web content article is set for review
      reviewDateYear - the year the web content article is set for review
      reviewDateHour - the hour the web content article is set for review
      reviewDateMinute - the minute the web content article is set for review
      neverReview - whether the web content article is not set for review
      indexable - whether the web content article is searchable
      smallImage - whether the web content article has a small image
      smallImageSource - the web content article's small image source
      smallImageURL - the web content article's small image URL
      smallImageFile - the web content article's small image file
      images - the web content's images
      articleURL - the web content article's accessible URL
      serviceContext - 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, 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:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • addArticle

      JournalArticle addArticle(String externalReferenceCode, long userId, 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) throws com.liferay.portal.kernel.exception.PortalException
      Adds a web content article.
      Parameters:
      externalReferenceCode - the external reference code of the web content article.
      userId - the primary key of the web content article's creator/owner
      groupId - the primary key of the web content article's group
      folderId - the primary key of the web content article folder
      titleMap - the web content article's locales and localized titles
      descriptionMap - the web content article's locales and localized descriptions
      content - the HTML content wrapped in XML. For more information, see the content example in the addArticle(String, long, long, long, long, long, String, boolean, double, Map, Map, Map, String, long, String, String, int, int, int, int, int, int, int, int, int, int, boolean, int, int, int, int, int, boolean, boolean, boolean, long, int, String, File, Map, String, ServiceContext) description.
      ddmStructureId - the primary key of the web content article's DDM structure, if the article is related to a DDM structure, or 0 otherwise
      ddmTemplateKey - the primary key of the web content article's DDM template
      serviceContext - 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:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • addArticleDefaultValues

      JournalArticle addArticleDefaultValues(long userId, 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) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addArticleResources

      void addArticleResources(JournalArticle article, boolean addGroupPermissions, boolean addGuestPermissions) throws com.liferay.portal.kernel.exception.PortalException
      Adds the resources to the web content article.
      Parameters:
      article - the web content article
      addGroupPermissions - whether to add group permissions
      addGuestPermissions - whether to add guest permissions
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • addArticleResources

      void addArticleResources(JournalArticle article, com.liferay.portal.kernel.service.permission.ModelPermissions modelPermissions) throws com.liferay.portal.kernel.exception.PortalException
      Adds the model resources with the permissions to the web content article.
      Parameters:
      article - the web content article to add resources to
      modelPermissions - the model permissions
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • addArticleResources

      void addArticleResources(long groupId, String articleId, boolean addGroupPermissions, boolean addGuestPermissions) throws com.liferay.portal.kernel.exception.PortalException
      Adds the resources to the most recently created web content article.
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      addGroupPermissions - whether to add group permissions
      addGuestPermissions - whether to add guest permissions
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • addJournalArticle

      @Indexable(type=REINDEX) JournalArticle addJournalArticle(JournalArticle journalArticle)
      Adds the journal article to the database. Also notifies the appropriate model listeners.

      Important: Inspect JournalArticleLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Parameters:
      journalArticle - the journal article
      Returns:
      the journal article that was added
    • checkArticleResourcePrimKey

      JournalArticle checkArticleResourcePrimKey(long groupId, String articleId, double version) throws com.liferay.portal.kernel.exception.PortalException
      Returns the web content article with the group, article ID, and version. This method checks for the article's resource primary key and, if not found, creates a new one.
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      version - the web content article's version
      Returns:
      the matching web content article
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • checkArticles

      void checkArticles(long companyId) throws com.liferay.portal.kernel.exception.PortalException
      Checks all web content articles by handling their expirations and sending review notifications based on their current workflow.
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • copyArticle

      @Indexable(type=REINDEX) JournalArticle copyArticle(long userId, 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.
      Parameters:
      userId - the primary key of the web content article's creator/owner
      groupId - the primary key of the web content article's group
      sourceArticleId - the primary key of the old web content article
      targetArticleId - the primary key of the new web content article
      autoArticleId - whether to auto-generate the web content article ID
      version - the web content article's version
      Returns:
      the new web content article
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • createJournalArticle

      @Transactional(enabled=false) JournalArticle createJournalArticle(long id)
      Creates a new journal article with the primary key. Does not add the journal article to the database.
      Parameters:
      id - the primary key for the new journal article
      Returns:
      the new journal article
    • createPersistedModel

      com.liferay.portal.kernel.model.PersistedModel createPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      createPersistedModel in interface com.liferay.portal.kernel.service.PersistedModelLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteArticle

      @SystemEvent(action=1, send=false, type=1) JournalArticle deleteArticle(JournalArticle article) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the web content article and its resources.
      Parameters:
      article - the web content article
      Returns:
      the deleted web content article
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • deleteArticle

      @Indexable(type=DELETE) @SystemEvent(action=1, send=false, type=1) JournalArticle deleteArticle(JournalArticle article, String articleURL, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the web content article and its resources, optionally sending email notifying denial of the article if it had not yet been approved.
      Parameters:
      article - the web content article
      articleURL - the web content article's accessible URL to include in email notifications (optionally null)
      serviceContext - the service context to be applied (optionally null). Can set the portlet preferences that include email information to notify recipients of the unapproved web content's denial.
      Returns:
      the deleted web content article
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • deleteArticle

      JournalArticle 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.
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      version - the web content article's version
      articleURL - the web content article's accessible URL
      serviceContext - 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.
      Returns:
      the deleted web content article
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • deleteArticle

      void deleteArticle(long groupId, String articleId, 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.
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      serviceContext - 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:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • deleteArticleDefaultValues

      void deleteArticleDefaultValues(long groupId, String articleId, long ddmStructureId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteArticles

      void deleteArticles(long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Deletes all the group's web content articles and resources.
      Parameters:
      groupId - the primary key of the web content article's group
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • deleteArticles

      void deleteArticles(long groupId, long folderId) throws com.liferay.portal.kernel.exception.PortalException
      Deletes all the group's web content articles and resources in the folder, including recycled articles.
      Parameters:
      groupId - the primary key of the web content article's group
      folderId - the primary key of the web content article folder
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • deleteArticles

      void deleteArticles(long groupId, long folderId, boolean includeTrashedEntries) throws com.liferay.portal.kernel.exception.PortalException
      Deletes all the group's web content articles and resources in the folder, optionally including recycled articles.
      Parameters:
      groupId - the primary key of the web content article's group
      folderId - the primary key of the web content article folder
      includeTrashedEntries - whether to include recycled web content articles
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • deleteArticles

      void deleteArticles(long groupId, String className, long classPK) throws com.liferay.portal.kernel.exception.PortalException
      Deletes all the group's web content articles and resources matching the class name and class primary key.
      Parameters:
      groupId - the primary key of the web content article's group
      className - 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 otherwise
      classPK - the primary key of the DDM structure, if the DDMStructure class name is given as the className parameter, the primary key of the class associated with the web content article, or 0 otherwise
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • deleteJournalArticle

      @Indexable(type=DELETE) JournalArticle deleteJournalArticle(JournalArticle journalArticle)
      Deletes the journal article from the database. Also notifies the appropriate model listeners.

      Important: Inspect JournalArticleLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Parameters:
      journalArticle - the journal article
      Returns:
      the journal article that was removed
    • deleteJournalArticle

      @Indexable(type=DELETE) JournalArticle deleteJournalArticle(long id) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the journal article with the primary key from the database. Also notifies the appropriate model listeners.

      Important: Inspect JournalArticleLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Parameters:
      id - the primary key of the journal article
      Returns:
      the journal article that was removed
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a journal article with the primary key could not be found
    • deleteLayoutArticleReferences

      void deleteLayoutArticleReferences(long groupId, String layoutUuid)
      Deletes the layout's association with the web content articles for the group.
      Parameters:
      groupId - the primary key of the web content article's group
      layoutUuid - the unique string identifying the web content article's display page
    • deletePersistedModel

      com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      deletePersistedModel in interface com.liferay.portal.kernel.service.PersistedModelLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • dslQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
      Specified by:
      dslQuery in interface com.liferay.portal.kernel.service.PersistedModelLocalService
    • dslQueryCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
      Specified by:
      dslQueryCount in interface com.liferay.portal.kernel.service.PersistedModelLocalService
    • dynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery()
    • dynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
      Performs a dynamic query on the database and returns the matching rows.
      Parameters:
      dynamicQuery - the dynamic query
      Returns:
      the matching rows
    • dynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
      Performs a dynamic query on the database and returns a range of the matching rows.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.journal.model.impl.JournalArticleModelImpl.

      Parameters:
      dynamicQuery - the dynamic query
      start - the lower bound of the range of model instances
      end - the upper bound of the range of model instances (not inclusive)
      Returns:
      the range of matching rows
    • dynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator)
      Performs a dynamic query on the database and returns an ordered range of the matching rows.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.journal.model.impl.JournalArticleModelImpl.

      Parameters:
      dynamicQuery - the dynamic query
      start - the lower bound of the range of model instances
      end - the upper bound of the range of model instances (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of matching rows
    • dynamicQueryCount

      @Transactional(propagation=SUPPORTS, readOnly=true) long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
      Returns the number of rows matching the dynamic query.
      Parameters:
      dynamicQuery - the dynamic query
      Returns:
      the number of rows matching the dynamic query
    • dynamicQueryCount

      @Transactional(propagation=SUPPORTS, readOnly=true) long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, com.liferay.portal.kernel.dao.orm.Projection projection)
      Returns the number of rows matching the dynamic query.
      Parameters:
      dynamicQuery - the dynamic query
      projection - the projection to apply to the query
      Returns:
      the number of rows matching the dynamic query
    • expireArticle

      @Indexable(type=REINDEX) JournalArticle expireArticle(long userId, 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.
      Parameters:
      userId - the primary key of the user updating the web content article
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      version - the web content article's version
      articleURL - the web content article's accessible URL
      serviceContext - 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 to Constants#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:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • expireArticle

      void expireArticle(long userId, 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 the journal.article.expire.all.versions portal property is true, otherwise expiring only its latest approved version.
      Parameters:
      userId - the primary key of the user updating the web content article
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      articleURL - the web content article's accessible URL
      serviceContext - 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 to Constants#UPDATE, the invocation is considered a web content update activity; otherwise it is considered a web content add activity.
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • fetchArticle

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle fetchArticle(long id)
      Returns the web content article with the ID.
      Parameters:
      id - the primary key of the web content article
      Returns:
      the web content article with the ID
    • fetchArticle

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle fetchArticle(long groupId, String articleId)
    • fetchArticle

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle fetchArticle(long groupId, String articleId, double version)
      Returns the web content article matching the group, article ID, and version.
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      version - the web content article's version
      Returns:
      the web content article matching the group, article ID, and version, or null if no web content article could be found
    • fetchArticleByUrlTitle

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle fetchArticleByUrlTitle(long groupId, String urlTitle)
    • fetchArticleByUrlTitle

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle fetchArticleByUrlTitle(long groupId, String urlTitle, double version)
    • fetchDisplayArticle

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle fetchDisplayArticle(long groupId, String articleId)
    • fetchJournalArticle

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle fetchJournalArticle(long id)
    • fetchJournalArticleByUuidAndGroupId

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle fetchJournalArticleByUuidAndGroupId(String uuid, long groupId)
      Returns the journal article matching the UUID and group.
      Parameters:
      uuid - the journal article's UUID
      groupId - the primary key of the group
      Returns:
      the matching journal article, or null if a matching journal article could not be found
    • fetchLatestArticle

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle fetchLatestArticle(long resourcePrimKey)
    • fetchLatestArticle

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle fetchLatestArticle(long resourcePrimKey, int status)
    • fetchLatestArticle

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle fetchLatestArticle(long resourcePrimKey, int status, boolean preferApproved)
      Returns the latest web content article matching the resource primary key and workflow status, optionally preferring articles with approved workflow status.
      Parameters:
      resourcePrimKey - the primary key of the resource instance
      status - the web content article's workflow status. For more information see WorkflowConstants for constants starting with the "STATUS_" prefix.
      preferApproved - whether to prefer returning the latest matching article that has workflow status WorkflowConstants#STATUS_APPROVED over returning one that has a different status
      Returns:
      the latest web content article matching the resource primary key and workflow status, optionally preferring articles with an approved workflow status, or null if no matching web content article could be found
    • fetchLatestArticle

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle fetchLatestArticle(long resourcePrimKey, int[] statuses)
    • fetchLatestArticle

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle fetchLatestArticle(long groupId, String articleId, int status)
      Returns the latest web content article matching the group, article ID, and workflow status.
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      status - the web content article's workflow status. For more information see WorkflowConstants for constants starting with the "STATUS_" prefix.
      Returns:
      the latest matching web content article, or null if no matching web content article could be found
    • fetchLatestArticleByExternalReferenceCode

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle fetchLatestArticleByExternalReferenceCode(long groupId, String externalReferenceCode)
      Returns the latest web content article matching the group and the external reference code.
      Parameters:
      groupId - the primary key of the web content article's group
      externalReferenceCode - the web content article's external reference code
      Returns:
      the latest matching web content article, or null if no matching web content article could be found
    • fetchLatestArticleByExternalReferenceCode

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle fetchLatestArticleByExternalReferenceCode(long groupId, String externalReferenceCode, int status, boolean preferApproved)
    • fetchLatestArticleByExternalReferenceCode

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle fetchLatestArticleByExternalReferenceCode(long groupId, String externalReferenceCode, int[] statuses)
    • fetchLatestArticleByUrlTitle

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle fetchLatestArticleByUrlTitle(long groupId, String urlTitle, int status)
    • fetchLatestIndexableArticle

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle fetchLatestIndexableArticle(long resourcePrimKey)
      Returns the latest indexable web content article matching the resource primary key.
      Parameters:
      resourcePrimKey - the primary key of the resource instance
      Returns:
      the latest indexable web content article matching the resource primary key, or null if no matching web content article could be found
    • fetchPersistedModel

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.model.PersistedModel fetchPersistedModel(Serializable primaryKeyObj)
      Specified by:
      fetchPersistedModel in interface com.liferay.portal.kernel.service.PersistedModelLocalService
    • getActionableDynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery()
    • getArticle

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle getArticle(long id) throws com.liferay.portal.kernel.exception.PortalException
      Returns the web content article with the ID.
      Parameters:
      id - the primary key of the web content article
      Returns:
      the web content article with the ID
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getArticle

      @Transactional(propagation=SUPPORTS, readOnly=true) 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.
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      Returns:
      the matching web content article
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getArticle

      @Transactional(propagation=SUPPORTS, readOnly=true) 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.
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      version - the web content article's version
      Returns:
      the matching web content article
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getArticle

      @Transactional(propagation=SUPPORTS, readOnly=true) 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.
      Parameters:
      groupId - the primary key of the web content article's group
      className - 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 otherwise
      classPK - the primary key of the DDM structure, if the DDMStructure class name is given as the className parameter, the primary key of the class associated with the web content article, or 0 otherwise
      Returns:
      the matching web content article
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getArticleByUrlTitle

      @Transactional(propagation=SUPPORTS, readOnly=true) 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.
      Parameters:
      groupId - the primary key of the web content article's group
      urlTitle - the web content article's accessible URL title
      Returns:
      the matching web content article
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getArticleContent

      @Transactional(propagation=SUPPORTS, readOnly=true) String getArticleContent(JournalArticle article, String ddmTemplateKey, String viewMode, 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 associated with the portlet request model and the DDM template.
      Parameters:
      article - the web content article
      ddmTemplateKey - the primary key of the web content article's DDM template
      viewMode - the mode in which the web content is being viewed
      languageId - the primary key of the language translation to get
      portletRequestModel - the portlet request model
      themeDisplay - the theme display
      Returns:
      the web content from the web content article associated with the portlet request model and the DDM template
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getArticleContent

      @Transactional(propagation=SUPPORTS, readOnly=true) String getArticleContent(long groupId, String articleId, double version, String viewMode, String ddmTemplateKey, 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, and associated with the portlet request model and the DDM template.
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      version - the web content article's version
      viewMode - the mode in which the web content is being viewed
      ddmTemplateKey - the primary key of the web content article's DDM template
      languageId - the primary key of the language translation to get
      portletRequestModel - the portlet request model
      themeDisplay - the theme display
      Returns:
      the web content from the matching web content article
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getArticleContent

      @Transactional(propagation=SUPPORTS, readOnly=true) String getArticleContent(long groupId, String articleId, String viewMode, String ddmTemplateKey, 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, and associated with the portlet request model and the DDM template.
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      viewMode - the mode in which the web content is being viewed
      ddmTemplateKey - the primary key of the web content article's DDM template
      languageId - the primary key of the language translation to get
      portletRequestModel - the portlet request model
      themeDisplay - the theme display
      Returns:
      the latest web content from the matching web content article
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getArticleDescription

      @Transactional(propagation=SUPPORTS, readOnly=true) String getArticleDescription(long articlePK, Locale locale)
    • getArticleDescription

      @Transactional(propagation=SUPPORTS, readOnly=true) String getArticleDescription(long articlePK, String languageId)
    • getArticleDescriptionMap

      @Transactional(propagation=SUPPORTS, readOnly=true) Map<Locale,String> getArticleDescriptionMap(long articlePK)
    • getArticleDisplay

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticleDisplay getArticleDisplay(JournalArticle article, String ddmTemplateKey, String viewMode, String languageId, int page, com.liferay.portal.kernel.portlet.PortletRequestModel portletRequestModel, com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) throws com.liferay.portal.kernel.exception.PortalException
      Returns a web content article display for the specified page of the latest version of the web content article, based on the DDM template. Web content transformation tokens are added using the portlet request model and theme display.
      Parameters:
      article - the primary key of the web content article
      ddmTemplateKey - the primary key of the web content article's DDM template
      viewMode - the mode in which the web content is being viewed
      languageId - the primary key of the language translation to get
      page - the web content article page to display
      portletRequestModel - the portlet request model
      themeDisplay - the theme display
      Returns:
      the web content article display, or null if the article has expired or if article's display date/time is after the current date/time
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getArticleDisplay

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticleDisplay getArticleDisplay(long groupId, String articleId, double version, String ddmTemplateKey, String viewMode, String languageId, int page, com.liferay.portal.kernel.portlet.PortletRequestModel portletRequestModel, com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) throws com.liferay.portal.kernel.exception.PortalException
      Returns a web content article display for the specified page of the specified version of the web content article matching the group, article ID, and DDM template. Web content transformation tokens are added using the portlet request model and theme display.
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      version - the web content article's version
      ddmTemplateKey - the primary key of the web content article's DDM template
      viewMode - the mode in which the web content is being viewed
      languageId - the primary key of the language translation to get
      page - the web content article page to display
      portletRequestModel - the portlet request model
      themeDisplay - the theme display
      Returns:
      the web content article display, or null if the article has expired or if article's display date/time is after the current date/time
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getArticleDisplay

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticleDisplay getArticleDisplay(long groupId, String articleId, double version, String ddmTemplateKey, String viewMode, String languageId, com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) throws com.liferay.portal.kernel.exception.PortalException
      Returns a web content article display for the first page of the specified version of the web content article matching the group, article ID, and DDM template. Web content transformation tokens are added from the theme display (if not null).
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      version - the web content article's version
      ddmTemplateKey - the primary key of the web content article's DDM template
      viewMode - the mode in which the web content is being viewed
      languageId - the primary key of the language translation to get
      themeDisplay - the theme display
      Returns:
      the web content article display, or null if the article has expired or if article's display date/time is after the current date/time
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getArticleDisplay

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticleDisplay getArticleDisplay(long groupId, String articleId, String viewMode, String languageId, int page, com.liferay.portal.kernel.portlet.PortletRequestModel portletRequestModel, com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) throws com.liferay.portal.kernel.exception.PortalException
      Returns a web content article display for the specified page of the latest version of the web content article matching the group and article ID. Web content transformation tokens are added from the theme display (if not null).
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      viewMode - the mode in which the web content is being viewed
      languageId - the primary key of the language translation to get
      page - the web content article page to display
      portletRequestModel - the portlet request model
      themeDisplay - the theme display
      Returns:
      the web content article display, or null if the article has expired or if article's display date/time is after the current date/time
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getArticleDisplay

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticleDisplay getArticleDisplay(long groupId, String articleId, String ddmTemplateKey, String viewMode, String languageId, int page, com.liferay.portal.kernel.portlet.PortletRequestModel portletRequestModel, com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) throws com.liferay.portal.kernel.exception.PortalException
      Returns a web content article display for the specified page of the latest version of the web content article matching the group, article ID, and DDM template. Web content transformation tokens are added using the portlet request model and theme display.
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      ddmTemplateKey - the primary key of the web content article's DDM template
      viewMode - the mode in which the web content is being viewed
      languageId - the primary key of the language translation to get
      page - the web content article page to display
      portletRequestModel - the portlet request model
      themeDisplay - the theme display
      Returns:
      the web content article display, or null if the article has expired or if article's display date/time is after the current date/time
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getArticleDisplay

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticleDisplay getArticleDisplay(long groupId, String articleId, String ddmTemplateKey, String viewMode, String languageId, com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) throws com.liferay.portal.kernel.exception.PortalException
      Returns a web content article display for the first page of the latest version of the web content article matching the group, article ID, and DDM template. Web content transformation tokens are added from the theme display (if not null).
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      ddmTemplateKey - the primary key of the web content article's DDM template
      viewMode - the mode in which the web content is being viewed
      languageId - the primary key of the language translation to get
      themeDisplay - the theme display
      Returns:
      the web content article display, or null if the article has expired or if article's display date/time is after the current date/time
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getArticleDisplay

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticleDisplay getArticleDisplay(long groupId, String articleId, String viewMode, String languageId, com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) throws com.liferay.portal.kernel.exception.PortalException
      Returns a web content article display for the first page of the latest version of the web content article matching the group and article ID. Web content transformation tokens are added from the theme display (if not null).
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      viewMode - the mode in which the web content is being viewed
      languageId - the primary key of the language translation to get
      themeDisplay - the theme display
      Returns:
      the web content article display, or null if the article has expired or if article's display date/time is after the current date/time
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getArticleLocalizationLanguageIds

      @Transactional(propagation=SUPPORTS, readOnly=true) List<String> getArticleLocalizationLanguageIds(long articlePK)
    • getArticles

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getArticles()
      Returns all the web content articles present in the system.
      Returns:
      the web content articles present in the system
    • getArticles

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getArticles(long groupId)
      Returns all the web content articles belonging to the group.
      Parameters:
      groupId - the primary key of the web content article's group
      Returns:
      the web content articles belonging to the group
    • getArticles

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getArticles(long groupId, int start, int end)
      Returns a range of all the web content articles belonging to the group.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set.

      Parameters:
      groupId - the primary key of the web content article's group
      start - the lower bound of the range of web content articles to return
      end - the upper bound of the range of web content articles to return (not inclusive)
      Returns:
      the range of matching web content articles
    • getArticles

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getArticles(long groupId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator)
      Returns an ordered range of all the web content articles belonging to the group.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set.

      Parameters:
      groupId - the primary key of the web content article's group
      start - the lower bound of the range of web content articles to return
      end - 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
    • getArticles

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getArticles(long groupId, long folderId)
      Returns all the web content articles matching the group and folder.
      Parameters:
      groupId - the primary key of the web content article's group
      folderId - the primary key of the web content article folder
      Returns:
      the matching web content articles
    • getArticles

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getArticles(long groupId, long folderId, int start, int end)
      Returns a range of all the web content articles matching the group and folder.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set.

      Parameters:
      groupId - the primary key of the web content article's group
      folderId - the primary key of the web content article's folder
      start - the lower bound of the range of web content articles to return
      end - the upper bound of the range of web content articles to return (not inclusive)
      Returns:
      the range of matching web content articles
    • getArticles

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getArticles(long groupId, long folderId, int status, int start, int end)
      Returns a range of all the web content articles matching the group, folder, and status.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set.

      Parameters:
      groupId - the primary key of the web content article's group
      folderId - the primary key of the web content article's folder
      status - the web content article's workflow status. For more information see WorkflowConstants for constants starting with the "STATUS_" prefix.
      start - the lower bound of the range of web content articles to return
      end - the upper bound of the range of web content articles to return (not inclusive)
      Returns:
      the range of matching web content articles
    • getArticles

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getArticles(long groupId, long folderId, 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 folder.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set.

      Parameters:
      groupId - the primary key of the web content article's group
      folderId - the primary key of the web content article's folder
      start - the lower bound of the range of web content articles to return
      end - 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
    • getArticles

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getArticles(long groupId, String articleId)
      Returns all the web content articles matching the group and article ID.
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      Returns:
      the matching web content articles
    • getArticles

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getArticles(long groupId, String articleId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator)
    • getArticlesByResourcePrimKey

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getArticlesByResourcePrimKey(long resourcePrimKey)
      Returns all the web content articles matching the resource primary key.
      Parameters:
      resourcePrimKey - the primary key of the resource instance
      Returns:
      the web content articles matching the resource primary key
    • getArticlesByReviewDate

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getArticlesByReviewDate(long companyId, Date previousCheckDate, Date reviewDate)
    • getArticlesBySmallImageId

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getArticlesBySmallImageId(long smallImageId)
      Returns all the web content articles matching the small image ID.
      Parameters:
      smallImageId - the primary key of the web content article's small image
      Returns:
      the web content articles matching the small image ID
    • getArticlesByStructureId

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getArticlesByStructureId(long groupId, long ddmStructureId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator)
    • getArticlesByStructureId

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getArticlesByStructureId(long groupId, long ddmStructureId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator)
    • getArticlesByStructureId

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getArticlesByStructureId(long groupId, long ddmStructureId, Locale locale, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator)
    • getArticlesByStructureId

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getArticlesByStructureId(long groupId, long classNameId, long ddmStructureId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator)
    • getArticlesByStructureId

      @Transactional(propagation=SUPPORTS, readOnly=true) 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)
    • getArticlesClassPKsWithDefaultDisplayPage

      @Transactional(propagation=SUPPORTS, readOnly=true) List<Long> getArticlesClassPKsWithDefaultDisplayPage(long groupId, long classTypeId)
    • getArticlesCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getArticlesCount(long groupId)
      Returns the number of web content articles belonging to the group.
      Parameters:
      groupId - the primary key of the web content article's group
      Returns:
      the number of web content articles belonging to the group
    • getArticlesCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getArticlesCount(long groupId, long folderId)
      Returns the number of web content articles matching the group and folder.
      Parameters:
      groupId - the primary key of the web content article's group
      folderId - the primary key of the web content article's folder
      Returns:
      the number of matching web content articles
    • getArticlesCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getArticlesCount(long groupId, long folderId, int status)
      Returns the number of web content articles matching the group, folder, and status.
      Parameters:
      groupId - the primary key of the web content article's group
      folderId - the primary key of the web content article's folder
      status - the web content article's workflow status. For more information see WorkflowConstants for constants starting with the "STATUS_" prefix.
      Returns:
      the number of matching web content articles
    • getArticlesCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getArticlesCount(long groupId, String articleId)
    • getArticlesCountByResourcePrimKey

      @Transactional(propagation=SUPPORTS, readOnly=true) int getArticlesCountByResourcePrimKey(long resourcePrimKey)
    • getArticleTitle

      @Transactional(propagation=SUPPORTS, readOnly=true) String getArticleTitle(long articlePK, Locale locale)
    • getArticleTitle

      @Transactional(propagation=SUPPORTS, readOnly=true) String getArticleTitle(long articlePK, String languageId)
    • getArticleTitleMap

      @Transactional(propagation=SUPPORTS, readOnly=true) Map<Locale,String> getArticleTitleMap(long articlePK)
    • getCompanyArticles

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getCompanyArticles(long companyId, double version, int status, int start, int end)
      Returns an ordered range of all the web content articles matching the company, version, and workflow status.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set.

      Parameters:
      companyId - the primary key of the web content article's company
      version - the web content article's version
      status - the web content article's workflow status. For more information see WorkflowConstants for constants starting with the "STATUS_" prefix.
      start - the lower bound of the range of web content articles to return
      end - the upper bound of the range of web content articles to return (not inclusive)
      Returns:
      the range of matching web content articles ordered by article ID
    • getCompanyArticles

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getCompanyArticles(long companyId, int status, int start, int end)
      Returns an ordered range of all the web content articles matching the company and workflow status.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set.

      Parameters:
      companyId - the primary key of the web content article's company
      status - the web content article's workflow status. For more information see WorkflowConstants for constants starting with the "STATUS_" prefix.
      start - the lower bound of the range of web content articles to return
      end - the upper bound of the range of web content articles to return (not inclusive)
      Returns:
      the range of matching web content articles ordered by article ID
    • getCompanyArticlesCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getCompanyArticlesCount(long companyId, double version, int status, int start, int end)
      Returns the number of web content articles matching the company, version, and workflow status.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set.

      Parameters:
      companyId - the primary key of the web content article's company
      version - the web content article's version
      status - the web content article's workflow status. For more information see WorkflowConstants for constants starting with the "STATUS_" prefix.
      start - the lower bound of the range of web content articles to return
      end - the upper bound of the range of web content articles to return (not inclusive)
      Returns:
      the number of matching web content articles
    • getCompanyArticlesCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getCompanyArticlesCount(long companyId, int status)
      Returns the number of web content articles matching the company and workflow status.
      Parameters:
      companyId - the primary key of the web content article's company
      status - the web content article's workflow status. For more information see WorkflowConstants for constants starting with the "STATUS_" prefix.
      Returns:
      the number of matching web content articles
    • getDisplayArticle

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle getDisplayArticle(long groupId, String articleId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the matching web content article currently displayed or next to be displayed if no article is currently displayed.
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      Returns:
      the matching web content article currently displayed, or the next one to be displayed if no version of the article is currently displayed
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getDisplayArticleByUrlTitle

      @Transactional(propagation=SUPPORTS, readOnly=true) 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.
      Parameters:
      groupId - the primary key of the web content article's group
      urlTitle - 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:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getExportActionableDynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext)
    • getGroupIdsByUrlTitle

      @Transactional(propagation=SUPPORTS, readOnly=true) List<Long> getGroupIdsByUrlTitle(long companyId, String urlTitle)
    • getIndexableActionableDynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
    • getJournalArticle

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle getJournalArticle(long id) throws com.liferay.portal.kernel.exception.PortalException
      Returns the journal article with the primary key.
      Parameters:
      id - the primary key of the journal article
      Returns:
      the journal article
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a journal article with the primary key could not be found
    • getJournalArticleByUuidAndGroupId

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle getJournalArticleByUuidAndGroupId(String uuid, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the journal article matching the UUID and group.
      Parameters:
      uuid - the journal article's UUID
      groupId - the primary key of the group
      Returns:
      the matching journal article
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a matching journal article could not be found
    • getJournalArticles

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getJournalArticles(int start, int end)
      Returns a range of all the journal articles.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.journal.model.impl.JournalArticleModelImpl.

      Parameters:
      start - the lower bound of the range of journal articles
      end - the upper bound of the range of journal articles (not inclusive)
      Returns:
      the range of journal articles
    • getJournalArticlesByUuidAndCompanyId

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getJournalArticlesByUuidAndCompanyId(String uuid, long companyId)
      Returns all the journal articles matching the UUID and company.
      Parameters:
      uuid - the UUID of the journal articles
      companyId - the primary key of the company
      Returns:
      the matching journal articles, or an empty list if no matches were found
    • getJournalArticlesByUuidAndCompanyId

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getJournalArticlesByUuidAndCompanyId(String uuid, long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<JournalArticle> orderByComparator)
      Returns a range of journal articles matching the UUID and company.
      Parameters:
      uuid - the UUID of the journal articles
      companyId - the primary key of the company
      start - the lower bound of the range of journal articles
      end - the upper bound of the range of journal articles (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the range of matching journal articles, or an empty list if no matches were found
    • getJournalArticlesCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getJournalArticlesCount()
      Returns the number of journal articles.
      Returns:
      the number of journal articles
    • getLatestArticle

      @Transactional(propagation=SUPPORTS, readOnly=true) 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.
      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:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getLatestArticle

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle getLatestArticle(long resourcePrimKey, int status) throws com.liferay.portal.kernel.exception.PortalException
      Returns the latest web content article matching the resource primary key and workflow status, preferring articles with approved workflow status.
      Parameters:
      resourcePrimKey - the primary key of the resource instance
      status - the web content article's workflow status. For more information see WorkflowConstants for constants starting with the "STATUS_" prefix.
      Returns:
      the latest web content article matching the resource primary key and workflow status, preferring articles with approved workflow status
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getLatestArticle

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle getLatestArticle(long resourcePrimKey, int status, boolean preferApproved) throws com.liferay.portal.kernel.exception.PortalException
      Returns the latest web content article matching the resource primary key and workflow status, optionally preferring articles with approved workflow status.
      Parameters:
      resourcePrimKey - the primary key of the resource instance
      status - the web content article's workflow status. For more information see WorkflowConstants for constants starting with the "STATUS_" prefix.
      preferApproved - whether to prefer returning the latest matching article that has workflow status WorkflowConstants#STATUS_APPROVED over returning one that has a different status
      Returns:
      the latest web content article matching the resource primary key and workflow status, optionally preferring articles with approved workflow status
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getLatestArticle

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle getLatestArticle(long groupId, String articleId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the latest web content article with the group and article ID.
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      Returns:
      the latest matching web content article
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getLatestArticle

      @Transactional(propagation=SUPPORTS, readOnly=true) 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.
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      status - the web content article's workflow status. For more information see WorkflowConstants for constants starting with the "STATUS_" prefix.
      Returns:
      the latest matching web content article
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getLatestArticle

      @Transactional(propagation=SUPPORTS, readOnly=true) 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.
      Parameters:
      groupId - the primary key of the web content article's group
      className - 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 otherwise
      classPK - the primary key of the DDM structure, if the DDMStructure class name is given as the className parameter, the primary key of the class associated with the web content article, or 0 otherwise
      Returns:
      the latest matching web content article
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getLatestArticleByExternalReferenceCode

      @Transactional(propagation=SUPPORTS, readOnly=true) 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.
      Parameters:
      groupId - the primary key of the web content article's group
      externalReferenceCode - the web content article's external reference code
      Returns:
      the latest matching web content article
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getLatestArticleByExternalReferenceCode

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle getLatestArticleByExternalReferenceCode(long groupId, String externalReferenceCode, int status, boolean preferApproved) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getLatestArticleByUrlTitle

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle getLatestArticleByUrlTitle(long groupId, String urlTitle, int status) throws com.liferay.portal.kernel.exception.PortalException
      Returns the latest web content article matching the group, URL title, and workflow status.
      Parameters:
      groupId - the primary key of the web content article's group
      urlTitle - the web content article's accessible URL title
      status - the web content article's workflow status. For more information see WorkflowConstants for constants starting with the "STATUS_" prefix.
      Returns:
      the latest matching web content article
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getLatestVersion

      @Transactional(propagation=SUPPORTS, readOnly=true) double getLatestVersion(long groupId, String articleId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the latest version number of the web content with the group and article ID.
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      Returns:
      the latest version number of the matching web content
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getLatestVersion

      @Transactional(propagation=SUPPORTS, readOnly=true) double getLatestVersion(long groupId, String articleId, int status) throws com.liferay.portal.kernel.exception.PortalException
      Returns the latest version number of the web content with the group, article ID, and workflow status.
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      status - the web content article's workflow status. For more information see WorkflowConstants for constants starting with the "STATUS_" prefix.
      Returns:
      the latest version number of the matching web content
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getNoAssetArticles

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getNoAssetArticles()
    • getNoPermissionArticles

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getNoPermissionArticles()
    • getNotInTrashArticlesCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getNotInTrashArticlesCount(long groupId, long folderId)
      Returns the number of web content articles that are not recycled.
      Parameters:
      groupId - the primary key of the web content article's group
      folderId - the primary key of the web content article folder
      Returns:
      the number of web content articles that are not recycled
    • getOldestArticle

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle getOldestArticle(long groupId, String articleId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the oldest web content article with the group and article ID.
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      Returns:
      the oldest matching web content article
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getOldestArticle

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle getOldestArticle(long groupId, String articleId, int status) throws com.liferay.portal.kernel.exception.PortalException
      Returns the oldest web content article matching the group, article ID, and workflow status.
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      status - the web content article's workflow status. For more information see WorkflowConstants for constants starting with the "STATUS_" prefix.
      Returns:
      the oldest matching web content article
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getOSGiServiceIdentifier

      String getOSGiServiceIdentifier()
      Returns the OSGi service identifier.
      Returns:
      the OSGi service identifier
    • getPersistedModel

      @Transactional(propagation=SUPPORTS, readOnly=true) List<? extends com.liferay.portal.kernel.model.PersistedModel> getPersistedModel(long resourcePrimKey) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getPersistedModel in interface com.liferay.portal.kernel.service.PersistedResourcedModelLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getPersistedModel

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.model.PersistedModel getPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getPersistedModel in interface com.liferay.portal.kernel.service.PersistedModelLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getPreviousApprovedArticle

      @Transactional(propagation=SUPPORTS, readOnly=true) JournalArticle getPreviousApprovedArticle(JournalArticle article)
      Returns the previously approved version of the web content article. For more information on the approved workflow status, see WorkflowConstants#STATUS_APPROVED.
      Parameters:
      article - the web content article
      Returns:
      the previously approved version of the web content article, or the current web content article if there are no previously approved web content articles
    • getStructureArticles

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getStructureArticles(long ddmStructureId)
      Returns the web content articles matching the DDM structure keys.
      Parameters:
      ddmStructureId - the primary key of the web content article's DDM structure
      Returns:
      the web content articles matching the DDM structure keys
    • getStructureArticles

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getStructureArticles(long groupId, long ddmStructureId)
      Returns the web content articles matching the group and DDM structure key.
      Parameters:
      groupId - the primary key of the web content article's group
      ddmStructureId - the primary key of the web content article's DDM structure
      Returns:
      the matching web content articles
    • getStructureArticles

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getStructureArticles(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 and DDM structure key.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set.

      Parameters:
      groupId - the primary key of the web content article's group
      ddmStructureId - the primary key of the web content article's DDM structure
      start - the lower bound of the range of web content articles to return
      end - 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
    • getStructureArticlesCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getStructureArticlesCount(long groupId, long ddmStructureId)
      Returns the number of web content articles matching the group and DDM structure key.
      Parameters:
      groupId - the primary key of the web content article's group
      ddmStructureId - the primary key of the web content article's DDM structure
      Returns:
      the number of matching web content articles
    • getTemplateArticles

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getTemplateArticles(long groupId, String ddmTemplateKey)
      Returns the web content articles matching the group and DDM template key.
      Parameters:
      groupId - the primary key of the web content article's group
      ddmTemplateKey - the primary key of the web content article's DDM template
      Returns:
      the matching web content articles
    • getTemplateArticles

      @Transactional(propagation=SUPPORTS, readOnly=true) List<JournalArticle> getTemplateArticles(long groupId, String ddmTemplateKey, 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 DDM template key.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set.

      Parameters:
      groupId - the primary key of the web content article's group
      ddmTemplateKey - the primary key of the web content article's DDM template
      start - the lower bound of the range of web content articles to return
      end - 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
    • getTemplateArticlesCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getTemplateArticlesCount(long groupId, String ddmTemplateKey)
      Returns the number of web content articles matching the group and DDM template key.
      Parameters:
      groupId - the primary key of the web content article's group
      ddmTemplateKey - the primary key of the web content article's DDM template
      Returns:
      the number of matching web content articles
    • getUniqueUrlTitle

      @Transactional(propagation=SUPPORTS, readOnly=true) String getUniqueUrlTitle(long groupId, String articleId, String urlTitle) throws com.liferay.portal.kernel.exception.PortalException
      Returns the web content article's unique URL title.
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      urlTitle - the web content article's accessible URL title
      Returns:
      the web content article's unique URL title
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • hasArticle

      @Transactional(propagation=SUPPORTS, readOnly=true) boolean hasArticle(long groupId, String articleId)
      Returns true if the specified web content article exists.
      Parameters:
      groupId - the primary key of the group
      articleId - the primary key of the web content article
      Returns:
      true if the specified web content article exists; false otherwise
    • isLatestVersion

      @Transactional(propagation=SUPPORTS, readOnly=true) boolean isLatestVersion(long groupId, String articleId, double version) throws com.liferay.portal.kernel.exception.PortalException
      Returns true if the web content article, specified by group and article ID, is the latest version.
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      version - the web content article's version
      Returns:
      true if the specified web content article is the latest version; false otherwise
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • isLatestVersion

      @Transactional(propagation=SUPPORTS, readOnly=true) boolean isLatestVersion(long groupId, String articleId, double version, int status) throws com.liferay.portal.kernel.exception.PortalException
      Returns true if the web content article, specified by group, article ID, and workflow status, is the latest version.
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      version - the web content article's version
      status - the web content article's workflow status. For more information see WorkflowConstants for constants starting with the "STATUS_" prefix.
      Returns:
      true if the specified web content article is the latest version; false otherwise
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • isListable

      @Transactional(propagation=SUPPORTS, readOnly=true) boolean isListable(JournalArticle article)
    • isRenderable

      @Transactional(propagation=SUPPORTS, readOnly=true) boolean isRenderable(JournalArticle article, com.liferay.portal.kernel.portlet.PortletRequestModel portletRequestModel, com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay)
    • moveArticle

      @Indexable(type=REINDEX) JournalArticle moveArticle(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 matching the group and article ID to a new folder.
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      newFolderId - the primary key of the web content article's new folder
      serviceContext - 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 to Constants#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 to a new folder
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • moveArticleFromTrash

      @Indexable(type=REINDEX) JournalArticle moveArticleFromTrash(long userId, long groupId, JournalArticle article, 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 a new folder.
      Parameters:
      userId - the primary key of the user updating the web content article
      groupId - the primary key of the web content article's group
      article - the web content article
      newFolderId - the primary key of the web content article's new folder
      serviceContext - 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 to Constants#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 a new folder
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • moveArticleToTrash

      @Indexable(type=REINDEX) JournalArticle moveArticleToTrash(long userId, JournalArticle article) 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.
      Parameters:
      userId - the primary key of the user updating the web content article
      article - the web content article
      Returns:
      the updated web content article, which was moved to the Recycle Bin
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • moveArticleToTrash

      JournalArticle moveArticleToTrash(long userId, 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.
      Parameters:
      userId - the primary key of the user updating the web content article
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      Returns:
      the moved web content article or null if no matching article was found
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • rebuildTree

      void rebuildTree(long companyId) throws com.liferay.portal.kernel.exception.PortalException
      Rebuilds the web content article's tree path using tree traversal.

      For example, here is a conceptualization of a web content article tree path:

       
       /(Folder's folderId)/(Subfolder's folderId)/(article's articleId)
       
       

      Parameters:
      companyId - the primary key of the web content article's company
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • removeArticleLocale

      @Indexable(type=REINDEX) 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.
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      version - the web content article's version
      languageId - the primary key of the language locale to remove
      Returns:
      the updated web content article with the locale removed
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • restoreArticleFromTrash

      @Indexable(type=REINDEX) JournalArticle restoreArticleFromTrash(long userId, JournalArticle article) throws com.liferay.portal.kernel.exception.PortalException
      Restores the web content article from the Recycle Bin.
      Parameters:
      userId - the primary key of the user restoring the web content article
      article - the web content article
      Returns:
      the restored web content article from the Recycle Bin
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • setTreePaths

      void setTreePaths(long folderId, String treePath, boolean reindex) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • subscribe

      void subscribe(long userId, long groupId, long articleId) throws com.liferay.portal.kernel.exception.PortalException
      Subscribes the user to changes in elements that belong to the web content article.
      Parameters:
      userId - the primary key of the user to be subscribed
      groupId - the primary key of the folder's group
      articleId - the primary key of the article to subscribe to
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • subscribeStructure

      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.
      Parameters:
      groupId - the primary key of the folder's group
      userId - the primary key of the user to be subscribed
      ddmStructureId - the primary key of the structure to subscribe to
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • unsubscribe

      void unsubscribe(long userId, long groupId, long articleId) throws com.liferay.portal.kernel.exception.PortalException
      Unsubscribes the user from changes in elements that belong to the web content article.
      Parameters:
      userId - the primary key of the user to be subscribed
      groupId - the primary key of the folder's group
      articleId - the primary key of the article to unsubscribe from
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • unsubscribeStructure

      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.
      Parameters:
      groupId - the primary key of the folder's group
      userId - the primary key of the user to be subscribed
      ddmStructureId - the primary key of the structure to subscribe to
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updateArticle

      @Indexable(type=REINDEX) JournalArticle updateArticle(long userId, 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 smallImageFile, Map<String,byte[]> images, String articleURL, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Updates the web content article with additional parameters. All scheduling parameters (display date, expiration date, and review date) use the current user's timezone.
      Parameters:
      userId - the primary key of the user updating the web content article
      groupId - the primary key of the web content article's group
      folderId - the primary key of the web content article folder
      articleId - the primary key of the web content article
      version - the web content article's version
      titleMap - the web content article's locales and localized titles
      descriptionMap - the web content article's locales and localized descriptions
      friendlyURLMap - the web content article's locales and localized friendly URLs
      content - the HTML content wrapped in XML. For more information, see the content example in the addArticle(String, long, long, long, long, long, String, boolean, double, Map, Map, Map, String, long, String, String, int, int, int, int, int, int, int, int, int, int, boolean, int, int, int, int, int, boolean, boolean, boolean, long, int, String, File, Map, String, ServiceContext) description.
      ddmTemplateKey - the primary key of the web content article's DDM template
      layoutUuid - the unique string identifying the web content article's display page
      displayDateMonth - the month the web content article is set to display
      displayDateDay - the calendar day the web content article is set to display
      displayDateYear - the year the web content article is set to display
      displayDateHour - the hour the web content article is set to display
      displayDateMinute - the minute the web content article is set to display
      expirationDateMonth - the month the web content article is set to expire
      expirationDateDay - the calendar day the web content article is set to expire
      expirationDateYear - the year the web content article is set to expire
      expirationDateHour - the hour the web content article is set to expire
      expirationDateMinute - the minute the web content article is set to expire
      neverExpire - whether the web content article is not set to auto expire
      reviewDateMonth - the month the web content article is set for review
      reviewDateDay - the calendar day the web content article is set for review
      reviewDateYear - the year the web content article is set for review
      reviewDateHour - the hour the web content article is set for review
      reviewDateMinute - the minute the web content article is set for review
      neverReview - whether the web content article is not set for review
      indexable - whether the web content is searchable
      smallImage - whether to update web content article's a small image. A file must be passed in as smallImageFile value, otherwise the current small image is deleted.
      smallImageSource - the web content article's small image source (optionally null)
      smallImageURL - the web content article's small image URL (optionally null)
      smallImageFile - the web content article's new small image file (optionally null). Must pass in smallImage value of true to replace the article's small image file.
      images - the web content's images (optionally null)
      articleURL - the web content article's accessible URL (optionally null)
      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 to Constants#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:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updateArticle

      JournalArticle 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) throws com.liferay.portal.kernel.exception.PortalException
      Updates the web content article matching the version, replacing its folder, title, description, content, and layout UUID.
      Parameters:
      userId - the primary key of the user updating the web content article
      groupId - the primary key of the web content article's group
      folderId - the primary key of the web content article folder
      articleId - the primary key of the web content article
      version - the web content article's version
      titleMap - the web content article's locales and localized titles
      descriptionMap - the web content article's locales and localized descriptions
      content - the HTML content wrapped in XML. For more information, see the content example in the addArticle(String, long, long, long, long, long, String, boolean, double, Map, Map, Map, String, long, String, String, int, int, int, int, int, int, int, int, int, int, boolean, int, int, int, int, int, boolean, boolean, boolean, long, int, String, File, Map, String, ServiceContext) description.
      layoutUuid - the unique string identifying the web content article's display page
      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 to Constants#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:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updateArticle

      JournalArticle updateArticle(long userId, 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.
      Parameters:
      userId - the primary key of the user updating the web content article
      groupId - the primary key of the web content article's group
      folderId - the primary key of the web content article folder
      articleId - the primary key of the web content article
      version - the web content article's version
      content - the HTML content wrapped in XML. For more information, see the content example in the addArticle(String, long, long, long, long, long, String, boolean, double, Map, Map, Map, String, long, String, String, int, int, int, int, int, int, int, int, int, int, boolean, int, int, int, int, int, boolean, boolean, boolean, long, int, String, File, Map, String, ServiceContext) description.
      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 to Constants#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:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updateArticle

      @Indexable(type=REINDEX) JournalArticle updateArticle(long id, String urlTitle) throws com.liferay.portal.kernel.exception.PortalException
      Updates the URL title of the web content article.
      Parameters:
      id - the primary key of the web content article
      urlTitle - the web content article's URL title
      Returns:
      the updated web content article
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updateArticleDefaultValues

      JournalArticle updateArticleDefaultValues(long userId, 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) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateArticleTranslation

      @Indexable(type=REINDEX) 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.PortalException
      Updates the translation of the web content article.
      Parameters:
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      version - the web content article's version
      locale - the locale of the web content article's display template
      title - the translated web content article title
      description - the translated web content article description
      content - the HTML content wrapped in XML. For more information, see the content example in the addArticle(String, long, long, long, long, long, String, boolean, double, Map, Map, Map, String, long, String, String, int, int, int, int, int, int, int, int, int, int, boolean, int, int, int, int, int, boolean, boolean, boolean, long, int, String, File, Map, String, ServiceContext) description.
      images - the web content's images
      serviceContext - 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:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updateAsset

      void updateAsset(long userId, JournalArticle article, long[] assetCategoryIds, String[] assetTagNames, long[] assetLinkEntryIds, Double priority) throws com.liferay.portal.kernel.exception.PortalException
      Updates the web content article's asset with the new asset categories, tag names, and link entries, removing and adding them as necessary.
      Parameters:
      userId - the primary key of the user updating the web content article's asset
      article - the web content article
      assetCategoryIds - the primary keys of the new asset categories
      assetTagNames - the new asset tag names
      assetLinkEntryIds - the primary keys of the new asset link entries
      priority - the priority of the asset
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updateDDMTemplateKey

      void updateDDMTemplateKey(long groupId, long classNameId, String oldDDMTemplateKey, String newDDMTemplateKey)
      Updates the web content articles matching the group, class name ID, and DDM template key, replacing the DDM template key with a new one.
      Parameters:
      groupId - the primary key of the web content article's group
      classNameId - 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 otherwise
      oldDDMTemplateKey - the primary key of the web content article's old DDM template
      newDDMTemplateKey - the primary key of the web content article's new DDM template
    • updateJournalArticle

      @Indexable(type=REINDEX) JournalArticle updateJournalArticle(JournalArticle journalArticle)
      Updates the journal article in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

      Important: Inspect JournalArticleLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Parameters:
      journalArticle - the journal article
      Returns:
      the journal article that was updated
    • updateStatus

      @Indexable(type=REINDEX) JournalArticle updateStatus(long userId, JournalArticle article, int status, String articleURL, com.liferay.portal.kernel.service.ServiceContext serviceContext, Map<String,Serializable> workflowContext) throws com.liferay.portal.kernel.exception.PortalException
      Updates the workflow status of the web content article.
      Parameters:
      userId - the primary key of the user updating the web content article's status
      article - the web content article
      status - the web content article's workflow status. For more information see WorkflowConstants for constants starting with the "STATUS_" prefix.
      articleURL - the web content article's accessible URL
      serviceContext - the service context to be applied. Can set the modification date, status date, and portlet preferences. With respect to social activities, by setting the service context's command to Constants#UPDATE, the invocation is considered a web content update activity; otherwise it is considered a web content add activity.
      workflowContext - the web content article's configured workflow context
      Returns:
      the updated web content article
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updateStatus

      JournalArticle updateStatus(long userId, long classPK, int status, Map<String,Serializable> workflowContext, 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 class PK.
      Parameters:
      userId - the primary key of the user updating the web content article's status
      classPK - the primary key of the DDM structure, if the web content article is related to a DDM structure, the primary key of the class associated with the article, or 0 otherwise
      status - the web content article's workflow status. For more information see WorkflowConstants for constants starting with the "STATUS_" prefix.
      workflowContext - the web content article's configured workflow
      serviceContext - 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:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updateStatus

      JournalArticle updateStatus(long userId, long groupId, String articleId, double version, int status, String articleURL, Map<String,Serializable> workflowContext, 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.
      Parameters:
      userId - the primary key of the user updating the web content article's status
      groupId - the primary key of the web content article's group
      articleId - the primary key of the web content article
      version - the web content article's version
      status - the web content article's workflow status. For more information see WorkflowConstants for constants starting with the "STATUS_" prefix.
      articleURL - the web content article's accessible URL
      workflowContext - the web content article's configured workflow
      serviceContext - 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:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getCTPersistence

      @Transactional(enabled=false) com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence<JournalArticle> getCTPersistence()
      Specified by:
      getCTPersistence in interface com.liferay.portal.kernel.service.change.tracking.CTService<JournalArticle>
    • getModelClass

      @Transactional(enabled=false) Class<JournalArticle> getModelClass()
      Specified by:
      getModelClass in interface com.liferay.portal.kernel.service.change.tracking.CTService<JournalArticle>
    • updateWithUnsafeFunction

      @Transactional(rollbackFor=java.lang.Throwable.class) <R, E extends Throwable> R updateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence<JournalArticle>,R,E> updateUnsafeFunction) throws E
      Specified by:
      updateWithUnsafeFunction in interface com.liferay.portal.kernel.service.change.tracking.CTService<JournalArticle>
      Throws:
      E extends Throwable