Update of /cvsroot/sunxacml/sunxacml/com/sun/xacml/cond/cluster
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7574/com/sun/xacml/cond/cluster
Added Files:
AbsFunctionCluster.java AddFunctionCluster.java
ComparisonFunctionCluster.java
ConditionBagFunctionCluster.java
ConditionSetFunctionCluster.java DateMathFunctionCluster.java
DivideFunctionCluster.java EqualFunctionCluster.java
FloorFunctionCluster.java FunctionCluster.java
GeneralBagFunctionCluster.java GeneralSetFunctionCluster.java
HigherOrderFunctionCluster.java LogicalFunctionCluster.java
MatchFunctionCluster.java ModFunctionCluster.java
MultiplyFunctionCluster.java NOfFunctionCluster.java
NotFunctionCluster.java NumericConvertFunctionCluster.java
RoundFunctionCluster.java StringNormalizeFunctionCluster.java
SubtractFunctionCluster.java package.html
Log Message:
created new "cluster" for run-time configuration system
--- NEW FILE: MatchFunctionCluster.java ---
/*
* @(#)MatchFunctionCluster.java
*
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistribution of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Sun Microsystems, Inc. or the names of contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
* ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN")
* AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
* AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
* DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
* REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
* INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY
* OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* You acknowledge that this software is not designed or intended for use in
* the design, construction, operation or maintenance of any nuclear facility.
*/
package com.sun.xacml.cond.cluster;
import com.sun.xacml.cond.MatchFunction;
import java.util.HashSet;
import java.util.Set;
/**
* Clusters all the functions supported by <code>MatchFunction</code>.
*
* @author Seth Proctor
*/
public class MatchFunctionCluster implements FunctionCluster
{
public Set getSupportedFunctions() {
Set set = new HashSet();
set.add(new MatchFunction(MatchFunction.NAME_REGEXP_STRING_MATCH));
set.add(new MatchFunction(MatchFunction.NAME_X500NAME_MATCH));
set.add(new MatchFunction(MatchFunction.NAME_RFC822NAME_MATCH));
return set;
}
}
--- NEW FILE: DivideFunctionCluster.java ---
/*
* @(#)DivideFunctionCluster.java
*
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistribution of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Sun Microsystems, Inc. or the names of contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
* ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN")
* AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
* AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
* DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
* REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
* INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY
* OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* You acknowledge that this software is not designed or intended for use in
* the design, construction, operation or maintenance of any nuclear facility.
*/
package com.sun.xacml.cond.cluster;
import com.sun.xacml.cond.DivideFunction;
import java.util.HashSet;
import java.util.Set;
/**
* Clusters all the functions supported by <code>DivideFunction</code>.
*
* @author Seth Proctor
*/
public class DivideFunctionCluster implements FunctionCluster
{
public Set getSupportedFunctions() {
Set set = new HashSet();
set.add(new DivideFunction(DivideFunction.NAME_INTEGER_DIVIDE));
set.add(new DivideFunction(DivideFunction.NAME_DOUBLE_DIVIDE));
return set;
}
}
--- NEW FILE: NOfFunctionCluster.java ---
/*
* @(#)NOfFunctionCluster.java
*
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistribution of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Sun Microsystems, Inc. or the names of contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
* ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN")
* AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
* AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
* DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
* REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
* INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY
* OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* You acknowledge that this software is not designed or intended for use in
* the design, construction, operation or maintenance of any nuclear facility.
*/
package com.sun.xacml.cond.cluster;
import com.sun.xacml.cond.NOfFunction;
import java.util.HashSet;
import java.util.Set;
/**
* Clusters all the functions supported by <code>NOfFunction</code>.
*
* @author Seth Proctor
*/
public class NOfFunctionCluster implements FunctionCluster
{
public Set getSupportedFunctions() {
Set set = new HashSet();
set.add(new NOfFunction(NOfFunction.NAME_N_OF));
return set;
}
}
--- NEW FILE: EqualFunctionCluster.java ---
/*
* @(#)EqualFunctionCluster.java
*
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistribution of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Sun Microsystems, Inc. or the names of contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
* ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN")
* AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
* AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
* DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
* REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
* INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY
* OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* You acknowledge that this software is not designed or intended for use in
* the design, construction, operation or maintenance of any nuclear facility.
*/
package com.sun.xacml.cond.cluster;
import com.sun.xacml.cond.EqualFunction;
import java.util.HashSet;
import java.util.Set;
/**
* Clusters all the functions supported by <code>EqualFunction</code>.
*
* @author Seth Proctor
*/
public class EqualFunctionCluster implements FunctionCluster
{
public Set getSupportedFunctions() {
Set set = new HashSet();
set.add(new EqualFunction(EqualFunction.NAME_STRING_EQUAL));
set.add(new EqualFunction(EqualFunction.NAME_BOOLEAN_EQUAL));
set.add(new EqualFunction(EqualFunction.NAME_INTEGER_EQUAL));
set.add(new EqualFunction(EqualFunction.NAME_DOUBLE_EQUAL));
set.add(new EqualFunction(EqualFunction.NAME_DATE_EQUAL));
set.add(new EqualFunction(EqualFunction.NAME_TIME_EQUAL));
set.add(new EqualFunction(EqualFunction.NAME_DATETIME_EQUAL));
set.add(new EqualFunction(EqualFunction.NAME_DAYTIME_DURATION_EQUAL));
set.add(new EqualFunction(EqualFunction.
NAME_YEARMONTH_DURATION_EQUAL));
set.add(new EqualFunction(EqualFunction.NAME_ANYURI_EQUAL));
set.add(new EqualFunction(EqualFunction.NAME_X500NAME_EQUAL));
set.add(new EqualFunction(EqualFunction.NAME_RFC822NAME_EQUAL));
set.add(new EqualFunction(EqualFunction.NAME_HEXBINARY_EQUAL));
set.add(new EqualFunction(EqualFunction.NAME_BASE64BINARY_EQUAL));
return set;
}
}
--- NEW FILE: StringNormalizeFunctionCluster.java ---
/*
* @(#)StringNormalizeFunctionCluster.java
*
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistribution of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Sun Microsystems, Inc. or the names of contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
* ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN")
* AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
* AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
* DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
* REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
* INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY
* OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* You acknowledge that this software is not designed or intended for use in
* the design, construction, operation or maintenance of any nuclear facility.
*/
package com.sun.xacml.cond.cluster;
import com.sun.xacml.cond.StringNormalizeFunction;
import java.util.HashSet;
import java.util.Set;
/**
* Clusters all the functions supported by
* <code>StringNormalizeFunction</code>.
*
* @author Seth Proctor
*/
public class StringNormalizeFunctionCluster implements FunctionCluster
{
public Set getSupportedFunctions() {
Set set = new HashSet();
set.add(new StringNormalizeFunction(StringNormalizeFunction.
NAME_STRING_NORMALIZE_SPACE));
set.add(new
StringNormalizeFunction(StringNormalizeFunction.
NAME_STRING_NORMALIZE_TO_LOWER_CASE));
return set;
}
}
--- NEW FILE: MultiplyFunctionCluster.java ---
/*
* @(#)MultiplyFunctionCluster.java
*
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistribution of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Sun Microsystems, Inc. or the names of contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
* ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN")
* AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
* AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
* DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
* REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
* INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY
* OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* You acknowledge that this software is not designed or intended for use in
* the design, construction, operation or maintenance of any nuclear facility.
*/
package com.sun.xacml.cond.cluster;
import com.sun.xacml.cond.MultiplyFunction;
import java.util.HashSet;
import java.util.Set;
/**
* Clusters all the functions supported by <code>MultiplyFunction</code>.
*
* @author Seth Proctor
*/
public class MultiplyFunctionCluster implements FunctionCluster
{
public Set getSupportedFunctions() {
Set set = new HashSet();
set.add(new MultiplyFunction(MultiplyFunction.NAME_INTEGER_MULTIPLY));
set.add(new MultiplyFunction(MultiplyFunction.NAME_DOUBLE_MULTIPLY));
return set;
}
}
--- NEW FILE: package.html ---
<body>
This package defines the <code>FunctionCluster</code> interface that
is used to define a cluster of functions that are all implemented by
some common class. Also included in this package, as a convenience,
are cluster classes for all the standard functions. These are used by
the standard factory and by the run-time configuration system.
</body>
--- NEW FILE: GeneralSetFunctionCluster.java ---
/*
* @(#)GeneralSetFunctionCluster.java
*
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistribution of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Sun Microsystems, Inc. or the names of contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
* ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN")
* AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
* AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
* DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
* REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
* INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY
* OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* You acknowledge that this software is not designed or intended for use in
* the design, construction, operation or maintenance of any nuclear facility.
*/
package com.sun.xacml.cond.cluster;
import com.sun.xacml.cond.FunctionBase;
import com.sun.xacml.cond.GeneralSetFunction;
import java.util.HashSet;
import java.util.Set;
/**
* Clusters all the functions supported by <code>GeneralSetFunction</code>.
*
* @author Seth Proctor
*/
public class GeneralSetFunctionCluster implements FunctionCluster
{
/**
* A complete list of all the XACML datatypes supported by the Set
* functions, using the "simple" form of the names (eg, string
* instead of http://www.w3.org/2001/XMLSchema#string)
*/
private static String simpleTypes [] = {
"string", "boolean", "integer", "double", "date", "dateTime",
"time", "anyURI", "hexBinary", "base64Binary", "dayTimeDuration",
"yearMonthDuration", "x500Name", "rfc822Name"
};
public Set getSupportedFunctions() {
Set set = new HashSet();
for (int i = 0; i < simpleTypes.length; i++) {
String baseName = FunctionBase.FUNCTION_NS + simpleTypes[i];
set.add(new GeneralSetFunction(baseName + GeneralSetFunction.
NAME_BASE_INTERSECTION));
set.add(new GeneralSetFunction(baseName + GeneralSetFunction.
NAME_BASE_UNION));
}
return set;
}
}
--- NEW FILE: RoundFunctionCluster.java ---
/*
* @(#)RoundFunctionCluster.java
*
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistribution of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Sun Microsystems, Inc. or the names of contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
* ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN")
* AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
* AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
* DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
* REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
* INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY
* OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* You acknowledge that this software is not designed or intended for use in
* the design, construction, operation or maintenance of any nuclear facility.
*/
package com.sun.xacml.cond.cluster;
import com.sun.xacml.cond.RoundFunction;
import java.util.HashSet;
import java.util.Set;
/**
* Clusters all the functions supported by <code>RoundFunction</code>.
*
* @author Seth Proctor
*/
public class RoundFunctionCluster implements FunctionCluster
{
public Set getSupportedFunctions() {
Set set = new HashSet();
set.add(new RoundFunction(RoundFunction.NAME_ROUND));
return set;
}
}
--- NEW FILE: AbsFunctionCluster.java ---
/*
* @(#)AbsFunctionCluster.java
*
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistribution of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Sun Microsystems, Inc. or the names of contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
* ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN")
* AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
* AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
* DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
* REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
* INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY
* OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* You acknowledge that this software is not designed or intended for use in
* the design, construction, operation or maintenance of any nuclear facility.
*/
package com.sun.xacml.cond.cluster;
import com.sun.xacml.cond.AbsFunction;
import java.util.HashSet;
import java.util.Set;
/**
* Clusters all the functions supported by <code>AbsFunction</code>.
*
* @author Seth Proctor
*/
public class AbsFunctionCluster implements FunctionCluster
{
public Set getSupportedFunctions() {
Set set = new HashSet();
set.add(new AbsFunction(AbsFunction.NAME_INTEGER_ABS));
set.add(new AbsFunction(AbsFunction.NAME_DOUBLE_ABS));
return set;
}
}
--- NEW FILE: AddFunctionCluster.java ---
/*
* @(#)AddFunctionCluster.java
*
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistribution of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Sun Microsystems, Inc. or the names of contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
* ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN")
* AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
* AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
* DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
* REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
* INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY
* OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* You acknowledge that this software is not designed or intended for use in
* the design, construction, operation or maintenance of any nuclear facility.
*/
package com.sun.xacml.cond.cluster;
import com.sun.xacml.cond.AddFunction;
import java.util.HashSet;
import java.util.Set;
/**
* Clusters all the functions supported by <code>AddFunction</code>.
*
* @author Seth Proctor
*/
public class AddFunctionCluster implements FunctionCluster
{
public Set getSupportedFunctions() {
Set set = new HashSet();
set.add(new AddFunction(AddFunction.NAME_INTEGER_ADD));
set.add(new AddFunction(AddFunction.NAME_DOUBLE_ADD));
return set;
}
}
--- NEW FILE: ConditionSetFunctionCluster.java ---
/*
* @(#)ConditionSetFunctionCluster.java
*
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistribution of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Sun Microsystems, Inc. or the names of contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
* ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN")
* AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
* AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
* DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
* REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
* INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY
* OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* You acknowledge that this software is not designed or intended for use in
* the design, construction, operation or maintenance of any nuclear facility.
*/
package com.sun.xacml.cond.cluster;
import com.sun.xacml.cond.FunctionBase;
import com.sun.xacml.cond.ConditionSetFunction;
import java.util.HashSet;
import java.util.Set;
/**
* Clusters all the functions supported by <code>ConditionSetFunction</code>.
*
* @author Seth Proctor
*/
public class ConditionSetFunctionCluster implements FunctionCluster
{
/**
* A complete list of all the XACML datatypes supported by the Set
* functions, using the "simple" form of the names (eg, string
* instead of http://www.w3.org/2001/XMLSchema#string)
*/
private static String simpleTypes [] = {
"string", "boolean", "integer", "double", "date", "dateTime",
"time", "anyURI", "hexBinary", "base64Binary", "dayTimeDuration",
"yearMonthDuration", "x500Name", "rfc822Name"
};
public Set getSupportedFunctions() {
Set set = new HashSet();
for (int i = 0; i < simpleTypes.length; i++) {
String baseName = FunctionBase.FUNCTION_NS + simpleTypes[i];
set.add(new ConditionSetFunction(baseName + ConditionSetFunction.
NAME_BASE_AT_LEAST_ONE_MEMBER_OF));
set.add(new ConditionSetFunction(baseName + ConditionSetFunction.
NAME_BASE_SUBSET));
set.add(new ConditionSetFunction(baseName + ConditionSetFunction.
NAME_BASE_SET_EQUALS));
}
return set;
}
}
--- NEW FILE: LogicalFunctionCluster.java ---
/*
* @(#)LogicalFunctionCluster.java
*
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistribution of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Sun Microsystems, Inc. or the names of contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
* ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN")
* AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
* AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
* DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
* REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
* INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY
* OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* You acknowledge that this software is not designed or intended for use in
* the design, construction, operation or maintenance of any nuclear facility.
*/
package com.sun.xacml.cond.cluster;
import com.sun.xacml.cond.LogicalFunction;
import java.util.HashSet;
import java.util.Set;
/**
* Clusters all the functions supported by <code>LogicalFunction</code>.
*
* @author Seth Proctor
*/
public class LogicalFunctionCluster implements FunctionCluster
{
public Set getSupportedFunctions() {
Set set = new HashSet();
set.add(new LogicalFunction(LogicalFunction.NAME_OR));
set.add(new LogicalFunction(LogicalFunction.NAME_AND));
return set;
}
}
--- NEW FILE: FunctionCluster.java ---
/*
* @(#)FunctionCluster.java
*
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistribution of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Sun Microsystems, Inc. or the names of contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
* ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN")
* AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
* AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
* DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
* REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
* INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY
* OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* You acknowledge that this software is not designed or intended for use in
* the design, construction, operation or maintenance of any nuclear facility.
*/
package com.sun.xacml.cond.cluster;
import java.util.Set;
/**
* Interface used by classes that support more than one function. It's a
* common design model to have a single class support more than one XACML
* function. In those cases, you should provide a proxy that implements
* <code>FunctionCluster</code> in addition to the <code>Function</code>.
* This is particularly important for the run-time configuration system,
* which uses this interface to create "clusters" of functions and therefore
* can use a smaller configuration file.
*
* @author Seth Proctor
*/
public interface FunctionCluster
{
/**
* Returns a single instance of each of the functions supported by
* some class. The <code>Set</code> must contain instances of
* <code>Function</code>, and it must be both non-null and non-empty.
* It may contain only a single <code>Function</code>.
* <p>
* Note that this is only used to return concrete <code>Function</code>s.
* It may not be used to report abstract functions.
*
* @return the functions supported by this class
*/
public Set getSupportedFunctions();
}
--- NEW FILE: SubtractFunctionCluster.java ---
/*
* @(#)SubtractFunctionCluster.java
*
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistribution of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Sun Microsystems, Inc. or the names of contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
* ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN")
* AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
* AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
* DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
* REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
* INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY
* OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* You acknowledge that this software is not designed or intended for use in
* the design, construction, operation or maintenance of any nuclear facility.
*/
package com.sun.xacml.cond.cluster;
import com.sun.xacml.cond.SubtractFunction;
import java.util.HashSet;
import java.util.Set;
/**
* Clusters all the functions supported by <code>SubtractFunction</code>.
*
* @author Seth Proctor
*/
public class SubtractFunctionCluster implements FunctionCluster
{
public Set getSupportedFunctions() {
Set set = new HashSet();
set.add(new SubtractFunction(SubtractFunction.NAME_INTEGER_SUBTRACT));
set.add(new SubtractFunction(SubtractFunction.NAME_DOUBLE_SUBTRACT));
return set;
}
}
--- NEW FILE: NotFunctionCluster.java ---
/*
* @(#)NotFunctionCluster.java
*
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistribution of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Sun Microsystems, Inc. or the names of contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
* ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN")
* AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
* AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
* DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
* REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
* INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY
* OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* You acknowledge that this software is not designed or intended for use in
* the design, construction, operation or maintenance of any nuclear facility.
*/
package com.sun.xacml.cond.cluster;
import com.sun.xacml.cond.NotFunction;
import java.util.HashSet;
import java.util.Set;
/**
* Clusters all the functions supported by <code>NotFunction</code>.
*
* @author Seth Proctor
*/
public class NotFunctionCluster implements FunctionCluster
{
public Set getSupportedFunctions() {
Set set = new HashSet();
set.add(new NotFunction(NotFunction.NAME_NOT));
return set;
}
}
--- NEW FILE: DateMathFunctionCluster.java ---
/*
* @(#)DateMathFunctionCluster.java
*
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistribution of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Sun Microsystems, Inc. or the names of contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
* ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN")
* AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
* AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
* DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
* REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
* INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY
* OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* You acknowledge that this software is not designed or intended for use in
* the design, construction, operation or maintenance of any nuclear facility.
*/
package com.sun.xacml.cond.cluster;
import com.sun.xacml.cond.DateMathFunction;
import java.util.HashSet;
import java.util.Set;
/**
* Clusters all the functions supported by <code>DateMathFunction</code>.
*
* @author Seth Proctor
*/
public class DateMathFunctionCluster implements FunctionCluster
{
public Set getSupportedFunctions() {
Set set = new HashSet();
set.add(new DateMathFunction(DateMathFunction.
NAME_DATETIME_ADD_DAYTIMEDURATION));
set.add(new DateMathFunction(DateMathFunction.
NAME_DATETIME_SUBTRACT_DAYTIMEDURATION));
set.add(new DateMathFunction(DateMathFunction.
NAME_DATETIME_ADD_YEARMONTHDURATION));
set.add(new
DateMathFunction(DateMathFunction.
NAME_DATETIME_SUBTRACT_YEARMONTHDURATION));
set.add(new DateMathFunction(DateMathFunction.
NAME_DATE_ADD_YEARMONTHDURATION));
set.add(new DateMathFunction(DateMathFunction.
NAME_DATE_SUBTRACT_YEARMONTHDURATION));
return set;
}
}
--- NEW FILE: ModFunctionCluster.java ---
/*
* @(#)ModFunctionCluster.java
*
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistribution of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Sun Microsystems, Inc. or the names of contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
* ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN")
* AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
* AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
* DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
* REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
* INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY
* OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* You acknowledge that this software is not designed or intended for use in
* the design, construction, operation or maintenance of any nuclear facility.
*/
package com.sun.xacml.cond.cluster;
import com.sun.xacml.cond.ModFunction;
import java.util.HashSet;
import java.util.Set;
/**
* Clusters all the functions supported by <code>ModFunction</code>.
*
* @author Seth Proctor
*/
public class ModFunctionCluster implements FunctionCluster
{
public Set getSupportedFunctions() {
Set set = new HashSet();
set.add(new ModFunction(ModFunction.NAME_INTEGER_MOD));
return set;
}
}
--- NEW FILE: HigherOrderFunctionCluster.java ---
/*
* @(#)HigherOrderFunctionCluster.java
*
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistribution of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Sun Microsystems, Inc. or the names of contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
* ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN")
* AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
* AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
* DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
* REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
* INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY
* OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* You acknowledge that this software is not designed or intended for use in
* the design, construction, operation or maintenance of any nuclear facility.
*/
package com.sun.xacml.cond.cluster;
import com.sun.xacml.cond.HigherOrderFunction;
import java.util.HashSet;
import java.util.Set;
/**
* Clusters all the functions supported by <code>HigherOrderFunction</code>.
*
* @author Seth Proctor
*/
public class HigherOrderFunctionCluster implements FunctionCluster
{
public Set getSupportedFunctions() {
Set set = new HashSet();
set.add(new HigherOrderFunction(HigherOrderFunction.NAME_ANY_OF));
set.add(new HigherOrderFunction(HigherOrderFunction.NAME_ALL_OF));
set.add(new HigherOrderFunction(HigherOrderFunction.NAME_ANY_OF_ANY));
set.add(new HigherOrderFunction(HigherOrderFunction.NAME_ALL_OF_ANY));
set.add(new HigherOrderFunction(HigherOrderFunction.NAME_ANY_OF_ALL));
set.add(new HigherOrderFunction(HigherOrderFunction.NAME_ALL_OF_ALL));
return set;
}
}
--- NEW FILE: FloorFunctionCluster.java ---
/*
* @(#)FloorFunctionCluster.java
*
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistribution of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Sun Microsystems, Inc. or the names of contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
* ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN")
* AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
* AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
* DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
* REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
* INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY
* OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* You acknowledge that this software is not designed or intended for use in
* the design, construction, operation or maintenance of any nuclear facility.
*/
package com.sun.xacml.cond.cluster;
import com.sun.xacml.cond.FloorFunction;
import java.util.HashSet;
import java.util.Set;
/**
* Clusters all the functions supported by <code>FloorFunction</code>.
*
* @author Seth Proctor
*/
public class FloorFunctionCluster implements FunctionCluster
{
public Set getSupportedFunctions() {
Set set = new HashSet();
set.add(new FloorFunction(FloorFunction.NAME_FLOOR));
return set;
}
}
--- NEW FILE: ComparisonFunctionCluster.java ---
/*
* @(#)ComparisonFunctionCluster.java
*
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistribution of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Sun Microsystems, Inc. or the names of contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
* ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN")
* AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
* AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
* DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
* REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
* INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY
* OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* You acknowledge that this software is not designed or intended for use in
* the design, construction, operation or maintenance of any nuclear facility.
*/
package com.sun.xacml.cond.cluster;
import com.sun.xacml.cond.ComparisonFunction;
import java.util.HashSet;
import java.util.Set;
/**
* Clusters all the functions supported by <code>ComparisonFunction</code>.
*
* @author Seth Proctor
*/
public class ComparisonFunctionCluster implements FunctionCluster
{
public Set getSupportedFunctions() {
Set set = new HashSet();
set.add(new ComparisonFunction(ComparisonFunction.
NAME_INTEGER_GREATER_THAN));
set.add(new ComparisonFunction(ComparisonFunction.
NAME_INTEGER_GREATER_THAN_OR_EQUAL));
set.add(new ComparisonFunction(ComparisonFunction.
NAME_INTEGER_LESS_THAN));
set.add(new ComparisonFunction(ComparisonFunction.
NAME_INTEGER_LESS_THAN_OR_EQUAL));
set.add(new ComparisonFunction(ComparisonFunction.
NAME_DOUBLE_GREATER_THAN));
set.add(new ComparisonFunction(ComparisonFunction.
NAME_DOUBLE_GREATER_THAN_OR_EQUAL));
set.add(new ComparisonFunction(ComparisonFunction.
NAME_DOUBLE_LESS_THAN));
set.add(new ComparisonFunction(ComparisonFunction.
NAME_DOUBLE_LESS_THAN_OR_EQUAL));
set.add(new ComparisonFunction(ComparisonFunction.
NAME_STRING_GREATER_THAN));
set.add(new ComparisonFunction(ComparisonFunction.
NAME_STRING_GREATER_THAN_OR_EQUAL));
set.add(new ComparisonFunction(ComparisonFunction.
NAME_STRING_LESS_THAN));
set.add(new ComparisonFunction(ComparisonFunction.
NAME_STRING_LESS_THAN_OR_EQUAL));
set.add(new ComparisonFunction(ComparisonFunction.
NAME_TIME_GREATER_THAN));
set.add(new ComparisonFunction(ComparisonFunction.
NAME_TIME_GREATER_THAN_OR_EQUAL));
set.add(new ComparisonFunction(ComparisonFunction.
NAME_TIME_LESS_THAN));
set.add(new ComparisonFunction(ComparisonFunction.
NAME_TIME_LESS_THAN_OR_EQUAL));
set.add(new ComparisonFunction(ComparisonFunction.
NAME_DATETIME_GREATER_THAN));
set.add(new ComparisonFunction(ComparisonFunction.
NAME_DATETIME_GREATER_THAN_OR_EQUAL));
set.add(new ComparisonFunction(ComparisonFunction.
NAME_DATETIME_LESS_THAN));
set.add(new ComparisonFunction(ComparisonFunction.
NAME_DATETIME_LESS_THAN_OR_EQUAL));
set.add(new ComparisonFunction(ComparisonFunction.
NAME_DATE_GREATER_THAN));
set.add(new ComparisonFunction(ComparisonFunction.
NAME_DATE_GREATER_THAN_OR_EQUAL));
set.add(new ComparisonFunction(ComparisonFunction.
NAME_DATE_LESS_THAN));
set.add(new ComparisonFunction(ComparisonFunction.
NAME_DATE_LESS_THAN_OR_EQUAL));
return set;
}
}
--- NEW FILE: NumericConvertFunctionCluster.java ---
/*
* @(#)NumericConvertFunctionCluster.java
*
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistribution of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Sun Microsystems, Inc. or the names of contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
* ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN")
* AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
* AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
* DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
* REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
* INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY
* OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* You acknowledge that this software is not designed or intended for use in
* the design, construction, operation or maintenance of any nuclear facility.
*/
package com.sun.xacml.cond.cluster;
import com.sun.xacml.cond.NumericConvertFunction;
import java.util.HashSet;
import java.util.Set;
/**
* Clusters all the functions supported by <code>NumericConvertFunction</code>.
*
* @author Seth Proctor
*/
public class NumericConvertFunctionCluster implements FunctionCluster
{
public Set getSupportedFunctions() {
Set set = new HashSet();
set.add(new NumericConvertFunction(NumericConvertFunction.
NAME_DOUBLE_TO_INTEGER));
set.add(new NumericConvertFunction(NumericConvertFunction.
NAME_INTEGER_TO_DOUBLE));
return set;
}
}
--- NEW FILE: ConditionBagFunctionCluster.java ---
/*
* @(#)ConditionBagFunctionCluster.java
*
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistribution of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Sun Microsystems, Inc. or the names of contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
* ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN")
* AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
* AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
* DERIVATIVES. IN N...
[truncated message content] |