Class WebPageManager

java.lang.Object
com.jalios.jcms.webpage.WebPageManager
All Implemented Interfaces:
JPropertiesListener

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

    • patternList

      protected List<org.apache.oro.text.regex.Pattern> patternList
    • checkPeriod

      protected long checkPeriod
  • Method Details

    • getInstance

      public static WebPageManager getInstance()
    • 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 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 Set<AbstractWebPage> getMatchingWebpageSet(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(String url, Workspace ws)
    • cleanURL

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

      public String cleanURL(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)