|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.jsp.util.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 CmsObject |
getCmsObject(java.lang.Object input)
Returns the current OpenCms user context from the given page context. |
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. |
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 CmsObject getCmsObject(java.lang.Object input)
input
- the input to create a CmsObject from
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)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |