001package ca.uhn.fhir.rest.server.audit;
002
003/*
004 * #%L
005 * HAPI FHIR - Core Library
006 * %%
007 * Copyright (C) 2014 - 2016 University Health Network
008 * %%
009 * Licensed under the Apache License, Version 2.0 (the "License");
010 * you may not use this file except in compliance with the License.
011 * You may obtain a copy of the License at
012 * 
013 *      http://www.apache.org/licenses/LICENSE-2.0
014 * 
015 * Unless required by applicable law or agreed to in writing, software
016 * distributed under the License is distributed on an "AS IS" BASIS,
017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
018 * See the License for the specific language governing permissions and
019 * limitations under the License.
020 * #L%
021 */
022
023import java.util.Map;
024
025import ca.uhn.fhir.model.api.IResource;
026import ca.uhn.fhir.model.base.composite.BaseCodingDt;
027import ca.uhn.fhir.model.base.composite.BaseIdentifierDt;
028import ca.uhn.fhir.model.dstu.valueset.SecurityEventObjectTypeEnum;
029
030
031public interface IResourceAuditor<T extends IResource> {
032        
033        /**
034         * @return the resource to be audited
035         */
036        public T getResource();
037        
038        /**
039         * @param resource the resource to be audited by this auditor
040         */
041        public void setResource(T resource);
042        
043        /**
044         * @return true if this resource is to be audited, false otherwise
045         */
046        public boolean isAuditable();
047        
048        /**
049         * An instance-specific descriptor of the Participant Object ID audited, such as a person's name
050         * @return the descriptive name of the resource object
051         */
052        public String getName();
053        
054        /**
055         * @return the identifier of the resource to be audited
056         */
057        public BaseIdentifierDt getIdentifier();
058        
059        /**
060         * @return the SecurityEventObjectTypeEnum of this resource
061         */
062        public SecurityEventObjectTypeEnum getType();   
063        
064        /**
065         * @return a text description of the resource
066         */
067        public String getDescription();
068        
069        /**
070         * @return a map of additional details to be audited
071         */
072        public Map<String, String> getDetail();
073        
074        /**
075         * Denotes policy-defined sensitivity for the Participant Object ID such as VIP, HIV status, mental health status or similar topics
076         * @return the sensitivity of this resource
077         */
078        public BaseCodingDt getSensitivity();
079        
080
081}