Package com.jalios.jcms.webpage
Class WebPageManager
- java.lang.Object
-
- com.jalios.jcms.webpage.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 Summary
Fields Modifier and Type Field Description protected java.util.List<org.apache.oro.text.regex.Pattern>
patternList
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
cleanURL(java.lang.String url)
java.lang.String
cleanURL(java.lang.String url, org.apache.oro.text.regex.Perl5Matcher matcher)
static WebPageManager
getInstance()
java.util.Set<AbstractWebPage>
getMatchingWebpageSet(java.lang.String url, Member loggedMember, Workspace ws, boolean filterByAuthor, boolean checkRights)
Returns a Set of matchingWebPage
with the same url as the given url, filtered on workspace, and logged member rightsjava.util.Set<AbstractWebPage>
getMatchingWebPageSet(AbstractWebPage webpage, Member loggedMember, Workspace ws)
Returns a Set of matchingWebPage
with the same url as the given webpage, filtered on workspace, and logged member rightsprotected void
initPatterns()
void
propertiesChange(JProperties properties)
Invoked after properties have been modified in JCMS and save on disk.boolean
webPageExists(java.lang.String url, Workspace ws)
-
-
-
Method Detail
-
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
orchannel.getProperty
.- Specified by:
propertiesChange
in interfaceJPropertiesListener
- 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 matchingWebPage
with the same url as the given webpage, filtered on workspace, and logged member rights- Parameters:
webpage
- theAbstractWebPage
from which URL is retrieved, requiredloggedMember
- theMember
to test read rights, requiredws
- theWorkspace
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 matchingWebPage
with the same url as the given url, filtered on workspace, and logged member rights- Parameters:
url
- the url to use to get matching webpageloggedMember
- theMember
to test read rights on, requiredws
- theWorkspace
to search matching webpage infilterByAuthor
- if true, search for WebPage published by the specifiedMember
checkRights
- if true, check read rights for givenMember
- 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 cleanmatcher
- the matcher to apply on url- Returns:
- a cleaned url (with removed parameters as described in jcms properties)
-
-