Skip to content

Commit ebec040

Browse files
committed
- New public static method: PdpEngineConfiguration#getInstance(Source, PdpModelHandler, EnvironmentProperties). Enables loading PDP configuration from other kinds of sources than files (e.g. String)
1 parent 5a9f7d3 commit ebec040

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

pdp-engine/src/main/java/org/ow2/authzforce/core/pdp/impl/PdpEngineConfiguration.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,21 @@ public PdpEngineConfiguration(final Pdp pdpJaxbConf, final EnvironmentProperties
668668
this(pdpJaxbConf, envProps, Map.of());
669669
}
670670

671-
private static PdpEngineConfiguration getInstance(final Source confXmlSrc, final PdpModelHandler modelHandler, final EnvironmentProperties envProps) throws IOException, IllegalArgumentException
671+
/**
672+
* Create PDP instance
673+
*
674+
* @param confXmlSrc
675+
* input PDP XML configuration
676+
* @param modelHandler
677+
* PDP configuration model handler
678+
* @param envProps environment properties that can be used in file paths as part of the PDP configuration ({@code confXmlSrc}). Occurrences of ${ENV_VAR} in file paths will be replaced with the value of the environment properties in {@code envProps} if it exists.
679+
* @return PDP instance
680+
* @throws java.io.IOException
681+
* I/O error reading XML from {@code confXmlSrc}
682+
* @throws java.lang.IllegalArgumentException
683+
* Invalid PDP configuration in {@code confXmlSrc}
684+
*/
685+
public static PdpEngineConfiguration getInstance(final Source confXmlSrc, final PdpModelHandler modelHandler, final EnvironmentProperties envProps) throws IOException, IllegalArgumentException
672686
{
673687
assert confXmlSrc != null && modelHandler != null;
674688

0 commit comments

Comments
 (0)