001package ca.uhn.fhir.rest.server.exceptions;
002
003import org.hl7.fhir.instance.model.api.IBaseOperationOutcome;
004
005import ca.uhn.fhir.rest.api.Constants;
006import ca.uhn.fhir.util.CoverageIgnore;
007
008/*
009 * #%L
010 * HAPI FHIR - Core Library
011 * %%
012 * Copyright (C) 2014 - 2022 Smile CDR, Inc.
013 * %%
014 * Licensed under the Apache License, Version 2.0 (the "License");
015 * you may not use this file except in compliance with the License.
016 * You may obtain a copy of the License at
017 *
018 *      http://www.apache.org/licenses/LICENSE-2.0
019 *
020 * Unless required by applicable law or agreed to in writing, software
021 * distributed under the License is distributed on an "AS IS" BASIS,
022 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
023 * See the License for the specific language governing permissions and
024 * limitations under the License.
025 * #L%
026 */
027
028/**
029 * This Represents an <b>HTTP 301 Not Modified</b> response, which means the resource has not
030 * changed since the last version the client retrieved. This exception should only be used
031 * as a part of the ETag workflow. 
032 * 
033 * <p>
034 * Note that a complete list of RESTful exceptions is available in the <a href="./package-summary.html">Package
035 * Summary</a>.
036 * </p>
037 */
038@CoverageIgnore
039public class NotModifiedException extends BaseServerResponseException {
040
041        public static final int STATUS_CODE = Constants.STATUS_HTTP_304_NOT_MODIFIED;
042        private static final long serialVersionUID = 1L;
043
044        public NotModifiedException(String theMessage) {
045                super(STATUS_CODE, theMessage);
046        }
047
048        /**
049         * Constructor
050         * 
051         * @param theMessage
052         *            The message
053         * @param theOperationOutcome
054         *            The OperationOutcome resource to return to the client
055         */
056        public NotModifiedException(String theMessage, IBaseOperationOutcome theOperationOutcome) {
057                super(STATUS_CODE, theMessage, theOperationOutcome);
058        }
059
060}