[jboss-cvs] JBossAS SVN: r66230 - in projects/security/security-xacml/trunk: jboss-xacml/src/main/org/jboss/security/xacml/core and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Oct 18 02:56:44 EDT 2007
Author: anil.saldhana at jboss.com
Date: 2007-10-18 02:56:44 -0400 (Thu, 18 Oct 2007)
New Revision: 66230
Modified:
projects/security/security-xacml/trunk/docs/userguide/pom.xml
projects/security/security-xacml/trunk/jboss-xacml/src/main/org/jboss/security/xacml/core/JBossResponseContext.java
projects/security/security-xacml/trunk/jboss-xacml/src/main/org/jboss/security/xacml/interfaces/ResponseContext.java
projects/security/security-xacml/trunk/jboss-xacml/src/tests/org/jboss/test/security/xacml/factories/util/XACMLTestUtil.java
Log:
add marshall method in response context
Modified: projects/security/security-xacml/trunk/docs/userguide/pom.xml
===================================================================
--- projects/security/security-xacml/trunk/docs/userguide/pom.xml 2007-10-18 05:51:39 UTC (rev 66229)
+++ projects/security/security-xacml/trunk/docs/userguide/pom.xml 2007-10-18 06:56:44 UTC (rev 66230)
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>jboss</groupId>
<artifactId>jbossxacml</artifactId>
- <version>2.0.0</version>
+ <version>2.0.1-BETA</version>
<packaging>pom</packaging>
<name>JBoss XACML User Guide</name>
<description>The JBoss XACML User Guide</description>
Modified: projects/security/security-xacml/trunk/jboss-xacml/src/main/org/jboss/security/xacml/core/JBossResponseContext.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-xacml/src/main/org/jboss/security/xacml/core/JBossResponseContext.java 2007-10-18 05:51:39 UTC (rev 66229)
+++ projects/security/security-xacml/trunk/jboss-xacml/src/main/org/jboss/security/xacml/core/JBossResponseContext.java 2007-10-18 06:56:44 UTC (rev 66230)
@@ -21,6 +21,8 @@
*/
package org.jboss.security.xacml.core;
+import java.io.IOException;
+import java.io.OutputStream;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
@@ -76,5 +78,15 @@
}
return decision;
- }
+ }
+
+ /**
+ * @see ResponseContext#marshall(OutputStream)
+ */
+ public void marshall(OutputStream os) throws IOException
+ {
+ ResponseCtx storedResponse = get(XACMLConstants.RESPONSE_CTX);
+ if(storedResponse != null)
+ storedResponse.encode(os);
+ }
}
Modified: projects/security/security-xacml/trunk/jboss-xacml/src/main/org/jboss/security/xacml/interfaces/ResponseContext.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-xacml/src/main/org/jboss/security/xacml/interfaces/ResponseContext.java 2007-10-18 05:51:39 UTC (rev 66229)
+++ projects/security/security-xacml/trunk/jboss-xacml/src/main/org/jboss/security/xacml/interfaces/ResponseContext.java 2007-10-18 06:56:44 UTC (rev 66230)
@@ -21,6 +21,9 @@
*/
package org.jboss.security.xacml.interfaces;
+import java.io.IOException;
+import java.io.OutputStream;
+
//$Id$
/**
@@ -37,4 +40,11 @@
* @see XACMLConstants
*/
int getDecision();
+
+ /**
+ * Marshall the response context onto an Output Stream
+ * @param os OutputStream (System.out, ByteArrayOutputStream etc)
+ * @throws IOException
+ */
+ void marshall(OutputStream os) throws IOException;
}
Modified: projects/security/security-xacml/trunk/jboss-xacml/src/tests/org/jboss/test/security/xacml/factories/util/XACMLTestUtil.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-xacml/src/tests/org/jboss/test/security/xacml/factories/util/XACMLTestUtil.java 2007-10-18 05:51:39 UTC (rev 66229)
+++ projects/security/security-xacml/trunk/jboss-xacml/src/tests/org/jboss/test/security/xacml/factories/util/XACMLTestUtil.java 2007-10-18 06:56:44 UTC (rev 66230)
@@ -45,6 +45,8 @@
*/
public class XACMLTestUtil
{
+ //Enable for request trace
+ private static boolean debug = "true".equals(System.getProperty("debug","false"));
/**
* Get the decision from the PDP
* @param pdp
@@ -76,6 +78,8 @@
throws Exception
{
ResponseContext response = pdp.evaluate(request);
+ if(debug)
+ response.marshall(System.out);
TestCase.assertNotNull("Response is not null", response);
return response.getDecision();
}
More information about the jboss-cvs-commits
mailing list