com.jalios.jcms.policy
Class BasicPortalPolicyFilter

java.lang.Object
  extended by com.jalios.jcms.policy.AbstractPolicyFilter
      extended by com.jalios.jcms.policy.BasicPortalPolicyFilter
All Implemented Interfaces:
PluginComponent, PolicyFilter, PortalPolicyFilter, Comparable

public class BasicPortalPolicyFilter
extends AbstractPolicyFilter
implements PortalPolicyFilter, PluginComponent

Since:
jcms-5.7.0
Version:
$Revision: 39481 $
Author:
Jean-Philippe Encausse
See Also:
PortalPolicyFilter, PortalPolicyFilter

Field Summary
static String REVISION
           
 
Fields inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
order
 
Constructor Summary
BasicPortalPolicyFilter()
           
 
Method Summary
 Category checkCategory(Category workingCategory, Member loggedMember)
          Hook called by display.jsp to update the working category.
 void checkCtxCategories(List ctxCategories)
          Hook called by doInitPortal.jsp to update the contextual category list.
 void checkDisplay(DisplayContext context, Category cat, Member loggedMember)
          Hook called by getDisplayContext() to update the content of context.
 void checkDisplay(DisplayContext context, Member member, Category home, Member loggedMember)
          Hook called by getDisplayContext() to update the content of context.
 void checkDisplay(DisplayContext context, Publication pub, Member loggedMember)
          Hook called by getDisplayContext() to update the content of context.
 void checkDisplayContext(DisplayContext context)
          Hook called by display.jsp to create the display context if it is null otherwise sendForbidden.
 String checkPermalink(String permalink, Data data)
          Deprecated. use checkPermalink(String, Data, Locale)
 String checkPermalink(String permalink, Data data, Locale userLocale)
          Hook called by PortalManager.getPermalink() to update the way to render permalinks
 boolean checkPortal(PortalInterface portal, Publication pub, DisplayContext context, Member loggedMember, boolean skipRedirect, boolean skipExact, boolean modePreview, boolean jcmsChoice)
          Hook called by PortalManager to decide if the given portal may be used to display information.
 Publication checkPublication(Publication workingPublication, Member loggedMember, boolean isPreview)
          Hook called by display.jsp to update the working publication.
 String checkRedirect(String redirectUrl, PortalRedirect redirect, DisplayContext context, Member loggedMember)
          Hook called by display.jsp to update the redirect url of PortletRedirect.
 void checkWorkingCategories(List workingCategories, Publication pub, Member loggedMember, boolean skipRedirect, boolean skipExact, boolean modePreview, Category[] ctxCategories)
          Hook called by PortalManager to change the order between categories of a given publication.
 Workspace checkWorkspace(DisplayContext context, Workspace workspace, Member loggedMember)
          Hook called by handleDisplayRequest() (in display.jsp) to update the working worskpace.
 void fillDescriptiveURLParameterMap(Map<String,String> paramMap, Data data)
          Fill the given map with custom parameters to be added to the descriptive URL
 void filterDisplayContext(PortalManager.DisplayContextParameters dcp)
          Hook called by PortalManager to compute display context parameters.
 boolean getBooleanFieldValue(JcmsJspContext ctxt, String fieldName, Data data, boolean computedValue)
          Returns an alternate value for the given boolean field and given Data.
 TreeSet<Category> getCategoryFieldValue(JcmsJspContext ctxt, String fieldName, Data data, TreeSet<Category> computedValue)
          Returns an alternate value for the given Category field and given Data.
 PortalInterface getDefaultPortal(PortalInterface jcmsChoice, Member loggedMember)
          Hook called by PortalManager to compute the default PortalInterface of the given logged Member.
 String getDescriptiveURLId(String descriptiveUrlPath, String id)
          Retrieve the Data to display from the specified descriptive URL.
 String getDescriptiveURLLanguage(String descriptiveUrlPath, String lang)
          Retrieve the language in which to display the Data from the specified descriptive URL.
 String getDescriptiveURLPath(Data data, Locale locale)
          Returns the path of the descriptive URL to use for the specified Data and Locale.
 String getDescriptiveURLText(String descriptiveURLtext, Data data, Locale locale)
          Returns the textual part of a descriptive URL built for the given Data.
 double getDoubleFieldValue(JcmsJspContext ctxt, String fieldName, Data data, double computedValue)
          Returns an alternate value for the given double field and given Data.
 Object getFieldValue(JcmsJspContext ctxt, String fieldName, Data data, Object computedValue)
          Returns an alternate value for the given field and given Data.
 Category getHomeCategory(Category jcmsChoice, Member loggedMember)
          Hook called by PortalManager to compute the home Category of the given logged Member.
 int getIntFieldValue(JcmsJspContext ctxt, String fieldName, Data data, int computedValue)
          Returns an alternate value for the given int field and given Data.
 long getLongFieldValue(JcmsJspContext ctxt, String fieldName, Data data, long computedValue)
          Returns an alternate value for the given long field and given Data.
 boolean init(Plugin plugin)
          Initialize the component with the given plugin configuration
 void initHeaders(Map header, String key, JcmsJspContext context)
          Initialise header data to include in HTML headers in the Front and Back Office.
 void initJavaScriptCodeSet(Set<String> jsCodeSet, JcmsJspContext context)
          Setup the javascript codes to be invoked on page load for current page.
 void initJavaScriptSet(Set<String> jsSet, JcmsJspContext context)
          Setup the javascript files to be included for current page.
 void setupHeaders(Map header, String key, JcmsJspContext context)
          Setup header data to include in HTML headers in the Front and Back Office.
 
