Package com.jalios.jcms.portlet
Class PortalManager
java.lang.Object
com.jalios.jcms.portlet.PortalManager
Manager for Portals that handle used classes, their associated images and
manage lots of general features around PortalElement. The features are
delegate to the portal element.
- Author:
- Jean-Philippe Encausse
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCompare categories to find the most relavant one for portal resolution.static final classA structure to handle method parametersstatic classSorts Portals by prioritizing Redirect, and then sorting by pdate -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final org.apache.oro.text.regex.Patternstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddDisplayedPublication(JcmsJspContext jcmsContext, Publication pub) static voidaddHighlightAttributes(javax.servlet.http.HttpServletRequest request, String text, String mode) Adds the given text and mode parameters as request attributes, and set the hlOk attribute to true to allow doDisplayHeader.jsp to provide highlight button.static booleancanWorkOnSome(PortalInterface portal, Member loggedMember) static booleancheckPortal(Category cat, DisplayContext context, Member loggedMember, boolean skipRedirect, boolean skipExact) This method looks for a matching Portal for a given Category.protected static booleancheckPortal(Category cat, Publication pub, DisplayContext context, Member loggedMember, boolean skipRedirect, boolean skipExact) Check the validity of the given Publication to be a convenient Portal.protected static booleancheckPortal(Category category, Publication pub, DisplayContext context, Member loggedMember, boolean skipRedirect, boolean skipExact, boolean preview) Check the validity of the given Publication to be a convenient Portal.static voidclearHighlightAttributes(javax.servlet.http.HttpServletRequest request) Remove the highlight attributes from the current request to disable highlighting for the rest of the pageprotected static booleancontainsAction(javax.servlet.http.HttpServletRequest request, PortalElement portlet) Looking for an action in the HttpRequeststatic booleandisableCache(javax.servlet.http.HttpServletRequest request, PortalElement portlet, Member loggedMember) Return true if the portlet should disable its cache Remove the cache parameter only if its the portlet itself that ask for a refresh (not one of it's parent)static booleanfindPortal(Category cat, DisplayContext context, Member loggedMember, boolean skipRedirect, boolean skipExact, boolean recursive) Recursive methode that try to find the right portal for a given category otherwise may call parent category.static booleanfindPortal(Publication pub, DisplayContext context, Member loggedMember, boolean skipRedirect, boolean skipExact, boolean preview, Category[] ctxCategories) Fill a display context with all the elements usefull for navigation, using the given steps:
1- Iterate on publication categories starting with sibling of contextual categories
2- Recursive call with parents until finding a Portal
3- Then set the portalCategory and the currentCategorystatic StringgetActionParam(PortalElement portlet, String action) Return the parameter for an action of a Portletstatic StringgetAjaxPortalRedirect(javax.servlet.http.HttpServletRequest request) Build an URL working with in AjaxContext redirectsstatic StringgetAjaxPortalUrl(PortalElement portlet) Deprecated.use #getAjaxPortalUrl()static StringgetAjaxPortalUrl(javax.servlet.http.HttpServletRequest request) Build an URL working with in AjaxContext redirectsgetAllCategories(Member loggedMember, Collection<Category> categoryCollec) Return all categories at a given levelsstatic PortalInterfacestatic StringgetCacheParam(PortalElement portlet) Return the parameter for a cache of a Portletstatic File[]This method return an array of CSS in directory css/portal.static Category[]getCtxCategories(javax.servlet.http.HttpServletRequest request) Get all Categories from cid parameters in the requeststatic PortalInterfaceReturn the default portal according to the property channel.default-portal
Implementation note : since jcms-7.1.2, this default portal can be overrided by any custom PortalPolicyFilter.
SeeBasicPortalPolicyFilter.getDefaultPortal(PortalInterface, Member).static DisplayContextgetDisplayContext(JcmsContext context) This is a convenient method to compute display.jsp display context.static DisplayContextgetDisplayContext(String id, PortalInterface overrided, Category[] ctxCategories, Member loggedMember, boolean preview, String queryString) This method compute a display context of parameters for display.jsp.static StringgetDisplayedMapKey(JcmsJspContext jcmsContext) static intgetDisplayedPublicationCount(JcmsJspContext jcmsContext) getDisplayedPublicationMap(JcmsJspContext jcmsContext) static Set<Publication> getDisplayedPublicationSet(JcmsJspContext jcmsContext) static StringgetHightlightParams(javax.servlet.http.HttpServletRequest request) Build query string parameters from the information currently available in the request attributes.static CategoryReturn by default the Category associated to propertychannel.default-index.static StringgetInnerClasses(PortalElement portlet) This method return classes to apply on the given portlet's inside.static StringgetInnerStyles(PortalElement portlet) This method return style to apply on the given portlet's inside.static StringgetOutterClasses(PortalElement portlet) This method return classes to apply on the given portlet's outside.static StringgetOutterStyles(PortalElement portlet) This method return style to apply on the given portlet's outside.static StringgetPermalink(Data data) Deprecated.static StringgetPermalink(Data data, Locale locale) Returns an url representing the permanent link for the given data in the specified language.static PortletReturns the PortletSearch used in the topbar.static PortalInterfaceReturn the print portal according to the property channel.default-printportalstatic Category[]static StringgetUrlWithCommonUpdatedParams(javax.servlet.http.HttpServletRequest request, String[] names, String[] values, boolean encodeParams) static StringgetUrlWithUpdateCtxCategories(Category cat, Category[] ctxArray, String resourcePath, Map<String, String[]> parameterMap, boolean ctx) Return an Url with updated cidsstatic StringgetUrlWithUpdateCtxCategories(Category cat, Category[] ctxArray, javax.servlet.http.HttpServletRequest request, boolean ctx) Return an Url with updated cidsstatic voidhandleDisplayRequest(JcmsJspContext context, DisplayContext display, long startPageRequest) Called by display.jsp to set all request attributes from computed display context.static booleanhandleRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Member loggedMember) Handle Request to check if parameters are Action of Portlets if true then remove them from request and put them to session.static booleanhasFullDisplay(PortalElement portlet, Member loggedMember) Checks if there is a full display anywhere inside the specified PortalElement (including the specified portlet itself).static booleanThis method will check if the portal mecanic use the new behaviour or the old one.static booleanThis method will check if the portal mecanic use the new behaviour or the old one.static booleanisPreview(javax.servlet.http.HttpServletRequest request, PortalElement portlet) Return true if the portlet is in preview modestatic voidprintPortletException(javax.servlet.jsp.JspWriter out, Throwable ex, PortalElement portlet, org.apache.log4j.Logger portletLogger) Print the specified exception as a warning log message (if logger is specified) and to JSP output (if developement mode is enabled).static voidprintPortletException(javax.servlet.jsp.JspWriter out, Throwable ex, String location, org.apache.log4j.Logger portletLogger) Print the specified exception as a warning log message (if logger is specified) and to JSP output (if developement mode is enabled).static voidprocessActions(javax.servlet.http.HttpServletRequest request, List<PortalElement> portlets, Member loggedMember, List<String> actions, List<String> messages, List<String> fullParams) static StringreceiveAction(javax.servlet.http.HttpServletRequest request, PortalElement portlet, String action) Return a Message set for this Portlet by sendAction()static booleanrefreshCache(javax.servlet.http.HttpServletRequest request, PortalElement portlet, Member loggedMember) Return true if the portlet should refresh its cache Remove the cache parameter only if its the portlet itself that ask for a refresh (not one of it's parent)static StringremoveAction(javax.servlet.http.HttpServletRequest request, PortalElement portlet, String action) Remove an action from the session.static StringsendAction(javax.servlet.http.HttpServletRequest request, PortalElement portlet, String action, String message) Return a well formated a URL with a parameter to do an Action for the portletstatic voidsetPreview(javax.servlet.http.HttpServletRequest request, PortalElement portlet, boolean isPreview) Sets the portlet preview modeprotected static booleanupdateFullDisplay(javax.servlet.http.HttpServletRequest request, PortalElement portlet, Member loggedMember) Looking for a FullDisplay Portletstatic voidInit #defaultPortal, #homeCategory, #printPortal and #rootNavigate given following properties :
#defaultPortal : based onchannel.default-portalid property, or "j_206" if property not set. #homeCategory : based onchannel.default-indexid property, or null if property not set. #printPortal : based onchannel.default-printportalid property, or "j_55" if property not set. #rootNavigate : based ondisplay.navigate-rootids property, or null if property not set.
-
Field Details
-
SEO_OPENGRAPH_ENABLED_PROP
- See Also:
-
APP_PORTAL_ATTR
- See Also:
-
CHECK_PORTAL_CATEGORY_ATTR
- See Also:
-
PRIORITIZE_PORTLET_REDIRECT_PROP
- See Also:
-
PORTAL_ACTION
- See Also:
-
PORTAL_ACTION_REMOVE
- See Also:
-
PORTAL_ACTION_CACHE
- See Also:
-
PORTAL_ACTION_MODE
- See Also:
-
PORTAL_PORTLET_FAKE
- See Also:
-
PORTAL_CSS_DIRECTORY
- See Also:
-
PORTAL_ACTION_CUT
- See Also:
-
PORTAL_ACTION_PAST
- See Also:
-
PORTAL_ACTION_REGEXP
public static final org.apache.oro.text.regex.Pattern PORTAL_ACTION_REGEXP -
PORTAL_MODE_ENABLE
- See Also:
-
PORTAL_CLIPBOARD
- See Also:
-
PORTAL_DEFAULT_CACHE
- See Also:
-
PORTAL_PUBLICATION
- See Also:
-
PORTAL_PORTALELEMENT
- See Also:
-
PORTAL_PORTALELEMENT_DOMID
- See Also:
-
PORTAL_PORTAL
- See Also:
-
PORTAL_CURRENTCATEGORY
- See Also:
-
PORTAL_PORTALCATEGORY
- See Also:
-
PORTAL_CTXCATEGORIES
- See Also:
-
PORTAL_TEMPLATEUSAGE
- See Also:
-
PORTAL_CONTEXTE_INCLUDE
- See Also:
-
PORTAL_AJAX_URI
- See Also:
-
PORTLET_SEARCH_TOPBAR_EXTRADATA
- See Also:
-
HIGHLIGHT_ENABLED
- See Also:
-
HIGHLIGHT_TEXT
- See Also:
-
HIGHLIGHT_MODE
- See Also:
-
HIGHLIGHT_DEFAULT_MODE
- See Also:
-
CSS_INNER
- See Also:
-
CSS_OUTER
- See Also:
-
-
Method Details
-
getActionParam
Return the parameter for an action of a Portlet- Parameters:
portlet- the working portletaction- the portlet action- Returns:
- String
- Since:
- jcms-4.0
-
sendAction
public static String sendAction(javax.servlet.http.HttpServletRequest request, PortalElement portlet, String action, String message) Return a well formated a URL with a parameter to do an Action for the portlet- Parameters:
request- the HttpRequestportlet- the working portletaction- String action to sendmessage- Strnig action value- Returns:
- String
- Since:
- jcms-4.0
-
receiveAction
public static String receiveAction(javax.servlet.http.HttpServletRequest request, PortalElement portlet, String action) Return a Message set for this Portlet by sendAction()- Parameters:
request- the HttpRequestportlet- the working portletaction- String action to receive- Returns:
- Sting
- Since:
- jcms-4.0
-
removeAction
public static String removeAction(javax.servlet.http.HttpServletRequest request, PortalElement portlet, String action) Remove an action from the session. Do not change the cache- Parameters:
request- the HttpRequestportlet- the working portletaction- String action to remove- Returns:
- String the action value TODO: Refresh Cache Boolean
- Since:
- jcms-4.0
-
processActions
-
getUrlWithCommonUpdatedParams
public static String getUrlWithCommonUpdatedParams(javax.servlet.http.HttpServletRequest request, String[] names, String[] values, boolean encodeParams) - Parameters:
request- the current HttpRequestnames- an array of parameter names added or updated the urlvalues- an array of values added or updated the url corresponding to namesencodeParams- whether to do a encodeURL on given param (if false, don't forget to do the encodeURL yourself on the parameters which need it! it is provided as a performance boost because encodeURL can be slow)- Returns:
- Returns a relative URL with the given parameters added or updated plus common parameters: portal, id, portlet, jsp, cid if they are in the current request parameters
-
handleRequest
public static boolean handleRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Member loggedMember) throws IOException Handle Request to check if parameters are Action of Portlets if true then remove them from request and put them to session.- Parameters:
request- the HttpRequestresponse- the HttpResponseloggedMember- the Member- Returns:
- boolean
- Throws:
IOException- exception- Since:
- jcms-4.0
-
getPermalink
Deprecated.Returns an url representing the permanent link for the given data.- Parameters:
data- the data to work with- Returns:
- String an url
-
getPermalink
Returns an url representing the permanent link for the given data in the specified language.- Parameters:
data- the data to work withlocale- the Locale in which the data is to be access by the permalink- Returns:
- String an url
-
getCacheParam
Return the parameter for a cache of a Portlet- Parameters:
portlet- the Portlet- Returns:
- String
- Since:
- jcms-4.0
-
refreshCache
public static boolean refreshCache(javax.servlet.http.HttpServletRequest request, PortalElement portlet, Member loggedMember) Return true if the portlet should refresh its cache Remove the cache parameter only if its the portlet itself that ask for a refresh (not one of it's parent)- Parameters:
request- the HttpRequestportlet- the PortletloggedMember- the logged member- Returns:
- boolean
- Since:
- jcms-4.0
-
disableCache
public static boolean disableCache(javax.servlet.http.HttpServletRequest request, PortalElement portlet, Member loggedMember) Return true if the portlet should disable its cache Remove the cache parameter only if its the portlet itself that ask for a refresh (not one of it's parent)- Parameters:
request- the HttpRequestportlet- the PortletloggedMember- the logged member- Returns:
- boolean
- Since:
- jcms-4.0.1
-
containsAction
protected static boolean containsAction(javax.servlet.http.HttpServletRequest request, PortalElement portlet) Looking for an action in the HttpRequest- Parameters:
request- the HttpRequestportlet- the Portlet- Returns:
- true if the request contains a Portlet Action
-
updateFullDisplay
protected static boolean updateFullDisplay(javax.servlet.http.HttpServletRequest request, PortalElement portlet, Member loggedMember) Looking for a FullDisplay Portlet- Parameters:
request- the HttpRequestportlet- the PortletloggedMember- the logged member- Returns:
- true if a FullDisplay Portlet Exists and paremeter exists TODO: Control Customized Portlets
-
hasFullDisplay
Checks if there is a full display anywhere inside the specified PortalElement (including the specified portlet itself).- Parameters:
portlet- the portlet from which to start FullDisplay searchloggedMember- the current loggedMember- Returns:
- true if the specified portlet is a FullDisplay or if any of its children is a full display, false otherwise
-
isPreview
public static boolean isPreview(javax.servlet.http.HttpServletRequest request, PortalElement portlet) Return true if the portlet is in preview mode- Parameters:
request- the HttpRequestportlet- the Portlet- Returns:
- boolean
- Since:
- jcms-4.0
-
setPreview
public static void setPreview(javax.servlet.http.HttpServletRequest request, PortalElement portlet, boolean isPreview) Sets the portlet preview mode- Parameters:
request- the HttpRequestportlet- the PortletisPreview- (true to set it, false to remove)- Since:
- jcms-6.0
-
canWorkOnSome
-
getDefaultPortal
Return the default portal according to the property channel.default-portal
Implementation note : since jcms-7.1.2, this default portal can be overrided by any custom PortalPolicyFilter.
SeeBasicPortalPolicyFilter.getDefaultPortal(PortalInterface, Member).- Returns:
- the default Portal
- Since:
- jcms-4.1
-
getAppPortal
- Returns:
- the portal dedicated to display applications.
- Since:
- jcms-10.0.0
-
getPrintPortal
Return the print portal according to the property channel.default-printportal- Returns:
- the print Portal
- Since:
- jcms-5.0.0
-
getHomeCategory
Return by default the Category associated to propertychannel.default-index.
Implementation note : since jcms-7.1.2, this default home Category can be overrided by any custom PortalPolicyFilter.
SeeBasicPortalPolicyFilter.getHomeCategory(Category, Member).- Returns:
- the home Category of the current logged Member.
-
updateProperties
public static void updateProperties()Init #defaultPortal, #homeCategory, #printPortal and #rootNavigate given following properties :
- #defaultPortal : based on
channel.default-portalid property, or "j_206" if property not set. - #homeCategory : based on
channel.default-indexid property, or null if property not set. - #printPortal : based on
channel.default-printportalid property, or "j_55" if property not set. - #rootNavigate : based on
display.navigate-rootids property, or null if property not set.
- #defaultPortal : based on
-
findPortal
public static boolean findPortal(Publication pub, DisplayContext context, Member loggedMember, boolean skipRedirect, boolean skipExact, boolean preview, Category[] ctxCategories) Fill a display context with all the elements usefull for navigation, using the given steps:
1- Iterate on publication categories starting with sibling of contextual categories
2- Recursive call with parents until finding a Portal
3- Then set the portalCategory and the currentCategory- Parameters:
pub- the publication to displaycontext- the display to fillloggedMember- the member, the publication is displayed forskipRedirect- should we ignore PortalRedirect ?skipExact- should we ignore exact portal ?preview- are we in preview mode ?ctxCategories- the contextual categories to sort the iteration on publication categories- Returns:
- true if the portal has been found
-
findPortal
public static boolean findPortal(Category cat, DisplayContext context, Member loggedMember, boolean skipRedirect, boolean skipExact, boolean recursive) Recursive methode that try to find the right portal for a given category otherwise may call parent category. Work with an display context filled with navigation elements:- Parameters:
cat- the category to work withcontext- the list to fillloggedMember- the member, the publication is displayed forskipRedirect- should we ignore PortalRedirect ? Usefull when called by findPortal(Publication).skipExact- should we ignore portal accepting only exact matchrecursive- is it a recursive call with parent category ?- Returns:
- true if the portal has been found
-
checkPortal
public static boolean checkPortal(Category cat, DisplayContext context, Member loggedMember, boolean skipRedirect, boolean skipExact) This method looks for a matching Portal for a given Category. Then set the portal Category in display context.
Portal with ExactCategory option are priority checked
- Parameters:
cat- The current categorycontext- display contextloggedMember- The current memberskipRedirect- Should skip redirect portalskipExact- Should skip exact portal- Returns:
- boolean true if portal as been found
- Since:
- jcms-4.0
-
checkPortal
protected static boolean checkPortal(Category cat, Publication pub, DisplayContext context, Member loggedMember, boolean skipRedirect, boolean skipExact) Check the validity of the given Publication to be a convenient Portal.
Set the Portal.- Parameters:
cat- the iterated category if anypub- the Publicationcontext- a DisplayContext to updateloggedMember- the Logged MemberskipRedirect- boolean to skip redirectskipExact- boolean to skip exact portal- Returns:
- true if publication is validated
- Since:
- jcms-4.0
-
checkPortal
protected static boolean checkPortal(Category category, Publication pub, DisplayContext context, Member loggedMember, boolean skipRedirect, boolean skipExact, boolean preview) Check the validity of the given Publication to be a convenient Portal.- Parameters:
category- the iterated category if anypub- the Publicationcontext- a DisplayContext to updateloggedMember- the Logged MemberskipRedirect- boolean to skip redirectskipExact- boolean to skip exact portalpreview- boolean is preview mode- Returns:
- true if publication is validated
- Since:
- jcms-4.0
-
getAllCategories
protected static List<Category> getAllCategories(Member loggedMember, Collection<Category> categoryCollec) Return all categories at a given levels- Parameters:
loggedMember- the logged MembercategoryCollec- a collection of Category- Returns:
- List a list of Category
- Since:
- jcms-4.0
-
getCtxCategories
Get all Categories from cid parameters in the request- Parameters:
request- the current request- Returns:
- An Array of category
- Since:
- jcms-5.0
-
getUrlWithUpdateCtxCategories
public static String getUrlWithUpdateCtxCategories(Category cat, Category[] ctxArray, String resourcePath, Map<String, String[]> parameterMap, boolean ctx) Return an Url with updated cids- Parameters:
cat- the categoryctxArray- the contextual category arrayresourcePath- the request resource pathparameterMap- the request parameter mapctx- is sctx category or navigate category- Returns:
- a erlative Url
- Since:
- jcms-5.5
-
getUrlWithUpdateCtxCategories
public static String getUrlWithUpdateCtxCategories(Category cat, Category[] ctxArray, javax.servlet.http.HttpServletRequest request, boolean ctx) Return an Url with updated cids- Parameters:
cat- the categoryctxArray- the contextual category arrayrequest- the request to call ServletUtilctx- is sctx category or navigate category- Returns:
- a erlative Url
- Since:
- jcms-5.0
-
getDisplayContext
This is a convenient method to compute display.jsp display context. See getDisplayContext() for more informations.- Parameters:
context- the JcmsContext- Returns:
- List computed display context
- See Also:
-
getDisplayContext
public static DisplayContext getDisplayContext(String id, PortalInterface overrided, Category[] ctxCategories, Member loggedMember, boolean preview, String queryString) This method compute a display context of parameters for display.jsp. The algorithm work on parameter 'id' to find matching attributes: CurrentCategory, PortalCategory, Portal to display the given Data.
- If context is null then a sendForbidden() must be called
- If redirect not null then sendRedirect()- Parameters:
id- the request parameter id describing the working dataoverrided- the overrided portal (request parameter portal)ctxCategories- the contextual categories (request parameter cid)loggedMember- the loggedmemberpreview- boolean indicate if it is a previewqueryString- the request querystring used by redirect parameters- Returns:
- List of display.jsp computed parameters
-
handleDisplayRequest
public static void handleDisplayRequest(JcmsJspContext context, DisplayContext display, long startPageRequest) Called by display.jsp to set all request attributes from computed display context. The method getDisplayContext() must be called before to compute display context.- Parameters:
context- a JcmsContext handling page requestdisplay- a computed display.jsp display contextstartPageRequest- long indicating start page request- See Also:
-
addHighlightAttributes
public static void addHighlightAttributes(javax.servlet.http.HttpServletRequest request, String text, String mode) Adds the given text and mode parameters as request attributes, and set the hlOk attribute to true to allow doDisplayHeader.jsp to provide highlight button.- Parameters:
request- the HttpRequesttext- The text to highlightmode- the mode to use to search the text (same mode used in query, all, any, etc)
-
clearHighlightAttributes
public static void clearHighlightAttributes(javax.servlet.http.HttpServletRequest request) Remove the highlight attributes from the current request to disable highlighting for the rest of the page- Parameters:
request- the HttpRequest
-
getHightlightParams
Build query string parameters from the information currently available in the request attributes. If highlight attributes are available in the request, the return value will be of the form "&hlText=...&hlMode=..."- Parameters:
request- the HttpRequest- Returns:
- String the highlight param
-
getAjaxPortalUrl
Deprecated.use #getAjaxPortalUrl()Build an URL working with AjaxContext redirects- Parameters:
portlet- the Portlet to display- Returns:
- String a valid URL
- Since:
- jcms-6.0.1
-
getAjaxPortalUrl
Build an URL working with in AjaxContext redirects- Parameters:
request- the HttpServletRequest- Returns:
- String a valid URL
- Since:
- jcms-6.0.2
-
getAjaxPortalRedirect
Build an URL working with in AjaxContext redirects- Parameters:
request- the HttpServletRequest- Returns:
- String a valid URL
- Since:
- jcms-6.0.2
-
isNewBehaviour
public static boolean isNewBehaviour()This method will check if the portal mecanic use the new behaviour or the old one.- Returns:
- boolean true if it is the new mecanic.
- Since:
- jcms-5.5.0
-
isBehaviourBackCompatible
public static boolean isBehaviourBackCompatible()This method will check if the portal mecanic use the new behaviour or the old one.- Returns:
- boolean true if it is the new mecanic.
- Since:
- jcms-5.5.0
-
getOutterStyles
This method return style to apply on the given portlet's outside. It works with portlet attributes:- width
- insets
- alignTable
- border
- backgroundImage
- backgroundColor
- Parameters:
portlet- a PortalElement to work with- Returns:
- String the outter styles
- Since:
- jcms-5.5.0
-
getInnerStyles
This method return style to apply on the given portlet's inside. It works with portlet attributes:- CellPadding
- AlignV
- AlignH
- Parameters:
portlet- a PortalElement to work with- Returns:
- String the inner styles
- Since:
- jcms-5.5.0
-
getOutterClasses
This method return classes to apply on the given portlet's outside. It may sets:- Outter
- Portlet
- PortletSkinable
- Custom CSS Skin
- PortletCollection
- Parameters:
portlet- a PortalElement to work with- Returns:
- String the outer classes
- Since:
- jcms-5.5.0
-
getInnerClasses
This method return classes to apply on the given portlet's inside. It works with portlet attributes:- Inner
- Custom CSS Display
- Parameters:
portlet- a PortalElement to work with- Returns:
- String the inner classes
- Since:
- jcms-5.5.0
-
getCssFiles
This method return an array of CSS in directory css/portal. It is used by portal to display available portal css files.- Returns:
- File[] the list of css files
-
getCSSMap
-
printPortletException
public static void printPortletException(javax.servlet.jsp.JspWriter out, Throwable ex, PortalElement portlet, org.apache.log4j.Logger portletLogger) throws IOException Print the specified exception as a warning log message (if logger is specified) and to JSP output (if developement mode is enabled).- Parameters:
out- the JspWriter to use to print the exception, when developement mode is enabledex- the exception, required, no operation is performed if null is specifiedportlet- the portlet in which the exception occured, may be null (though not recommanded)portletLogger- the logger to use to output the exception, may be null- Throws:
IOException- if an error occured while printing to JSP output.
-
printPortletException
public static void printPortletException(javax.servlet.jsp.JspWriter out, Throwable ex, String location, org.apache.log4j.Logger portletLogger) throws IOException Print the specified exception as a warning log message (if logger is specified) and to JSP output (if developement mode is enabled).Developpement mode is configured with property
channel.dev-mode.enabled- Parameters:
out- the JspWriter to use to print the exception, when developement mode is enabledex- the exception, required, no operation is performed if null is specifiedlocation- a string indicating where the exception occured (e.g. a JSP path, a portlet title, ...), no operation is performed if null is specifiedportletLogger- the logger to use to output the exception as a warning level, may be null- Throws:
IOException- if an error occured while printing to JSP output.
-
getPortletSearchTopbar
Returns the PortletSearch used in the topbar.- Returns:
- the PortletSearch used in the topbar.
- Since:
- jcms-8.0.0
-
addDisplayedPublication
-
getDisplayedPublicationMap
-
getDisplayedPublicationSet
-
getDisplayedPublicationCount
-
getDisplayedMapKey
-