Package org.apache.slide.common

Examples of org.apache.slide.common.SlideException


                    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


            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

            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

        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

                }
            } 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

                }
            } 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

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.