private void spoolMultiValued(OutputStream out) { try { Document doc = DomUtil.createDocument(); doc.appendChild(getProperty(JCR_VALUES).toXml(doc)); ContentHandler handler = SerializingContentHandler.getSerializer(out); Transformer transformer = TransformerFactory.newInstance().newTransformer(); transformer.transform( new DOMSource(doc), new SAXResult(handler)); } catch (SAXException e) { log.error("Failed to set up XML serializer for " + item, e); } catch (TransformerConfigurationException e) { log.error("Failed to set up XML transformer for " + item, e); } catch (ParserConfigurationException e) { log.error("Failed to set up XML document for " + item, e); } catch (TransformerException e) { log.error("Failed to serialize the values of " + item, e); } }
/** * Return the AclProperty relative to a given url * * @param urlPath Location of the CalendarResource * @param httpResponse Response Object for the request. * @return AclProperty xml response or null if missing */ public AclProperty getAcl(HttpResponse httpResponse, String urlPath) { DavProperty p = getDavProperty(httpResponse, urlPath, CalDAVConstants.DNAME_ACL); if (p != null) { try { return AclProperty.createFromXml(p.toXml(DomUtil.createDocument())); } catch (DavException | ParserConfigurationException e) { log.warn("Unable to create AclProperty"); } } return null; }
propElement = getPropElement(proppatch, true); propElement.appendChild(setProperty.toXml(document)); } else { throw new IllegalArgumentException("ChangeList may only contain DavPropertyName and DavProperty elements.");
propElement = getPropElement(proppatch, true); propElement.appendChild(setProperty.toXml(document)); } else { throw new IllegalArgumentException("ChangeList may only contain DavPropertyName and DavProperty elements.");
if (ps.contains(DavPropertyName.LOCKDISCOVERY)) { DavProperty<?> p = ps.get(DavPropertyName.LOCKDISCOVERY); LockDiscovery ld = LockDiscovery.createFromXml(p.toXml(DomUtil.createDocument())); NodeId parentId = getParentId(uri, ps, sessionInfo); return retrieveLockInfo(ld, sessionInfo, nodeId, parentId);
if (ps.contains(DavPropertyName.LOCKDISCOVERY)) { DavProperty<?> p = ps.get(DavPropertyName.LOCKDISCOVERY); LockDiscovery ld = LockDiscovery.createFromXml(p.toXml(DomUtil.createDocument())); NodeId parentId = getParentId(uri, ps, sessionInfo); return retrieveLockInfo(ld, sessionInfo, nodeId, parentId);