Commit ba6d505f authored by Romain Ferrari's avatar Romain Ferrari
Browse files

Merge branch '3.x'

Conflicts:
	.gitignore
	pom.xml
	src/main/java/com/sun/xacml/AbstractPolicy.java
	src/main/java/com/sun/xacml/BasicEvaluationCtx.java
	src/main/java/com/sun/xacml/BindingUtility.java
	src/main/java/com/sun/xacml/CacheManager.java
	src/main/java/com/sun/xacml/ConfigurationStore.java
	src/main/java/com/sun/xacml/EvaluationCtx.java
	src/main/java/com/sun/xacml/Indenter.java
	src/main/java/com/sun/xacml/MatchResult.java
	src/main/java/com/sun/xacml/Obligation.java
	src/main/java/com/sun/xacml/PDP.java
	src/main/java/com/sun/xacml/PDPConfig.java
	src/main/java/com/sun/xacml/ParsingException.java
	src/main/java/com/sun/xacml/Policy.java
	src/main/java/com/sun/xacml/PolicyMetaData.java
	src/main/java/com/sun/xacml/PolicyReference.java
	src/main/java/com/sun/xacml/PolicySet.java
	src/main/java/com/sun/xacml/PolicyTreeElement.java
	src/main/java/com/sun/xacml/ProcessingException.java
	src/main/java/com/sun/xacml/Rule.java
	src/main/java/com/sun/xacml/Target.java
	src/main/java/com/sun/xacml/TargetMatch.java
	src/main/java/com/sun/xacml/TargetMatchGroup.java
	src/main/java/com/sun/xacml/TargetSection.java
	src/main/java/com/sun/xacml/UnknownIdentifierException.java
	src/main/java/com/sun/xacml/VersionConstraints.java
	src/main/java/com/sun/xacml/attr/AnyURIAttribute.java
	src/main/java/com/sun/xacml/attr/AttributeDesignator.java
	src/main/java/com/sun/xacml/attr/AttributeFactory.java
	src/main/java/com/sun/xacml/attr/AttributeFactoryProxy.java
	src/main/java/com/sun/xacml/attr/AttributeProxy.java
	src/main/java/com/sun/xacml/attr/AttributeSelector.java
	src/main/java/com/sun/xacml/attr/AttributeValue.java
	src/main/java/com/sun/xacml/attr/BagAttribute.java
	src/main/java/com/sun/xacml/attr/Base64.java
	src/main/java/com/sun/xacml/attr/Base64BinaryAttribute.java
	src/main/java/com/sun/xacml/attr/BaseAttributeFactory.java
	src/main/java/com/sun/xacml/attr/BooleanAttribute.java
	src/main/java/com/sun/xacml/attr/DNSNameAttribute.java
	src/main/java/com/sun/xacml/attr/DateAttribute.java
	src/main/java/com/sun/xacml/attr/DateTimeAttribute.java
	src/main/java/com/sun/xacml/attr/DayTimeDurationAttribute.java
	src/main/java/com/sun/xacml/attr/DoubleAttribute.java
	src/main/java/com/sun/xacml/attr/HexBinaryAttribute.java
	src/main/java/com/sun/xacml/attr/IPAddressAttribute.java
	src/main/java/com/sun/xacml/attr/IPv4AddressAttribute.java
	src/main/java/com/sun/xacml/attr/IPv6AddressAttribute.java
	src/main/java/com/sun/xacml/attr/IntegerAttribute.java
	src/main/java/com/sun/xacml/attr/PortRange.java
	src/main/java/com/sun/xacml/attr/RFC822NameAttribute.java
	src/main/java/com/sun/xacml/attr/StandardAttributeFactory.java
	src/main/java/com/sun/xacml/attr/StringAttribute.java
	src/main/java/com/sun/xacml/attr/TimeAttribute.java
	src/main/java/com/sun/xacml/attr/X500NameAttribute.java
	src/main/java/com/sun/xacml/attr/YearMonthDurationAttribute.java
	src/main/java/com/sun/xacml/attr/proxy/AnyURIAttributeProxy.java
	src/main/java/com/sun/xacml/attr/proxy/Base64BinaryAttributeProxy.java
	src/main/java/com/sun/xacml/attr/proxy/BooleanAttributeProxy.java
	src/main/java/com/sun/xacml/attr/proxy/DNSNameAttributeProxy.java
	src/main/java/com/sun/xacml/attr/proxy/DateAttributeProxy.java
	src/main/java/com/sun/xacml/attr/proxy/DateTimeAttributeProxy.java
	src/main/java/com/sun/xacml/attr/proxy/DayTimeDurationAttributeProxy.java
	src/main/java/com/sun/xacml/attr/proxy/DoubleAttributeProxy.java
	src/main/java/com/sun/xacml/attr/proxy/HexBinaryAttributeProxy.java
	src/main/java/com/sun/xacml/attr/proxy/IPAddressAttributeProxy.java
	src/main/java/com/sun/xacml/attr/proxy/IntegerAttributeProxy.java
	src/main/java/com/sun/xacml/attr/proxy/RFC822NameAttributeProxy.java
	src/main/java/com/sun/xacml/attr/proxy/StringAttributeProxy.java
	src/main/java/com/sun/xacml/attr/proxy/TimeAttributeProxy.java
	src/main/java/com/sun/xacml/attr/proxy/X500NameAttributeProxy.java
	src/main/java/com/sun/xacml/attr/proxy/YearMonthDurationAttributeProxy.java
	src/main/java/com/sun/xacml/combine/BaseCombiningAlgFactory.java
	src/main/java/com/sun/xacml/combine/CombinerElement.java
	src/main/java/com/sun/xacml/combine/CombinerParameter.java
	src/main/java/com/sun/xacml/combine/CombiningAlgFactory.java
	src/main/java/com/sun/xacml/combine/CombiningAlgFactoryProxy.java
	src/main/java/com/sun/xacml/combine/CombiningAlgorithm.java
	src/main/java/com/sun/xacml/combine/DenyOverridesPolicyAlg.java
	src/main/java/com/sun/xacml/combine/DenyOverridesRuleAlg.java
	src/main/java/com/sun/xacml/combine/FirstApplicablePolicyAlg.java
	src/main/java/com/sun/xacml/combine/FirstApplicableRuleAlg.java
	src/main/java/com/sun/xacml/combine/OnlyOneApplicablePolicyAlg.java
	src/main/java/com/sun/xacml/combine/OrderedDenyOverridesPolicyAlg.java
	src/main/java/com/sun/xacml/combine/OrderedDenyOverridesRuleAlg.java
	src/main/java/com/sun/xacml/combine/OrderedPermitOverridesPolicyAlg.java
	src/main/java/com/sun/xacml/combine/OrderedPermitOverridesRuleAlg.java
	src/main/java/com/sun/xacml/combine/PermitOverridesPolicyAlg.java
	src/main/java/com/sun/xacml/combine/PermitOverridesRuleAlg.java
	src/main/java/com/sun/xacml/combine/PolicyCombinerElement.java
	src/main/java/com/sun/xacml/combine/PolicyCombiningAlgorithm.java
	src/main/java/com/sun/xacml/combine/RuleCombinerElement.java
	src/main/java/com/sun/xacml/combine/RuleCombiningAlgorithm.java
	src/main/java/com/sun/xacml/combine/StandardCombiningAlgFactory.java
	src/main/java/com/sun/xacml/cond/AbsFunction.java
	src/main/java/com/sun/xacml/cond/AbstractFunction.java
	src/main/java/com/sun/xacml/cond/AddFunction.java
	src/main/java/com/sun/xacml/cond/BagFunction.java
	src/main/java/com/sun/xacml/cond/BaseFunctionFactory.java
	src/main/java/com/sun/xacml/cond/BasicFunctionFactoryProxy.java
	src/main/java/com/sun/xacml/cond/ComparisonFunction.java
	src/main/java/com/sun/xacml/cond/Condition.java
	src/main/java/com/sun/xacml/cond/ConditionBagFunction.java
	src/main/java/com/sun/xacml/cond/ConditionSetFunction.java
	src/main/java/com/sun/xacml/cond/DateMathFunction.java
	src/main/java/com/sun/xacml/cond/DivideFunction.java
	src/main/java/com/sun/xacml/cond/EqualFunction.java
	src/main/java/com/sun/xacml/cond/Evaluatable.java
	src/main/java/com/sun/xacml/cond/FloorFunction.java
	src/main/java/com/sun/xacml/cond/Function.java
	src/main/java/com/sun/xacml/cond/FunctionBase.java
	src/main/java/com/sun/xacml/cond/FunctionFactory.java
	src/main/java/com/sun/xacml/cond/FunctionFactoryProxy.java
	src/main/java/com/sun/xacml/cond/FunctionProxy.java
	src/main/java/com/sun/xacml/cond/FunctionTypeException.java
	src/main/java/com/sun/xacml/cond/GeneralBagFunction.java
	src/main/java/com/sun/xacml/cond/GeneralSetFunction.java
	src/main/java/com/sun/xacml/cond/HigherOrderFunction.java
	src/main/java/com/sun/xacml/cond/LogicalFunction.java
	src/main/java/com/sun/xacml/cond/MapFunction.java
	src/main/java/com/sun/xacml/cond/MapFunctionProxy.java
	src/main/java/com/sun/xacml/cond/MatchFunction.java
	src/main/java/com/sun/xacml/cond/ModFunction.java
	src/main/java/com/sun/xacml/cond/MultiplyFunction.java
	src/main/java/com/sun/xacml/cond/NOfFunction.java
	src/main/java/com/sun/xacml/cond/NotFunction.java
	src/main/java/com/sun/xacml/cond/NumericConvertFunction.java
	src/main/java/com/sun/xacml/cond/RoundFunction.java
	src/main/java/com/sun/xacml/cond/SetFunction.java
	src/main/java/com/sun/xacml/cond/StandardFunctionFactory.java
	src/main/java/com/sun/xacml/cond/StringFunction.java
	src/main/java/com/sun/xacml/cond/StringNormalizeFunction.java
	src/main/java/com/sun/xacml/cond/SubtractFunction.java
	src/main/java/com/sun/xacml/cond/TimeInRangeFunction.java
	src/main/java/com/sun/xacml/cond/URLStringCatFunction.java
	src/main/java/com/sun/xacml/cond/VariableDefinition.java
	src/main/java/com/sun/xacml/cond/VariableManager.java
	src/main/java/com/sun/xacml/cond/VariableReference.java
	src/main/java/com/sun/xacml/cond/cluster/AbsFunctionCluster.java
	src/main/java/com/sun/xacml/cond/cluster/AddFunctionCluster.java
	src/main/java/com/sun/xacml/cond/cluster/ComparisonFunctionCluster.java
	src/main/java/com/sun/xacml/cond/cluster/ConditionBagFunctionCluster.java
	src/main/java/com/sun/xacml/cond/cluster/ConditionSetFunctionCluster.java
	src/main/java/com/sun/xacml/cond/cluster/DateMathFunctionCluster.java
	src/main/java/com/sun/xacml/cond/cluster/DivideFunctionCluster.java
	src/main/java/com/sun/xacml/cond/cluster/EqualFunctionCluster.java
	src/main/java/com/sun/xacml/cond/cluster/FloorFunctionCluster.java
	src/main/java/com/sun/xacml/cond/cluster/FunctionCluster.java
	src/main/java/com/sun/xacml/cond/cluster/GeneralBagFunctionCluster.java
	src/main/java/com/sun/xacml/cond/cluster/GeneralSetFunctionCluster.java
	src/main/java/com/sun/xacml/cond/cluster/HigherOrderFunctionCluster.java
	src/main/java/com/sun/xacml/cond/cluster/LogicalFunctionCluster.java
	src/main/java/com/sun/xacml/cond/cluster/MatchFunctionCluster.java
	src/main/java/com/sun/xacml/cond/cluster/ModFunctionCluster.java
	src/main/java/com/sun/xacml/cond/cluster/MultiplyFunctionCluster.java
	src/main/java/com/sun/xacml/cond/cluster/NOfFunctionCluster.java
	src/main/java/com/sun/xacml/cond/cluster/NotFunctionCluster.java
	src/main/java/com/sun/xacml/cond/cluster/NumericConvertFunctionCluster.java
	src/main/java/com/sun/xacml/cond/cluster/RoundFunctionCluster.java
	src/main/java/com/sun/xacml/cond/cluster/StringFunctionCluster.java
	src/main/java/com/sun/xacml/cond/cluster/StringNormalizeFunctionCluster.java
	src/main/java/com/sun/xacml/cond/cluster/SubtractFunctionCluster.java
	src/main/java/com/sun/xacml/ctx/Attribute.java
	src/main/java/com/sun/xacml/ctx/InputParser.java
	src/main/java/com/sun/xacml/ctx/ResponseCtx.java
	src/main/java/com/sun/xacml/ctx/Result.java
	src/main/java/com/sun/xacml/ctx/Status.java
	src/main/java/com/sun/xacml/ctx/StatusDetail.java
	src/main/java/com/sun/xacml/ctx/Subject.java
	src/main/java/com/sun/xacml/finder/AttributeFinder.java
	src/main/java/com/sun/xacml/finder/AttributeFinderModule.java
	src/main/java/com/sun/xacml/finder/PolicyFinder.java
	src/main/java/com/sun/xacml/finder/PolicyFinderModule.java
	src/main/java/com/sun/xacml/finder/PolicyFinderResult.java
	src/main/java/com/sun/xacml/finder/ResourceFinder.java
	src/main/java/com/sun/xacml/finder/ResourceFinderModule.java
	src/main/java/com/sun/xacml/finder/ResourceFinderResult.java
	src/main/java/com/sun/xacml/finder/impl/CurrentEnvModule.java
	src/main/java/com/sun/xacml/finder/impl/MultipleResourceFinder.java
	src/main/java/com/sun/xacml/finder/impl/MyCacheManager.java
	src/main/java/com/sun/xacml/finder/impl/NamespaceContextImpl.java
	src/main/java/com/sun/xacml/finder/impl/PrefixResolverDefault.java
	src/main/java/com/sun/xacml/finder/impl/SelectorModule.java
	src/main/java/com/sun/xacml/support/SimplePDP.java
	src/main/java/com/sun/xacml/support/finder/BasicPolicyFinderModule.java
	src/main/java/com/sun/xacml/support/finder/FilePolicyModule.java
	src/main/java/com/sun/xacml/support/finder/PolicyCollection.java
	src/main/java/com/sun/xacml/support/finder/PolicyReader.java
	src/main/java/com/sun/xacml/support/finder/StaticPolicyFinderModule.java
	src/main/java/com/sun/xacml/support/finder/StaticRefPolicyFinderModule.java
	src/main/java/com/sun/xacml/support/finder/TopLevelPolicyException.java
	src/main/java/com/sun/xacml/support/finder/URLPolicyFinderModule.java
	src/test/resources/config.xml
