Package org.apache.slide.common

Examples of org.apache.slide.common.SlideException


        }
        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

            throw e;
        }
       
        catch (Exception e) {
            e.printStackTrace();
            throw new SlideException (e.getMessage()); // TODO: clean exception handling
        }
    }
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)e.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

            if (mustCheckin) {
                try {
                    versioningHelper.checkin(destinationUri, false, false, true ); //forkOk=false, keepCheckedOut=false
                }
                catch (IOException e) {
                    throw new SlideException("Checkin failed: " + e.getMessage());
                }
                catch (JDOMException e) {
                    throw new SlideException("Checkin failed: " + e.getMessage());
                }
            }
           
            // check if the resource should be put under version-control
            if( PutMethod.AUTO_VERSION_CONTROL && !isCollection(destinationUri) && !isInVersioncontrolExcludePath ) {
View Full Code Here

                   
                    try {
                        versioningHelper.checkout(destinationNrds, destinationNrd, false, false, true );
                    }
                    catch (IOException e) {
                        throw new SlideException("Checkout failed: " + e.getMessage());
                    }
                    catch (JDOMException e) {
                        throw new SlideException("Checkout failed: " + e.getMessage());
                    }
                }
               
                // store the descriptor(s) in order to restore it in afterDelete()
                // (the COPY specification for DeltaV says that an existing destination
View Full Code Here

                if (checkoutSetValue.iterator().hasNext()) {
                    b.append(" - please use "+checkoutSetValue.getTextValue()+" instead");
                }
            }
            throw new ConflictException(
                rUri, new SlideException(b.toString()));
        }
        content.store(sToken, coutNrds.getUri(), coutNrd, null);
       
        // update VCR to previous VR
        rNrd.removeProperty( P_CHECKED_OUT );
View Full Code Here

                    if (checkoutSetValue.iterator().hasNext()) {
                        b.append(" - please use "+checkoutSetValue.getTextValue()+" instead");
                    }
                }
                throw new ConflictException(
                    rUri, new SlideException(b.toString()));
            }
            content.store(sToken, vhrNrds.getUri(), vrNrdOld, null);
           
            // check preconditions
            ViolatedPrecondition violatedPrecondition =
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.