/** * Encodes this <code>Target</code> into its XML representation and writes * this encoding to the given <code>OutputStream</code> with no * indentation. * * @param output a stream into which the XML-encoded data is written */ public void encode(OutputStream output) { encode(output, new Indenter(0)); }
/** * Returns the given description of this policy or null if there is no * description. If the policy is invalid or can't be retrieved, then a * runtime exception is thrown. * * @return the description or null * * @throws ProcessingException if the referenced policy can't be retrieved */ public String getDescription() { return resolvePolicy().getDescription(); }
/** * Returns the default version for this policy. If the policy is * invalid or can't be retrieved, then a runtime exception is thrown. * * @return the policy's default version * * @throws ProcessingException if the referenced policy can't be retrieved */ public String getDefaultVersion() { return resolvePolicy().getDefaultVersion(); }
/** * Default constructor. This creates a <code>SimplePDP</code> with a * <code>PDP</code> based on the configuration defined by the runtime * property com.sun.xcaml.PDPConfigFile. */ public SimplePDP() throws Exception { // load the configuration ConfigurationStore store = new ConfigurationStore(); // use the default factories from the configuration store.useDefaultFactories(); // get the PDP configuration's and setup the PDP pdp = new PDP(store.getDefaultPDPConfig()); }
/** * Encodes this <code>TargetMatchGroup</code> into its XML representation * and writes this encoding to the given <code>OutputStream</code> with no * indentation. * * @param output a stream into which the XML-encoded data is written */ public void encode(OutputStream output) { encode(output, new Indenter(0)); }
/** * Encodes this <code>Policy</code> into its XML representation and writes * this encoding to the given <code>OutputStream</code> with no * indentation. * * @param output a stream into which the XML-encoded data is written */ public void encode(OutputStream output) { encode(output, new Indenter(0)); }
/** * Encodes this <code>Rule</code> into its XML representation and writes * this encoding to the given <code>OutputStream</code> with no * indentation. * * @param output a stream into which the XML-encoded data is written */ public void encode(OutputStream output) { encode(output, new Indenter(0)); }
/** * Encodes this <code>PolicySet</code> into its XML representation and * writes this encoding to the given <code>OutputStream</code> with no * indentation. * * @param output a stream into which the XML-encoded data is written */ public void encode(OutputStream output) { encode(output, new Indenter(0)); }
/** * Encodes this <code>TargetMatch</code> into its XML representation and * writes this encoding to the given <code>OutputStream</code> with no * indentation. * * @param output a stream into which the XML-encoded data is written */ public void encode(OutputStream output) { encode(output, new Indenter(0)); }
/** * Encodes this <code>TargetSection</code> into its XML representation * and writes this encoding to the given <code>OutputStream</code> with * no indentation. * * @param output a stream into which the XML-encoded data is written */ public void encode(OutputStream output) { encode(output, new Indenter(0)); }
/** * Returns the id of this policy. If the policy is invalid or can't be * retrieved, then a runtime exception is thrown. * * @return the policy id * * @throws ProcessingException if the referenced policy can't be retrieved */ public URI getId() { return resolvePolicy().getId(); }
/** * Encodes this <code>PolicyReference</code> into its XML representation * and writes this encoding to the given <code>OutputStream</code> with * no indentation. * * @param output a stream into which the XML-encoded data is written */ public void encode(OutputStream output) { encode(output, new Indenter(0)); }
/** * Returns the target for this policy. If the policy is invalid or can't be * retrieved, then a runtime exception is thrown. * * @return the policy's target * * @throws ProcessingException if the referenced policy can't be retrieved */ public Target getTarget() { return resolvePolicy().getTarget(); }
/** * Returns the combining algorithm used by this policy. If the policy is * invalid or can't be retrieved, then a runtime exception is thrown. * * @return the combining algorithm * * @throws ProcessingException if the referenced policy can't be retrieved */ public CombiningAlgorithm getCombiningAlg() { return resolvePolicy().getCombiningAlg(); }
/** * Returns the child policy nodes under this node in the policy tree. If * the policy is invalid or can't be retrieved, then a runtime exception * is thrown. * * @return the <code>List</code> of child policy nodes * * @throws ProcessingException if the referenced policy can't be retrieved */ public List getChildren() { return resolvePolicy().getChildren(); }
/** * Returns the version of this policy. If the policy is invalid or can't * be retrieved, then a runtime exception is thrown. * * @return the policy version * * @throws ProcessingException if the referenced policy can't be retrieved */ public String getVersion() { return resolvePolicy().getVersion(); }
/** * Returns the child policy nodes and their associated parameters. If * the policy is invalid or can't be retrieved, then a runtime exception * is thrown. * * @return a <code>List</code> of <code>CombinerElement</code>s * * @throws ProcessingException if the referenced policy can't be retrieved */ public List getChildElements() { return resolvePolicy().getChildElements(); }
/** * Returns the Set of obligations for this policy, which may be empty if * there are no obligations. If the policy is invalid or can't be * retrieved, then a runtime exception is thrown. * * @return the policy's obligations * * @throws ProcessingException if the referenced policy can't be retrieved */ public Set getObligations() { return resolvePolicy().getObligations(); }
/** * Checks if the given version string matches the constraint string. * * @param version the version string to check * @param constraint a constraint string to use in matching * * @return true if the version string matches the constraint */ public static boolean matches(String version, String constraint) { return compareHelper(version, constraint, COMPARE_EQUAL); }