Package ghidra.framework.data
Class DBWithUserDataContentHandler<T extends DomainObjectAdapterDB>
java.lang.Object
ghidra.framework.data.DBContentHandler<T>
ghidra.framework.data.DBWithUserDataContentHandler<T>
- Type Parameters:
T
-DomainObjectAdapterDB
implementation class
- All Implemented Interfaces:
ContentHandler<T>
,ExtensionPoint
- Direct Known Subclasses:
ProgramContentHandler
public abstract class DBWithUserDataContentHandler<T extends DomainObjectAdapterDB>
extends DBContentHandler<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 final DBHandle
openAssociatedUserFile
(String associatedFileID, String associatedContentType, FileSystem userfs, TaskMonitor monitor) Open user data file associatedDbhfinal void
removeUserDataFile
(FolderItem associatedItem, FileSystem userFilesystem) Remove user data file associated with an existing folder item.final void
saveUserDataFile
(DomainObject associatedDomainObj, DBHandle userDbh, FileSystem userfs, TaskMonitor monitor) Create user data file associated with existing content.Methods inherited from class ghidra.framework.data.DBContentHandler
abortCreate, createFile
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
-
DBWithUserDataContentHandler
public DBWithUserDataContentHandler()
-
-
Method Details
-
saveUserDataFile
public final void saveUserDataFile(DomainObject associatedDomainObj, DBHandle userDbh, FileSystem userfs, TaskMonitor monitor) throws CancelledException, IOException Create user data file associated with existing content. This facilitates the lazy creation of the user data file.- Parameters:
associatedDomainObj
- associated domain object corresponding to this content handleruserDbh
- user data handleuserfs
- private user data filesystemmonitor
- task monitor- Throws:
IOException
- if an IO or access error occursCancelledException
- if operation is cancelled by user
-
removeUserDataFile
public final void removeUserDataFile(FolderItem associatedItem, FileSystem userFilesystem) throws IOException Remove user data file associated with an existing folder item.- Parameters:
associatedItem
- associated folder itemuserFilesystem
- user data file system from which corresponding data should be removed.- Throws:
IOException
- if an access error occurs
-
openAssociatedUserFile
protected final DBHandle openAssociatedUserFile(String associatedFileID, String associatedContentType, FileSystem userfs, TaskMonitor monitor) throws IOException, CancelledException Open user data file associatedDbh- Parameters:
associatedFileID
-associatedContentType
-userfs
-monitor
-- Returns:
- user data file database handle
- Throws:
IOException
CancelledException
-