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
,LinkHandler
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
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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 objectcontentType
- the content typefs
- the domain object file systempath
- the path of the new filename
- the name of the new filemonitor
- the monitor that allows the user to cancel- Returns:
- checkout ID for new file
- Throws:
InvalidNameException
- if the name contains invalid charactersCancelledException
- if the user cancels the operationIOException
- if an i/o error occurs
-
abortCreate
-