/** * @see XmlSerializable#toXml(Document) */ public Element toXml(Document document) { Element ace = DomUtil.createElement(document, XML_ACE, SecurityConstants.NAMESPACE); if (invert) { Element inv = DomUtil.addChildElement(ace, XML_INVERT, SecurityConstants.NAMESPACE); inv.appendChild(principal.toXml(document)); } else { ace.appendChild(principal.toXml(document)); } Element gd = DomUtil.addChildElement(ace, ((grant) ? XML_GRANT : XML_DENY), SecurityConstants.NAMESPACE); for (Privilege privilege : privileges) { gd.appendChild(privilege.toXml(document)); } if (isProtected) { DomUtil.addChildElement(ace, XML_PROTECTED, SecurityConstants.NAMESPACE); } if (inheritedHref != null) { Element inh = DomUtil.addChildElement(ace, XML_INHERITED, SecurityConstants.NAMESPACE); inh.appendChild(DomUtil.hrefToXml(inheritedHref, document)); } return ace; }
/** * @see XmlSerializable#toXml(Document) */ public Element toXml(Document document) { Element ace = DomUtil.createElement(document, XML_ACE, SecurityConstants.NAMESPACE); if (invert) { Element inv = DomUtil.addChildElement(ace, XML_INVERT, SecurityConstants.NAMESPACE); inv.appendChild(principal.toXml(document)); } else { ace.appendChild(principal.toXml(document)); } Element gd = DomUtil.addChildElement(ace, ((grant) ? XML_GRANT : XML_DENY), SecurityConstants.NAMESPACE); for (Privilege privilege : privileges) { gd.appendChild(privilege.toXml(document)); } if (isProtected) { DomUtil.addChildElement(ace, XML_PROTECTED, SecurityConstants.NAMESPACE); } if (inheritedHref != null) { Element inh = DomUtil.addChildElement(ace, XML_INHERITED, SecurityConstants.NAMESPACE); inh.appendChild(DomUtil.hrefToXml(inheritedHref, document)); } return ace; }
/** * @see XmlSerializable#toXml(Document) */ public Element toXml(Document document) { Element ace = DomUtil.createElement(document, XML_ACE, SecurityConstants.NAMESPACE); if (invert) { Element inv = DomUtil.addChildElement(ace, XML_INVERT, SecurityConstants.NAMESPACE); inv.appendChild(principal.toXml(document)); } else { ace.appendChild(principal.toXml(document)); } Element gd = DomUtil.addChildElement(ace, ((grant) ? XML_GRANT : XML_DENY), SecurityConstants.NAMESPACE); for (int i = 0; i < privileges.length; i++) { gd.appendChild(privileges[i].toXml(document)); } if (isProtected) { DomUtil.addChildElement(ace, XML_PROTECTED, SecurityConstants.NAMESPACE); } if (inheritedHref != null) { Element inh = DomUtil.addChildElement(ace, XML_INHERITED, SecurityConstants.NAMESPACE); inh.appendChild(DomUtil.hrefToXml(inheritedHref, document)); } return ace; }
/** * @see DavProperty#toXml(Document) */ @Override public Element toXml(Document document) { Element elem = getName().toXml(document); if (grantOnly) { DomUtil.addChildElement(elem, XML_GRANT_ONLY, SecurityConstants.NAMESPACE); } if (noInvert) { DomUtil.addChildElement(elem, XML_NO_INVERT, SecurityConstants.NAMESPACE); } if (denyBeforeGrant) { DomUtil.addChildElement(elem, XML_DENY_BEFORE_GRANT, SecurityConstants.NAMESPACE); } if (requiredPrincipal != null) { elem.appendChild(requiredPrincipal.toXml(document)); } return elem; }
/** * @see DavProperty#toXml(Document) */ public Element toXml(Document document) { Element elem = getName().toXml(document); if (grantOnly) { DomUtil.addChildElement(elem, XML_GRANT_ONLY, SecurityConstants.NAMESPACE); } if (noInvert) { DomUtil.addChildElement(elem, XML_NO_INVERT, SecurityConstants.NAMESPACE); } if (denyBeforeGrant) { DomUtil.addChildElement(elem, XML_DENY_BEFORE_GRANT, SecurityConstants.NAMESPACE); } if (requiredPrincipal != null) { elem.appendChild(requiredPrincipal.toXml(document)); } return elem; }
/** * @see DavProperty#toXml(Document) */ @Override public Element toXml(Document document) { Element elem = getName().toXml(document); if (grantOnly) { DomUtil.addChildElement(elem, XML_GRANT_ONLY, SecurityConstants.NAMESPACE); } if (noInvert) { DomUtil.addChildElement(elem, XML_NO_INVERT, SecurityConstants.NAMESPACE); } if (denyBeforeGrant) { DomUtil.addChildElement(elem, XML_DENY_BEFORE_GRANT, SecurityConstants.NAMESPACE); } if (requiredPrincipal != null) { elem.appendChild(requiredPrincipal.toXml(document)); } return elem; }