Package org.sleuthkit.datamodel

Examples of org.sleuthkit.datamodel.TskCoreException


                }
            }
            try {
                return tagsManager.addTagName(displayName);
            } catch (TagsManager.TagNameAlreadyExistsException ex) {
                throw new TskCoreException("tagame exists but wasn't found", ex);
            }
        } catch (IllegalStateException ex) {
            Logger.getLogger(TagUtils.class.getName()).log(Level.SEVERE, "Case was closed out from underneath", ex);
            throw new TskCoreException("Case was closed out from underneath", ex);
        }
    }
View Full Code Here


            rs = statement.executeQuery("SELECT obj_id FROM drawable_files WHERE " + sqlWhereClause);
            while (rs.next()) {
                ret.add(rs.getLong(1));
            }
        } catch (SQLException e) {
            throw new TskCoreException("SQLException thrown when calling 'DrawableDB.findAllFileIdsWhere(): " + sqlWhereClause, e);
        } finally {
            if (rs != null) {
                try {
                    rs.close();
                } catch (SQLException ex) {
View Full Code Here

     * @return a list of AbstractFile for files/directories whose name matches
     *         the given fileName
     */
    public synchronized List<AbstractFile> findFiles(Content dataSource, String fileName) throws TskCoreException {
        if (tskCase == null) {
            throw new TskCoreException(NbBundle.getMessage(this.getClass(), "FileManager.findFiles.exception.msg"));
        }
        return tskCase.findFiles(dataSource, fileName);
    }
View Full Code Here

     * @return a list of AbstractFile for files/directories whose name matches
     *         fileName and whose parent directory contains dirName.
     */
    public synchronized List<AbstractFile> findFiles(Content dataSource, String fileName, String dirName) throws TskCoreException {
        if (tskCase == null) {
            throw new TskCoreException(NbBundle.getMessage(this.getClass(), "FileManager.findFiles2.exception.msg"));
        }
        return tskCase.findFiles(dataSource, fileName, dirName);
    }
View Full Code Here

     *         fileName and that were inside a directory described by
     *         parentFsContent.
     */
    public synchronized List<AbstractFile> findFiles(Content dataSource, String fileName, AbstractFile parentFile) throws TskCoreException {
        if (tskCase == null) {
            throw new TskCoreException(NbBundle.getMessage(this.getClass(), "FileManager.findFiles3.exception.msg"));
        }
        return findFiles(dataSource, fileName, parentFile.getName());
    }
View Full Code Here

     *
     * @return a list of AbstractFile that have the given file path.
     */
    public synchronized List<AbstractFile> openFiles(Content dataSource, String filePath) throws TskCoreException {
        if (tskCase == null) {
            throw new TskCoreException(NbBundle.getMessage(this.getClass(), "FileManager.openFiles.exception.msg"));
        }
        return tskCase.openFiles(dataSource, filePath);
    }
View Full Code Here

            long ctime, long crtime, long atime, long mtime,
            boolean isFile, AbstractFile parentFile,
            String rederiveDetails, String toolName, String toolVersion, String otherDetails) throws TskCoreException {

        if (tskCase == null) {
            throw new TskCoreException(NbBundle.getMessage(this.getClass(), "FileManager.addDerivedFile.exception.msg"));
        }

        return tskCase.addDerivedFile(fileName, localPath, size,
                ctime, crtime, atime, mtime,
                isFile, parentFile, rederiveDetails, toolName, toolVersion, otherDetails);
View Full Code Here

     */
    public synchronized LayoutFile addCarvedFile(String carvedFileName, long carvedFileSize,
            long systemId, List<TskFileRange> sectors) throws TskCoreException {

        if (tskCase == null) {
            throw new TskCoreException(NbBundle.getMessage(this.getClass(), "FileManager.addCarvedFile.exception.msg"));
        }

        return tskCase.addCarvedFile(carvedFileName, carvedFileSize, systemId, sectors);
    }
View Full Code Here

     * @return List<LayoutFile> This is a list of the files added to the database
     * @throws org.sleuthkit.datamodel.TskCoreException
     */
    public List<LayoutFile> addCarvedFiles(List<CarvedFileContainer> filesToAdd) throws TskCoreException {
     if (tskCase == null) {
         throw new TskCoreException(NbBundle.getMessage(this.getClass(), "FileManager.addCarvedFile.exception.msg"));
     }
     else {
         return tskCase.addCarvedFiles(filesToAdd);
     }
    }
View Full Code Here

            if (!localFile.exists() || !localFile.canRead()) {
                String msg = NbBundle
                        .getMessage(this.getClass(), "FileManager.addLocalFilesDirs.exception.notReadable.msg",
                                    localFile.getAbsolutePath());
                logger.log(Level.SEVERE, msg);
                throw new TskCoreException(msg);
            }
            rootsToAdd.add(localFile);
        }

        CaseDbTransaction trans = tskCase.beginTransaction();
        // make a virtual top-level directory for this set of files/dirs
        final VirtualDirectory fileSetRootDir = addLocalFileSetRootDir(trans);

        try {
            // recursively add each item in the set
            for (java.io.File localRootToAdd : rootsToAdd) {
                AbstractFile localFileAdded = addLocalDirInt(trans, fileSetRootDir, localRootToAdd, addProgressUpdater);

                if (localFileAdded == null) {
                    String msg = NbBundle
                            .getMessage(this.getClass(), "FileManager.addLocalFilesDirs.exception.cantAdd.msg",
                                        localRootToAdd.getAbsolutePath());
                    logger.log(Level.SEVERE, msg);
                    throw new TskCoreException(msg);
                } else {
                    //added.add(localFileAdded);
                    //send new content event
                    //for now reusing ingest events, in future this will be replaced by datamodel / observer sending out events
                    // @@@ Is this the right place for this? A directory tree refresh will be triggered, so this may be creating a race condition
View Full Code Here

TOP

Related Classes of org.sleuthkit.datamodel.TskCoreException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.