Interface ArticleService

  • All Superinterfaces:
    BaseAPIService

    public interface ArticleService
    extends BaseAPIService
    Fornece acesso aos serviços de artigos.
    Since:
    1.5.4
    Author:
    marcus.carvalho
    • Method Detail

      • delete

        void delete​(long articleId)
             throws com.fluig.sdk.api.common.SDKException
        Remove an article by his id
        Parameters:
        articleId - the Id of a article that will be removed
        Throws:
        com.fluig.sdk.api.common.SDKException
      • get

        ArticleVO get​(String alias,
                      long articleId,
                      boolean draft)
               throws com.fluig.sdk.api.common.SDKException
        Retrieve an article

        Return an article published in a community.
        Parameters:
        alias - the community's alias where the article is published
        articleId - The article's id
        draft - true if retrieving a draft version of the article
        false if retrieving a published version of the article
        Returns:
        ArticleVO This method returns VO of article
        Throws:
        com.fluig.sdk.api.common.SDKException
      • list

        List<ArticleVO> list​(String alias,
                             Long categoryId,
                             Integer limit,
                             Integer offset,
                             String filterBy,
                             String orderBy,
                             String searchBy)
                      throws com.fluig.sdk.api.common.SDKException
        Retrieve a list of article

        Return a list of article published in a community.
        Parameters:
        alias - the community's alias where the article is published
        categoryId - The category's id
        limit - The results limit
        offset - The pagination offset
        offset - The pagination offset
        filterBy - filter result ALL_ARTICLES return all published articles MY_ARTICLES return my publications
        orderBy - ordering result CREATION_DATE_ASC order by creation date CREATION_DATE_DESC order by creation date inverse DESCRIPTION_ASC order by description DESCRIPTION_DESC order by description inverse
        searchBy - literal pattern into document title
        Returns:
        List<ArticleVO> This method returns VO of article
        Throws:
        com.fluig.sdk.api.common.SDKException
      • createDraft

        ArticleVO createDraft​(ArticleVO vo)
                       throws com.fluig.sdk.api.common.SDKException
        Create an article in draft mode.

        Return the article that was created in a draft mode.
        Parameters:
        vo - A article VO with data used to create a article
        Returns:
        ArticleVO This method returns VO of article created
        Throws:
        com.fluig.sdk.api.common.SDKException
      • update

        ArticleVO update​(ArticleVO vo)
                  throws com.fluig.sdk.api.common.SDKException
        Save and update an article.

        Return the article that was updated in a community.
        Parameters:
        vo - A article VO with data used to save the article
        Returns:
        ArticleVO This method returns VO of article updated
        Throws:
        com.fluig.sdk.api.common.SDKException
      • create

        ArticleVO create​(ArticleVO vo)
                  throws com.fluig.sdk.api.common.SDKException
        Create an article.

        Return the article that was updated in a community.
        Parameters:
        vo - A article VO with data used to save the article
        Returns:
        ArticleVO This method returns VO of article updated
        Throws:
        com.fluig.sdk.api.common.SDKException
      • changeCover

        ArticleVO changeCover​(ArticleVO sdkVO)
                       throws com.fluig.sdk.api.common.SDKException
        Update the cover image of an existing article.

        Return the article that was updated in a community.
        Parameters:
        sdkVO - A article VO with data used to update the article
        Returns:
        ArticleVO This method returns VO of article updated
        Throws:
        com.fluig.sdk.api.common.SDKException
      • removeCover

        ArticleVO removeCover​(ArticleVO sdkVO)
                       throws com.fluig.sdk.api.common.SDKException
        Remove the cover image of an existing article.

        Return the article that was updated in a community.
        Parameters:
        sdkVO - A article VO with data used to update the article
        Returns:
        ArticleVO This method returns VO of article updated
        Throws:
        com.fluig.sdk.api.common.SDKException
      • getNextOrPrev

        ArticleVO getNextOrPrev​(Long folderId,
                                Long articleId,
                                String order)
                         throws Exception
        Retrive the next or previous article of one specific article.

        Return the article that is the next or previous of the article passed by parameter.
        Parameters:
        folderId - The folder's id where the next or previous will be searched.
        articleId - The article's Id that will be retrieved the next or previous.
        order - The order to get next or previous article. Use the string 'next' retrieve the next article.
        Returns:
        ArticleVO This method returns VO of article that is the next or previous of the article passed by parameter
        Throws:
        Exception
      • deleteDraft

        void deleteDraft​(String alias,
                         Long articleId)
                  throws com.fluig.sdk.api.common.SDKException
        Remove a version in draft of article

        Remove a draft version of article by his id. If the article isn't in draft, a Error message wil be returned
        Parameters:
        alias - the community's alias where the article is published
        articleId - the Id of a article that will remove the draft version of an article
        Throws:
        com.fluig.sdk.api.common.SDKException