From b6db84233dca68ed4e420d80a7df515a6e2f0cdb Mon Sep 17 00:00:00 2001 From: Mathieu Baudier Date: Wed, 19 Feb 2020 08:20:11 +0100 Subject: [PATCH] Start working on CMS workspaces. --- .../cms/internal/kernel/CmsWorkspace.java | 144 ++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 org.argeo.cms/src/org/argeo/cms/internal/kernel/CmsWorkspace.java diff --git a/org.argeo.cms/src/org/argeo/cms/internal/kernel/CmsWorkspace.java b/org.argeo.cms/src/org/argeo/cms/internal/kernel/CmsWorkspace.java new file mode 100644 index 000000000..2033241f7 --- /dev/null +++ b/org.argeo.cms/src/org/argeo/cms/internal/kernel/CmsWorkspace.java @@ -0,0 +1,144 @@ +package org.argeo.cms.internal.kernel; + +import java.io.IOException; +import java.io.InputStream; + +import javax.jcr.AccessDeniedException; +import javax.jcr.InvalidItemStateException; +import javax.jcr.InvalidSerializedDataException; +import javax.jcr.ItemExistsException; +import javax.jcr.NamespaceRegistry; +import javax.jcr.NoSuchWorkspaceException; +import javax.jcr.PathNotFoundException; +import javax.jcr.RepositoryException; +import javax.jcr.Session; +import javax.jcr.UnsupportedRepositoryOperationException; +import javax.jcr.Workspace; +import javax.jcr.lock.LockException; +import javax.jcr.lock.LockManager; +import javax.jcr.nodetype.ConstraintViolationException; +import javax.jcr.nodetype.NodeTypeManager; +import javax.jcr.observation.ObservationManager; +import javax.jcr.query.QueryManager; +import javax.jcr.version.Version; +import javax.jcr.version.VersionException; +import javax.jcr.version.VersionManager; + +import org.xml.sax.ContentHandler; + +public class CmsWorkspace implements Workspace { + private String name; + private Session session; + + @Override + public Session getSession() { + return session; + } + + @Override + public String getName() { + return name; + } + + @Override + public void copy(String srcAbsPath, String destAbsPath) throws ConstraintViolationException, VersionException, + AccessDeniedException, PathNotFoundException, ItemExistsException, LockException, RepositoryException { + throw new UnsupportedOperationException(); + } + + @Override + public void copy(String srcWorkspace, String srcAbsPath, String destAbsPath) + throws NoSuchWorkspaceException, ConstraintViolationException, VersionException, AccessDeniedException, + PathNotFoundException, ItemExistsException, LockException, RepositoryException { + throw new UnsupportedOperationException(); + } + + @Override + public void clone(String srcWorkspace, String srcAbsPath, String destAbsPath, boolean removeExisting) + throws NoSuchWorkspaceException, ConstraintViolationException, VersionException, AccessDeniedException, + PathNotFoundException, ItemExistsException, LockException, RepositoryException { + throw new UnsupportedOperationException(); + } + + @Override + public void move(String srcAbsPath, String destAbsPath) throws ConstraintViolationException, VersionException, + AccessDeniedException, PathNotFoundException, ItemExistsException, LockException, RepositoryException { + throw new UnsupportedOperationException(); + } + + @Override + public void restore(Version[] versions, boolean removeExisting) + throws ItemExistsException, UnsupportedRepositoryOperationException, VersionException, LockException, + InvalidItemStateException, RepositoryException { + throw new UnsupportedOperationException(); + } + + @Override + public LockManager getLockManager() throws UnsupportedRepositoryOperationException, RepositoryException { + throw new UnsupportedOperationException(); + } + + @Override + public QueryManager getQueryManager() throws RepositoryException { + throw new UnsupportedOperationException(); + } + + @Override + public NamespaceRegistry getNamespaceRegistry() throws RepositoryException { + throw new UnsupportedOperationException(); + } + + @Override + public NodeTypeManager getNodeTypeManager() throws RepositoryException { + throw new UnsupportedOperationException(); + } + + @Override + public ObservationManager getObservationManager() + throws UnsupportedRepositoryOperationException, RepositoryException { + throw new UnsupportedOperationException(); + } + + @Override + public VersionManager getVersionManager() throws UnsupportedRepositoryOperationException, RepositoryException { + // TODO Auto-generated method stub + return null; + } + + @Override + public String[] getAccessibleWorkspaceNames() throws RepositoryException { + throw new UnsupportedOperationException(); + } + + @Override + public ContentHandler getImportContentHandler(String parentAbsPath, int uuidBehavior) throws PathNotFoundException, + ConstraintViolationException, VersionException, LockException, AccessDeniedException, RepositoryException { + throw new UnsupportedOperationException(); + } + + @Override + public void importXML(String parentAbsPath, InputStream in, int uuidBehavior) throws IOException, VersionException, + PathNotFoundException, ItemExistsException, ConstraintViolationException, InvalidSerializedDataException, + LockException, AccessDeniedException, RepositoryException { + throw new UnsupportedOperationException(); + } + + @Override + public void createWorkspace(String name) + throws AccessDeniedException, UnsupportedRepositoryOperationException, RepositoryException { + throw new UnsupportedOperationException(); + } + + @Override + public void createWorkspace(String name, String srcWorkspace) throws AccessDeniedException, + UnsupportedRepositoryOperationException, NoSuchWorkspaceException, RepositoryException { + throw new UnsupportedOperationException(); + } + + @Override + public void deleteWorkspace(String name) throws AccessDeniedException, UnsupportedRepositoryOperationException, + NoSuchWorkspaceException, RepositoryException { + throw new UnsupportedOperationException(); + } + +} -- 2.30.2