Class WebPageManager

  • All Implemented Interfaces:
    JPropertiesListener

    public class WebPageManager
    extends java.lang.Object
    implements JPropertiesListener
    Manager for WebPage Publication type
    Since:
    jcms-9.0.4 and jcms-10.0.0
    Author:
    Kevin Bransard
    • Field Detail

      • patternList

        protected java.util.List<org.apache.oro.text.regex.Pattern> patternList
    • Method Detail

      • initPatterns

        protected void initPatterns()
      • propertiesChange

        public void propertiesChange​(JProperties properties)
        Description copied from interface: JPropertiesListener
        Invoked after properties have been modified in JCMS and save on disk.

        You cannot alter the value received in parameters.

        Note that properties parameter may be null, a limited set of site properties, or all site properties.

        To check that a property has been modified, reload the "current" property instead using channel.getProperties or channel.getProperty.

        Specified by:
        propertiesChange in interface JPropertiesListener
        Parameters:
        properties - the properties which have been submitted to change
      • getMatchingWebPageSet

        public java.util.Set<AbstractWebPage> getMatchingWebPageSet​(AbstractWebPage webpage,
                                                                    Member loggedMember,
                                                                    Workspace ws)
        Returns a Set of matching WebPage with the same url as the given webpage, filtered on workspace, and logged member rights
        Parameters:
        webpage - the AbstractWebPage from which URL is retrieved, required
        loggedMember - the Member to test read rights, required
        ws - the Workspace to search matching webpage in
        Returns:
        a Set of matching WebPage
      • getMatchingWebpageSet

        public java.util.Set<AbstractWebPage> getMatchingWebpageSet​(java.lang.String url,
                                                                    Member loggedMember,
                                                                    Workspace ws,
                                                                    boolean filterByAuthor,
                                                                    boolean checkRights)
        Returns a Set of matching WebPage with the same url as the given url, filtered on workspace, and logged member rights
        Parameters:
        url - the url to use to get matching webpage
        loggedMember - the Member to test read rights on, required
        ws - the Workspace to search matching webpage in
        filterByAuthor - if true, search for WebPage published by the specified Member
        checkRights - if true, check read rights for given Member
        Returns:
        a Set of matching WebPage
      • webPageExists

        public boolean webPageExists​(java.lang.String url,
                                     Workspace ws)
      • cleanURL

        public java.lang.String cleanURL​(java.lang.String url)
        Parameters:
        url - the url to clean
        Returns:
        a cleaned url (with removed parameters as described in jcms properties)
      • cleanURL

        public java.lang.String cleanURL​(java.lang.String url,
                                         org.apache.oro.text.regex.Perl5Matcher matcher)
        Parameters:
        url - the url to clean
        matcher - the matcher to apply on url
        Returns:
        a cleaned url (with removed parameters as described in jcms properties)