Context: I am running Magnolia CMS 5.x & try to programmatically (in freemarker
) check if a node exist to avoid getting an exception thrown when trying to access it via ${damfn.getAssetLink(<someUUID>)}
or similar.
Is there a way to check if a Node with a given UUID exist?
I found nothing interesting when looking at NodeUtil.java, SessionUtil.java, Session.java, JCRUtils, TemplatingFunction (cmsfn:
) & DamTemplatingFunctions (damfn:
)
I only could find that you can check via path using jackrabbit.510166.n4.nabble.com/Checking-if-node-exists-td516003.html
Resources:
- Node.java - API doc - Adobe's Content Repository for Java 2.0
- Session.java - API doc - Adobe's Content Repository for Java 2.0
- JCRUtils.java - API doc - Apache Jackrabbit 2.0.0 API
- NodeUtil.java - code - Magnolia Main Project
- NodeUtil.java - API doc - Magnolia Main Project 5.5
- SessionUtil.java - code - Magnolia Main Project
- SessionUtil.java - API doc - Magnolia Main Project 5.5
TemplatingFunction.java
(cmsfn:
) explained by Magnolia CMS' teamDamTemplatingFunctions.java
(damfn:
) explained by Magnolia CMS' teamDamTemplatingFunctions.java
code