+
+ /*
+ * UTILITIES
+ */
+ /**
+ * Just adds a '/' so that it becomes an absolute JCR path within the JCR
+ * workspace of this provider.
+ */
+ private String toJcrPath(String relativePath) {
+ return '/' + relativePath;
+ }
+
+ /*
+ * TRANSITIONAL, WHILE MIGRATING FROM JCR TO ACR
+ */
+ @Deprecated
+ public synchronized <T> T doInAdminSession(Function<Session, T> toDo) {
+ try {
+ return toDo.apply(adminSession);
+ } finally {
+ try {
+ if (adminSession.hasPendingChanges())
+ adminSession.save();
+ } catch (RepositoryException e) {
+ throw new JcrException("Cannot save admin session", e);
+ }
+ }
+ }
+