Improve image management and ACR
[gpl/argeo-suite.git] / swt / org.argeo.app.swt / src / org / argeo / app / swt / ux / SwtArgeoApp.java
index 80bd3552b4346e7bb52748fec83b7d7714decb75..816be08b269b6c1f513171d2e41edd8c00ab939e 100644 (file)
@@ -36,7 +36,6 @@ import org.argeo.app.ux.AppUi;
 import org.argeo.app.ux.SuiteUxEvent;
 import org.argeo.cms.LocaleUtils;
 import org.argeo.cms.Localized;
-import org.argeo.cms.acr.ContentUtils;
 import org.argeo.cms.swt.CmsSwtUtils;
 import org.argeo.cms.swt.acr.SwtUiProvider;
 import org.argeo.cms.swt.dialogs.CmsFeedback;
@@ -128,6 +127,8 @@ public class SwtArgeoApp extends AbstractArgeoApp implements CmsEventSubscriber
                        appPid = "<unknown>";
                }
 
+               Objects.requireNonNull(contentRepository, "Content repository must be provided");
+               Objects.requireNonNull(appUserState, "App user state must be provided");
 //             if (pidPrefix == null)
 //                     throw new IllegalArgumentException("PID prefix must be set.");
 
@@ -247,7 +248,7 @@ public class SwtArgeoApp extends AbstractArgeoApp implements CmsEventSubscriber
                                        if (cmsSession == null || cmsView.isAnonymous()) {
                                                assert publicBasePath != null;
                                                Content userDir = contentSession
-                                                               .get(ContentUtils.SLASH + CmsConstants.SYS_WORKSPACE + publicBasePath);
+                                                               .get(Content.ROOT_PATH + CmsConstants.SYS_WORKSPACE + publicBasePath);
                                                ui.setUserDir(userDir);
                                        } else {
                                                Content userDir = appUserState.getOrCreateSessionDir(contentSession, cmsSession);
@@ -467,7 +468,7 @@ public class SwtArgeoApp extends AbstractArgeoApp implements CmsEventSubscriber
        }
 
        // TODO move it to an internal package?
-       public static String nodeToState(Content node) {
+       private static String nodeToState(Content node) {
                return node.getPath();
        }