+ public void persist(ProvidedSession session) {
+ if (mountPath != null) {
+ Content mountPoint = session.getMountPoint(mountPath);
+ try (OutputStream out = mountPoint.open(OutputStream.class)) {
+ CmsContentRepository contentRepository = (CmsContentRepository) session.getRepository();
+ contentRepository.writeDom(document, out);
+ } catch (IOException e) {
+ throw new IllegalStateException("Cannot persist " + mountPath, e);
+ }
+ }
+ }
+
+ @Override
+ public String getMountPath() {
+ return mountPath;
+ }
+