Examples of PartialResponse


Examples of org.apache.xindice.webadmin.PartialResponse

            /*
             * If an error in executing the COPY method occurs with a resource other
             * than the resource identified in the Request-URI then the response
             * MUST be a 207 (Multi-Status).
             */
            PartialResponse part = new PartialResponse(dest);
            String st = res.getProtocol() + " " + status + " " + WebdavStatus.getStatusText(status);
            part.addContent("status", st);
            res.sendMultiStatusResponse(part);
        }

        res.closeMultistatusResponse();
    }
View Full Code Here

Examples of org.apache.xindice.webadmin.PartialResponse

    private String getLocation(String context, Collection col, String resource) {
        return context + col.getCanonicalDocumentName(resource);
    }

    public void addPropfindResponse(DAVResponse res, String location, HashMap statusList) throws IOException {
        PartialResponse response = new PartialResponse(location);

        for (Iterator i = statusList.keySet().iterator(); i.hasNext(); ) {
            Integer status = (Integer) i.next();
            ArrayList props = (ArrayList) statusList.get(status);

            if (props != null && props.size() > 0) {
                PartialResponse.Content prop = new PartialResponse.Content("prop");
                for (Iterator j = props.iterator(); j.hasNext(); ) {
                    prop.addChild((PartialResponse.Content) j.next());
                }

                PartialResponse.Content stat = new PartialResponse.Content("status");
                stat.setValue(res.getProtocol() + " " + status + " " + WebdavStatus.getStatusText(status.intValue()));

                PartialResponse.Content propstat = new PartialResponse.Content("propstat");
                propstat.addChild(prop);
                propstat.addChild(stat);

                response.addContent(propstat);
            }
        }

        res.sendMultiStatusResponse(response);
    }
View Full Code Here

Examples of org.apache.xindice.webadmin.PartialResponse

            /*
             * If an error in executing the MOVE method occurs with a resource other
             * than the resource identified in the Request-URI then the response
             * MUST be a 207 (Multi-Status).
             */
            PartialResponse part = new PartialResponse(dest);
            String st = res.getProtocol() + " " + status + " " + WebdavStatus.getStatusText(status);
            part.addContent("status", st);
            res.sendMultiStatusResponse(part);
        }

        res.closeMultistatusResponse();
    }
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.