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

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Mar 2 11:59:53 EST 2010


Author: anil.saldhana at jboss.com
Date: 2010-03-02 11:59:52 -0500 (Tue, 02 Mar 2010)
New Revision: 101723

Modified:
   projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/AttributeValue.java
   projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/BagAttribute.java
   projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/BooleanAttribute.java
   projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/DNSNameAttribute.java
   projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/DayTimeDurationAttribute.java
   projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/DoubleAttribute.java
   projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/IPv4AddressAttribute.java
   projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/IPv6AddressAttribute.java
   projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/IntegerAttribute.java
   projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/YearMonthDurationAttribute.java
Log:
SECURITY-463: getValue() abstract method

Modified: projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/AttributeValue.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/AttributeValue.java	2010-03-02 16:40:24 UTC (rev 101722)
+++ projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/AttributeValue.java	2010-03-02 16:59:52 UTC (rev 101723)
@@ -88,6 +88,12 @@
     public URI getType() {
         return type;
     }
+    
+    /**
+     * Get the value represented
+     * @return
+     */
+    public abstract Object getValue();
 
     /**
      * Returns whether or not this value is actually a bag of values. This

Modified: projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/BagAttribute.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/BagAttribute.java	2010-03-02 16:40:24 UTC (rev 101722)
+++ projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/BagAttribute.java	2010-03-02 16:59:52 UTC (rev 101723)
@@ -37,7 +37,6 @@
 package org.jboss.security.xacml.sunxacml.attr;
 
 import java.net.URI;
-
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
@@ -233,4 +232,14 @@
         throw new UnsupportedOperationException("Bags cannot be encoded");
     }
 
-}
+   @Override
+   public Object getValue()
+   {
+      if(isEmpty() == false)
+      {
+         AttributeValue attributeValue = (AttributeValue) iterator().next();
+         return attributeValue.getValue(); 
+      }
+      return null;
+   }
+}
\ No newline at end of file

Modified: projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/BooleanAttribute.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/BooleanAttribute.java	2010-03-02 16:40:24 UTC (rev 101722)
+++ projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/BooleanAttribute.java	2010-03-02 16:59:52 UTC (rev 101723)
@@ -177,7 +177,7 @@
      *
      * @return the <code>boolean</code> value
      */
-    public boolean getValue() {
+    public Boolean getValue() {
         return value;
     }
 

Modified: projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/DNSNameAttribute.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/DNSNameAttribute.java	2010-03-02 16:40:24 UTC (rev 101722)
+++ projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/DNSNameAttribute.java	2010-03-02 16:59:52 UTC (rev 101723)
@@ -259,4 +259,10 @@
         return hostname + ":" + range.encode();
     }
 
-}
+
+    @Override
+    public Object getValue()
+    {
+       throw new RuntimeException("Not implemented");
+    }   
+}
\ No newline at end of file

Modified: projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/DayTimeDurationAttribute.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/DayTimeDurationAttribute.java	2010-03-02 16:40:24 UTC (rev 101722)
+++ projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/DayTimeDurationAttribute.java	2010-03-02 16:59:52 UTC (rev 101723)
@@ -538,4 +538,10 @@
 
         return encodedValue;
     }
-}
+
+   @Override
+   public Object getValue()
+   {
+      throw new RuntimeException("Not implemented");
+   }   
+}
\ No newline at end of file

Modified: projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/DoubleAttribute.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/DoubleAttribute.java	2010-03-02 16:40:24 UTC (rev 101722)
+++ projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/DoubleAttribute.java	2010-03-02 16:59:52 UTC (rev 101723)
@@ -120,7 +120,7 @@
      *
      * @return the <code>double</code> value
      */
-    public double getValue() {
+    public Double getValue() {
         return value;
     }
     

Modified: projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/IPv4AddressAttribute.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/IPv4AddressAttribute.java	2010-03-02 16:40:24 UTC (rev 101722)
+++ projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/IPv4AddressAttribute.java	2010-03-02 16:59:52 UTC (rev 101723)
@@ -171,4 +171,10 @@
         return str;
     }
 
-}
+
+    @Override
+    public Object getValue()
+    {
+       throw new RuntimeException("Not implemented");
+    }   
+}
\ No newline at end of file

Modified: projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/IPv6AddressAttribute.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/IPv6AddressAttribute.java	2010-03-02 16:40:24 UTC (rev 101722)
+++ projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/IPv6AddressAttribute.java	2010-03-02 16:59:52 UTC (rev 101723)
@@ -161,4 +161,11 @@
         return str;
     }
 
-}
+
+    @Override
+    public Object getValue()
+    {
+       throw new RuntimeException("Not implemented");
+    }   
+
+}
\ No newline at end of file

Modified: projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/IntegerAttribute.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/IntegerAttribute.java	2010-03-02 16:40:24 UTC (rev 101722)
+++ projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/IntegerAttribute.java	2010-03-02 16:59:52 UTC (rev 101723)
@@ -119,7 +119,7 @@
      *
      * @return the <code>long</code> value
      */
-    public long getValue() {
+    public Long getValue() {
         return value;
     }
 

Modified: projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/YearMonthDurationAttribute.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/YearMonthDurationAttribute.java	2010-03-02 16:40:24 UTC (rev 101722)
+++ projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/attr/YearMonthDurationAttribute.java	2010-03-02 16:59:52 UTC (rev 101723)
@@ -386,4 +386,11 @@
 
         return encodedValue;
     }
-}
+
+
+    @Override
+    public Object getValue()
+    {
+       throw new RuntimeException("Not implemented");
+    }   
+}
\ No newline at end of file




More information about the jboss-cvs-commits mailing list