Methods inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
compareTo, equals, getOrder, setOrder
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values
Constructor Detail

BasicPortalPolicyFilter

public BasicPortalPolicyFilter()
Method Detail

init

public boolean init(Plugin plugin)
Description copied from interface: PluginComponent
Initialize the component with the given plugin configuration

Specified by:
init in interface PluginComponent
Parameters:
plugin - the calling plugin
Returns:
true if the component has been correctly initialized.
Since:
jcms-5.7.1
See Also:
PluginComponent.init(Plugin)

getHomeCategory

public Category getHomeCategory(Category jcmsChoice,
                                Member loggedMember)
Description copied from interface: PortalPolicyFilter
Hook called by PortalManager to compute the home Category of the given logged Member.
It is called by PolicyManager.getHomeCategory(Category, Member).

Specified by:
getHomeCategory in interface PortalPolicyFilter
Parameters:
jcmsChoice - the jcms standard response
loggedMember - the logged member
Returns:
the home Category
Since:
jcms-7.1.2
See Also:
PortalPolicyFilter.getHomeCategory(com.jalios.jcms.Category, com.jalios.jcms.Member)

getDefaultPortal

public PortalInterface getDefaultPortal(PortalInterface jcmsChoice,
                                        Member loggedMember)
Description copied from interface: PortalPolicyFilter
Hook called by PortalManager to compute the default PortalInterface of the given logged Member.
It is called by PolicyManager.getDefaultPortal(PortalInterface, Member).

Specified by:
getDefaultPortal in interface PortalPolicyFilter
Parameters:
jcmsChoice - the jcms standard response
loggedMember - the logged member
Returns:
the default Portal Interface
Since:
jcms-7.1.2
See Also:
PortalPolicyFilter.getDefaultPortal(com.jalios.jcms.portlet.PortalInterface, com.jalios.jcms.Member)

filterDisplayContext

public void filterDisplayContext(PortalManager.DisplayContextParameters dcp)
Description copied from interface: PortalPolicyFilter
Hook called by PortalManager to compute display context parameters. It is called first before portal resolution. The given PortalManager.DisplayContextParameters contains all computed request parameters. Usage: - This filter may be used to completly update the elements of the request

