[jboss-cvs] JBossAS SVN: r71680 - 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
Thu Apr 3 03:12:35 EDT 2008
Author: anil.saldhana at jboss.com
Date: 2008-04-03 03:12:35 -0400 (Thu, 03 Apr 2008)
New Revision: 71680
Added:
projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/interfaces/ElementMappingType.java
Modified:
projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/core/JBossRequestContext.java
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/RequestContext.java
projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/interfaces/ResponseContext.java
Log:
SECURITY-176: placeholder for asElement
Modified: projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/core/JBossRequestContext.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/core/JBossRequestContext.java 2008-04-03 07:08:49 UTC (rev 71679)
+++ projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/core/JBossRequestContext.java 2008-04-03 07:12:35 UTC (rev 71680)
@@ -40,6 +40,7 @@
import org.jboss.security.xacml.interfaces.XACMLConstants;
import org.jboss.security.xacml.sunxacml.ctx.RequestCtx;
import org.w3c.dom.Document;
+import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -144,6 +145,15 @@
storedRequest.encode(os);
}
+ /**
+ * @see ElementMappingType#asElement(Document)
+ */
+ public Element asElement(Document root)
+ {
+ throw new RuntimeException("SECURITY-176");
+ }
+
+
private Node getRequest(InputStream is) throws Exception
{
String contextSchema = "urn:oasis:names:tc:xacml:2.0:context:schema:os";
@@ -155,4 +165,6 @@
return nodes.item(0);
}
+
+
}
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-03 07:08:49 UTC (rev 71679)
+++ projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/core/JBossResponseContext.java 2008-04-03 07:12:35 UTC (rev 71680)
@@ -37,6 +37,7 @@
import org.jboss.security.xacml.sunxacml.ctx.ResponseCtx;
import org.jboss.security.xacml.sunxacml.ctx.Result;
import org.w3c.dom.Document;
+import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -136,6 +137,14 @@
}
}
+ /**
+ * @see ElementMappingType#asElement(Document)
+ */
+ public Element asElement(Document root)
+ {
+ throw new RuntimeException("SECURITY-177");
+ }
+
private Node getResponse(InputStream is) throws Exception
{
String contextSchema = XACMLConstants.CONTEXT_SCHEMA;
Added: projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/interfaces/ElementMappingType.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/interfaces/ElementMappingType.java (rev 0)
+++ projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/interfaces/ElementMappingType.java 2008-04-03 07:12:35 UTC (rev 71680)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.security.xacml.interfaces;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * Represents an element from a document
+ * @author Anil.Saldhana at redhat.com
+ * @since Apr 3, 2008
+ * @version $Revision$
+ */
+public interface ElementMappingType
+{
+ /**
+ * Return a new Element given the owner document
+ * @param root
+ * @return
+ */
+ Element asElement(Document root);
+}
\ No newline at end of file
Modified: projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/interfaces/RequestContext.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/interfaces/RequestContext.java 2008-04-03 07:08:49 UTC (rev 71679)
+++ projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/interfaces/RequestContext.java 2008-04-03 07:12:35 UTC (rev 71680)
@@ -34,7 +34,7 @@
* @since Jul 6, 2007
* @version $Revision$
*/
-public interface RequestContext extends ContextMapOp
+public interface RequestContext extends ContextMapOp, ElementMappingType
{
/**
* Return the element of the document
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-03 07:08:49 UTC (rev 71679)
+++ projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/interfaces/ResponseContext.java 2008-04-03 07:12:35 UTC (rev 71680)
@@ -34,7 +34,7 @@
* @since Jul 6, 2007
* @version $Revision$
*/
-public interface ResponseContext extends ContextMapOp
+public interface ResponseContext extends ContextMapOp, ElementMappingType
{
/**
* Decision based on the evaluation of policies
More information about the jboss-cvs-commits
mailing list