Class Xacml20Utils
- java.lang.Object
-
- org.openehealth.ipf.commons.ihe.xacml20.Xacml20Utils
-
public class Xacml20Utils extends Object
- Since:
- 3.5.1
- Author:
- Dmytro Rud
-
-
Field Summary
Fields Modifier and Type Field Description static StringATTRIBUTE_TYPE_PATIENT_IDstatic StringELEMENT_NAME_PATIENT_IDstatic javax.xml.bind.JAXBContextJAXB_CONTEXTstatic QNameQUERY_POLICY_ID_QNAMEstatic QNameQUERY_POLICY_SET_ID_QNAMEstatic QNameQUERY_REQUEST_QNAMEstatic StringSAML20_STATUS_SUCCESS
-
Constructor Summary
Constructors Constructor Description Xacml20Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ResponseTypecreateXacmlQueryResponse(String status)static Optional<String>extractPatientId(XACMLPolicyQueryType request)static Optional<org.herasaf.xacml.core.policy.impl.IdReferenceType>extractPolicyId(XACMLPolicyQueryType request)static voidinitializeHerasaf(org.herasaf.xacml.core.simplePDP.initializers.api.Initializer... customInitializers)Configures the HERAS-AF framework to use HL7v3 data types and functions and provides the possibility to run user-defined custom initialization routines.static Stream<org.herasaf.xacml.core.policy.Evaluatable>toStream(AddPolicyRequest request)Creates a stream of all policies and policy sets contained in the given PPQ Add Policy request.static Stream<org.herasaf.xacml.core.policy.impl.IdReferenceType>toStream(DeletePolicyRequest request)Creates a stream of all policy and policy set IDs contained in the given PPQ Delete Policy request.static Stream<org.herasaf.xacml.core.policy.Evaluatable>toStream(UpdatePolicyRequest request)Creates a stream of all policies and policy sets contained in the given PPQ Update Policy request.static Stream<org.herasaf.xacml.core.policy.Evaluatable>toStream(ResponseType response)Creates a stream of all policies and policy sets contained in the given PPQ response object.
-
-
-
Field Detail
-
SAML20_STATUS_SUCCESS
public static final String SAML20_STATUS_SUCCESS
- See Also:
- Constant Field Values
-
ATTRIBUTE_TYPE_PATIENT_ID
public static final String ATTRIBUTE_TYPE_PATIENT_ID
- See Also:
- Constant Field Values
-
ELEMENT_NAME_PATIENT_ID
public static final String ELEMENT_NAME_PATIENT_ID
- See Also:
- Constant Field Values
-
QUERY_REQUEST_QNAME
public static final QName QUERY_REQUEST_QNAME
-
QUERY_POLICY_ID_QNAME
public static final QName QUERY_POLICY_ID_QNAME
-
QUERY_POLICY_SET_ID_QNAME
public static final QName QUERY_POLICY_SET_ID_QNAME
-
JAXB_CONTEXT
public static final javax.xml.bind.JAXBContext JAXB_CONTEXT
-
-
Method Detail
-
initializeHerasaf
public static void initializeHerasaf(org.herasaf.xacml.core.simplePDP.initializers.api.Initializer... customInitializers)
Configures the HERAS-AF framework to use HL7v3 data types and functions and provides the possibility to run user-defined custom initialization routines. This function is idempotent, it is safe to run it multiple times.- Parameters:
customInitializers- additional optional user-defined custom initializers.
-
createXacmlQueryResponse
public static ResponseType createXacmlQueryResponse(String status)
-
toStream
public static Stream<org.herasaf.xacml.core.policy.Evaluatable> toStream(ResponseType response)
Creates a stream of all policies and policy sets contained in the given PPQ response object.- Parameters:
response- PPQ response.- Returns:
- resulting stream, may be ampty but never
null.
-
toStream
public static Stream<org.herasaf.xacml.core.policy.Evaluatable> toStream(AddPolicyRequest request)
Creates a stream of all policies and policy sets contained in the given PPQ Add Policy request.- Parameters:
request- PPQ Add Policy request.- Returns:
- resulting stream, may be empty but never
null.
-
toStream
public static Stream<org.herasaf.xacml.core.policy.Evaluatable> toStream(UpdatePolicyRequest request)
Creates a stream of all policies and policy sets contained in the given PPQ Update Policy request.- Parameters:
request- PPQ Update Policy request.- Returns:
- resulting stream, may be empty but never
null.
-
toStream
public static Stream<org.herasaf.xacml.core.policy.impl.IdReferenceType> toStream(DeletePolicyRequest request)
Creates a stream of all policy and policy set IDs contained in the given PPQ Delete Policy request.- Parameters:
request- PPQ Delete Policy request.- Returns:
- resulting stream, may be empty but never
null.
-
extractPatientId
public static Optional<String> extractPatientId(XACMLPolicyQueryType request)
-
extractPolicyId
public static Optional<org.herasaf.xacml.core.policy.impl.IdReferenceType> extractPolicyId(XACMLPolicyQueryType request)
-
-