001package ca.cdr.api.fhirgw.model;
002
003import com.google.common.collect.ArrayListMultimap;
004import com.google.common.collect.Multimap;
005import com.google.common.collect.Multimaps;
006
007public class SearchPageRequest extends BaseRequest<SearchPageRequest> {
008        private String myRequestPath;
009        private Multimap<String, String> myParameters = EMPTY_STRING_MULTIMAP;
010
011        /**
012         * Constructor
013         */
014        public SearchPageRequest() {
015                // nothing
016        }
017
018        /**
019         * Copy constructor
020         */
021        public SearchPageRequest(SearchPageRequest theRequest) {
022                super(theRequest);
023                myRequestPath = theRequest.getRequestPath();
024                myParameters = ArrayListMultimap.create(theRequest.getRequestParameters());
025        }
026
027        public String getRequestPath() {
028                return myRequestPath;
029        }
030
031        public void setRequestPath(String theRequestPath) {
032                myRequestPath = theRequestPath;
033        }
034
035        public Multimap<String, String> getRequestParameters() {
036                return Multimaps.unmodifiableMultimap(myParameters);
037        }
038
039        public void addRequestParameter(String theName, String theValue) {
040                if (myParameters.isEmpty()) {
041                        myParameters = ArrayListMultimap.create();
042                }
043                myParameters.put(theName, theValue);
044        }
045}