Package ghidra.framework.data

# Class DBContentHandler<T extends DomainObjectAdapterDB>

java.lang.Object
ghidra.framework.data.DBContentHandler<T>

Type Parameters:
  `T` - `DomainObjectAdapterDB` implementation class

All Implemented Interfaces:
  `ContentHandler<T>`, `ExtensionPoint`

Direct Known Subclasses:
  `DataTypeArchiveContentHandler`, `DBWithUserDataContentHandler`

public abstract class DBContentHandler<T extends DomainObjectAdapterDB> extends Object implements ContentHandler<T>
`DBContentHandler` provides an abstract ContentHandler for domain object content which is stored within a database file. This class provides helper methods for working with database files.

- ## Field Summary

  ### Fields inherited from interface ghidra.framework.data.ContentHandler

  `MISSING_CONTENT, UNKNOWN_CONTENT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DBContentHandler()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `abortCreate(FileSystem fs, String path, String name, long checkoutId)`
  `protected final long`
  `createFile(DomainObjectAdapterDB domainObj, String contentType, FileSystem fs, String path, String name, TaskMonitor monitor)`
  Create a new database file from an open database handle.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface ghidra.framework.data.ContentHandler

  `canResetDBSourceFile, createFile, getChangeSet, getContentType, getContentTypeDisplayString, getDefaultToolName, getDomainObject, getDomainObjectClass, getIcon, getImmutableObject, getLinkHandler, getMergeManager, getReadOnlyObject, isPrivateContentType, resetDBSourceFile`

- ## Constructor Details

  - ### DBContentHandler

    public DBContentHandler()

- ## Method Details

  - ### createFile

    protected final long createFile(DomainObjectAdapterDB domainObj, String contentType, FileSystem fs, String path, String name, TaskMonitor monitor) throws InvalidNameException, CancelledException, IOException
    Create a new database file from an open database handle. If fs is versioned, the resulting item is marked as checked-out within the versioned file-system. The specified domainObj will become associated with the newly created database.
    Parameters:
      `domainObj` - domain object
      `contentType` - the content type
      `fs` - the domain object file system
      `path` - the path of the new file
      `name` - the name of the new file
      `monitor` - the monitor that allows the user to cancel
    Returns:
      checkout ID for new file
    Throws:
      `InvalidNameException` - if the name contains invalid characters
      `CancelledException` - if the user cancels the operation
      `IOException` - if an i/o error occurs

  - ### abortCreate

    protected void abortCreate(FileSystem fs, String path, String name, long checkoutId)