com.jalios.jcms.context
Class JcmsContext

java.lang.Object
  extended by com.jalios.jcms.context.JcmsContext
All Implemented Interfaces:
JcmsConstants, JaliosConstants
Direct Known Subclasses:
JcmsJspContext, PagerHandler

public class JcmsContext
extends Object
implements JcmsConstants

This class keep track of all variables declared in doInitPage and give access to convenient methods when you are not in a jsp (servlet, tag, custom class etc) To use methods of this class, You MUST set a valid request and response (either with the contructor or with the setters). The current JcmsContext can be retreived either through the variable jcmsContext in a JSP or through the method Channel.getCurrentJcmsContext().

Since:
jcms-5.0.0
Version:
$Revision: 25050 $
Author:
Olivier Jaquemet

Field Summary
protected  Browser browser
           
protected  Caddy caddy
           
protected static Channel channel
           
protected  boolean inFO
           
protected  boolean initDone
           
protected  boolean initWorkspace
           
protected  boolean isAdmin
           
protected  boolean isAjaxRequest
           
protected  boolean isDBMember
           
protected  boolean isDebug
           
protected  boolean isLogged
           
protected  Member loggedMember
           
protected  javax.servlet.http.HttpServletRequest request
           
protected  javax.servlet.http.HttpServletResponse response
           
static String REVISION
           
protected  String userLang
           
protected  Locale userLocale
           
protected  Workspace workspace
           
 
Fields inherited from interface com.jalios.jcms.JcmsConstants
ADATE_SEARCH, ADMIN_NOTES_PROP, ADVANCED_TAB, ARCHIVES_DIR, ASCII_WIDTH, CATEGORY_TAB, CDATE_SEARCH, COMMON_ALARM, CONTENT_TAB, COOKIE_MAX_AGE, CRYPT_MD5, CRYPT_UNDEFINED, CRYPT_UNIX, CTRL_TOPIC_INTERNAL, CTRL_TOPIC_REF, CTRL_TOPIC_VALUE, CTRL_TOPIC_WRITE, CUSTOM_PROP, DOCCHOOSER_HEIGHT, DOCCHOOSER_WIDTH, DOCS_DIR, EDATE_SEARCH, EMAIL_REGEXP, ERROR_MSG, FORBIDDEN_FILE_ACCESS, FORBIDDEN_REDIRECT, FORCE_REDIRECT, ICON_ARCHIVE, ICON_LOCK, ICON_LOCK_STRONG, ICON_WARN, ICON_WH_BOOK_CLOSED, ICON_WH_BOOK_OPEN, INFORMATION_MSG, JALIOS_JUNIT_PROP, JCMS_CADDY, JSYNC_DOWNLOAD_DIR, JSYNC_SYNC_ALARM, LOG_FILE, LOG_TOPIC_SECURITY, LOGGER_PROP, LOGGER_XMLPROP, MBR_PHOTO_DIR, MDATE_SEARCH, MONITOR_XML, OP_CREATE, OP_DEEP_COPY, OP_DEEP_DELETE, OP_DELETE, OP_MERGE, OP_UPDATE, PDATE_SEARCH, PHOTO_LARGE, PHOTO_LARGE_HEIGHT, PHOTO_LARGE_WIDTH, PHOTO_NORMAL, PHOTO_NORMAL_HEIGHT, PHOTO_NORMAL_WIDTH, PHOTO_SMALL, PHOTO_SMALL_HEIGHT, PHOTO_SMALL_WIDTH, PHOTO_TINY, PHOTO_TINY_HEIGHT, PHOTO_TINY_WIDTH, PREVIOUS_TAB, PRINT_VIEW, PRIVATE_FILE_ACCESS, PUBLIC_FILE_ACCESS, READ_RIGHT_TAB, SDATE_SEARCH, SEARCHENGINE_ALARM, SESSION_AUTHORIZED_FILENAMES_SET, STATS_REPORT_DIR, STATUS_PROP, STORE_XML, TEMPLATE_TAB, THUMBNAIL_LARGE_HEIGHT, THUMBNAIL_LARGE_WIDTH, THUMBNAIL_SMALL_HEIGHT, THUMBNAIL_SMALL_WIDTH, UDATE_SEARCH, UPDATE_RIGHT_TAB, UPLOAD_DIR, URL_REGEXP, WARNING_MSG, WEBAPP_PROP, WFEXPRESS_ALARM, WFREMINDER_ALARM, WORKFLOW_TAB, WORKFLOW_XML
 
