Class Xacml20Utils
java.lang.Object
org.openehealth.ipf.commons.ihe.xacml20.Xacml20Utils
- Since:
- 3.5.1
- Author:
- Dmytro Rud
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.herasaf.xacml.core.context.impl.RequestType
static CV
extractCodeAttributeValue
(org.herasaf.xacml.core.context.impl.AttributeType attribute) extractPatientId
(XACMLPolicyQueryType request) static Optional<org.herasaf.xacml.core.policy.impl.IdReferenceType>
extractPolicyId
(XACMLPolicyQueryType request) static String
extractStringAttributeValue
(org.herasaf.xacml.core.context.impl.AttributeType attribute) 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.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 Details
-
ATTRIBUTE_TYPE_PATIENT_ID
- See Also:
-
ELEMENT_NAME_PATIENT_ID
- See Also:
-
QUERY_REQUEST_QNAME
-
QUERY_POLICY_ID_QNAME
-
QUERY_POLICY_SET_ID_QNAME
-
JAXB_CONTEXT
public static final javax.xml.bind.JAXBContext JAXB_CONTEXT
-
-
Constructor Details
-
Xacml20Utils
public Xacml20Utils()
-
-
Method Details
-
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.
-
toStream
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
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
-
extractPolicyId
public static Optional<org.herasaf.xacml.core.policy.impl.IdReferenceType> extractPolicyId(XACMLPolicyQueryType request) -
extractAuthzRequest
public static org.herasaf.xacml.core.context.impl.RequestType extractAuthzRequest(XACMLAuthzDecisionQueryType query) -
extractStringAttributeValue
public static String extractStringAttributeValue(org.herasaf.xacml.core.context.impl.AttributeType attribute) -
extractCodeAttributeValue
public static CV extractCodeAttributeValue(org.herasaf.xacml.core.context.impl.AttributeType attribute)
-