Package org.apache.jackrabbit.webdav

Examples of org.apache.jackrabbit.webdav.DavException


     * @throws DavException
     * @see DeltaVResource#getReport(org.apache.jackrabbit.webdav.version.report.ReportInfo)
     */
    public Report getReport(ReportInfo reportInfo) throws DavException {
        if (reportInfo == null) {
            throw new DavException(DavServletResponse.SC_BAD_REQUEST, "A REPORT request must provide a valid XML request body.");
        }
        if (!exists()) {
            throw new DavException(DavServletResponse.SC_NOT_FOUND);
        }

        if (supportedReports.isSupportedReport(reportInfo)) {
            Report report = ReportType.getType(reportInfo).createReport(this, reportInfo);
            return report;
        } else {
            throw new DavException(DavServletResponse.SC_UNPROCESSABLE_ENTITY, "Unkown report "+ reportInfo.getReportName() +"requested.");
        }
    }
View Full Code Here


     * @param workspace
     * @throws DavException Always throws.
     * @see DeltaVResource#addWorkspace(org.apache.jackrabbit.webdav.DavResource)
     */
    public void addWorkspace(DavResource workspace) throws DavException {
        throw new DavException(DavServletResponse.SC_FORBIDDEN);
    }
View Full Code Here

     * @see DeltaVResource#getReferenceResources(org.apache.jackrabbit.webdav.property.DavPropertyName)
     */
    public DavResource[] getReferenceResources(DavPropertyName hrefPropertyName) throws DavException {
        DavProperty prop = getProperty(hrefPropertyName);
        if (prop == null || !(prop instanceof HrefProperty)) {
            throw new DavException(DavServletResponse.SC_CONFLICT, "Unknown Href-Property '"+hrefPropertyName+"' on resource "+getResourcePath());
        }

        List hrefs = ((HrefProperty)prop).getHrefs();
        DavResource[] refResources = new DavResource[hrefs.size()];
        Iterator hrefIter = hrefs.iterator();
View Full Code Here

        try {
            DavResource res;
            if (getRepositorySession().itemExists(loc.getRepositoryPath())) {
                res = createResourceFromLocator(loc);
            } else {
                throw new DavException(DavServletResponse.SC_NOT_FOUND);
            }
            return res;
        } catch (RepositoryException e) {
            throw new JcrDavException(e);
        }
View Full Code Here

        public void start(TransactionResource resource) throws DavException {
            try {
                // make sure, the given resource represents an existing repository item
                if (!getRepositorySession(resource).itemExists(getResourcePath())) {
                    throw new DavException(DavServletResponse.SC_CONFLICT, "Unable to start local transaction: no repository item present at " + getResourcePath());
                }
            } catch (RepositoryException e) {
                log.error("Unexpected error: " + e.getMessage());
                throw new JcrDavException(e);
            }
View Full Code Here

            String itemPath = resource.getLocator().getRepositoryPath();
            return getRepositorySession(resource).getItem(itemPath);
        }

        public Transaction put(String key, Transaction value) throws DavException {
            throw new DavException(WebdavResponse.SC_PRECONDITION_FAILED, "Attempt to nest a new transaction into a local one.");
        }
View Full Code Here

            XAResource xaRes = getXAResource(resource);
            try {
                xaRes.setTransactionTimeout((int) getLock().getTimeout() / 1000);
                xaRes.start(xid, XAResource.TMNOFLAGS);
            } catch (XAException e) {
                throw new DavException(DavServletResponse.SC_FORBIDDEN, e.getMessage());
            }
        }
View Full Code Here

            XAResource xaRes = getXAResource(resource);
            try {
                xaRes.commit(xid, false);
                removeLocalTxReferences(resource);
            } catch (XAException e) {
                throw new DavException(DavServletResponse.SC_FORBIDDEN, e.getMessage());
            }
        }
View Full Code Here

            XAResource xaRes = getXAResource(resource);
            try {
                xaRes.rollback(xid);
                removeLocalTxReferences(resource);
            } catch (XAException e) {
                throw new DavException(DavServletResponse.SC_FORBIDDEN, e.getMessage());
            }
        }
View Full Code Here

    return ((XASession)session).getXAResource();
      } else {
    throw new DavException(DavServletResponse.SC_FORBIDDEN);
      }
            */
            throw new DavException(DavServletResponse.SC_FORBIDDEN);
        }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.webdav.DavException

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.