Fields inherited from interface com.jalios.util.JaliosConstants
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR
 
Constructor Summary
JcmsContext()
          If you use this constructor, request must be initialized at a later time (This constructor is kept to allow JcmsJspContext to be initialized as a bean, with pageContext parameter)
JcmsContext(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 
Method Summary
 void addCookie(javax.servlet.http.Cookie cookie)
          Adds the specified cookie to the response (or in a http-equiv is the response has already been commited, in this case, only for front office use).
 void forceUpdate()
          Will force an update of all JcmsContext variables (retrieve it from the request).
 void forceWorkspaceUpdate()
          Force Workspace update on next getWorkspace()
 String getBaseUrl()
          Convenient method which returns ServletUtil.getBaseUrl(request);
 Browser getBrowser()
          Returns the Client Browser computed for this session identified from userAgent.
 Caddy getCaddy()
          Returns the caddy stored in current session.
 String getContextPath()
          Convenient method which returns ServletUtil.getContextPath(request)
static String[] getErrorMsg(javax.servlet.http.HttpServletRequest request)
          Returns messages in the J2EE session and in the J2EE request of ERROR level.
static String[] getInfoMsg(javax.servlet.http.HttpServletRequest request)
          Returns messages in the J2EE session and in the J2EE request of INFO level.
 Member getLoggedMember()
          Retrieve the loggedMember variable for this context.
 javax.servlet.http.HttpServletRequest getRequest()
           
 javax.servlet.http.HttpServletResponse getResponse()
           
 javax.servlet.http.HttpSession getSession()
          Shorter Method to get Session from request
 Object getUploadedFile(String field, boolean isFileDocument, boolean override)
          Performs upload for the given field to JCMS upload directory.
 List<DocUploadInfo> getUploadedFileList(String field, boolean isFileDocument, boolean override)
          Performs upload for the given field to JCMS upload directory.
 String getUrlWithCommonUpdatedParams(String[] names, String[] values, boolean encodeParams)
           
 String getUserLang()
          Retrieves the user lang variable for this context.
 Locale getUserLocale()
          Retrieve the userLocale variable for this context.
static String[] getWarningMsg(javax.servlet.http.HttpServletRequest request)
          Returns messages in the J2EE session and in the J2EE request of WARNING level.
 Workspace getWorkspace()
          Retrieve the current Workspace variable for this context either from request if inFO or from session if in back office.
 String glp(String key, Object... params)
          Resolve a language property in the user language of the current request.
 boolean isAdmin()
          Return the admin status of the current logged user.
 boolean isAjaxRequest()
          Check if the current request is an Ajax Request (performed through by prototypejs API).
 boolean isDBMember()
          Return the DB status of the current logged user.
 boolean isDebug()
          Return the debug state of the request depending on request parameter "debug"
 boolean isInFrontOffice()
          retrieve the inFO variable for this context.
 boolean isLogged()
          Return the user logging status for current request.
 boolean isWebdavAccess()
          Check if the current request is a Webdav Access
protected  DocUploadInfo retrieveUploadedFile(org.apache.commons.fileupload.FileItem item, boolean isFileDocument, boolean override)
          Performs upload of a given FileItem to JCMS upload directory.
 void sendForbidden()
          Send a redirect to the forbidden page
static void sendForbidden(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Send a redirect to the forbidden page if parameter forbidden is set, then redirect to the given url without logging anything.
 void sendRedirect(Data data)
          Redirect to the given data (eg a publication, a category, ...)
 void sendRedirect(String url)
          Redirect current request to given URL.
static void sendRedirect(String url, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Redirect current request to given URL.
 void setErrorMsg(String msg)
          Set JCMS warning message for current request (displayed through doMessageBox.jsp)
static void setErrorMsg(String msg, javax.servlet.http.HttpServletRequest request)
          Set JCMS warning message for specified request (displayed through doMessageBox.jsp)
 void setErrorMsgSession(String msg)
          Set JCMS warning message for current session (displayed through doMessageBox.jsp)
static void setErrorMsgSession(String msg, javax.servlet.http.HttpServletRequest request)
          Set JCMS warning message for specified session (displayed through doMessageBox.jsp)
 void setInfoMsg(String msg)
          Set JCMS info message for current request (displayed through doMessageBox.jsp)
static void setInfoMsg(String msg, javax.servlet.http.HttpServletRequest request)
          Set JCMS info message for specified request (displayed through doMessageBox.jsp)
 void setInfoMsgSession(String msg)
          Set JCMS info message for current session (displayed through doMessageBox.jsp)
static void setInfoMsgSession(String msg, javax.servlet.http.HttpServletRequest request)
          Set JCMS info message for specified session (displayed through doMessageBox.jsp)
 void setLoggedMember(Member mbr)
          Set the logged member for this context.
 void setRequest(javax.servlet.http.HttpServletRequest request)
          Setter for the request.
 void setResponse(javax.servlet.http.HttpServletResponse response)
          Setter for the response.
 void setWarningMsg(String msg)
          Set JCMS warning message for current request (displayed through doMessageBox.jsp)
static void setWarningMsg(String msg, javax.servlet.http.HttpServletRequest request)
          Set JCMS warning message for specified request (displayed through doMessageBox.jsp)
 void setWarningMsgSession(String msg)
          Set JCMS warning message for current session (displayed through doMessageBox.jsp)
static void setWarningMsgSession(String msg, javax.servlet.http.HttpServletRequest request)
          Set JCMS warning message for specified session (displayed through doMessageBox.jsp)
 boolean validateRegexp(String regexp)
          Validate a pattern as a Perl regexp and set a convienient warning message in the request if not valid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values

channel

protected static final Channel channel

initDone

protected boolean initDone

initWorkspace

protected boolean initWorkspace

request

protected javax.servlet.http.HttpServletRequest request

response

protected javax.servlet.http.HttpServletResponse response

isLogged

protected boolean isLogged

isAdmin

protected boolean isAdmin

isDBMember

protected boolean isDBMember

isDebug

protected boolean isDebug

loggedMember

protected Member loggedMember

userLocale

protected Locale userLocale

userLang

protected String userLang

workspace

protected Workspace workspace

browser

protected Browser browser

caddy

protected Caddy caddy

inFO

protected boolean inFO

isAjaxRequest

protected boolean isAjaxRequest
Constructor Detail

JcmsContext

public JcmsContext()
If you use this constructor, request must be initialized at a later time (This constructor is kept to allow JcmsJspContext to be initialized as a bean, with pageContext parameter)


JcmsContext

public JcmsContext(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
Method Detail

forceUpdate

public void forceUpdate()
Will force an update of all JcmsContext variables (retrieve it from the request). Update the protected variable initDone (to false at begining of method, and true on end).


setRequest

public void setRequest(javax.servlet.http.HttpServletRequest request)
Setter for the request. Will initialize all the variable of the JcmsContext if available in the request. (Therefore, it must be called after all the treatements done in doInitPage)

Parameters:
request - the HttpServletRequest from twhich to retrieve all jcms context information.

getRequest

public javax.servlet.http.HttpServletRequest getRequest()
Returns:
the request of this JcmsContext

setResponse

public void setResponse(javax.servlet.http.HttpServletResponse response)
Setter for the response.
Response is only needed for some methods of the context such as sendRedirect(String)

Parameters:
response - the HttpServletResponse to use when needed.

getResponse

public javax.servlet.http.HttpServletResponse getResponse()
Returns:
the response of this JcmsContext

getSession

public javax.servlet.http.HttpSession getSession()
Shorter Method to get Session from request

Returns:
HttpSession the Session

getUploadedFile

public Object getUploadedFile(String field,
                              boolean isFileDocument,
                              boolean override)
Performs upload for the given field to JCMS upload directory. Calling method must handle job around file like creating or updating associated FileDocument.

Parameters:
field - the submited field
isFileDocument - upload to a FileDocument path upload/docs/...
override - If file already exists, override or rename with current timemillis
Returns:
Object a List of uploaded files (DocUploadInfo) or a DocUploadInfo
Since:
jcms-5.7.0

getUploadedFileList

public List<DocUploadInfo> getUploadedFileList(String field,
                                               boolean isFileDocument,
                                               boolean override)
Performs upload for the given field to JCMS upload directory. Calling method must handle job around file like creating or updating associated FileDocument.

Parameters:
field - the submited field
isFileDocument - upload to a FileDocument upload/docs/...
override - If file already exists, override or rename with current timemillis
Returns:
List a List of uploaded files
Since:
jcms-5.7.0

retrieveUploadedFile

protected DocUploadInfo retrieveUploadedFile(org.apache.commons.fileupload.FileItem item,
                                             boolean isFileDocument,
                                             boolean override)
Performs upload of a given FileItem to JCMS upload directory. Calling method must handle job around file like creating or updating associated FileDocument.

Parameters:
item - the FileItem handling uploaded file information
isFileDocument - upload to a FileDocument path upload/docs/...
override - If file already exists, override or rename with current timemillis
Returns:
DocUploadInfo the uploaded DocUploadInfo
Since:
jcms-5.7.0

isLogged

public boolean isLogged()
Return the user logging status for current request. Fast: this method is cached using initDone (it is recomputed only on forceUpdate() or setRequest()).

Returns:
true if a member is logged, false otherwise.

isWebdavAccess

public boolean isWebdavAccess()
Check if the current request is a Webdav Access

Returns:
boolean true if it is a Webdav Access
Since:
jcms-5.5.0

isDebug

public boolean isDebug()
Return the debug state of the request depending on request parameter "debug"

Returns:
true if request is in debug mode

isAdmin

public boolean isAdmin()
Return the admin status of the current logged user. Fast: this method is cached using initDone (it is recomputed only on forceUpdate() or setRequest()).

Returns:
true if the logged member is admin, false otherwise.

isDBMember

public boolean isDBMember()
Return the DB status of the current logged user. Fast: this method is cached using initDone (it is recomputed only on forceUpdate() or setRequest()).

Returns:
true if the logged member is an DBMember, false otherwise.

getLoggedMember

public Member getLoggedMember()
Retrieve the loggedMember variable for this context. Fast: this method is cached using initDone (it is recomputed only on forceUpdate() or setRequest()).

Returns:
the logged member (or null if nobody is logged)

setLoggedMember

public void setLoggedMember(Member mbr)
Set the logged member for this context.

This methods only changed the logged member for this context instance, this method is provided in case you want to force the logged member in bean/handlers.
It will NOT change the logged member of the current request, if you want to do that, see AuthenticationHandler.

Parameters:
mbr - the Member to set as the currently logged Member.
Since:
jcms-5.7.1

getUserLang

public String getUserLang()
Retrieves the user lang variable for this context.
Fast: this method is cached using initDone (it is recomputed only on forceUpdate() or setRequest()).

Returns:
the user lang (define in InitFilter, guessed either from logged member lang, userLang portlet action, http request Accept-Language header, or defaut channel language

getUserLocale

public Locale getUserLocale()
Retrieve the userLocale variable for this context.
Fast: this method is cached using initDone (it is retrieved again only on forceUpdate() or setRequest()).

Returns:
the Locale associated with the user language

isInFrontOffice

public boolean isInFrontOffice()
retrieve the inFO variable for this context. This parameter indicate if the jsp/servlet is in the FrontOffice or Not. Fast: this method is cached using initDone (it is retrieve again only on forceUpdate() or setRequest()).

Returns:
true if in FrontOffice otherwise false

forceWorkspaceUpdate

public void forceWorkspaceUpdate()
Force Workspace update on next getWorkspace()


getWorkspace

public Workspace getWorkspace()
Retrieve the current Workspace variable for this context either from request if inFO or from session if in back office. Fast: this method is cached using initDone (it is recomputed only on forceUpdate() or setRequest()).

Returns:
the Workspace associated with the current session

getBrowser

public Browser getBrowser()
Returns the Client Browser computed for this session identified from userAgent. Fast: this method is cached using initDone (it is retrieve again only on forceUpdate() or setRequest()).

Returns:
the Client Browser

getCaddy

public Caddy getCaddy()
Returns the caddy stored in current session. Fast: this method is cached using initDone (it is retrieve again only on forceUpdate() or setRequest()).

Returns:
the session caddy

isAjaxRequest

public boolean isAjaxRequest()
Check if the current request is an Ajax Request (performed through by prototypejs API). Fast: this method is cached using initDone (it is retrieve again only on forceUpdate() or setRequest()).

Returns:
true if request is an ajax request, false otherwise

sendRedirect

public void sendRedirect(Data data)
                  throws IOException
Redirect to the given data (eg a publication, a category, ...) Will not redirect if data is null or if response has already been commited, but we put the request attribute "redirect" with the value of the url so that doDisplayBuffer can be able to redirect with the javascript hack.

Parameters:
data - the data to redirect to.
Throws:
IOException - if an error occured while writing in response headers
Since:
jcms-5.7.1
See Also:
sendRedirect(String, HttpServletRequest, HttpServletResponse)

sendRedirect

public void sendRedirect(String url)
                  throws IOException
Redirect current request to given URL. Will not redirect if response has already been commited, but we put the request attribute "redirect" with the value of the url so that doDisplayBuffer can be able to redirect with the javascript hack.

Parameters:
url - the url to redirect to.
Throws:
IOException - if an error occured while writing in response headers
Since:
jcms-5.0.0
See Also:
sendRedirect(String, HttpServletRequest, HttpServletResponse)

sendForbidden

public void sendForbidden()
                   throws IOException
Send a redirect to the forbidden page

Throws:
IOException - if an error occured while writing in response headers
Since:
jcms-5.0.0
See Also:
sendForbidden(HttpServletRequest, HttpServletResponse)

sendRedirect

public static void sendRedirect(String url,
                                javax.servlet.http.HttpServletRequest request,
                                javax.servlet.http.HttpServletResponse response)
                         throws IOException
Redirect current request to given URL. Will not redirect if response has already been commited, but we put the request attribute "redirect" with the value of the url so that doDisplayBuffer can be able to redirect with the javascript hack.

Parameters:
url - the url to redirect to.
request - the current request from which the redirect is performed
response - the response in which to write redirect headers
Throws:
IOException - if an error occured while writing in response headers
Since:
jcms-5.5.0

sendForbidden

public static void sendForbidden(javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response)
                          throws IOException
Send a redirect to the forbidden page if parameter forbidden is set, then redirect to the given url without logging anything.

Parameters:
request - the current request from which the forbidden redirect is performed
response - the response in which to write forbidden redirect headers
Throws:
IOException - if an error occured while writing in response headers
Since:
jcms-5.5.0

addCookie

public void addCookie(javax.servlet.http.Cookie cookie)
Adds the specified cookie to the response (or in a http-equiv is the response has already been commited, in this case, only for front office use). This method can be called multiple times to set more than one cookie.

The cookie is not added to the response if it has already been commited, instead, we put the request attribute "cookieList" with a ArrayList containing all cookies to add so that doDisplayBuffer.jsp can use "http-equiv" able to add those cookies. doDisplayBuffer.jsp is automatically called by display.jsp.

Parameters:
cookie - the cookie to be added
Since:
jcms-5.0.0

getContextPath

public String getContextPath()
Convenient method which returns ServletUtil.getContextPath(request)

Returns:
the context path of the request (without trailing '/')
Since:
jcms-5.0.0
See Also:
ServletUtil.getContextPath(HttpServletRequest)

getBaseUrl

public String getBaseUrl()
Convenient method which returns ServletUtil.getBaseUrl(request);

Returns:
the base url of the request
Since:
jcms-5.0.0
See Also:
ServletUtil.getBaseUrl(HttpServletRequest)

getUrlWithCommonUpdatedParams

public String getUrlWithCommonUpdatedParams(String[] names,
                                            String[] values,
                                            boolean encodeParams)
Parameters:
names - an array of parameter names added or updated the url
values - an array of values added or updated the url corresponding to names
encodeParams - 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
See Also:
PortalManager.getUrlWithCommonUpdatedParams(HttpServletRequest, String[], String[], boolean)

setInfoMsg

public void setInfoMsg(String msg)
Set JCMS info message for current request (displayed through doMessageBox.jsp)

Parameters:
msg - the message to display

setInfoMsgSession

public void setInfoMsgSession(String msg)
Set JCMS info message for current session (displayed through doMessageBox.jsp)

Parameters:
msg - the message to display

setWarningMsg

public void setWarningMsg(String msg)
Set JCMS warning message for current request (displayed through doMessageBox.jsp)

Parameters:
msg - the message to display

setWarningMsgSession

public void setWarningMsgSession(String msg)
Set JCMS warning message for current session (displayed through doMessageBox.jsp)

Parameters:
msg - the message to display

setErrorMsg

public void setErrorMsg(String msg)
Set JCMS warning message for current request (displayed through doMessageBox.jsp)

Parameters:
msg - the message to display

setErrorMsgSession

public void setErrorMsgSession(String msg)
Set JCMS warning message for current session (displayed through doMessageBox.jsp)

Parameters:
msg - the message to display

setInfoMsg

public static void setInfoMsg(String msg,
                              javax.servlet.http.HttpServletRequest request)
Set JCMS info message for specified request (displayed through doMessageBox.jsp)

Parameters:
msg - the message to display
request - the current request from which the message is being set

setInfoMsgSession

public static void setInfoMsgSession(String msg,
                                     javax.servlet.http.HttpServletRequest request)
Set JCMS info message for specified session (displayed through doMessageBox.jsp)

Parameters:
msg - the message to display
request - the current request from which the message is being set

setWarningMsg

public static void setWarningMsg(String msg,
                                 javax.servlet.http.HttpServletRequest request)
Set JCMS warning message for specified request (displayed through doMessageBox.jsp)

Parameters:
msg - the message to display
request - the current request from which the message is being set

setWarningMsgSession

public static void setWarningMsgSession(String msg,
                                        javax.servlet.http.HttpServletRequest request)
Set JCMS warning message for specified session (displayed through doMessageBox.jsp)

Parameters:
msg - the message to display
request - the current request from which the message is being set

setErrorMsg

public static void setErrorMsg(String msg,
                               javax.servlet.http.HttpServletRequest request)
Set JCMS warning message for specified request (displayed through doMessageBox.jsp)

Parameters:
msg - the message to display
request - the current request from which the message is being set

setErrorMsgSession

public static void setErrorMsgSession(String msg,
                                      javax.servlet.http.HttpServletRequest request)
Set JCMS warning message for specified session (displayed through doMessageBox.jsp)

Parameters:
msg - the message to display
request - the current request from which the message is being set

getInfoMsg

public static String[] getInfoMsg(javax.servlet.http.HttpServletRequest request)
Returns messages in the J2EE session and in the J2EE request of INFO level.

Parameters:
request -
Returns:
A array of size 2 with the two messages or empty string if there is none.

getWarningMsg

public static String[] getWarningMsg(javax.servlet.http.HttpServletRequest request)
Returns messages in the J2EE session and in the J2EE request of WARNING level.

Parameters:
request -
Returns:
A array of size 2 with the two messages or empty string if there is none.

getErrorMsg

public static String[] getErrorMsg(javax.servlet.http.HttpServletRequest request)
Returns messages in the J2EE session and in the J2EE request of ERROR level.

Parameters:
request -
Returns:
A array of size 2 with the two messages or empty string if there is none.

glp

public String glp(String key,
                  Object... params)
Resolve a language property in the user language of the current request.

Parameters:
key - the language property to resolve, for example "ui.com.lbl.contents"
params - an array of parameters to use when resolving the format of the given property
Returns:
the resolved property
Since:
jcms-5.0.0

validateRegexp

public boolean validateRegexp(String regexp)
Validate a pattern as a Perl regexp and set a convienient warning message in the request if not valid.

Parameters:
regexp - The pattern to validate
Returns:
true if the pattern is a valid Perl 5 regexp.
Since:
jcms-6.0


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