X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=jcr%2Forg.argeo.cms.jcr%2Fsrc%2Forg%2Fargeo%2Fcms%2Fjcr%2Facr%2FJcrContent.java;h=116e45c7bf09fc0d546aeadc216a7239bcab4b9b;hb=da9d144b6b241e1526a3bd255dff905a7969a5bc;hp=63bf8dfffae04110938d08fc56ef418cbc6382ca;hpb=fdf44255df56ae179b904e4ab326bf595674800e;p=lgpl%2Fargeo-commons.git diff --git a/jcr/org.argeo.cms.jcr/src/org/argeo/cms/jcr/acr/JcrContent.java b/jcr/org.argeo.cms.jcr/src/org/argeo/cms/jcr/acr/JcrContent.java index 63bf8dfff..116e45c7b 100644 --- a/jcr/org.argeo.cms.jcr/src/org/argeo/cms/jcr/acr/JcrContent.java +++ b/jcr/org.argeo.cms.jcr/src/org/argeo/cms/jcr/acr/JcrContent.java @@ -222,6 +222,14 @@ public class JcrContent extends AbstractContent { } + boolean exists() { + try { + return provider.getJcrSession(session, jcrWorkspace).itemExists(jcrPath); + } catch (RepositoryException e) { + throw new JcrException("Cannot check whether " + jcrPath + " exists", e); + } + } + /* * ADAPTERS */