|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Objectorg.opencms.jsp.util.CmsJspElFunctions
public final class CmsJspElFunctions
Provides utility methods to be used as functions from a JSP with the EL.
CmsJspContentAccessBean| Method Summary | |
|---|---|
static CmsObject |
convertCmsObject(java.lang.Object input)
Returns an OpenCms user context created from an Object. |
static java.util.Date |
convertDate(java.lang.Object input)
Returns a Date created from an Object. |
static java.util.Locale |
convertLocale(java.lang.Object input)
Returns a Locale created from an Object. |
static CmsResource |
convertResource(CmsObject cms,
java.lang.Object input)
Returns a resource created from an Object. |
static CmsUUID |
convertUUID(java.lang.Object input)
Returns a CmsUUID created from an Object. |
static java.lang.String |
escape(java.lang.String source,
java.lang.String encoding)
Encodes a String in a way that is compatible with the JavaScript escape function. |
static CmsObject |
getCmsObject(java.lang.Object input)
Returns the current OpenCms user context from the given page context. |
static java.lang.String |
getRequestLink(java.lang.String url)
Returns the link without parameters from a String that is formatted for a GET request. |
static java.lang.String |
getRequestParam(java.lang.String url,
java.lang.String paramName)
Returns the value of a parameter from a String that is formatted for a GET request. |
static CmsJspVfsAccessBean |
getVfsAccessBean(java.lang.Object input)
Returns a JSP / EL VFS access bean. |
static java.lang.String |
stripHtml(java.lang.Object input)
Strips all HTML markup from the given input. |
static java.lang.String |
trimToSize(java.lang.String input,
int length)
Returns a substring of the source, which is at most length characters long. |
static java.lang.String |
unescape(java.lang.String source,
java.lang.String encoding)
Decodes a String in a way that is compatible with the JavaScript unescape function. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static CmsObject convertCmsObject(java.lang.Object input)
CmsObject, it is casted and returned unchanged.
ServletRequest, the OpenCms user context is read from the request context.
PageContext, the OpenCms user context is read from the request of the page context.
input - the input to create an OpenCms user context from
public static java.util.Date convertDate(java.lang.Object input)
Date already, if so it is casted and returned unchanged.
Long, and if so the Date is created from the Long value.
input - the Object to create a Date from
public static java.util.Locale convertLocale(java.lang.Object input)
Locale already, if so it is casted and returned.
input - the Object to create a Locale from
public static CmsResource convertResource(CmsObject cms,
java.lang.Object input)
throws CmsException
CmsResource, it is casted to the resource and returned unchanged.
CmsUUID, the given OpenCms context is used to read a resource with
this UUID from the VFS.
cms - the current OpenCms user contextinput - the input to create a resource from
CmsException - in case of errors accessing the OpenCms VFS for reading the resourcepublic static CmsUUID convertUUID(java.lang.Object input)
CmsUUID already, if so it is casted and returned.
CmsUUID is created with this byte[].
CmsUUID is created with this String.
input - the Object to create a CmsUUID from
public static java.lang.String escape(java.lang.String source,
java.lang.String encoding)
source - The text to be encodedencoding - the encoding type
public static CmsObject getCmsObject(java.lang.Object input)
input - the input to create a CmsObject from
public static java.lang.String getRequestLink(java.lang.String url)
url - the URL to remove the parameters from
public static java.lang.String getRequestParam(java.lang.String url,
java.lang.String paramName)
url - the URL to get the parameter value fromparamName - the request parameter name
public static CmsJspVfsAccessBean getVfsAccessBean(java.lang.Object input)
input - the Object to create a CmsObject from
public static java.lang.String stripHtml(java.lang.Object input)
CmsJspContentAccessValueWrapper, an optimized
method is used for the HTML stripping.
input - the input to Strip from HTML
public static java.lang.String trimToSize(java.lang.String input,
int length)
If a char is cut, " ..." is appended to the result.
input - the string to trimlength - the maximum length of the string to be returned
CmsStringUtil.trimToSize(String, int, String)
public static java.lang.String unescape(java.lang.String source,
java.lang.String encoding)
source - The String to be decodedencoding - the encoding type
|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||