Specified by:
filterDisplayContext in interface PortalPolicyFilter
Parameters:
dcp - PortalManager.DisplayContextParameters
See Also:
PortalPolicyFilter.filterDisplayContext(com.jalios.jcms.portlet.PortalManager.DisplayContextParameters)

checkCategory

public Category checkCategory(Category workingCategory,
                              Member loggedMember)
Description copied from interface: PortalPolicyFilter
Hook called by display.jsp to update the working category. It is called before portal resolution. Usage: - Replace a given category referenced with "display.jsp?id=catid" by an other. - To do kind of dynamic alias

Specified by:
checkCategory in interface PortalPolicyFilter
Parameters:
workingCategory - the previous computed category
loggedMember - the logged member
Returns:
the new working publication
See Also:
PortalPolicyFilter.checkCategory(Category, Member)

checkPublication

public Publication checkPublication(Publication workingPublication,
                                    Member loggedMember,
                                    boolean isPreview)
Description copied from interface: PortalPolicyFilter
Hook called by display.jsp to update the working publication. It is called before portal resolution. Usage: - Replace a given publication referenced with "display.jsp?id=pubid" by an other. - Handle reader notes - Defaults on publication's reviews or other sub publications.

Specified by:
checkPublication in interface PortalPolicyFilter
Parameters:
workingPublication - the previous computed publication
loggedMember - the logged member
isPreview - boolean indicate preview mode
Returns:
the new working publication
See Also:
PortalPolicyFilter.checkPublication(Publication, Member, boolean)

checkCtxCategories

public void checkCtxCategories(List ctxCategories)
Description copied from interface: PortalPolicyFilter
Hook called by doInitPortal.jsp to update the contextual category list. It is called during page initialisation Usage: - Add/Remove/Reorder contextual categories for all page processing (Contextual categories are used by lots of portal mechanism)

Specified by:
checkCtxCategories in interface PortalPolicyFilter
Parameters:
ctxCategories - the previous computed ctx categories
See Also:
PortalPolicyFilter.checkCtxCategories(List)

checkPortal

public boolean checkPortal(PortalInterface portal,
                           Publication pub,
                           DisplayContext context,
                           Member loggedMember,
                           boolean skipRedirect,
                           boolean skipExact,
                           boolean modePreview,
                           boolean jcmsChoice)
Description copied from interface: PortalPolicyFilter
Hook called by PortalManager to decide if the given portal may be used to display information. It is called for each Portal for each Category tree. Usage: - Accept or Reject a given Portal

Specified by:
checkPortal in interface PortalPolicyFilter
Parameters:
portal - the portal to check
pub - the current publication if we work on a publication
context - the display context
loggedMember - the logged member
skipRedirect - true for display portal, false for display or redirect portal
skipExact - true no to check "exact" feature
modePreview - is preview mode activated
jcmsChoice - the jcms standard response
Returns:
boolean true if the given portal may be used
See Also:
PortalPolicyFilter.checkPortal(PortalInterface, Publication, DisplayContext, Member, boolean, boolean, boolean, boolean)

checkWorkingCategories

public void checkWorkingCategories(List workingCategories,
                                   Publication pub,
                                   Member loggedMember,
                                   boolean skipRedirect,
                                   boolean skipExact,
                                   boolean modePreview,
                                   Category[] ctxCategories)
Description copied from interface: PortalPolicyFilter
Hook called by PortalManager to change the order between categories of a given publication. Default behaviour use first publication categories descendant of contextual categories or channel properties. Note: Since JCMS 5.7.3 This method is called with an empty workingCategories List if the publication do not have valid categories. In this case the method will be called twice: before (without categories) and after sort If the methods stils returns empty workingCategories then use workspace categories Usage: - Update workingCategories List to modify the iteration order. - Set a custom category branch priority - Since JCMS 5.7.3: Add categories for publication without categories

Specified by:
checkWorkingCategories in interface PortalPolicyFilter
Parameters:
workingCategories - a sorted list of starting categories to work with
pub - the current publication
loggedMember - the logged member
skipRedirect - true for display portal, false for display or redirect portal
skipExact - true no to check "exact" feature
modePreview - is preview mode activated
ctxCategories - the contextual categories in request parameters
See Also:
PortalPolicyFilter.checkWorkingCategories(List, Publication, Member, boolean, boolean, boolean, Category[])

