Package org.apache.util

Examples of org.apache.util.XMLPrinter.writeElement()


     */
    protected String generateRequestBody() {

        XMLPrinter printer = new XMLPrinter();
        printer.writeXMLHeader();
        printer.writeElement("D", "DAV:", "acl",
                             XMLPrinter.OPENING);

        Enumeration aceList = aces.elements();

        while (aceList.hasMoreElements()) {
View Full Code Here


                // do not submit inherited and protected aces
                // continue with next ace
                continue;
            }

            printer.writeElement("D", null, "ace",
                                 XMLPrinter.OPENING);

            printer.writeElement("D", null, "principal",
                                 XMLPrinter.OPENING);
View Full Code Here

            }

            printer.writeElement("D", null, "ace",
                                 XMLPrinter.OPENING);

            printer.writeElement("D", null, "principal",
                                 XMLPrinter.OPENING);

            boolean found = false;
            String principal = ace.getPrincipal();
            String[] types = {"all", "authenticated", "unauthenticated",
View Full Code Here

                              "property", "self"};
            for (int i = 0; i < types.length && !found; i++) {
                if (types[i].equals(principal)) {
                    found = true;
                    if ("property".equals(principal)) {
                        printer.writeElement("D", null, principal,
                                             XMLPrinter.OPENING);
                        PropertyName property = ace.getProperty();
                        String nsURI = property.getNamespaceURI();
                        if ("DAV:".equals(nsURI)) {
                            printer.writeElement("D", null,
View Full Code Here

                        printer.writeElement("D", null, principal,
                                             XMLPrinter.OPENING);
                        PropertyName property = ace.getProperty();
                        String nsURI = property.getNamespaceURI();
                        if ("DAV:".equals(nsURI)) {
                            printer.writeElement("D", null,
                                                 property.getLocalName(),
                                                 XMLPrinter.NO_CONTENT);
                        } else {
                            printer.writeElement("Z", nsURI,
                                                 property.getLocalName(),
View Full Code Here

                        if ("DAV:".equals(nsURI)) {
                            printer.writeElement("D", null,
                                                 property.getLocalName(),
                                                 XMLPrinter.NO_CONTENT);
                        } else {
                            printer.writeElement("Z", nsURI,
                                                 property.getLocalName(),
                                                 XMLPrinter.NO_CONTENT);
                        }
                        printer.writeElement("D", null, principal,
                                             XMLPrinter.CLOSING);
View Full Code Here

                        } else {
                            printer.writeElement("Z", nsURI,
                                                 property.getLocalName(),
                                                 XMLPrinter.NO_CONTENT);
                        }
                        printer.writeElement("D", null, principal,
                                             XMLPrinter.CLOSING);
                    } else {
                        printer.writeElement("D", null, principal,
                                             XMLPrinter.NO_CONTENT);
                    }
View Full Code Here

                                                 XMLPrinter.NO_CONTENT);
                        }
                        printer.writeElement("D", null, principal,
                                             XMLPrinter.CLOSING);
                    } else {
                        printer.writeElement("D", null, principal,
                                             XMLPrinter.NO_CONTENT);
                    }
                }
            }
            if (!found) {
View Full Code Here

                                             XMLPrinter.NO_CONTENT);
                    }
                }
            }
            if (!found) {
                printer.writeElement("D", null, "href", XMLPrinter.OPENING);
                printer.writeText(principal);
                printer.writeElement("D", null, "href", XMLPrinter.CLOSING);
            }

            printer.writeElement("D", null, "principal",
View Full Code Here

                }
            }
            if (!found) {
                printer.writeElement("D", null, "href", XMLPrinter.OPENING);
                printer.writeText(principal);
                printer.writeElement("D", null, "href", XMLPrinter.CLOSING);
            }

            printer.writeElement("D", null, "principal",
                                 XMLPrinter.CLOSING);
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.