1 /*
 2  * Sleuth Kit Data Model
 3  *
 4  * Copyright 2011-2016 Basis Technology Corp.
 5  * Contact: carrier <at> sleuthkit <dot> org
 6  *
 7  * Licensed under the Apache License, Version 2.0 (the "License");
 8  * you may not use this file except in compliance with the License.
 9  * You may obtain a copy of the License at
 10  *
 11  * http://www.apache.org/licenses/LICENSE-2.0
 12  *
 13  * Unless required by applicable law or agreed to in writing, software
 14  * distributed under the License is distributed on an "AS IS" BASIS,
 15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 16  * See the License for the specific language governing permissions and
 17  * limitations under the License.
 18  */
 19  package org.sleuthkit.autopsy.casemodule.services;
 
 20 
 21 import java.io.Closeable;
 22 import java.io.IOException;
 23 import org.openide.util.Lookup;
 
 31 
 39 
 41  
 49  this.caseDb = casedb;
 50  }
 51 
 60  if (null == caseDb) {
 62  }
 64  if (null == searchService) {
 66  }
 67  try {
 69  } catch (TskCoreException ex) {
 71  }
 72  }
 73 
 87  if (null == caseDb) {
 89  }
 90  try {
 91  return caseDb.addBlackboardArtifactType(typeName, displayName);
 92  } catch (TskDataException typeExistsEx) {
 93  try {
 94  return caseDb.getArtifactType(typeName);
 95  } catch (TskCoreException ex) {
 97  }
 98  } catch (TskCoreException ex) {
 100  }
 101  }
 102 
 117  if (null == caseDb) {
 119  }
 120  try {
 121  return caseDb.addArtifactAttributeType(typeName, valueType, displayName);
 122  } catch (TskDataException typeExistsEx) {
 123  try {
 124  return caseDb.getAttributeType(typeName);
 125  } catch (TskCoreException ex) {
 127  }
 128  } catch (TskCoreException ex) {
 130  }
 131  }
 132 
 138  @Override
 139   public synchronized void close() throws IOException {
 
 140  caseDb = null;
 141  }
 142 
 143 
 148 
 150 
 157  super(message);
 158  }
 159 
 168  super(message, cause);
 169  }
 170  }
 171 }
void indexArtifact(BlackboardArtifact artifact)
synchronized BlackboardAttribute.Type getOrAddAttributeType(String typeName, BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE valueType, String displayName)
synchronized void close()
BlackboardException(String message)
static final long serialVersionUID
synchronized BlackboardArtifact.Type getOrAddArtifactType(String typeName, String displayName)
synchronized void indexArtifact(BlackboardArtifact artifact)
BlackboardException(String message, Throwable cause)