checkDisplay

public void checkDisplay(DisplayContext context,
                         Category cat,
                         Member loggedMember)
Description copied from interface: PortalPolicyFilter
Hook called by getDisplayContext() to update the content of context. It is called after portal resolution. Usage: - Update the computed context for the given category

Specified by:
checkDisplay in interface PortalPolicyFilter
Parameters:
context - the computed data
cat - the requested category
loggedMember - the current logged member
See Also:
PortalPolicyFilter.checkDisplay(DisplayContext, Category, Member)

checkDisplay

public void checkDisplay(DisplayContext context,
                         Publication pub,
                         Member loggedMember)
Description copied from interface: PortalPolicyFilter
Hook called by getDisplayContext() to update the content of context. It is called after portal resolution. Usage: - Update the computed context for the given publication

Specified by:
checkDisplay in interface PortalPolicyFilter
Parameters:
context - the computed data
pub - the requested publication
loggedMember - the current logged member
See Also:
PortalPolicyFilter.checkDisplay(DisplayContext, Publication, Member)

checkDisplay

public void checkDisplay(DisplayContext context,
                         Member member,
                         Category home,
                         Member loggedMember)
Description copied from interface: PortalPolicyFilter
Hook called by getDisplayContext() to update the content of context. It is called after portal resolution. Usage: - Update the computed context for the given member

Specified by:
checkDisplay in interface PortalPolicyFilter
Parameters:
context - the computed data
member - the requested member
home - the home category used in redirect url
loggedMember - the current logged member
See Also:
PortalPolicyFilter.checkDisplay(DisplayContext, Member, Category, Member)

checkWorkspace

public Workspace checkWorkspace(DisplayContext context,
                                Workspace workspace,
                                Member loggedMember)
Description copied from interface: PortalPolicyFilter
Hook called by handleDisplayRequest() (in display.jsp) to update the working worskpace. It is called after portal resolution. Usage: - Default behavior use Portal workspace as working workspace. This hook will change this behavior.

Specified by:
checkWorkspace in interface PortalPolicyFilter
Parameters:
context - the computed data
workspace - The workspace
loggedMember - the logged member
Returns:
Workspace the workspace to use
See Also:
PortalPolicyFilter.checkWorkspace(DisplayContext, Workspace, Member)

checkDisplayContext

public void checkDisplayContext(DisplayContext context)
Description copied from interface: PortalPolicyFilter
Hook called by display.jsp to create the display context if it is null otherwise sendForbidden. It is called after portal resolution. Usage: - If context is null a sendForbidden() is sent. - Context may be created or changed to display anything - Set/Remove redirect url

Specified by:
checkDisplayContext in interface PortalPolicyFilter
Parameters:
context - the computed context or null if forbidden
See Also:
PortalPolicyFilter.checkDisplayContext(DisplayContext)

checkRedirect

public String checkRedirect(String redirectUrl,
                            PortalRedirect redirect,
                            DisplayContext context,
                            Member loggedMember)
Description copied from interface: PortalPolicyFilter
Hook called by display.jsp to update the redirect url of PortletRedirect. It is not called for simple redirection error It is called after portal resolution

Specified by:
checkRedirect in interface PortalPolicyFilter
Parameters:
redirectUrl - The redirect url
redirect - the PortalRedirect
context - the computed history
loggedMember - the logged member
Returns:
String the redirect URL
See Also:
PortalPolicyFilter.checkRedirect(String, PortalRedirect, DisplayContext, Member)

checkPermalink

public String checkPermalink(String permalink,
                             Data data)
Deprecated. use checkPermalink(String, Data, Locale)

Description copied from interface: PortalPolicyFilter
Hook called by PortalManager.getPermalink() to update the way to render permalinks

