|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.templating.jsp.cmsfn.JspTemplatingFunction
public class JspTemplatingFunction
Static wrapper of the Templating function class. This wrapper gives us the ability to expose these functions as Tags in the JSP's.
Constructor Summary | |
---|---|
JspTemplatingFunction()
|
Method Summary | |
---|---|
static List<info.magnolia.jcr.util.ContentMap> |
ancestors(info.magnolia.jcr.util.ContentMap contentMap,
String nodeTypeName)
|
static info.magnolia.jcr.util.ContentMap |
asContentMap(javax.jcr.Node content)
|
static List<info.magnolia.jcr.util.ContentMap> |
asContentMapList(Collection<javax.jcr.Node> nodeList)
|
static javax.jcr.Node |
asJCRNode(info.magnolia.jcr.util.ContentMap contentMap)
|
static List<javax.jcr.Node> |
asNodeList(Collection<info.magnolia.jcr.util.ContentMap> contentMapList)
|
static List<info.magnolia.jcr.util.ContentMap> |
children(info.magnolia.jcr.util.ContentMap content,
String nodeTypeName)
|
static javax.jcr.Node |
content(String path,
String repository)
Return the Node for the Given Path from the given repository. |
static String |
createHtmlAttribute(String name,
String value)
Util method to create html attributes name="value" . |
static info.magnolia.jcr.util.ContentMap |
decode(info.magnolia.jcr.util.ContentMap content)
Removes escaping of HTML on properties. |
static String |
externalLink(info.magnolia.jcr.util.ContentMap content,
String linkPropertyName)
Returns an external link prepended with http:// in case the protocol is missing or an empty String
if the link does not exist. |
static String |
externalLinkTitle(info.magnolia.jcr.util.ContentMap content,
String linkPropertyName,
String linkTitlePropertyName)
Return a link title based on the @param linkTitlePropertyName. |
static info.magnolia.jcr.util.ContentMap |
inherit(info.magnolia.jcr.util.ContentMap content,
String relPath)
|
static List<info.magnolia.jcr.util.ContentMap> |
inheritList(info.magnolia.jcr.util.ContentMap content,
String relPath)
|
static javax.jcr.Property |
inheritProperty(info.magnolia.jcr.util.ContentMap content,
String relPath)
|
static boolean |
isAuthorInstance()
|
static boolean |
isEditMode()
|
static boolean |
isFromCurrentPage(info.magnolia.jcr.util.ContentMap content)
|
static boolean |
isInherited(info.magnolia.jcr.util.ContentMap content)
|
static boolean |
isPreviewMode()
|
static boolean |
isPublicInstance()
|
static String |
language()
Get the language used currently. |
static String |
link(info.magnolia.jcr.util.ContentMap contentMap)
|
static String |
linkForProperty(javax.jcr.Property property)
FIXME Add a LinkUtil.createLink(Property property).... |
static String |
linkForWorkspace(String workspace,
String nodeIdentifier)
Create link for the Node identified by nodeIdentifier in the specified workspace. |
static info.magnolia.jcr.util.ContentMap |
page(info.magnolia.jcr.util.ContentMap content)
Returns the page's ContentMap of the passed ContentMap . |
static info.magnolia.jcr.util.ContentMap |
parent(info.magnolia.jcr.util.ContentMap contentMap,
String nodeTypeName)
|
static info.magnolia.jcr.util.ContentMap |
root(info.magnolia.jcr.util.ContentMap contentMap,
String nodeTypeName)
|
static info.magnolia.cms.util.SiblingsHelper |
siblings(info.magnolia.jcr.util.ContentMap node)
Returns an instance of SiblingsHelper for the given contentMap. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JspTemplatingFunction()
Method Detail |
---|
@Function public static javax.jcr.Node asJCRNode(info.magnolia.jcr.util.ContentMap contentMap)
@Function public static info.magnolia.jcr.util.ContentMap asContentMap(javax.jcr.Node content)
@Function public static List<info.magnolia.jcr.util.ContentMap> children(info.magnolia.jcr.util.ContentMap content, String nodeTypeName) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
@Function public static info.magnolia.jcr.util.ContentMap root(info.magnolia.jcr.util.ContentMap contentMap, String nodeTypeName) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
@Function public static info.magnolia.jcr.util.ContentMap parent(info.magnolia.jcr.util.ContentMap contentMap, String nodeTypeName) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
@Function public static info.magnolia.jcr.util.ContentMap page(info.magnolia.jcr.util.ContentMap content) throws javax.jcr.RepositoryException
ContentMap
of the passed ContentMap
. If the passed ContentMap
represents a page, the passed ContentMap
will be returned.
If the passed ContentMap
has no parent page at all, null is returned.
content
- the ContentMap
to get the page's ContentMap
from.
ContentMap
of the passed content ContentMap
.
javax.jcr.RepositoryException
@Function public static List<info.magnolia.jcr.util.ContentMap> ancestors(info.magnolia.jcr.util.ContentMap contentMap, String nodeTypeName) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
@Function public static info.magnolia.jcr.util.ContentMap inherit(info.magnolia.jcr.util.ContentMap content, String relPath) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
@Function public static javax.jcr.Property inheritProperty(info.magnolia.jcr.util.ContentMap content, String relPath) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
@Function public static List<info.magnolia.jcr.util.ContentMap> inheritList(info.magnolia.jcr.util.ContentMap content, String relPath) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
@Function public static boolean isInherited(info.magnolia.jcr.util.ContentMap content)
@Function public static boolean isFromCurrentPage(info.magnolia.jcr.util.ContentMap content)
@Function public static String linkForWorkspace(String workspace, String nodeIdentifier)
@Function public static String linkForProperty(javax.jcr.Property property)
@Function public static String link(info.magnolia.jcr.util.ContentMap contentMap) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
@Function public static String language()
@Function public static String externalLink(info.magnolia.jcr.util.ContentMap content, String linkPropertyName)
http://
in case the protocol is missing or an empty String
if the link does not exist.
content
- The node's map representation where the link property is stored on.linkPropertyName
- The property where the link value is stored in.
http://
@Function public static String externalLinkTitle(info.magnolia.jcr.util.ContentMap content, String linkPropertyName, String linkTitlePropertyName)
http://
).
content
- The node where the link property is stored on.linkPropertyName
- The property where the link value is stored in.linkTitlePropertyName
- The property where the link title value is stored
@Function public static boolean isEditMode()
@Function public static boolean isPreviewMode()
@Function public static boolean isAuthorInstance()
@Function public static boolean isPublicInstance()
@Function public static String createHtmlAttribute(String name, String value)
name="value"
. If the value is empty an empty string will be returned.
This is mainly helpful to avoid empty attributes.
@Function public static info.magnolia.cms.util.SiblingsHelper siblings(info.magnolia.jcr.util.ContentMap node) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
@Function public static javax.jcr.Node content(String path, String repository)
@Function public static List<info.magnolia.jcr.util.ContentMap> asContentMapList(Collection<javax.jcr.Node> nodeList)
@Function public static List<javax.jcr.Node> asNodeList(Collection<info.magnolia.jcr.util.ContentMap> contentMapList)
@Function public static info.magnolia.jcr.util.ContentMap decode(info.magnolia.jcr.util.ContentMap content)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |