[jboss-cvs] JBossAS SVN: r71696 - projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/ctx.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Apr 3 12:03:10 EDT 2008


Author: anil.saldhana at jboss.com
Date: 2008-04-03 12:03:09 -0400 (Thu, 03 Apr 2008)
New Revision: 71696

Modified:
   projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/ctx/ResponseCtx.java
Log:
SECURITY-178: encode method with nsuri

Modified: projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/ctx/ResponseCtx.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/ctx/ResponseCtx.java	2008-04-03 13:58:02 UTC (rev 71695)
+++ projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/ctx/ResponseCtx.java	2008-04-03 16:03:09 UTC (rev 71696)
@@ -193,6 +193,35 @@
     }
     
     
+    public void encode(OutputStream output, Indenter indenter, 
+          String nsURI) {
+
+       // Make a PrintStream for a nicer printing interface
+       PrintStream out = new PrintStream(output);
+
+       // Prepare the indentation string
+       String topIndent = indenter.makeString();
+       out.println(topIndent + "<Response xmlns='"+nsURI+"'>");
+
+       // Now write the XML... 
+
+       // Go through all results
+       Iterator it = results.iterator();
+       indenter.in();
+
+       while (it.hasNext()) {
+           Result result = (Result)(it.next());
+           result.encode(out, indenter);
+       }
+
+       indenter.out();
+
+       // Finish the XML for a response
+       out.println(topIndent + "</Response>");
+   }
+
+    
+    
     private static String getNodeName(Node node)
     {
     	String name = node.getLocalName();




More information about the jboss-cvs-commits mailing list