Update of /cvsroot/sunxacml/sunxacml/com/sun/xacml/cond
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv27141/com/sun/xacml/cond
Modified Files:
HigherOrderFunction.java StandardFunctionFactory.java
URLStringCatFunction.java
Log Message:
Small bug-fix commits:
- com/sun/xacml/AbstractPolicy.java
Updated to handle empty descriptions gracefully
- com/sun/xacml/cond/HigherOrderFunction.java
Updated to allow parameters of different types
- com/sun/xacml/cond/StandardFunctionFactory.java
Added support for TimeInRange function
- com/sun/xacml/cond/URLStringCatFunction.java
Renamed function to uri-string-concatenate
Index: StandardFunctionFactory.java
===================================================================
RCS file: /cvsroot/sunxacml/sunxacml/com/sun/xacml/cond/StandardFunctionFactory.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** StandardFunctionFactory.java 13 Jan 2006 22:32:51 -0000 1.7
--- StandardFunctionFactory.java 28 Nov 2006 14:42:19 -0000 1.8
***************
*** 182,185 ****
--- 182,187 ----
conditionFunctions = new HashSet(targetFunctions);
+ // add condition function TimeInRange
+ conditionFunctions.add(new TimeInRangeFunction());
// add condition functions from BagFunction
conditionFunctions.addAll((new ConditionBagFunctionCluster()).
Index: HigherOrderFunction.java
===================================================================
RCS file: /cvsroot/sunxacml/sunxacml/com/sun/xacml/cond/HigherOrderFunction.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** HigherOrderFunction.java 14 Feb 2006 22:44:44 -0000 1.11
--- HigherOrderFunction.java 28 Nov 2006 14:42:19 -0000 1.12
***************
*** 429,437 ****
Evaluatable eval2 = (Evaluatable)(list[2]);
- // make sure the two args are of the same type
- if (! eval1.getType().equals(eval2.getType()))
- throw new IllegalArgumentException("input types to the any/all " +
- "functions must match");
-
// the first arg might be a bag
if (secondIsBag && (! eval1.returnsBag()))
--- 429,432 ----
Index: URLStringCatFunction.java
===================================================================
RCS file: /cvsroot/sunxacml/sunxacml/com/sun/xacml/cond/URLStringCatFunction.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** URLStringCatFunction.java 13 Jan 2006 22:32:51 -0000 1.1
--- URLStringCatFunction.java 28 Nov 2006 14:42:19 -0000 1.2
***************
*** 65,70 ****
* Standard identifier for the url-string-concatenate function.
*/
! public static final String NAME_URL_STRING_CONCATENATE =
! FUNCTION_NS_2 + "url-string-concatenate";
/**
--- 65,70 ----
* Standard identifier for the url-string-concatenate function.
*/
! public static final String NAME_URI_STRING_CONCATENATE =
! FUNCTION_NS_2 + "uri-string-concatenate";
/**
***************
*** 72,76 ****
*/
public URLStringCatFunction() {
! super(NAME_URL_STRING_CONCATENATE, 0, AnyURIAttribute.identifier,
false);
}
--- 72,76 ----
*/
public URLStringCatFunction() {
! super(NAME_URI_STRING_CONCATENATE, 0, AnyURIAttribute.identifier,
false);
}
***************
*** 88,92 ****
while (it.hasNext()) {
if (((Expression)(it.next())).returnsBag())
! throw new IllegalArgumentException(NAME_URL_STRING_CONCATENATE
+ " doesn't accept bags");
}
--- 88,92 ----
while (it.hasNext()) {
if (((Expression)(it.next())).returnsBag())
! throw new IllegalArgumentException(NAME_URI_STRING_CONCATENATE
+ " doesn't accept bags");
}
***************
*** 107,111 ****
if (inputs.size() < 2)
throw new IllegalArgumentException("not enough args to " +
! NAME_URL_STRING_CONCATENATE);
// check that the parameters are of the correct types...
--- 107,111 ----
if (inputs.size() < 2)
throw new IllegalArgumentException("not enough args to " +
! NAME_URI_STRING_CONCATENATE);
// check that the parameters are of the correct types...
***************
*** 156,160 ****
List code = new ArrayList();
code.add(Status.STATUS_PROCESSING_ERROR);
! String message = NAME_URL_STRING_CONCATENATE + " didn't produce"
+ " a valid URI: " + str;
--- 156,160 ----
List code = new ArrayList();
code.add(Status.STATUS_PROCESSING_ERROR);
! String message = NAME_URI_STRING_CONCATENATE + " didn't produce"
+ " a valid URI: " + str;
|