Specified by:
checkPermalink in interface PortalPolicyFilter
Parameters:
permalink - the computed permanent link
data - the working data
Returns:
the permanling of the specified data

checkPermalink

public String checkPermalink(String permalink,
                             Data data,
                             Locale userLocale)
Description copied from interface: PortalPolicyFilter
Hook called by PortalManager.getPermalink() to update the way to render permalinks

Specified by:
checkPermalink in interface PortalPolicyFilter
Parameters:
permalink - the computed permanent link
data - the working data
Returns:
the permanling of the specified data
See Also:
PortalPolicyFilter.checkPermalink(String, Data, Locale)

getDescriptiveURLText

public String getDescriptiveURLText(String descriptiveURLtext,
                                    Data data,
                                    Locale locale)
Description copied from interface: PortalPolicyFilter
Returns the textual part of a descriptive URL built for the given Data. As the textual part is optionnal, this method is called only when the property descriptive-urls.text.enabled is set to "true". The given descriptiveURLtext is null or represents a custom descriptiveURLtext. If the methods returns null then compute the default descriptive URL text

Specified by:
getDescriptiveURLText in interface PortalPolicyFilter
Parameters:
descriptiveURLtext - null or a custom descriptive url
data - the Data for which the URL is built.
locale - the Locale to use I18N and localized operation
Returns:
the textual part of the descriptive URL, or null if you want to let JCMS generate it.
See Also:
PortalPolicyFilter.getDescriptiveURLText(String, Data, Locale)

getDescriptiveURLPath

public String getDescriptiveURLPath(Data data,
                                    Locale locale)
Description copied from interface: PortalPolicyFilter
Returns the path of the descriptive URL to use for the specified Data and Locale.

IMPORTANT : This method is provided for extreme customization of the descriptive URL, but it might break internal features if not modified properly.
Ensure to implement method PortalPolicyFilter.getDescriptiveURLId(String, String) at the same time.

Instead of implementing this method, the easiest way to modify descriptive URL is to implement PortalPolicyFilter.getDescriptiveURLText(String, Data, Locale) in order to change the textual part of the descriptive URL and let JCMS perform all the rest.

Specified by:
getDescriptiveURLPath in interface PortalPolicyFilter
Parameters:
data - the Data for which the URL is built, might be null.
locale - the Locale to use I18N and localized operation
Returns:
the path of the data, relative to the Display Servlet root mapping (usually /jcms/) and without '/' at begining, for example my-unique-data-title Return null if you want to let JCMS generate it, eg : id/my-data-title.
Since:
jcms-6.1.1
See Also:
PortalPolicyFilter.getDescriptiveURLPath(Data, Locale)

getDescriptiveURLId

public String getDescriptiveURLId(String descriptiveUrlPath,
                                  String id)
Description copied from interface: PortalPolicyFilter
Retrieve the Data to display from the specified descriptive URL.

You only need to implement this method if you have modified PortalPolicyFilter.getDescriptiveURLPath(Data, Locale).

Specified by:
getDescriptiveURLId in interface PortalPolicyFilter
Parameters:
descriptiveUrlPath - a descriptive URL such as /jcms/id_42/some-text or anything starting with the DisplayServlet root mapping (usually /jcms/) and followed by value computed through PortalPolicyFilter.getDescriptiveURLPath(Data, Locale)
id - the ID already computed by JCMS (or null if none was found)
Returns:
a Data id, if null or invalid, URL will not be resolved to display any Data.
Since:
jcms-6.1.1
See Also:
PortalPolicyFilter.getDescriptiveURLId(String, String)

getDescriptiveURLLanguage

public String getDescriptiveURLLanguage(String descriptiveUrlPath,
                                        String lang)
Description copied from interface: PortalPolicyFilter
Retrieve the language in which to display the Data from the specified descriptive URL.

You only need to implement this method if you have modified PortalPolicyFilter.getDescriptiveURLPath(Data, Locale).

