- /**
- * Load properties from given file.
- *
- * @throws IOException If unable to read file
- */
- protected synchronized Properties loadXacmlProperties() throws IOException {
- LOGGER.info("Loading xacml properties {}", pathForData);
- try (InputStream is = Files.newInputStream(pathForData)) {
- Properties properties = new Properties();
- properties.load(is);
- return properties;
- }
- }
-
- /**
- * Stores the XACML Properties to the given file location.
- *
- * @throws IOException If unable to store the file.
- */
- protected synchronized void storeXacmlProperties() throws IOException {
- try (OutputStream os = Files.newOutputStream(pathForData)) {
- String strComments = "#";
- pdpProperties.store(os, strComments);
- }
- }
-
- /**
- * Appends 'xacml.properties' to a root Path object
- *
- * @return Path to rootPath/xacml.properties file
- */
- protected synchronized Path getPropertiesPath() {
- return Paths.get(pathForData.toAbsolutePath().toString(), "xacml.properties");
- }
-