Package org.apache.jackrabbit.webdav.jcr

Examples of org.apache.jackrabbit.webdav.jcr.JcrDavException


     */
    void suspend() throws DavException {
        try {
            obsMgr.removeEventListener(this);
        } catch (RepositoryException e) {
            throw new JcrDavException(e);
        }
    }
View Full Code Here


        try {
            obsMgr.addEventListener(this, getJcrEventTypes(),
                    getLocator().getRepositoryPath(), isDeep(), getUuidFilters(),
                    getNodetypeNameFilters(), isNoLocal());
        } catch (RepositoryException e) {
            throw new JcrDavException(e);
        }
    }
View Full Code Here

        super.init(resource, info);
        // report specific validation and preparation for xml serialization
        try {
            ntIter = getNodeTypes(getRepositorySession(), info);
        } catch (RepositoryException e) {
            throw new JcrDavException(e);
        }
        if (ntIter == null) {
            throw new DavException(DavServletResponse.SC_INTERNAL_SERVER_ERROR);
        }
    }
View Full Code Here

            DavResourceLocator loc = resourceLoc.getFactory().createResourceLocator(resourceLoc.getPrefix(), resourceLoc.getWorkspacePath(), n.getPath(), false);
            DavResource locatedResource = resource.getFactory().createResource(loc, resource.getSession());
            ms = new MultiStatus();
            ms.addResourceProperties(locatedResource, info.getPropertyNameSet(), info.getDepth());
        } catch (RepositoryException e) {
            throw new JcrDavException(e);
        }
    }
View Full Code Here

        // report specific validation: resource must represent an existing
        // repository node
        absNodePath = resource.getLocator().getRepositoryPath();
        try {
            if (!(getRepositorySession().itemExists(absNodePath) && getRepositorySession().getItem(absNodePath).isNode())) {
                throw new JcrDavException(new PathNotFoundException(absNodePath + " does not exist."));
            }
        } catch (RepositoryException e) {
            throw new JcrDavException(e);
        }

    }
View Full Code Here

        }
        // retrieve href of the corresponding resource in the other workspace
        try {
            this.correspHref = getCorrespondingResourceHref(resource, getRepositorySession(), workspaceHref);
        } catch (RepositoryException e) {
            throw new JcrDavException(e);
        }
    }
View Full Code Here

            getJcrSession().getWorkspace().copy(locator.getRepositoryPath(), destItemPath);
        } catch (PathNotFoundException e) {
            // according to rfc 2518: missing parent
            throw new DavException(DavServletResponse.SC_CONFLICT, e.getMessage());
        } catch (RepositoryException e) {
            throw new JcrDavException(e);
        }
    }
View Full Code Here

                    Lock jcrLock = node.lock(lockInfo.isDeep(), false);
                    if (jcrLock != null) {
                        lock = new JcrActiveLock(jcrLock);
                    }
                } catch (RepositoryException e) {
                    throw new JcrDavException(e);
                }
            } else {
                // create a new webdav lock
                lock = lockManager.createLock(lockInfo, this);
            }
View Full Code Here

        if (lock instanceof JcrActiveLock) {
            try {
                // refresh JCR lock and return the original lock object.
                node.getLock().refresh();
            } catch (RepositoryException e) {
                throw new JcrDavException(e);
            }
        } else {
            lock = lockManager.refreshLock(lockInfo, lockToken, this);
        }
        /* since lock has infinite lock (simple) or undefined timeout (jcr)
View Full Code Here

        } else if (lock.isLockedByToken(lockToken)) {
            if (lock instanceof JcrActiveLock) {
                try {
                    node.unlock();
                } catch (RepositoryException e) {
                    throw new JcrDavException(e);
                }
            } else {
                lockManager.releaseLock(lockToken, this);
            }
        } else {
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.webdav.jcr.JcrDavException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.