001package ca.uhn.fhir.rest.server.interceptor.auth;
002
003import org.hl7.fhir.instance.model.api.IIdType;
004
005/*
006 * #%L
007 * HAPI FHIR - Core Library
008 * %%
009 * Copyright (C) 2014 - 2017 University Health Network
010 * %%
011 * Licensed under the Apache License, Version 2.0 (the "License");
012 * you may not use this file except in compliance with the License.
013 * You may obtain a copy of the License at
014 * 
015 *      http://www.apache.org/licenses/LICENSE-2.0
016 * 
017 * Unless required by applicable law or agreed to in writing, software
018 * distributed under the License is distributed on an "AS IS" BASIS,
019 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
020 * See the License for the specific language governing permissions and
021 * limitations under the License.
022 * #L%
023 */
024
025public interface IAuthRuleBuilderRuleOp extends IAuthRuleBuilderAppliesTo<IAuthRuleBuilderRuleOpClassifier> {
026
027        /**
028         * Rule applies to the resource with the given ID (e.g. <code>Patient/123</code>)
029         * <p>
030         * See the following examples which show how theId is interpreted:
031         * </p>
032         * <ul>
033         * <li><b><code>http://example.com/Patient/123</code></b> - Any Patient resource with the ID "123" will be matched (note: the base URL part is ignored)</li> 
034         * <li><b><code>Patient/123</code></b> - Any Patient resource with the ID "123" will be matched</li>
035         * <li><b><code>123</code></b> - Any resource of any type with the ID "123" will be matched</li>
036         * </ul>
037         * 
038         * @param theId The ID of the resource to apply  (e.g. <code>Patient/123</code>)
039         * @throws IllegalArgumentException If theId does not contain an ID with at least an ID part
040         * @throws NullPointerException If theId is null
041         */
042        IAuthRuleFinished instance(String theId);
043
044        /**
045         * Rule applies to the resource with the given ID (e.g. <code>Patient/123</code>)
046         * <p>
047         * See the following examples which show how theId is interpreted:
048         * </p>
049         * <ul>
050         * <li><b><code>http://example.com/Patient/123</code></b> - Any Patient resource with the ID "123" will be matched (note: the base URL part is ignored)</li> 
051         * <li><b><code>Patient/123</code></b> - Any Patient resource with the ID "123" will be matched</li>
052         * <li><b><code>123</code></b> - Any resource of any type with the ID "123" will be matched</li>
053         * </ul>
054         * 
055         * @param theId The ID of the resource to apply  (e.g. <code>Patient/123</code>)
056         * @throws IllegalArgumentException If theId does not contain an ID with at least an ID part
057         * @throws NullPointerException If theId is null
058         */
059        IAuthRuleFinished instance(IIdType theId);
060
061}