[jboss-cvs] JBossAS SVN: r71632 - in projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml: interfaces and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Apr 2 14:26:16 EDT 2008
Author: anil.saldhana at jboss.com
Date: 2008-04-02 14:26:16 -0400 (Wed, 02 Apr 2008)
New Revision: 71632
Modified:
projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/core/JBossResponseContext.java
projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/interfaces/ResponseContext.java
Log:
SECURITY-170: readResponse(node)
Modified: projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/core/JBossResponseContext.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/core/JBossResponseContext.java 2008-04-02 18:18:21 UTC (rev 71631)
+++ projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/core/JBossResponseContext.java 2008-04-02 18:26:16 UTC (rev 71632)
@@ -30,8 +30,10 @@
import org.jboss.security.xacml.interfaces.ContextMapOp;
import org.jboss.security.xacml.interfaces.ResponseContext;
import org.jboss.security.xacml.interfaces.XACMLConstants;
+import org.jboss.security.xacml.sunxacml.ParsingException;
import org.jboss.security.xacml.sunxacml.ctx.ResponseCtx;
import org.jboss.security.xacml.sunxacml.ctx.Result;
+import org.w3c.dom.Node;
/**
* Implementation of the ResponseContext interface
@@ -87,5 +89,22 @@
ResponseCtx storedResponse = get(XACMLConstants.RESPONSE_CTX);
if(storedResponse != null)
storedResponse.encode(os);
+ }
+
+ /**
+ * @see ResponseContext#readResponse(Node)
+ */
+ public void readResponse(Node node) throws IOException
+ {
+ ResponseCtx responseCtx;
+ try
+ {
+ responseCtx = ResponseCtx.getInstance(node);
+ set(XACMLConstants.RESPONSE_CTX, responseCtx);
+ }
+ catch (ParsingException e)
+ {
+ throw new RuntimeException(e);
+ }
}
-}
+}
\ No newline at end of file
Modified: projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/interfaces/ResponseContext.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/interfaces/ResponseContext.java 2008-04-02 18:18:21 UTC (rev 71631)
+++ projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/interfaces/ResponseContext.java 2008-04-02 18:26:16 UTC (rev 71632)
@@ -24,6 +24,8 @@
import java.io.IOException;
import java.io.OutputStream;
+import org.w3c.dom.Node;
+
//$Id$
/**
@@ -42,6 +44,13 @@
int getDecision();
/**
+ * Read a preparsed Node
+ * @param node
+ * @throws IOException
+ */
+ void readResponse(Node node) throws IOException;
+
+ /**
* Marshall the response context onto an Output Stream
* @param os OutputStream (System.out, ByteArrayOutputStream etc)
* @throws IOException
More information about the jboss-cvs-commits
mailing list