Specified by:
getDescriptiveURLLanguage in interface PortalPolicyFilter
Parameters:
descriptiveUrlPath - a descriptive URL such as /jcms/id_42/en/some-text or anything starting with the DisplayServlet root mapping (usually /jcms/) and followed by value computed through PortalPolicyFilter.getDescriptiveURLPath(Data, Locale)
lang - the language already computed by JCMS (or null if none was found in the path, in which case default user language is used)
Returns:
a ISO-639 language code, must be a valid value configured in Channel.getLanguageList()
Since:
jcms-7.1.0
See Also:
PortalPolicyFilter.getDescriptiveURLLanguage(String, String)

fillDescriptiveURLParameterMap

public void fillDescriptiveURLParameterMap(Map<String,String> paramMap,
                                           Data data)
Description copied from interface: PortalPolicyFilter
Fill the given map with custom parameters to be added to the descriptive URL

Specified by:
fillDescriptiveURLParameterMap in interface PortalPolicyFilter
Parameters:
paramMap - the parameter map
data - the Data for which the URL is built, might be null.
Since:
jcms-7.0.0
See Also:
PortalPolicyFilter.fillDescriptiveURLParameterMap(Map, Data)

getFieldValue

public Object getFieldValue(JcmsJspContext ctxt,
                            String fieldName,
                            Data data,
                            Object computedValue)
Description copied from interface: PortalPolicyFilter
Returns an alternate value for the given field and given Data. The return value might be a String id of a Storable that might be resolved. The original value can be retrieve by calling Data.getFieldValue(String)

Specified by:
getFieldValue in interface PortalPolicyFilter
Parameters:
ctxt - the JCmsJspContext
fieldName - the name of the called field
data - the Data object to work with
computedValue - the already computed value (using extra data)
Returns:
Object the alternate value
See Also:
PortalPolicyFilter.getFieldValue(JcmsJspContext, String, Data, Object)

getIntFieldValue

public int getIntFieldValue(JcmsJspContext ctxt,
                            String fieldName,
                            Data data,
                            int computedValue)
Description copied from interface: PortalPolicyFilter
Returns an alternate value for the given int field and given Data. The original value can be retrieve by calling Data.getIntFieldValue(String)

Specified by:
getIntFieldValue in interface PortalPolicyFilter
Parameters:
ctxt - the JCmsJspContext
fieldName - the name of the called field
data - the Data object to work with
computedValue - the already computed value (using extra data)
Returns:
int the alternate value
Since:
jcms-6.0.0
See Also:
PortalPolicyFilter.getIntFieldValue(JcmsJspContext, String, Data, int)

getLongFieldValue

public long getLongFieldValue(JcmsJspContext ctxt,
                              String fieldName,
                              Data data,
                              long computedValue)
Description copied from interface: PortalPolicyFilter
Returns an alternate value for the given long field and given Data. The original value can be retrieve by calling Data.getLongFieldValue(String)

Specified by:
getLongFieldValue in interface PortalPolicyFilter
Parameters:
ctxt - the JCmsJspContext
fieldName - the name of the called field
data - the Data object to work with
computedValue - the already computed value (using extra data)
Returns:
long the alternate value
Since:
jcms-6.0.2, jcms-6.1.1
See Also:
PortalPolicyFilter.getLongFieldValue(JcmsJspContext, String, Data, long)

getDoubleFieldValue

public double getDoubleFieldValue(JcmsJspContext ctxt,
                                  String fieldName,
                                  Data data,
                                  double computedValue)
Description copied from interface: PortalPolicyFilter
Returns an alternate value for the given double field and given Data. The original value can be retrieve by calling Data.getDoubleFieldValue(String)

Specified by:
getDoubleFieldValue in interface PortalPolicyFilter
Parameters:
ctxt - the JCmsJspContext
fieldName - the name of the called field
data - the Data object to work with
computedValue - the already computed value (using extra data)
Returns:
double the alternate value
Since:
jcms-6.0.2, jcms-6.1.1
See Also:
PortalPolicyFilter.getDoubleFieldValue(JcmsJspContext, String, Data, double)

