Package org.apache.slide.common

Examples of org.apache.slide.common.SlideException


        updateDescriptors(resourceUri);
        try {
            return propertyHelper.getProperty(propertyName, revisionDescriptors, revisionDescriptor, slideContextPath);
        }
        catch (JDOMException e) {
            throw new SlideException("ComputedPropertyProvider.getProperty(): " + e.getMessage());
        }
    }
View Full Code Here


            update(updateSourcePath, updateLabelName, resourcePath, getDepth(), multistatusElement);
        } catch (NestedSlideException nestedSlideException) {

            if (!requestHeaders.isDefined(H_DEPTH)) {
                // do not send a 207 multistatus if the depth header is not set
                SlideException exception = (SlideException)nestedSlideException.enumerateExceptions().nextElement();
                resp.setStatus(getErrorCode(exception))// special handling needed
                if (exception instanceof PreconditionViolationException) {
                    try {
                        sendPreconditionViolation((PreconditionViolationException)exception);
                    } catch(IOException e) {
View Full Code Here

     * @param      statusElement         the <status> element.
     * @param      responseElement       the <response> element.
     * @param      nestedSlideException  the NestedSlideException to add the exception to.
     */
    private void handleException(JDOMException exception, Element statusElement, Element responseElement, NestedSlideException nestedSlideException) {
        handleException(new SlideException("Nested exception: " + exception),
                        statusElement,
                        responseElement,
                        nestedSlideException);
    }
View Full Code Here

     * Constructor.
     *
     * @param objectUri Uri of the forbidden operation
     */
    public ForbiddenException(String objectUri) {
        this(objectUri, new SlideException("no cause given", false));
    }
View Full Code Here

     * Constructor.
     *
     * @param objectUri Uri of the forbidden operation
     */
    public ConflictException(String objectUri) {
        this(objectUri, new SlideException("no cause given", false));
    }
View Full Code Here

                }
            } else {
                // Returning 207 on non-collection requests is generally
                // considered bad. So let's not do it, since this way
                // makes clients generally behave better.
                SlideException exception = (SlideException)dme.enumerateExceptions().nextElement();
                if (exception instanceof PreconditionViolationException) {
                    try {
                        sendPreconditionViolation((PreconditionViolationException)exception);
                    } catch(IOException ex) {
                        // Critical error ... Servlet container is dead or something
View Full Code Here

                }
                catch( RevisionDescriptorNotFoundException e ) {
                    // Nothing to do if the VR is gone, e.g. because the VHR was deleted.
                }
                catch( JDOMException e ) {
                    throw new SlideException(
                        "Unable to update DAV:checkout-set of "+vrUri+": "+e.getMessage() );
                }
            }
        }
    }
View Full Code Here

        if (isCollection) {
            if (causeException.getExceptionsCount() > 1) {
                isMultiStatus = true;
            }
            else if (causeException.getExceptionsCount() == 1) {
                SlideException unpackedException = causeException.unpackSingleException();
                isMultiStatus =  ! resourceURI.equals(MethodUtil.getURI(unpackedException));
            }
        }
        return isMultiStatus;
    }
View Full Code Here

                    value = (XMLValue)rootVersion.getValue();
                } else {
                    try {
                        value = new XMLValue(rootVersion.getValue().toString());
                    } catch (JDOMException e) {
                        throw new SlideException("Could not parse DAV:root-version: "+nrds.getUri());
                    }
                }
                Iterator i = value.iterator();
                if (i.hasNext()) {
                    resourcePath = ((Element)i.next()).getText();
View Full Code Here

            XMLValue xmlValue;
            try {
                xmlValue =  new XMLValue(versionSetProperty.getValue().toString());
            }
            catch (JDOMException e) {
                throw new SlideException("Could not parse DAV:version-set: "+nrds.getUri());
            }
            Iterator hrefIterator = xmlValue.iterator();
           
            NodeRevisionNumber currentNrn= null;
            UriHandler currentUh = null;
View Full Code Here

TOP

Related Classes of org.apache.slide.common.SlideException

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.