001/*-
002 * #%L
003 * Smile CDR - CDR
004 * %%
005 * Copyright (C) 2016 - 2025 Smile CDR, Inc.
006 * %%
007 * All rights reserved.
008 * #L%
009 */
010package ca.cdr.api.consent;
011
012import java.util.HashMap;
013import java.util.Map;
014
015/**
016 * A consent fixed policy request containing:
017 * <ol>
018 *     <li>The policy name which should be mapped to a new instance of an {@link ca.uhn.fhir.rest.server.interceptor.consent.IConsentService}</li>
019 *     <li>A list of parameters that can be used to specify additional information used to build the
020 *     {@link ca.uhn.fhir.rest.server.interceptor.consent.IConsentService}.</li>
021 * </ol>
022 */
023public class ConsentFixedPolicyRequest {
024        private final String myPolicyName;
025        private final Map<String, String> myParameters;
026
027        public ConsentFixedPolicyRequest(String thePolicyName) {
028                myPolicyName = thePolicyName;
029                myParameters = new HashMap<>();
030        }
031
032        public void addParameters(String theKey, String theValue) {
033                myParameters.put(theKey, theValue);
034        }
035
036        public Map<String, String> getParameters() {
037                return myParameters;
038        }
039
040        public String getPolicyName() {
041                return myPolicyName;
042        }
043}