public XACMLPolicyScanner(Path filename, Callback callback) { try (InputStream is = Files.newInputStream(filename)) { this.policyObject = XACMLPolicyScanner.readPolicy(is); } catch (IOException e) { logger.error("Failed to read policy", e); } this.callback = callback; }
public XACMLPolicyScanner(Path filename, Callback callback) { try (InputStream is = Files.newInputStream(filename)) { this.policyObject = XACMLPolicyScanner.readPolicy(is); } catch (IOException e) { logger.error("Failed to read policy", e); } this.callback = callback; }
/** * Reads the XACML XML policy file in and returns the version contained in the root Policy/PolicySet element. * * @param policy - The policy file. * @return - The version string from the file (uninterpreted) * @throws IOException */ public static String getVersion(Path policy) throws IOException { Object data = null; try (InputStream is = Files.newInputStream(policy)) { data = XACMLPolicyScanner.readPolicy(is); } catch (IOException e) { logger.error("Failed to read policy", e); throw e; } if (data == null) { logger.warn("Version is null."); return null; } return getVersion(data); }
/** * Reads the XACML XML policy file in and returns the version contained in the root Policy/PolicySet element. * * @param policy - The policy file. * @return - The version string from the file (uninterpreted) * @throws IOException */ public static String getVersion(Path policy) throws IOException { Object data = null; try (InputStream is = Files.newInputStream(policy)) { data = XACMLPolicyScanner.readPolicy(is); } catch (IOException e) { logger.error("Failed to read policy", e); throw e; } if (data == null) { logger.warn("Version is null."); return null; } return getVersion(data); }
Object rootElement = XACMLPolicyScanner.readPolicy(url.openStream()); if (rootElement == null ||
Object rootElement = XACMLPolicyScanner.readPolicy(url.openStream()); if (rootElement == null ||