/** * Tries to add the specified object to the <code>PropContainer</code> and * returns a boolean indicating whether the content could be added to the * internal set/map. * * @param contentEntry * @return true if the object could be added; false otherwise * @deprecated Use {@link #addContent(PropEntry)} instead. */ public boolean addContent(Object contentEntry) { if (contentEntry instanceof PropEntry) { return addContent((PropEntry) contentEntry); } else { return false; } }
Status st = new Status(statusKey); PropContainer propCont = statusMap.get(statusKey); if (!propCont.isEmpty()) { Element propstat = DomUtil.createElement(document, XML_PROPSTAT, NAMESPACE); propstat.appendChild(propCont.toXml(document)); propstat.appendChild(st.toXml(document)); response.appendChild(propstat);
/** * Returns the xml representation of a property related set with the * following format: * <pre> * <!ELEMENT prop (ANY) > * where ANY consists of a list of elements each reflecting the xml * representation of the entries returned by {@link #getContent()}. * </pre> * * @see XmlSerializable#toXml(Document) */ public Element toXml(Document document) { Element prop = DomUtil.createElement(document, XML_PROP, NAMESPACE); Iterator it = getContent().iterator(); while (it.hasNext()) { Object content = it.next(); if (content instanceof XmlSerializable) { prop.appendChild(((XmlSerializable)content).toXml(document)); } else { log.debug("Unexpected content in PropContainer: should be XmlSerializable."); } } return prop; }
propstat.appendChild(propCont.toXml(document)); propstat.appendChild(st.toXml(document)); response.appendChild(propstat);
Status st = new Status(statusKey); PropContainer propCont = statusMap.get(statusKey); if (!propCont.isEmpty()) { Element propstat = DomUtil.createElement(document, XML_PROPSTAT, NAMESPACE); propstat.appendChild(propCont.toXml(document)); propstat.appendChild(st.toXml(document)); response.appendChild(propstat);
/** * Returns the xml representation of a property related set with the * following format: * <pre> * <!ELEMENT prop (ANY) > * where ANY consists of a list of elements each reflecting the xml * representation of the entries returned by {@link #getContent()}. * </pre> * * @see XmlSerializable#toXml(Document) */ public Element toXml(Document document) { Element prop = DomUtil.createElement(document, XML_PROP, NAMESPACE); for (Object content : getContent()) { if (content instanceof XmlSerializable) { prop.appendChild(((XmlSerializable) content).toXml(document)); } else { log.debug("Unexpected content in PropContainer: should be XmlSerializable."); } } return prop; }
/** * Tries to add the specified object to the <code>PropContainer</code> and * returns a boolean indicating whether the content could be added to the * internal set/map. * * @param contentEntry * @return true if the object could be added; false otherwise * @deprecated Use {@link #addContent(PropEntry)} instead. */ public boolean addContent(Object contentEntry) { if (contentEntry instanceof PropEntry) { return addContent((PropEntry) contentEntry); } else { return false; } }
/** * Returns the xml representation of a property related set with the * following format: * <pre> * <!ELEMENT prop (ANY) > * where ANY consists of a list of elements each reflecting the xml * representation of the entries returned by {@link #getContent()}. * </pre> * * @see XmlSerializable#toXml(Document) */ public Element toXml(Document document) { Element prop = DomUtil.createElement(document, XML_PROP, NAMESPACE); for (Object content : getContent()) { if (content instanceof XmlSerializable) { prop.appendChild(((XmlSerializable) content).toXml(document)); } else { log.debug("Unexpected content in PropContainer: should be XmlSerializable."); } } return prop; }
/** * Adds a property name to this response '200' propstat set. * * @param propertyName the property name to add */ public void add(DavPropertyName propertyName) { checkType(TYPE_PROPSTAT); PropContainer status200 = getPropContainer(DavServletResponse.SC_OK, true); status200.addContent(propertyName); }
/** * Adds a property to this response '200' propstat set. * * @param property the property to add */ public void add(DavProperty<?> property) { checkType(TYPE_PROPSTAT); PropContainer status200 = getPropContainer(DavServletResponse.SC_OK, false); status200.addContent(property); }
/** * Adds a property to this response * * @param property the property to add * @param status the status of the response set to select */ public void add(DavProperty<?> property, int status) { checkType(TYPE_PROPSTAT); PropContainer propCont = getPropContainer(status, false); propCont.addContent(property); }
/** * Adds a property name to this response * * @param propertyName the property name to add * @param status the status of the response set to select */ public void add(DavPropertyName propertyName, int status) { checkType(TYPE_PROPSTAT); PropContainer propCont = getPropContainer(status, true); propCont.addContent(propertyName); }
/** * Adds a property name to this response '200' propstat set. * * @param propertyName the property name to add */ public void add(DavPropertyName propertyName) { checkType(TYPE_PROPSTAT); PropContainer status200 = getPropContainer(DavServletResponse.SC_OK, true); status200.addContent(propertyName); }
/** * Adds a property to this response * * @param property the property to add * @param status the status of the response set to select */ public void add(DavProperty<?> property, int status) { checkType(TYPE_PROPSTAT); PropContainer propCont = getPropContainer(status, false); propCont.addContent(property); }
/** * Adds a property to this response '200' propstat set. * * @param property the property to add */ public void add(DavProperty property) { checkType(TYPE_PROPSTAT); PropContainer status200 = getPropContainer(DavServletResponse.SC_OK, false); status200.addContent(property); }
/** * Adds a property to this response * * @param property the property to add * @param status the status of the response set to select */ public void add(DavProperty property, int status) { checkType(TYPE_PROPSTAT); PropContainer propCont = getPropContainer(status, false); propCont.addContent(property); }
/** * Adds a property name to this response * * @param propertyName the property name to add * @param status the status of the response set to select */ public void add(DavPropertyName propertyName, int status) { checkType(TYPE_PROPSTAT); PropContainer propCont = getPropContainer(status, true); propCont.addContent(propertyName); }
/** * Adds a property name to this response '200' propstat set. * * @param propertyName the property name to add */ public void add(DavPropertyName propertyName) { checkType(TYPE_PROPSTAT); PropContainer status200 = getPropContainer(DavServletResponse.SC_OK, true); status200.addContent(propertyName); }
/** * Adds a property name to this response * * @param propertyName the property name to add * @param status the status of the response set to select */ public void add(DavPropertyName propertyName, int status) { checkType(TYPE_PROPSTAT); PropContainer propCont = getPropContainer(status, true); propCont.addContent(propertyName); }
/** * Adds a property to this response '200' propstat set. * * @param property the property to add */ public void add(DavProperty<?> property) { checkType(TYPE_PROPSTAT); PropContainer status200 = getPropContainer(DavServletResponse.SC_OK, false); status200.addContent(property); }