Interface CmsCockpitService

  • All Known Implementing Classes:
    CmsCockpitServiceImpl

    public interface CmsCockpitService
    The Interface CmsCockpitService is responsible for managing approval status, cloning pages and retrieving components, sites and pages information.
    • Method Detail

      • getAllApprovalStatusCodes

        java.util.List<java.lang.String> getAllApprovalStatusCodes()
        Return all approval status codes
        Returns:
        all approval status codes
      • getApprovalStatusName

        java.lang.String getApprovalStatusName​(java.lang.String code)
        Find an approval status name from a given code
        Parameters:
        code - of approval status
        Returns:
        the approval status name
      • setApprovalStatus

        void setApprovalStatus​(TypedObject item,
                               java.lang.String code)
        Update an approval status for a given code
        Parameters:
        item - requiring an approval
        code - of approval status to be updated
      • getApprovalStatusCode

        java.lang.String getApprovalStatusCode​(TypedObject item)
        Find the approval status code for a given item
        Parameters:
        item - having an approval status
        Returns:
        approval status code
      • isPartOfTemplate

        boolean isPartOfTemplate​(TypedObject cmsComponent)
        Determine whether a component is part of a template
        Parameters:
        cmsComponent - to be determined if it is contained in a template
        Returns:
        true if a component is part of a template; false otherwise
      • isRestricted

        boolean isRestricted​(TypedObject cmsComponent)
        Determine whether a component has any associated restrictions or not
        Parameters:
        cmsComponent - to be determined if it has any restrictions
        Returns:
        true if a component has at least one restriction; false otherwise
      • clonePageFirstLevel

        TypedObject clonePageFirstLevel​(TypedObject page,
                                        java.lang.String name)
        Creates a new page on base of an already existing page. Also creates new content slots for this page, but components are the same as in the original page.
        Parameters:
        page - the page to use as template
        name - the name for the new page, if null the name of the original page is used
        Returns:
        the new page
      • createRestrictionTooltip

        java.lang.String createRestrictionTooltip​(TypedObject restriction)
        Retrieve the restriction description to be displayed in a tooltip
        Parameters:
        restriction - containing the description to be displayed
        Returns:
        the description of a given restriction
      • getWebsites

        java.util.Collection<CMSSiteModel> getWebsites()
        Find all sites
        Returns:
        collection of sites, user type permission is checked before returning
      • getRecentlyEditedPages

        java.util.List<AbstractPageModel> getRecentlyEditedPages​(int count)
        Find all pages recently edited
        Parameters:
        count - max number of pages to be returned
        Returns:
        all pages recently edited
      • getPersonalizedPages

        java.util.List<TypedObject> getPersonalizedPages​(TypedObject page)
        Find all personalized pages for a given page
        Parameters:
        page - which is personalized
        Returns:
        all personalized pages for a given page
      • getPersonalizedPages

        java.util.List<TypedObject> getPersonalizedPages​(TypedObject page,
                                                         TypedObject excludePage)
        Find all personalized pages for a given page without a given excluded page
        Parameters:
        page - which is personalized
        excludePage - which is excluded
        Returns:
        all personalized pages for a given page
      • getDefaultPage

        TypedObject getDefaultPage​(TypedObject page)
        Find the default page for a given page
        Parameters:
        page - having a default page
        Returns:
        a default page for a given page
      • getSites

        java.util.Collection<CMSSiteModel> getSites()
        Find all sites
        Returns:
        collection of sites, user type permission is checked before returning