getBooleanFieldValue

public boolean getBooleanFieldValue(JcmsJspContext ctxt,
                                    String fieldName,
                                    Data data,
                                    boolean computedValue)
Description copied from interface: PortalPolicyFilter
Returns an alternate value for the given boolean field and given Data. The original value can be retrieve by calling Data.getBooleanFieldValue(String)

Specified by:
getBooleanFieldValue in interface PortalPolicyFilter
Parameters:
ctxt - the JCmsJspContext
fieldName - the name of the called field
data - the Data object to work with
computedValue - the already computed value (using extra data)
Returns:
boolean the alternate value
Since:
jcms-6.0.2, jcms-6.1.1
See Also:
PortalPolicyFilter.getBooleanFieldValue(JcmsJspContext, String, Data, boolean)

getCategoryFieldValue

public TreeSet<Category> getCategoryFieldValue(JcmsJspContext ctxt,
                                               String fieldName,
                                               Data data,
                                               TreeSet<Category> computedValue)
Description copied from interface: PortalPolicyFilter
Returns an alternate value for the given Category field and given Data. The original value can be retrieve by calling Data.getCategoryFieldValue(String, Member)

Specified by:
getCategoryFieldValue in interface PortalPolicyFilter
Parameters:
ctxt - the JCmsJspContext
fieldName - the name of the called field
data - the Data object to work with
computedValue - the already computed value (using extra data)
Returns:
a TreeSet of Category the alternate value
Since:
jcms-6.0.2, jcms-6.1.1
See Also:
PortalPolicyFilter.getCategoryFieldValue(JcmsJspContext, String, Data, TreeSet)

initHeaders

public void initHeaders(Map header,
                        String key,
                        JcmsJspContext context)
Description copied from interface: PortalPolicyFilter
Initialise header data to include in HTML headers in the Front and Back Office. This method is called during the first initialisation of the header. Portlets and Plugins might add header during page construction Topics might be:

Specified by:
initHeaders in interface PortalPolicyFilter
Parameters:
header - the jcms Map header
key - the topic key (for javascript, css, ...)
context - the calling JcmsJspContext
See Also:
PortalPolicyFilter.initHeaders(Map, String, JcmsJspContext)

setupHeaders

public void setupHeaders(Map header,
                         String key,
                         JcmsJspContext context)
Description copied from interface: PortalPolicyFilter
Setup header data to include in HTML headers in the Front and Back Office. This method is called before printing header (done by doEmptyHeader.jsp). Headers contains all elements that will be printed. Topics might be:

Specified by:
setupHeaders in interface PortalPolicyFilter
Parameters:
header - the jcms Map header
key - the topic key (for javascript, css, ...)
context - the calling JcmsJspContext
See Also:
PortalPolicyFilter.setupHeaders(Map, String, JcmsJspContext)

initJavaScriptSet

public void initJavaScriptSet(Set<String> jsSet,
                              JcmsJspContext context)
Description copied from interface: PortalPolicyFilter
Setup the javascript files to be included for current page.

Specified by:
initJavaScriptSet in interface PortalPolicyFilter
Parameters:
jsSet - a set of relative file path (e.g. "js/custom/myfile.js")
context - the calling JcmsJspContext
See Also:
PortalPolicyFilter.initJavaScriptSet(Set, JcmsJspContext)

initJavaScriptCodeSet

public void initJavaScriptCodeSet(Set<String> jsCodeSet,
                                  JcmsJspContext context)
Description copied from interface: PortalPolicyFilter
Setup the javascript codes to be invoked on page load for current page.

Specified by:
initJavaScriptCodeSet in interface PortalPolicyFilter
Parameters:
jsCodeSet - a set of javascript code (e.g. "if (true) { alert('page loaded'); }")
context - the calling JcmsJspContext
See Also:
PortalPolicyFilter.initJavaScriptCodeSet(Set, JcmsJspContext)


Copyright © 2001-2010 Jalios SA. All Rights Reserved.