Package com.opensymphony.module.propertyset.xml

Examples of com.opensymphony.module.propertyset.xml.XMLPropertySet


                    String userName = userElement.getAttribute("id");
                    Node propertySetContent = userElement.getFirstChild();
                    log.debug(propertySetContent.toString());
                   
          XMLPropertySet ps = (XMLPropertySet)PropertySetManager.getInstance("xml", null);
          Document d = factory.newDocumentBuilder().newDocument();
          d.appendChild(propertySetContent);
          ps.loadFromDocument(d);
          propertySets.put(userName, ps);
         
                    log.debug("added user credentials " + userName);
                } else {
                    log.warn("expected 'user' element, found " + userElement.getNodeName() + " in " + storeFile);
View Full Code Here


            Node root = document.createElement("users");

            // a <user id="foo" password="bar"> for each group
            for (Iterator i = propertySets.keySet().iterator(); i.hasNext();) {
                String userKey = i.next().toString();
                XMLPropertySet ps = (XMLPropertySet) propertySets.get(userKey);
                //Node user = createElement("user").addAttribute("id", userKey);
                Node userNode = new Node();
                root.appendChild(userNode);
                log.debug(ps.saveToDocument().toString());
                //userElement.add(ps.saveToDocument().toString());
            }

            // print it nicely
            OutputFormat format = OutputFormat.createPrettyPrint();
View Full Code Here

TOP

Related Classes of com.opensymphony.module.propertyset.xml.XMLPropertySet

Copyright © 2018 www.massapicom. 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.