Package org.apache.slide.common

Examples of org.apache.slide.common.SlideException


                }
            } 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)nestedSlideException.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 (SlideException e) {
            nestedSlideException.addException(e);
        }
        catch (JDOMException e) {
            nestedSlideException.addException(new SlideException(e.getMessage()));
        }
    }
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

                    PropertyHelper.removeHrefFromProperty(vrNrd, P_CHECKOUT_SET, sourceUri);
                    PropertyHelper.addHrefToProperty(vrNrd, P_CHECKOUT_SET, destinationUri);
                    content.store(slideToken, vrNrds.getUri(), vrNrd, null);
                }
                catch (JDOMException e) {
                    throw new SlideException(
                        "Unable to update DAV:checkout-set of "+vrUri+": "+e.getMessage() );
                }
            }
        }
    }
View Full Code Here

            nestedException.enumerateExceptions();
        while (nestedExceptionsList.hasMoreElements()) {
           
            Element response = new Element(E_RESPONSE, DNSP);
            multistatus.addContent(response);
            SlideException ex =
                (SlideException) nestedExceptionsList.nextElement();
            generateStatusText(response, MethodUtil.getErrorMessage(ex),
                               getErrorCode(ex));
            if (ex instanceof PreconditionViolationException) {
                response.addContent(MethodUtil.getPreconditionViolationResponseDescription((PreconditionViolationException)ex));
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( isAutoVersionControl(destinationUri) && !isCollection(destinationUri) && !isExcludedForVersionControl(destinationUri) ) {
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

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

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.