import javax.jcr.RepositoryException;
import javax.jcr.Session;
-import org.argeo.api.NodeUtils;
+import org.argeo.cms.jcr.CmsJcrUtils;
import org.argeo.entity.EntityConstants;
import org.argeo.entity.EntityDefinition;
import org.argeo.jcr.Jcr;
private String defaultEditorId;
public void init(BundleContext bundleContext, Map<String, String> properties) throws RepositoryException {
- Session adminSession = NodeUtils.openDataAdminSession(repository, null);
+ Session adminSession = CmsJcrUtils.openDataAdminSession(repository, null);
try {
type = properties.get(EntityConstants.TYPE);
if (type == null)
import javax.jcr.RepositoryException;
import org.argeo.api.NodeConstants;
-import org.argeo.api.NodeUtils;
import org.argeo.cms.fs.CmsFsUtils;
+import org.argeo.cms.jcr.CmsJcrUtils;
import org.argeo.cms.ui.CmsUiProvider;
import org.argeo.cms.ui.CmsView;
import org.argeo.cms.ui.util.CmsUiUtils;
FsTreeViewer fsTreeViewer = new FsTreeViewer(parent, SWT.NONE);
fsTreeViewer.configureDefaultSingleColumnTable(500);
CmsView cmsView = CmsView.getCmsView(parent);
- Node homeNode = NodeUtils.getUserHome(cmsView.doAs(() -> Jcr.login(repository, NodeConstants.HOME_WORKSPACE)));
+ Node homeNode = CmsJcrUtils.getUserHome(cmsView.doAs(() -> Jcr.login(repository, NodeConstants.HOME_WORKSPACE)));
parent.addDisposeListener((e1) -> Jcr.logout(homeNode));
Path homePath = CmsFsUtils.getPath(nodeFileSystemProvider, homeNode);
fsTreeViewer.addSelectionChangedListener((e) -> {
import javax.jcr.Session;
import org.argeo.api.NodeConstants;
-import org.argeo.api.NodeUtils;
+import org.argeo.cms.jcr.CmsJcrUtils;
import org.argeo.entity.EntityNames;
import org.argeo.entity.EntityType;
import org.argeo.entity.Term;
private Session adminSession;
public void init() {
- adminSession = NodeUtils.openDataAdminSession(repository, NodeConstants.SYS_WORKSPACE);
+ adminSession = CmsJcrUtils.openDataAdminSession(repository, NodeConstants.SYS_WORKSPACE);
}
@Override
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.argeo.api.NodeUtils;
import org.argeo.cms.CmsUserManager;
import org.argeo.cms.LocaleUtils;
import org.argeo.cms.Localized;
import org.argeo.cms.auth.CmsSession;
+import org.argeo.cms.jcr.CmsJcrUtils;
import org.argeo.cms.ui.AbstractCmsApp;
import org.argeo.cms.ui.CmsTheme;
import org.argeo.cms.ui.CmsUiProvider;
} else {
Session adminSession = null;
try {
- adminSession = NodeUtils.openDataAdminSession(getRepository(), null);
+ adminSession = CmsJcrUtils.openDataAdminSession(getRepository(), null);
Node userDir = SuiteUtils.getOrCreateCmsSessionNode(adminSession, cmsSession);
ui.initSessions(getRepository(), userDir.getPath());
} finally {
// if (context.getPath().equals("/")) {// root node
// types.add("nt:folder");
// }
- if (NodeUtils.isUserHome(context) && byType.containsKey("nt:folder")) {// home node
+ if (CmsJcrUtils.isUserHome(context) && byType.containsKey("nt:folder")) {// home node
types.add("nt:folder");
}
else {
Session adminSession = null;
try {
- adminSession = NodeUtils.openDataAdminSession(getRepository(), workspaceName);
+ adminSession = CmsJcrUtils.openDataAdminSession(getRepository(), workspaceName);
SuiteUtils.getOrCreateUserNode(adminSession, userDn);
} finally {
Jcr.logout(adminSession);
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.argeo.api.NodeUtils;
import org.argeo.cms.auth.CmsSession;
+import org.argeo.cms.jcr.CmsJcrUtils;
import org.argeo.cms.servlet.ServletAuthUtils;
import org.argeo.jcr.Jcr;
import org.argeo.jcr.JcrUtils;
Session adminSession = null;
try {
// TODO centralise at a deeper level
- adminSession = NodeUtils.openDataAdminSession(repository, null);
+ adminSession = CmsJcrUtils.openDataAdminSession(repository, null);
SuiteUtils.getOrCreateCmsSessionNode(adminSession, cmsSession);
} finally {
Jcr.logout(adminSession);