Commit 3bd88442 authored by cdanger's avatar cdanger

- Moved CombiningAlgSet, generic/abstract function classes, standard

datatype implementation classes to authzforce-ce-core-pdp-api
parent f874dd38
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.ow2.authzforce</groupId>
<artifactId>authzforce-ce-parent</artifactId>
<version>3.3.7</version>
</parent>
<artifactId>authzforce-ce-core</artifactId>
<version>3.9.0-SNAPSHOT</version>
<name>${project.groupId}:${project.artifactId}</name>
<description>AuthZForce Community Edition - XACML-compliant Core Engine</description>
<url>https://tuleap.ow2.org/projects/authzforce</url>
<scm>
<!-- Used by Jenkins - Maven release plugin -->
<connection>scm:git:${git.url.base}/core.git</connection>
<developerConnection>scm:git:${git.url.base}/core.git</developerConnection>
<tag>HEAD</tag>
<!-- Publicly browsable repository URL. For example, via Gitlab web UI. -->
<url>${git.url.base}/core</url>
</scm>
<!-- distributionManagement defined in parent POM already -->
<dependencies>
<!-- Third-party dependencies -->
<dependency>
<!-- For redirecting Spring logs to slf4j -->
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</dependency>
<dependency>
<!-- Needed for org.springframework.util.ResourceUtils,SystemPropertyUtils,FileCopyUtils, etc. -->
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
<dependency>
<!-- For loading XML schemas with OASIS catalog (CatalogManager) -->
<groupId>xml-resolver</groupId>
<artifactId>xml-resolver</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<!-- For validation of XACML RFC822Name (email address) -->
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>1.5.4</version>
</dependency>
<dependency>
<!-- For validating IP addresses (XACML IPAdress datatype), Domain names (XACML DNSName datatype), etc. without any DNS resolution -->
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>
<!-- /Third-party dependencies -->
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.ow2.authzforce</groupId>
<artifactId>authzforce-ce-parent</artifactId>
<version>3.3.7</version>
</parent>
<artifactId>authzforce-ce-core</artifactId>
<version>3.9.0-SNAPSHOT</version>
<name>${project.groupId}:${project.artifactId}</name>
<description>AuthZForce Community Edition - XACML-compliant Core Engine</description>
<url>https://tuleap.ow2.org/projects/authzforce</url>
<scm>
<!-- Used by Jenkins - Maven release plugin -->
<connection>scm:git:${git.url.base}/core.git</connection>
<developerConnection>scm:git:${git.url.base}/core.git</developerConnection>
<tag>HEAD</tag>
<!-- Publicly browsable repository URL. For example, via Gitlab web UI. -->
<url>${git.url.base}/core</url>
</scm>
<!-- distributionManagement defined in parent POM already -->
<dependencies>
<!-- Third-party dependencies -->
<dependency>
<!-- For redirecting Spring logs to slf4j -->
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</dependency>
<dependency>
<!-- Needed for org.springframework.util.ResourceUtils,SystemPropertyUtils,FileCopyUtils, etc. -->
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
<dependency>
<!-- For loading XML schemas with OASIS catalog (CatalogManager) -->
<groupId>xml-resolver</groupId>
<artifactId>xml-resolver</artifactId>
<version>1.2</version>
</dependency>
<!-- /Third-party dependencies -->
<!-- Authzforce dependencies -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${artifactId.prefix}-core-pdp-api</artifactId>
<!-- Major/minor version should match this artifact major/minor version to respect Semantic Versioning -->
<version>3.7.1-SNAPSHOT</version>
</dependency>
<!-- /Authzforce dependencies -->
<!-- Authzforce dependencies -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${artifactId.prefix}-core-pdp-api</artifactId>
<!-- Major/minor version should match this artifact major/minor version to respect Semantic Versioning -->
<version>3.7.1-SNAPSHOT</version>
</dependency>
<!-- /Authzforce dependencies -->
<!-- Test dependencies -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<!-- /Test dependencies -->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.5</version>
<!-- target JDK already set by parent project's maven.compiler.target property -->
<configuration>
<verbose>true</verbose>
<excludeRoots>
<excludeRoot>target/generated-sources</excludeRoot>
<excludeRoot>target/generated-test-sources</excludeRoot>
</excludeRoots>
</configuration>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>check</goal>
<goal>cpd-check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<!--
Enables analysis which takes more memory but finds more bugs.
If you run out of memory, changes the value of the effort element
to 'Low'.
-->
<effort>Max</effort>
<!-- Reports all bugs (other values are medium and max) -->
<threshold>Low</threshold>
<failOnError>true</failOnError>
</configuration>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<!-- Override license-maven-plugin configuration to exclude Sunxacml files from adding GPL license headers (different license) -->
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration>
<header>license/thales-gpl.header.txt</header>
<skipExistingHeaders>true</skipExistingHeaders>
<includes>
<include>src/main/java/org/ow2/authzforce/core/**</include>
<!-- Include test files also -->
<include>src/test/java/**</include>
</includes>
</configuration>
<executions>
<execution>
<id>format-sources-license</id>
<phase>process-sources</phase>
<goals>
<goal>format</goal>
</goals>
</execution>
<execution>
<id>format-test-sources-license</id>
<phase>process-test-sources</phase>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<configuration>
<!-- debug=true will generate JAXBDebug class. More info: https://github.com/highsource/maven-jaxb2-plugin/wiki/Miscellaneous -->
<debug>false</debug>
<strict>false</strict>
<verbose>false</verbose>
<removeOldOutput>true</removeOldOutput>
<extension>true</extension>
<args>
<arg>-Xvalue-constructor</arg>
</args>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-value-constructor</artifactId>
<version>${jaxb2-value-constructor.version}</version>
</plugin>
</plugins>
<useDependenciesAsEpisodes>false</useDependenciesAsEpisodes>
<episodes>
<episode>
<groupId>${project.groupId}</groupId>
<artifactId>${artifactId.prefix}-xmlns-model</artifactId>
</episode>
<episode>
<groupId>${project.groupId}</groupId>
<artifactId>${artifactId.prefix}-xacml-model</artifactId>
</episode>
<episode>
<groupId>${project.groupId}</groupId>
<artifactId>${artifactId.prefix}-pdp-ext-model</artifactId>
<version>3.3.7</version>
</episode>
</episodes>
<catalog>src/main/jaxb/catalog.xml</catalog>
<bindingDirectory>src/main/jaxb</bindingDirectory>
<bindingIncludes>
<include>bindings.xjb</include>
</bindingIncludes>
</configuration>
<executions>
<execution>
<id>jaxb-generate-compile-sources</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<schemaDirectory>src/main/resources</schemaDirectory>
<schemaIncludes>
<include>pdp.xsd</include>
</schemaIncludes>
<generateDirectory>${project.build.directory}/generated-sources/xjc</generateDirectory>
<generatePackage>${project.groupId}.core.xmlns.pdp</generatePackage>
<addCompileSourceRoot>true</addCompileSourceRoot>
<addTestCompileSourceRoot>false</addTestCompileSourceRoot>
</configuration>
</execution>
<execution>
<id>jaxb-generate-test-sources</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<schemaDirectory>src/test/resources</schemaDirectory>
<generateDirectory>${project.build.directory}/generated-test-sources/xjc</generateDirectory>
<generatePackage>${project.groupId}.core.xmlns.test</generatePackage>
<addCompileSourceRoot>false</addCompileSourceRoot>
<addTestCompileSourceRoot>true</addTestCompileSourceRoot>
</configuration>
</execution>
</executions>
</plugin>
<!-- Test configuration -->
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<configuration>
<skipTests>false</skipTests>
<systemPropertyVariables>
<javax.xml.accessExternalSchema>all</javax.xml.accessExternalSchema>
</systemPropertyVariables>
<includes>
<include>**/MainTest.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
<configuration>
<includes>
<include>org.ow2.authzforce.core.test.xsd</include>
<include>org/ow2/authzforce/core/xmlns/test/**</include>
<include>org/ow2/authzforce/core/test/utils/**</include>
<include>META-INF/**</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<!-- Test dependencies -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<!-- /Test dependencies -->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.5</version>
<!-- target JDK already set by parent project's maven.compiler.target property -->
<configuration>
<verbose>true</verbose>
<excludeRoots>
<excludeRoot>target/generated-sources</excludeRoot>
<excludeRoot>target/generated-test-sources</excludeRoot>
</excludeRoots>
</configuration>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>check</goal>
<goal>cpd-check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<!-- Enables analysis which takes more memory but finds more bugs. If you run out of memory, changes the value of the effort element to 'Low'. -->
<effort>Max</effort>
<!-- Reports all bugs (other values are medium and max) -->
<threshold>Low</threshold>
<failOnError>true</failOnError>
</configuration>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<!-- Override license-maven-plugin configuration to exclude Sunxacml files from adding GPL license headers (different license) -->
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration>
<header>license/thales-gpl.header.txt</header>
<skipExistingHeaders>true</skipExistingHeaders>
<includes>
<include>src/main/java/org/ow2/authzforce/core/**</include>
<!-- Include test files also -->
<include>src/test/java/**</include>
</includes>
</configuration>
<executions>
<execution>
<id>format-sources-license</id>
<phase>process-sources</phase>
<goals>
<goal>format</goal>
</goals>
</execution>
<execution>
<id>format-test-sources-license</id>
<phase>process-test-sources</phase>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<configuration>
<!-- debug=true will generate JAXBDebug class. More info: https://github.com/highsource/maven-jaxb2-plugin/wiki/Miscellaneous -->
<debug>false</debug>
<strict>false</strict>
<verbose>false</verbose>
<removeOldOutput>true</removeOldOutput>
<extension>true</extension>
<args>
<arg>-Xvalue-constructor</arg>
</args>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-value-constructor</artifactId>
<version>${jaxb2-value-constructor.version}</version>
</plugin>
</plugins>
<useDependenciesAsEpisodes>false</useDependenciesAsEpisodes>
<episodes>
<episode>
<groupId>${project.groupId}</groupId>
<artifactId>${artifactId.prefix}-xmlns-model</artifactId>
</episode>
<episode>
<groupId>${project.groupId}</groupId>
<artifactId>${artifactId.prefix}-xacml-model</artifactId>
</episode>
<episode>
<groupId>${project.groupId}</groupId>
<artifactId>${artifactId.prefix}-pdp-ext-model</artifactId>
<version>3.3.7</version>
</episode>
</episodes>
<catalog>src/main/jaxb/catalog.xml</catalog>
<bindingDirectory>src/main/jaxb</bindingDirectory>
<bindingIncludes>
<include>bindings.xjb</include>
</bindingIncludes>
</configuration>
<executions>
<execution>
<id>jaxb-generate-compile-sources</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<schemaDirectory>src/main/resources</schemaDirectory>
<schemaIncludes>
<include>pdp.xsd</include>
</schemaIncludes>
<generateDirectory>${project.build.directory}/generated-sources/xjc</generateDirectory>
<generatePackage>${project.groupId}.core.xmlns.pdp</generatePackage>
<addCompileSourceRoot>true</addCompileSourceRoot>
<addTestCompileSourceRoot>false</addTestCompileSourceRoot>
</configuration>
</execution>
<execution>
<id>jaxb-generate-test-sources</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<schemaDirectory>src/test/resources</schemaDirectory>
<generateDirectory>${project.build.directory}/generated-test-sources/xjc</generateDirectory>
<generatePackage>${project.groupId}.core.xmlns.test</generatePackage>
<addCompileSourceRoot>false</addCompileSourceRoot>
<addTestCompileSourceRoot>true</addTestCompileSourceRoot>
</configuration>
</execution>
</executions>
</plugin>
<!-- Test configuration -->
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<configuration>
<skipTests>false</skipTests>
<systemPropertyVariables>
<javax.xml.accessExternalSchema>all</javax.xml.accessExternalSchema>
</systemPropertyVariables>
<includes>
<include>**/MainTest.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
<configuration>
<includes>
<include>org.ow2.authzforce.core.test.xsd</include>
<include>org/ow2/authzforce/core/xmlns/test/**</include>
<include>org/ow2/authzforce/core/test/custom/**</include>
<include>org/ow2/authzforce/core/test/utils/**</include>
<include>META-INF/**</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
......@@ -27,17 +27,17 @@ import java.util.Collections;
import java.util.Deque;
import java.util.List;
import org.ow2.authzforce.core.pdp.api.Datatype;
import org.ow2.authzforce.core.pdp.api.Expression;
import org.ow2.authzforce.core.pdp.api.FirstOrderFunction;
import org.ow2.authzforce.core.pdp.api.FirstOrderFunctionCall;
import org.ow2.authzforce.core.pdp.api.IndeterminateEvaluationException;
import org.ow2.authzforce.core.pdp.impl.value.BooleanValue;
import org.ow2.authzforce.core.pdp.impl.value.DatatypeConstants;
import org.ow2.authzforce.core.pdp.api.expression.Expression;
import org.ow2.authzforce.core.pdp.api.func.FirstOrderFunction;
import org.ow2.authzforce.core.pdp.api.func.FirstOrderFunctionCall;
import org.ow2.authzforce.core.pdp.api.value.BooleanValue;
import org.ow2.authzforce.core.pdp.api.value.Datatype;
import org.ow2.authzforce.core.pdp.api.value.StandardDatatypes;
/**
* A class that implements the not function. This function takes one boolean argument and returns the logical negation of that value. If the argument evaluates
* to indeterminate, an indeterminate result is returned.
* A class that implements the not function. This function takes one boolean argument and returns the logical negation of that value. If the argument evaluates to indeterminate, an indeterminate
* result is returned.
*
* @since 1.0
* @author Steve Hanna
......@@ -59,7 +59,7 @@ public final class NotFunction extends FirstOrderFunction.SingleParameterTyped<B
private NotFunction()
{
super(NAME_NOT, DatatypeConstants.BOOLEAN.TYPE, false, Collections.singletonList(DatatypeConstants.BOOLEAN.TYPE));
super(NAME_NOT, StandardDatatypes.BOOLEAN_FACTORY.getDatatype(), false, Collections.singletonList(StandardDatatypes.BOOLEAN_FACTORY.getDatatype()));
}
/** {@inheritDoc} */
......
......@@ -28,17 +28,17 @@ import java.util.Deque;
import java.util.List;
import java.util.Locale;
import org.ow2.authzforce.core.pdp.api.Datatype;
import org.ow2.authzforce.core.pdp.api.Expression;
import org.ow2.authzforce.core.pdp.api.FirstOrderFunction;
import org.ow2.authzforce.core.pdp.api.FirstOrderFunctionCall;
import org.ow2.authzforce.core.pdp.api.FirstOrderFunctionCall.EagerSinglePrimitiveTypeEval;
import org.ow2.authzforce.core.pdp.api.FunctionSet;
import org.ow2.authzforce.core.pdp.api.FunctionSignature;
import org.ow2.authzforce.core.pdp.api.IndeterminateEvaluationException;
import org.ow2.authzforce.core.pdp.impl.func.BaseFunctionSet;
import org.ow2.authzforce.core.pdp.impl.value.DatatypeConstants;
import org.ow2.authzforce.core.pdp.impl.value.StringValue;
import org.ow2.authzforce.core.pdp.api.expression.Expression;
import org.ow2.authzforce.core.pdp.api.func.BaseFunctionSet;
import org.ow2.authzforce.core.pdp.api.func.FirstOrderFunction;
import org.ow2.authzforce.core.pdp.api.func.FirstOrderFunctionCall;
import org.ow2.authzforce.core.pdp.api.func.FirstOrderFunctionCall.EagerSinglePrimitiveTypeEval;
import org.ow2.authzforce.core.pdp.api.func.FunctionSet;
import org.ow2.authzforce.core.pdp.api.func.FunctionSignature;
import org.ow2.authzforce.core.pdp.api.value.Datatype;
import org.ow2.authzforce.core.pdp.api.value.StandardDatatypes;
import org.ow2.authzforce.core.pdp.api.value.StringValue;
/**
* string-normalize-* function
......@@ -78,8 +78,7 @@ public final class StringNormalizeFunction extends FirstOrderFunction.SinglePara
this.strNormalizer = stringNormalizer;
}
private FirstOrderFunctionCall<StringValue> getInstance(List<Expression<?>> argExpressions, Datatype<?>... remainingArgTypes)
throws IllegalArgumentException
private FirstOrderFunctionCall<StringValue> getInstance(List<Expression<?>> argExpressions, Datatype<?>... remainingArgTypes) throws IllegalArgumentException
{
return new EagerSinglePrimitiveTypeEval<StringValue, StringValue>(funcSig, argExpressions, remainingArgTypes)
{
......@@ -110,9 +109,8 @@ public final class StringNormalizeFunction extends FirstOrderFunction.SinglePara
public StringValue normalize(StringValue value)
{
/*
* Specified by fn:lower-case function in [XF]. Looking at Saxon HE as our reference for Java open source implementation of XPath functions, we can
* check in Saxon implementation of fn:lower-case (LowerCase class), that this is equivalent to String#toLowerCase(); English locale to be used for
* Locale-insensitive strings, see String.toLowerCase()
* Specified by fn:lower-case function in [XF]. Looking at Saxon HE as our reference for Java open source implementation of XPath functions, we can check in Saxon implementation of
* fn:lower-case (LowerCase class), that this is equivalent to String#toLowerCase(); English locale to be used for Locale-insensitive strings, see String.toLowerCase()
*/
return value.toLowerCase(Locale.ENGLISH);
}
......@@ -130,14 +128,14 @@ public final class StringNormalizeFunction extends FirstOrderFunction.SinglePara
*/
private StringNormalizeFunction(String functionName, StringNormalizer stringNormalizer)
{
super(functionName, DatatypeConstants.STRING.TYPE, false, Collections.singletonList(DatatypeConstants.STRING.TYPE));
super(functionName, StandardDatatypes.STRING_FACTORY.getDatatype(), false, Collections.singletonList(StandardDatatypes.STRING_FACTORY.getDatatype()));
this.funcCallFactory = new CallFactory(functionSignature, stringNormalizer);
}
/**
* *-string-normalize-* function cluster
*/
public static final FunctionSet CLUSTER = new BaseFunctionSet(FunctionSet.DEFAULT_ID_NAMESPACE + "string-normalize", //
public static final FunctionSet SET = new BaseFunctionSet(FunctionSet.DEFAULT_ID_NAMESPACE + "string-normalize", //
new StringNormalizeFunction(NAME_STRING_NORMALIZE_SPACE, STRING_NORMALIZE_SPACE_FUNCTION_CALL_FACTORY), //
new StringNormalizeFunction(NAME_STRING_NORMALIZE_TO_LOWER_CASE, STRING_NORMALIZE_TO_LOWER_CASE_FUNCTION_CALL_FACTORY));
......
......@@ -29,15 +29,15 @@ import java.util.Deque;
import java.util.List;
import java.util.TimeZone;
import org.ow2.authzforce.core.pdp.api.Datatype;
import org.ow2.authzforce.core.pdp.api.Expression;
import org.ow2.authzforce.core.pdp.api.FirstOrderFunction;
import org.ow2.authzforce.core.pdp.api.FirstOrderFunctionCall;
import org.ow2.authzforce.core.pdp.api.FunctionSignature;
import org.ow2.authzforce.core.pdp.api.IndeterminateEvaluationException;
import org.ow2.authzforce.core.pdp.impl.value.BooleanValue;
import org.ow2.authzforce.core.pdp.impl.value.DatatypeConstants;
import org.ow2.authzforce.core.pdp.impl.value.TimeValue;
import org.ow2.authzforce.core.pdp.api.expression.Expression;
import org.ow2.authzforce.core.pdp.api.func.FirstOrderFunction;
import org.ow2.authzforce.core.pdp.api.func.FirstOrderFunctionCall;
import org.ow2.authzforce.core.pdp.api.func.FunctionSignature;
import org.ow2.authzforce.core.pdp.api.value.BooleanValue;
import org.ow2.authzforce.core.pdp.api.value.Datatype;
import org.ow2.authzforce.core.pdp.api.value.StandardDatatypes;
import org.ow2.authzforce.core.pdp.api.value.TimeValue;
/**
* This class implements the time-in-range function, which takes three time values and returns true if the first value falls between the second and the third value. This function was introduced in
......@@ -71,7 +71,8 @@ public final class TimeInRangeFunction extends FirstOrderFunction.SingleParamete
/**
* boolean timeInRange(time,time,time)
*/
super(NAME, DatatypeConstants.BOOLEAN.TYPE, false, Arrays.asList(DatatypeConstants.TIME.TYPE, DatatypeConstants.TIME.TYPE, DatatypeConstants.TIME.TYPE));
super(NAME, StandardDatatypes.BOOLEAN_FACTORY.getDatatype(), false, Arrays.asList(StandardDatatypes.TIME_FACTORY.getDatatype(), StandardDatatypes.TIME_FACTORY.getDatatype(),
StandardDatatypes.TIME_FACTORY.getDatatype()));
}
private static final class Call extends FirstOrderFunctionCall.EagerSinglePrimitiveTypeEval<BooleanValue, TimeValue>
......
......@@ -21,8 +21,8 @@ import oasis.names.tc.xacml._3_0.core.schema.wd_17.AllOf;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.Match;
import org.ow2.authzforce.core.pdp.api.EvaluationContext;
import org.ow2.authzforce.core.pdp.api.ExpressionFactory;
import org.ow2.authzforce.core.pdp.api.IndeterminateEvaluationException;
import org.ow2.authzforce.core.pdp.api.expression.ExpressionFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......
......@@ -24,8 +24,8 @@ import oasis.names.tc.xacml._3_0.core.schema.wd_17.AllOf;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.AnyOf;
import org.ow2.authzforce.core.pdp.api.EvaluationContext;
import org.ow2.authzforce.core.pdp.api.ExpressionFactory;
import org.ow2.authzforce.core.pdp.api.IndeterminateEvaluationException;
import org.ow2.authzforce.core.pdp.api.expression.ExpressionFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......
......@@ -26,13 +26,13 @@ import oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeAssignment;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeAssignmentExpression;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.ExpressionType;
import org.ow2.authzforce.core.pdp.api.AttributeValue;
import org.ow2.authzforce.core.pdp.api.Bag;
import org.ow2.authzforce.core.pdp.api.EvaluationContext;
import org.ow2.authzforce.core.pdp.api.Expression;
import org.ow2.authzforce.core.pdp.api.ExpressionFactory;
import org.ow2.authzforce.core.pdp.api.IndeterminateEvaluationException;
import org.ow2.authzforce.core.pdp.api.Value;
import org.ow2.authzforce.core.pdp.api.expression.Expression;
import org.ow2.authzforce.core.pdp.api.expression.ExpressionFactory;
import org.ow2.authzforce.core.pdp.api.value.AttributeValue;
import org.ow2.authzforce.core.pdp.api.value.Bag;
import org.ow2.authzforce.core.pdp.api.value.Value;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......
......@@ -28,7 +28,7 @@ import org.ow2.authzforce.core.pdp.api.AttributeGUID;
import org.ow2.authzforce.core.pdp.api.AttributeProvider;
import org.ow2.authzforce.core.pdp.api.AttributeProviderModule;
import org.ow2.authzforce.core.pdp.api.CloseableAttributeProviderModule;