parents 76ac4bd3 c1fb3cd8
<<<<<<< HEAD
target/
.classpath
.project
......@@ -6,3 +7,15 @@ target/
.settings/org.eclipse.m2e.core.prefs
/bin
/.settings
=======
/target
/.classpath
/.project
/bin
/.settings
/.settings/org.eclipse.jdt.core.prefs
/.settings/org.eclipse.core.resources.prefs
/.settings/org.eclipse.wst.common.component
/.settings/org.eclipse.wst.common.project.facet.core.xml
/.settings/org.sonar.ide.eclipse.core.prefs
>>>>>>> 3.x
......@@ -5,6 +5,7 @@
<artifactId>core</artifactId>
<groupId>com.thalesgroup.authzforce</groupId>
<version>2.0.0</version>
<<<<<<< HEAD
<relativePath>../authzforce-core</relativePath>
</parent>
<groupId>com.thalesgroup.authzforce.core</groupId>
......@@ -40,22 +41,87 @@
</plugins>
</build>
<dependencies>
=======
<relativePath>../authzforce-core/pom.xml</relativePath>
</parent>
<groupId>com.thalesgroup.authzforce.core</groupId>
<artifactId>authzforce-core</artifactId>
<version>3.4.0</version>
<name>AuthZForce :: Core :: AuthZForce AuthoriZation Server</name>
<organization>
<name>Thales</name>
</organization>
<description>
An authorization server that supports XACML, X.509 attributes certificates, SQL and LDAP.
</description>
<inceptionYear>2011</inceptionYear>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<copyrightOwner>Thales Services - ThereSIS</copyrightOwner>
<jdk.source>1.7</jdk.source>
<jdk.target>1.7</jdk.target>
</properties>
<dependencies>
<!-- Authzforce optionnal dependencies -->
<!-- <dependency> -->
<!-- <groupId>com.thalesgroup.authzforce</groupId> -->
<!-- <artifactId>authzforce-audit</artifactId> -->
<!-- <version>2.0.1</version> -->
<!-- </dependency> -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.6.11</version>
</dependency>
<!-- /Authzforce optionnal dependencies -->
>>>>>>> 3.x
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
<dependency>
<<<<<<< HEAD
=======
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics-runtime</artifactId>
<version>0.6.4</version>
</dependency>
<dependency>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>testing</artifactId>
<version>0.4.1.5</version>
</dependency>
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
<version>1.2.3</version>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.11</version>
</dependency>
<!-- Test dependencies -->
<dependency>
>>>>>>> 3.x
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>3.1.1.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<<<<<<< HEAD
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.4</version>
<scope>test</scope>
=======
<groupId>com.thalesgroup.authzforce.core</groupId>
<artifactId>authzforce-model</artifactId>
<version>3.0.2</version>
>>>>>>> 3.x
</dependency>
<dependency>
<groupId>commons-jxpath</groupId>
......@@ -64,6 +130,7 @@
<scope>test</scope>
</dependency>
<dependency>
<<<<<<< HEAD
<groupId>com.thalesgroup.authzforce.core</groupId>
<artifactId>model</artifactId>
<version>${project.version}</version>
......@@ -79,4 +146,161 @@
<version>1.2.3</version>
</dependency>
</dependencies>
=======
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<!-- /Test dependencies -->
</dependencies>
<build>
<plugins>
<!-- Maven compiler configuration -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<executions>
<execution>
<id>default-testCompile</id>
<phase>test-compile</phase>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<source>${jdk.source}</source>
<target>${jdk.target}</target>
</configuration>
</execution>
<execution>
<id>default-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<source>${jdk.source}</source>
<target>${jdk.target}</target>
</configuration>
</execution>
</executions>
<configuration>
<source>${jdk.source}</source>
<target>${jdk.target}</target>
</configuration>
</plugin>
<!-- Uber jar configuration -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<finalName>${project.artifactId}-${project.version}</finalName>
</configuration>
</execution>
</executions>
</plugin>
<!-- Test configuration -->
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.14.1</version>
<executions>
<execution>
<id>default-test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<failIfNoTests>false</failIfNoTests>
<skipTests>false</skipTests>
</configuration>
</execution>
</executions>
</plugin>
<!-- Creating current year element for license headers -->
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<source>
import java.util.Date
import java.text.MessageFormat
def
vartimestamp = MessageFormat.format("{0,date,yyyy}", new Date())
project.properties['currentYear'] = vartimestamp
</source>
</configuration>
</execution>
</executions>
</plugin>
<!-- Adding header to file -->
<plugin>
<groupId>com.mycila.maven-license-plugin</groupId>
<artifactId>maven-license-plugin</artifactId>
<version>1.9.0</version>
<configuration>
<!-- Template location -->
<header>src/main/resources/fileHeader.txt</header>
<properties>
<!-- Values to be substituted in template -->
<h_inceptionYear>${inceptionYear}</h_inceptionYear>
<h_currentYear>${currentYear}</h_currentYear>
<h_copyrightOwner>${copyrightOwner}</h_copyrightOwner>
</properties>
<strictCheck>true</strictCheck>
<excludes>
<exclude>**/*.html</exclude>
<exclude>**/*.xml</exclude>
<exclude>**/*.txt</exclude>
<exclude>**/*.ec</exclude>
<exclude>**/*.log</exclude>
<exclude>**/*.css</exclude>
<exclude>**/*.js</exclude>
<exclude>**/*.jsp</exclude>
<exclude>**/*.md</exclude>
<exclude>**/*.properties</exclude>
<exclude>**/*.gitignore</exclude>
</excludes>
</configuration>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<id>default</id>
<phase>compile</phase>
<!-- <goals> -->
<!-- <goal>compile</goal> -->
<!-- <goal>test-compile</goal> -->
<!-- </goals> -->
</execution>
</executions>
</plugin>
</plugins>
</build>
>>>>>>> 3.x
</project>
<<<<<<< HEAD
=======
/**
* Copyright (C) 2011-2013 Thales Services - ThereSIS - All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
>>>>>>> 3.x
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
......@@ -17,7 +35,11 @@ import javax.xml.parsers.ParserConfigurationException;
/**
*
<<<<<<< HEAD
* @author najmi
=======
* @author Romain Ferrari
>>>>>>> 3.x
*/
public class BindingUtility {
......@@ -26,6 +48,7 @@ public class BindingUtility {
static DocumentBuilderFactory dbf = null;
static JAXBContext s_jaxbContext = null;
<<<<<<< HEAD
public static oasis.names.tc.xacml._2_0.context.schema.os.ObjectFactory contextFac =
new oasis.names.tc.xacml._2_0.context.schema.os.ObjectFactory();
public static oasis.names.tc.xacml._2_0.policy.schema.os.ObjectFactory policyFac =
......@@ -40,6 +63,22 @@ public class BindingUtility {
s_jaxbContext = JAXBContext.newInstance(
jaxbContextPath,
BindingUtility.class.getClassLoader());
=======
public static oasis.names.tc.xacml._3_0.core.schema.wd_17.ObjectFactory contextFac =
new oasis.names.tc.xacml._3_0.core.schema.wd_17.ObjectFactory();
// public static oasis.names.tc.xacml._2_0.policy.schema.os.ObjectFactory policyFac =
// new oasis.names.tc.xacml._2_0.policy.schema.os.ObjectFactory();
public static oasis.names.tc.xacml._3_0.core.schema.wd_17.ObjectFactory policyFac =
new oasis.names.tc.xacml._3_0.core.schema.wd_17.ObjectFactory();
//public static String jaxbContextPath = "net.opengis.gml.v_3_2_1:org.isotc211.iso19139.d_2007_04_17.gco:org.isotc211.iso19139.d_2007_04_17.gmd:org.isotc211.iso19139.d_2007_04_17.gmx:org.isotc211.iso19139.d_2007_04_17.gsr:org.isotc211.iso19139.d_2007_04_17.gss:org.isotc211.iso19139.d_2007_04_17.gts";
public static String jaxbContextPath = "oasis.names.tc.xacml._3_0.core.schema.wd_17";
public static JAXBContext getJAXBContext() throws JAXBException {
if (s_jaxbContext == null) {
s_jaxbContext = JAXBContext.newInstance(jaxbContextPath, BindingUtility.class.getClassLoader());
>>>>>>> 3.x
}
return s_jaxbContext;
......
<<<<<<< HEAD
=======
/**
* Copyright (C) 2011-2013 Thales Services - ThereSIS - All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
>>>>>>> 3.x
package com.sun.xacml;
import java.util.ArrayList;
......
<<<<<<< HEAD
/*
* @(#)ConfigurationStore.java
......@@ -34,6 +35,23 @@
* the design, construction, operation or maintenance of any nuclear facility.
*/
=======
/**
* Copyright (C) 2011-2013 Thales Services - ThereSIS - All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
>>>>>>> 3.x
package com.sun.xacml;
import com.sun.xacml.attr.AttributeFactory;
......@@ -61,6 +79,10 @@ import com.sun.xacml.cond.cluster.FunctionCluster;
import com.sun.xacml.finder.AttributeFinder;
import com.sun.xacml.finder.PolicyFinder;
import com.sun.xacml.finder.ResourceFinder;
<<<<<<< HEAD
=======
import com.sun.xacml.xacmlv3.Policy;
>>>>>>> 3.x
import java.io.File;
import java.io.FileInputStream;
......@@ -146,9 +168,17 @@ public class ConfigurationStore
// the classloader we'll use for loading classes
private ClassLoader loader;
<<<<<<< HEAD
// the logger we'll use for all messages
private static final Logger LOGGER =
Logger.getLogger(ConfigurationStore.class.getName());
=======
/**
* Logger used for all classes
*/
private static final org.apache.log4j.Logger LOGGER = org.apache.log4j.Logger
.getLogger(ConfigurationStore.class);
>>>>>>> 3.x
/**
* Default constructor. This constructor uses the
......@@ -165,7 +195,11 @@ public class ConfigurationStore
// make sure that the right property was set
if (configFile == null) {
<<<<<<< HEAD
LOGGER.severe("A property defining a config file was expected, " +
=======
LOGGER.error("A property defining a config file was expected, " +
>>>>>>> 3.x
"but none was provided");
throw new ParsingException("Config property " +
......@@ -176,7 +210,11 @@ public class ConfigurationStore
try {
setupConfig(new File(configFile));
} catch (ParsingException pe) {
<<<<<<< HEAD
LOGGER.log(Level.SEVERE, "Runtime config file couldn't be loaded" +
=======
LOGGER.error("Runtime config file couldn't be loaded" +
>>>>>>> 3.x
" so no configurations will be available", pe);
throw pe;
}
......@@ -198,7 +236,11 @@ public class ConfigurationStore
try {
setupConfig(configFile);
} catch (ParsingException pe) {
<<<<<<< HEAD
LOGGER.log(Level.SEVERE, "Runtime config file couldn't be loaded" +
=======
LOGGER.error("Runtime config file couldn't be loaded" +
>>>>>>> 3.x
" so no configurations will be available", pe);
throw pe;
}
......@@ -212,7 +254,11 @@ public class ConfigurationStore
* to setup all the pdps and factories.
*/
private void setupConfig(File configFile) throws ParsingException {
<<<<<<< HEAD
LOGGER.config("Loading runtime configuration");
=======
LOGGER.info("Loading runtime configuration");
>>>>>>> 3.x
// load our classloader
loader = getClass().getClassLoader();
......@@ -253,18 +299,26 @@ public class ConfigurationStore
// putting the new element into the respective map...make sure
// that we're never loading something with the same name twice
if (childName.equals("pdp")) {
<<<<<<< HEAD
if (LOGGER.isLoggable(Level.CONFIG)) {
LOGGER.config("Loading PDP: " + elementName);
}
=======
LOGGER.info("Loading PDP: " + elementName);
>>>>>>> 3.x
if (pdpConfigMap.containsKey(elementName)) {
throw new ParsingException("more that one pdp with " +
"name \"" + elementName +"\"");
}
pdpConfigMap.put(elementName, parsePDPConfig(child));
} else if (childName.equals("attributeFactory")) {
<<<<<<< HEAD
if (LOGGER.isLoggable(Level.CONFIG)) {
LOGGER.config("Loading AttributeFactory: " + elementName);
}
=======
LOGGER.info("Loading AttributeFactory: " + elementName);
>>>>>>> 3.x
if (attributeMap.containsKey(elementName)) {
throw new ParsingException("more that one " +
"attributeFactory with name " +
......@@ -272,8 +326,12 @@ public class ConfigurationStore
}
attributeMap.put(elementName, parseAttributeFactory(child));
} else if (childName.equals("combiningAlgFactory")) {
<<<<<<< HEAD
if (LOGGER.isLoggable(Level.CONFIG))
LOGGER.config("Loading CombiningAlgFactory: " +
=======
LOGGER.info("Loading CombiningAlgFactory: " +
>>>>>>> 3.x
elementName);
if (combiningMap.containsKey(elementName)) {
throw new ParsingException("more that one " +
......@@ -282,9 +340,13 @@ public class ConfigurationStore
}
combiningMap.put(elementName, parseCombiningAlgFactory(child));
} else if (childName.equals("functionFactory")) {
<<<<<<< HEAD
if (LOGGER.isLoggable(Level.CONFIG)) {
LOGGER.config("Loading FunctionFactory: " + elementName);
}
=======
LOGGER.info("Loading FunctionFactory: " + elementName);
>>>>>>> 3.x
if (functionMap.containsKey(elementName)) {
throw new ParsingException("more that one functionFactory"
+ " with name \"" +
......@@ -438,7 +500,11 @@ public class ConfigurationStore
// check if we're starting with the standard factory setup
if (useStandard(root, "useStandardDatatypes")) {
<<<<<<< HEAD
LOGGER.config("Starting with standard Datatypes");
=======
LOGGER.info("Starting with standard Datatypes");
>>>>>>> 3.x
factory = StandardAttributeFactory.getNewFactory();
} else {
......@@ -480,7 +546,11 @@ public class ConfigurationStore
// check if we're starting with the standard factory setup
if (useStandard(root, "useStandardAlgorithms")) {
<<<<<<< HEAD
LOGGER.config("Starting with standard Combining Algorithms");
=======
LOGGER.info("Starting with standard Combining Algorithms");
>>>>>>> 3.x
factory = StandardCombiningAlgFactory.getNewFactory();
} else {
......@@ -527,7 +597,11 @@ public class ConfigurationStore
// check if we're starting with the standard factory setup, and
// make sure that the proxy is pre-configured
if (useStandard(root, "useStandardFunctions")) {
<<<<<<< HEAD
LOGGER.config("Starting with standard Functions");
=======
LOGGER.info("Starting with standard Functions");
>>>>>>> 3.x
proxy = StandardFunctionFactory.getNewFactoryProxy();
......@@ -552,6 +626,7 @@ public class ConfigurationStore
String name = child.getNodeName();
if (name.equals("target")) {
<<<<<<< HEAD
LOGGER.config("Loading [TARGET] functions");
functionParserHelper(child, targetFactory);
} else if (name.equals("condition")) {
......@@ -559,6 +634,15 @@ public class ConfigurationStore
functionParserHelper(child, conditionFactory);
} else if (name.equals("general")) {
LOGGER.config("Loading [GENERAL] functions");
=======
LOGGER.info("Loading [TARGET] functions");
functionParserHelper(child, targetFactory);
} else if (name.equals("condition")) {
LOGGER.info("Loading [CONDITION] functions");
functionParserHelper(child, conditionFactory);
} else if (name.equals("general")) {
LOGGER.info("Loading [GENERAL] functions");
>>>>>>> 3.x
functionParserHelper(child, generalFactory);
}
}
......@@ -636,9 +720,13 @@ public class ConfigurationStore
// get the name of the class
String className = root.getAttributes().getNamedItem("class").getNodeValue();
<<<<<<< HEAD
if (LOGGER.isLoggable(Level.CONFIG)) {
LOGGER.config("Loading [ " + prefix + ": " + className + " ]");
}
=======
LOGGER.info("Loading [ " + prefix + ": " + className + " ]");
>>>>>>> 3.x
// load the given class using the local classloader
Class c = null;
......@@ -740,6 +828,7 @@ public class ConfigurationStore
* Right now this just supports String and List, but it's trivial to
* add support for other types should that be needed. Right now, it's not
* clear that there's any need for other types.
<<<<<<< HEAD
*/
// private List getArgs(Node root) {
// List args = new ArrayList();
......@@ -768,6 +857,8 @@ public class ConfigurationStore
* Right now this just supports String and List, but it's trivial to
* add support for other types should that be needed. Right now, it's not
* clear that there's any need for other types.
=======
>>>>>>> 3.x
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
private List getArgs(Node root) {
......@@ -920,7 +1011,11 @@ public class ConfigurationStore
*/
public PDPConfig getDefaultPDPConfig() throws UnknownIdentifierException {