Examples of DAVItemSerializer


Examples of com.nirima.jenkins.webdav.impl.DAVItemSerializer

        response.close();

    }

    protected void printItem(IDavContext ctxt, XMLStreamWriter response, IDavItem di) throws IOException, MethodException, XMLStreamException {
        DAVItemSerializer dis = new DAVItemSerializer();

        // Item
        response.writeStartElement("DAV:", "response");
        response.writeStartElement("DAV:", "href");

        String href = this.getBaseUrl();

        // If we're looking at the root item, don't ask it for its' name, because it will
        // be 'null'
        if (!di.equals(getRepo().getRepositoryRoot(getDavContext()))) href += di.getPath(ctxt);
        // else
        // href += "/";

        // The following is to keep slide happy. I think it's wrong (looking at the RFC examples
        // seems to confirm this), but - hey ho!
        URL url = new URL(href);
        href = url.getPath();

        s_logger.info("PATH href " + href);
        response.writeCharacters(href);

        response.writeEndElement();
        if (m_properties != null)
            dis.generateNamedProperties(ctxt, di, response, m_properties);
        else
            dis.generateProperties(ctxt, di, response, false);
        response.writeEndElement();

        // Item
    }
View Full Code Here

Examples of com.nirima.jenkins.webdav.impl.DAVItemSerializer

        // m_response.setContentType("text/xml; charset=UTF-8");
        // Output the response

        XMLStreamWriter response = this.createXmlResponse();
        DAVItemSerializer dis = new DAVItemSerializer();
        try {
            //response.writeStartDocument("UTF-8");
            response.setPrefix("a", "DAV:");
            response.writeStartElement("DAV:", "prop");
            dis.generateLockXml(response, lockItem);
            response.writeEndElement();
            response.writeEndDocument();
            response.flush();
            response.close();
        } catch (Exception e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.