View Javadoc
1   package ca.uhn.fhir.rest.server.exceptions;
2   
3   import org.hl7.fhir.instance.model.api.IBaseOperationOutcome;
4   
5   import ca.uhn.fhir.rest.api.Constants;
6   import ca.uhn.fhir.util.CoverageIgnore;
7   
8   /*
9    * #%L
10   * HAPI FHIR - Core Library
11   * %%
12   * Copyright (C) 2014 - 2018 University Health Network
13   * %%
14   * Licensed under the Apache License, Version 2.0 (the "License");
15   * you may not use this file except in compliance with the License.
16   * You may obtain a copy of the License at
17   * 
18   *      http://www.apache.org/licenses/LICENSE-2.0
19   * 
20   * Unless required by applicable law or agreed to in writing, software
21   * distributed under the License is distributed on an "AS IS" BASIS,
22   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23   * See the License for the specific language governing permissions and
24   * limitations under the License.
25   * #L%
26   */
27  
28  /**
29   * This Represents an <b>HTTP 301 Not Modified</b> response, which means the resource has not
30   * changed since the last version the client retrieved. This exception should only be used
31   * as a part of the ETag workflow. 
32   * 
33   * <p>
34   * Note that a complete list of RESTful exceptions is available in the <a href="./package-summary.html">Package
35   * Summary</a>.
36   * </p>
37   */
38  @CoverageIgnore
39  public class NotModifiedException extends BaseServerResponseException {
40  
41  	public static final int STATUS_CODE = Constants.STATUS_HTTP_304_NOT_MODIFIED;
42  	private static final long serialVersionUID = 1L;
43  
44  	public NotModifiedException(String theMessage) {
45  		super(STATUS_CODE, theMessage);
46  	}
47  
48  	/**
49  	 * Constructor
50  	 * 
51  	 * @param theMessage
52  	 *            The message
53  	 * @param theOperationOutcome
54  	 *            The OperationOutcome resource to return to the client
55  	 */
56  	public NotModifiedException(String theMessage, IBaseOperationOutcome theOperationOutcome) {
57  		super(STATUS_CODE, theMessage, theOperationOutcome);
58  	}
59  
60  }