Package org.apache.slide.common

Examples of org.apache.slide.common.RequestedPropertiesImpl


                resourcePath
            );
        }
       
        try {
            this.requestedProperties = new RequestedPropertiesImpl(propElm);
        }
        catch (PropertyParseException e) {
            throw new PreconditionViolationException(
                new ViolatedPrecondition("invalid-prop",
                                         WebdavStatus.SC_BAD_REQUEST,
View Full Code Here


        }
       
        if (propElmL.size() == 1) {
            Element propElm = (Element)propElmL.get(0);
            try {
                this.requestedProperties = new RequestedPropertiesImpl(propElm);
            }
            catch (PropertyParseException e) {
                throw new PreconditionViolationException(
                    new ViolatedPrecondition("invalid-prop",
                                             WebdavStatus.SC_BAD_REQUEST,
View Full Code Here

        }
       
        if (propElmL.size() == 1) {
            Element propElm = (Element)propElmL.get(0);
            try {
                this.requestedProperties = new RequestedPropertiesImpl(propElm);
            }
            catch (PropertyParseException e) {
                throw new PreconditionViolationException(
                    new ViolatedPrecondition("invalid-prop",
                                             WebdavStatus.SC_BAD_REQUEST,
View Full Code Here

            }
            if( e.getName().equals(E_PROP) ) {
                if( requestedProps != null ) {
                    throw new JDOMException("At most one "+E_PROP+" element allowed" );
                }
                requestedProps = new RequestedPropertiesImpl( e );
            }
            if( e.getName().equals(E_LABEL_NAME) ) {
                if (updateSourcePath != null) {
                    throw new JDOMException("Either a <"+E_VERSION+"> OR a <"+E_LABEL_NAME+"> element allowed");
                }
View Full Code Here

        labelHeader = WebdavUtils.fixTomcatHeader(requestHeaders.getLabel(), "UTF-8");
       
        retrieveDepth();
       
        if (req.getContentLength() == 0) {
            requestedProperties = new RequestedPropertiesImpl();
            requestedProperties.setIsAllProp(true);
            propFindType = FIND_ALL_PROP;
        }
        else {
           
            try {
               
                Element element = parseRequestContent(E_PROPFIND);
                try {
                    element = (Element)element.getChildren().get(0);
                }
                catch (Exception e) {
                    int statusCode = WebdavStatus.SC_BAD_REQUEST;
                    sendError( statusCode, getClass().getName()+".missingRootElementChildren", new Object[]{"DAV:"+E_PROPFIND} );
                    throw new WebdavException( statusCode );
                }
               
                if (element.getName().equalsIgnoreCase(E_PROPNAME)){
                    propFindType = FIND_PROPERTY_NAMES;
                }
                else if ( element.getName().equalsIgnoreCase(E_PROP) ) {
                    requestedProperties = new RequestedPropertiesImpl(element);
                    propFindType = FIND_BY_PROPERTY;
                }
                else if ( element.getName().equalsIgnoreCase(E_ALLPROP) ) {
                    requestedProperties = new RequestedPropertiesImpl(element);
                    propFindType = FIND_ALL_PROP;
                }
                else {
                    int statusCode = WebdavStatus.SC_BAD_REQUEST;
                    sendError( statusCode, getClass().getName()+".invalidChildOfRootElement", new Object[]{element.getNamespace()+":"+element.getName(),"DAV:"+E_PROPFIND} );
View Full Code Here

     */
    public RequestedProperties getAllPropertyNames(String resourcePath, boolean liveOnly) throws SlideException {
        NodeRevisionDescriptor nrd =
            content.retrieve(sToken, content.retrieve(sToken, resourcePath));
        ResourceKind resourceKind = AbstractResourceKind.determineResourceKind(nsaToken, resourcePath, nrd);
        RequestedPropertiesImpl result = (RequestedPropertiesImpl)getAllPropertyNames(resourceKind);
       
        if (!liveOnly) {
            // add this resource's dead properties
            Enumeration props = nrd.enumerateProperties();
            while (props.hasMoreElements()) {
                NodeProperty np = (NodeProperty)props.nextElement();
                if (!result.contains(np)) {
                    result.addProperty(new RequestedPropertyImpl(np.getName(), np.getNamespace()));
                }
            }
        }
        return result;
    }
View Full Code Here

     *
     * @throws   SlideException
     *
     */
    public RequestedProperties getAllPropertyNames(ResourceKind resourceKind) throws SlideException {
        RequestedPropertiesImpl result = new RequestedPropertiesImpl();
        Iterator liveprops = resourceKind.getSupportedLiveProperties().iterator();
        while (liveprops.hasNext()) {
            result.addProperty(new RequestedPropertyImpl((String)liveprops.next(), DNSP.getURI()));
        }
        return result;
    }
View Full Code Here

     * @return   a RequestedProperties
     *
     */
    protected RequestedProperties createRequestedProperties (Element propElement) throws BadQueryException {
        try {
            return new RequestedPropertiesImpl (propElement);
        }
        catch (PropertyParseException e) {
            throw new BadQueryException (e.getMessage(), e);
        }
    }
View Full Code Here

        if (propElement == null) {
            throw new BadQueryException(PROP_OR_ALLPROP_ELEMENT_MISSING);
        }

        try {
            requestedProperties = new RequestedPropertiesImpl (propElement);
        }
        catch (PropertyParseException e) {
            throw new BadQueryException(e.getMessage(), e);
        }
View Full Code Here

        labelHeader = WebdavUtils.fixTomcatHeader(requestHeaders.getLabel(), "UTF-8");
       
        retrieveDepth();
       
        if (req.getContentLength() == 0) {
            requestedProperties = new RequestedPropertiesImpl();
            requestedProperties.setIsAllProp(true);
            propFindType = FIND_ALL_PROP;
        }
        else {
           
            try {
               
                Element element = parseRequestContent(E_PROPFIND);
                try {
                    element = (Element)element.getChildren().get(0);
                }
                catch (Exception e) {
                    int statusCode = WebdavStatus.SC_BAD_REQUEST;
                    sendError( statusCode, getClass().getName()+".missingRootElementChildren", new Object[]{"DAV:"+E_PROPFIND} );
                    throw new WebdavException( statusCode );
                }
               
                if (element.getName().equalsIgnoreCase(E_PROPNAME)){
                    propFindType = FIND_PROPERTY_NAMES;
                }
                else if ( element.getName().equalsIgnoreCase(E_PROP) ) {
                    requestedProperties = new RequestedPropertiesImpl(element);
                    propFindType = FIND_BY_PROPERTY;
                }
                else if ( element.getName().equalsIgnoreCase(E_ALLPROP) ) {
                    requestedProperties = new RequestedPropertiesImpl(element);
                    propFindType = FIND_ALL_PROP;
                }
                else {
                    int statusCode = WebdavStatus.SC_BAD_REQUEST;
                    sendError( statusCode, getClass().getName()+".invalidChildOfRootElement", new Object[]{element.getNamespace()+":"+element.getName(),"DAV:"+E_PROPFIND} );
View Full Code Here

TOP

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

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.