Package ghidra.program.database
Class ProgramDB
- java.lang.Object
-
- ghidra.framework.data.DomainObjectAdapter
-
- ghidra.framework.data.DomainObjectAdapterDB
-
- ghidra.program.database.ProgramDB
-
- All Implemented Interfaces:
DBConstants,ErrorHandler,DataTypeManagerOwner,DomainObject,Undoable,UndoableDomainObject,DataTypeManagerDomainObject,Program,ChangeManager
public class ProgramDB extends DomainObjectAdapterDB implements Program, ChangeManager
Database implementation for Program.
-
-
Field Summary
Fields Modifier and Type Field Description static intADDED_VARIABLE_STORAGE_MANAGER_VERSIONstatic intANALYSIS_OPTIONS_MOVED_VERSIONKey version numbers which require special upgrade handlingstatic intAUTO_PARAMETERS_ADDED_VERSIONstatic intCOMPOUND_VARIABLE_STORAGE_ADDED_VERSIONstatic java.lang.StringCONTENT_TYPEstatic intEXTERNAL_FUNCTIONS_ADDED_VERSIONstatic intMETADATA_ADDED_VERSION-
Fields inherited from class ghidra.framework.data.DomainObjectAdapterDB
changeSet, dbh, NUM_UNDOS, options
-
Fields inherited from class ghidra.framework.data.DomainObjectAdapter
changed, changeSupportMap, DEFAULT_NAME, lock, metadata, name, temporary
-
Fields inherited from interface ghidra.program.util.ChangeManager
DOCR_ADDRESS_SET_PROPERTY_MAP_ADDED, DOCR_ADDRESS_SET_PROPERTY_MAP_CHANGED, DOCR_ADDRESS_SET_PROPERTY_MAP_REMOVED, DOCR_BOOKMARK_ADDED, DOCR_BOOKMARK_CHANGED, DOCR_BOOKMARK_REMOVED, DOCR_BOOKMARK_TYPE_ADDED, DOCR_BOOKMARK_TYPE_REMOVED, DOCR_CATEGORY_ADDED, DOCR_CATEGORY_MOVED, DOCR_CATEGORY_REMOVED, DOCR_CATEGORY_RENAMED, DOCR_CODE_ADDED, DOCR_CODE_MOVED, DOCR_CODE_REMOVED, DOCR_CODE_REPLACED, DOCR_CODE_UNIT_PROPERTY_ALL_REMOVED, DOCR_CODE_UNIT_PROPERTY_CHANGED, DOCR_CODE_UNIT_PROPERTY_RANGE_REMOVED, DOCR_CODE_UNIT_USER_DATA_CHANGED, DOCR_COMPOSITE_ADDED, DOCR_COMPOSITE_REMOVED, DOCR_CUSTOM_FORMAT_ADDED, DOCR_CUSTOM_FORMAT_REMOVED, DOCR_DATA_TYPE_ADDED, DOCR_DATA_TYPE_CHANGED, DOCR_DATA_TYPE_MOVED, DOCR_DATA_TYPE_REMOVED, DOCR_DATA_TYPE_RENAMED, DOCR_DATA_TYPE_REPLACED, DOCR_DATA_TYPE_SETTING_CHANGED, DOCR_DOCUMENT_CHANGED, DOCR_EOL_COMMENT_CHANGED, DOCR_EQUATE_ADDED, DOCR_EQUATE_REFERENCE_ADDED, DOCR_EQUATE_REFERENCE_REMOVED, DOCR_EQUATE_REMOVED, DOCR_EQUATE_RENAMED, DOCR_EXTERNAL_ENTRY_POINT_ADDED, DOCR_EXTERNAL_ENTRY_POINT_REMOVED, DOCR_EXTERNAL_NAME_ADDED, DOCR_EXTERNAL_NAME_CHANGED, DOCR_EXTERNAL_NAME_REMOVED, DOCR_EXTERNAL_PATH_CHANGED, DOCR_EXTERNAL_REFERENCE_ADDED, DOCR_EXTERNAL_REFERENCE_REMOVED, DOCR_FALLTHROUGH_CHANGED, DOCR_FLOWOVERRIDE_CHANGED, DOCR_FRAGMENT_MOVED, DOCR_FUNCTION_ADDED, DOCR_FUNCTION_BODY_CHANGED, DOCR_FUNCTION_CHANGED, DOCR_FUNCTION_REMOVED, DOCR_FUNCTION_TAG_CHANGED, DOCR_FUNCTION_TAG_CREATED, DOCR_FUNCTION_TAG_DELETED, DOCR_GROUP_ADDED, DOCR_GROUP_ALIAS_CHANGED, DOCR_GROUP_COMMENT_CHANGED, DOCR_GROUP_REMOVED, DOCR_GROUP_RENAMED, DOCR_GROUP_REPARENTED, DOCR_IMAGE_BASE_CHANGED, DOCR_INT_ADDRESS_SET_PROPERTY_MAP_ADDED, DOCR_INT_ADDRESS_SET_PROPERTY_MAP_CHANGED, DOCR_INT_ADDRESS_SET_PROPERTY_MAP_REMOVED, DOCR_LANGUAGE_CHANGED, DOCR_MEM_REF_PRIMARY_REMOVED, DOCR_MEM_REF_PRIMARY_SET, DOCR_MEM_REF_TYPE_CHANGED, DOCR_MEM_REFERENCE_ADDED, DOCR_MEM_REFERENCE_REMOVED, DOCR_MEMORY_BLOCK_ADDED, DOCR_MEMORY_BLOCK_CHANGED, DOCR_MEMORY_BLOCK_MOVED, DOCR_MEMORY_BLOCK_REMOVED, DOCR_MEMORY_BLOCK_SPLIT, DOCR_MEMORY_BLOCKS_JOINED, DOCR_MEMORY_BYTES_CHANGED, DOCR_MODULE_REORDERED, DOCR_OBJECT_CREATED, DOCR_PLATE_COMMENT_CHANGED, DOCR_POST_COMMENT_CHANGED, DOCR_PRE_COMMENT_CHANGED, DOCR_REGISTER_VALUES_CHANGED, DOCR_REPEATABLE_COMMENT_ADDED, DOCR_REPEATABLE_COMMENT_CHANGED, DOCR_REPEATABLE_COMMENT_CREATED, DOCR_REPEATABLE_COMMENT_DELETED, DOCR_REPEATABLE_COMMENT_REMOVED, DOCR_SOURCE_ARCHIVE_ADDED, DOCR_SOURCE_ARCHIVE_CHANGED, DOCR_SYMBOL_ADDED, DOCR_SYMBOL_ADDRESS_CHANGED, DOCR_SYMBOL_ANCHORED_FLAG_CHANGED, DOCR_SYMBOL_ASSOCIATION_ADDED, DOCR_SYMBOL_ASSOCIATION_REMOVED, DOCR_SYMBOL_DATA_CHANGED, DOCR_SYMBOL_REMOVED, DOCR_SYMBOL_RENAMED, DOCR_SYMBOL_SCOPE_CHANGED, DOCR_SYMBOL_SET_AS_PRIMARY, DOCR_SYMBOL_SOURCE_CHANGED, DOCR_TAG_ADDED_TO_FUNCTION, DOCR_TAG_REMOVED_FROM_FUNCTION, DOCR_TREE_CREATED, DOCR_TREE_REMOVED, DOCR_TREE_RENAMED, DOCR_TREE_RESTORED, DOCR_USER_DATA_CHANGED, DOCR_VARIABLE_REFERENCE_ADDED, DOCR_VARIABLE_REFERENCE_REMOVED, FUNCTION_CHANGED_CALL_FIXUP, FUNCTION_CHANGED_INLINE, FUNCTION_CHANGED_NORETURN, FUNCTION_CHANGED_PARAMETERS, FUNCTION_CHANGED_PURGE, FUNCTION_CHANGED_RETURN, FUNCTION_CHANGED_THUNK
-
Fields inherited from interface db.DBConstants
CREATE, READ_ONLY, UPDATE, UPGRADE
-
Fields inherited from interface ghidra.framework.model.DomainObject
DO_DOMAIN_FILE_CHANGED, DO_OBJECT_CLOSED, DO_OBJECT_ERROR, DO_OBJECT_RENAMED, DO_OBJECT_RESTORED, DO_OBJECT_SAVED, DO_PROPERTY_CHANGED, undoLock
-
Fields inherited from interface ghidra.program.model.listing.Program
ANALYSIS_PROPERTIES, ANALYSIS_START_DATE, ANALYSIS_START_DATE_FORMAT, ANALYZED, CREATED_WITH_GHIDRA_VERSION, DATE_CREATED, DISASSEMBLER_PROPERTIES, JANUARY_1_1970, MAX_OPERANDS, PROGRAM_INFO, PROGRAM_SETTINGS
-
-
Constructor Summary
Constructors Constructor Description ProgramDB(DBHandle dbh, int openMode, TaskMonitor monitor, java.lang.Object consumer)Constructs a new ProgramDBProgramDB(java.lang.String name, Language language, CompilerSpec compilerSpec, java.lang.Object consumer)Constructs a new ProgramDB
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AddressSpaceaddOverlaySpace(java.lang.String overlaySpaceName, AddressSpace templateSpace, long minOffset, long maxOffset)Creates a new OverlayAddressSpace with the given name and base AddressSpacevoidcategoryAdded(long categoryID, int type, java.lang.Object oldValue, java.lang.Object newValue)Notification that a category was added.voidcategoryChanged(long categoryID, int type, java.lang.Object oldValue, java.lang.Object newValue)Notification that a category was changed.protected voidclearCache(boolean all)protected voidclose()AddressSetPropertyMapcreateAddressSetPropertyMap(java.lang.String mapName)Create a new AddressSetPropertyMap with the specified name.IntRangeMapDBcreateIntRangeMap(java.lang.String mapName)Create a new IntRangeMap with the specified name.voiddataTypeAdded(long dataTypeID, int type, java.lang.Object oldValue, java.lang.Object newValue)Notification that a datatype was added.voiddataTypeChanged(long dataTypeID, int type, java.lang.Object oldValue, java.lang.Object newValue)notification the a datatype has changedvoiddeleteAddressRange(Address startAddr, Address endAddr, TaskMonitor monitor)Deletes given range from the program.voiddeleteAddressSetPropertyMap(java.lang.String mapName)Remove the property map from the program.voiddeleteIntRangeMap(java.lang.String mapName)Remove the property map from the program.voidflushWriteCache()Flush any pending database changes.voidforceLock(boolean rollback, java.lang.String reason)Cancels any previous lock and aquires it.AddressFactorygetAddressFactory()Returns the AddressFactory for this program.AddressMapgetAddressMap()Returns this programs address map.AddressSetPropertyMapgetAddressSetPropertyMap(java.lang.String mapName)Get the property map with the given name.protected FileSystemgetAssociatedUserFilesystem()Returns the hidden user-filesystem associated with this objects domain file, or null if unknown.BookmarkManagergetBookmarkManager()Get the bookmark manager.java.util.HashSet<java.lang.Long>getChangedFunctionTagIDs()ProgramChangeSetgetChanges()Get the program changes since the last save as a set of addresses.CodeManagergetCodeManager()Returns the CodeManagerjava.lang.StringgetCompiler()Gets the name of the compiler believed to have been used to create this program.CompilerSpecgetCompilerSpec()Returns the CompilerSpec currently used by this program.java.util.DategetCreationDate()Returns the creation date of this program.ProgramDataTypeManagergetDataTypeManager()Returns the program's datatype manager.intgetDefaultPointerSize()Gets the default pointer size in bytes as it may be stored within the program listing.java.lang.StringgetDescription()Returns a word or short phrase that best describes or categorizes the object in terms that a user will understand.EquateTablegetEquateTable()Get the equate table object.java.lang.StringgetExecutableFormat()Returns a value corresponding to the original file format.java.lang.StringgetExecutableMD5()Returns a value corresponding to the original binary file MD5 hash.java.lang.StringgetExecutablePath()Gets the path to the program's executable file.java.lang.StringgetExecutableSHA256()Returns a value corresponding to the original binary file SHA256 hash.ExternalManagergetExternalManager()Returns the external manager.FunctionManagergetFunctionManager()Returns the FunctionManagerNamespacegetGlobalNamespace()Returns the global namespace for this programAddressgetImageBase()Returns the current program image base address;IntRangeMapgetIntRangeMap(java.lang.String mapName)Get the property map with the given name.LanguagegetLanguage()Returns the language used by this program.LanguageIDgetLanguageID()Return the name of the language used by this program.ListinggetListing()Get the listing object.AddressgetMaxAddress()Get the programs maximum address.MemorygetMemory()Get the memory object.java.util.Map<java.lang.String,java.lang.String>getMetadata()Returns a map containing all the stored metadata associated with this domain object.AddressgetMinAddress()get the program's minimum address.NamespaceManagergetNamespaceManager()returns the namespace managerProgramContextgetProgramContext()Returns the program context.ProgramUserDatagetProgramUserData()Returns the user-specific data manager for this program.ReferenceManagergetReferenceManager()Get the reference manager.RegistergetRegister(Address addr)Returns the largest register located at the specified addressRegistergetRegister(Address addr, int size)Returns a specific register based upon its address and sizeRegistergetRegister(Varnode varnode)Returns the register which corresponds to the specified varnodeRegistergetRegister(java.lang.String regName)Returns the register with the given name;Register[]getRegisters(Address addr)Returns all registers located at the specified addressRelocationTablegetRelocationTable()Gets the relocation table.intgetStoredVersion()SymbolTablegetSymbolTable()Get the symbol table object.TreeManagergetTreeManager()Returns the TreeManagerlonggetUniqueProgramID()Returns an ID that is unique for this program.protected DomainObjectAdapterDBgetUserData()Returns the user data object or null if not supported by this domain object.PropertyMapManagergetUsrPropertyManager()Get the user propertyMangager stored with this program.voidinvalidate()Invalidates any caching in a program.voidinvalidateWriteCache()Invalidate (i.e., clear) any pending database changes not yet written.booleanisChangeable()Returns true if changes are permitted.booleanlock(java.lang.String reason)Attempt to obtain a modification lock on the domain object.voidmoveAddressRange(Address fromAddr, Address toAddr, long length, TaskMonitor monitor)Moves all information stored in the given range to the new location.Address[]parseAddress(java.lang.String addrStr)Return an array of Addresses that could represent the given string.Address[]parseAddress(java.lang.String addrStr, boolean caseSensitive)Return an array of Addresses that could represent the given string.voidprogramTreeAdded(long id, int type, java.lang.Object oldValue, java.lang.Object newValue)Notification that a program tree was added.voidprogramTreeChanged(long id, int type, java.lang.Object affectedObj, java.lang.Object oldValue, java.lang.Object newValue)Notification that a program tree was changed.booleanremoveOverlaySpace(AddressSpace overlaySpace)voidrenameOverlaySpace(java.lang.String oldName, java.lang.String newName)voidrestoreImageBase()Restores the last committed image base.protected voidsetChanged(boolean b)voidsetChanged(int type, Address start, Address end, java.lang.Object oldValue, java.lang.Object newValue)Mark the state this Program as having changed and generate the event.voidsetChanged(int type, java.lang.Object oldValue, java.lang.Object newValue)Mark the state this Program as having changed and generate the event.voidsetCompiler(java.lang.String compiler)Sets the name of the compiler which created this program.protected voidsetDomainFile(DomainFile df)voidsetExecutableFormat(java.lang.String format)Sets the value corresponding to the original file format.voidsetExecutableMD5(java.lang.String md5)Sets the value corresponding to the original binary file MD5 hash.voidsetExecutablePath(java.lang.String path)Sets the path to the program's executable file.voidsetExecutableSHA256(java.lang.String sha256)Sets the value corresponding to the original binary file SHA256 hash.voidsetImageBase(Address base, boolean commit)Sets the program's image base address.voidsetLanguage(Language newLanguage, CompilerSpecID newCompilerSpecID, boolean forceRedisassembly, TaskMonitor monitor)Sets the language for the program.voidsetLanguage(LanguageTranslator translator, CompilerSpecID newCompilerSpecID, boolean forceRedisassembly, TaskMonitor monitor)Translate languagevoidsetName(java.lang.String newName)Set the name for this domain object.voidsetObjChanged(int type, int subType, Address addr, java.lang.Object affectedObj, java.lang.Object oldValue, java.lang.Object newValue)Mark the state of a Program as having changed and generate the event.voidsetObjChanged(int type, int subType, java.lang.Object affectedObj, java.lang.Object oldValue, java.lang.Object newValue)Mark the state of a Program as having changed and generate the event.voidsetObjChanged(int type, Address addr, java.lang.Object affectedObj, java.lang.Object oldValue, java.lang.Object newValue)Mark the state of a Program as having changed and generate the event.voidsetObjChanged(int type, AddressSetView addrSet, java.lang.Object affectedObj, java.lang.Object oldValue, java.lang.Object newValue)Mark the state of a Program as having changed and generate the event.voidsetObjChanged(int type, java.lang.Object affectedObj, java.lang.Object oldValue, java.lang.Object newValue)Mark the state of a Program as having changed and generate the event.voidsetPropertyChanged(java.lang.String propertyName, Address codeUnitAddr, java.lang.Object oldValue, java.lang.Object newValue)Mark the state of a Program as having changed and generate the DOCR_CODE_UNIT_PROPERTY_CHANGED event.voidsetPropertyRangeRemoved(java.lang.String propertyName, Address start, Address end)Mark the state of a Program as having changed and generate the DOCR_CODE_UNIT_PROPERTY_RANGE_REMOVED event.voidsetRegisterValuesChanged(Register register, Address start, Address end)Notifies that register values have changed over the indicated address range.voidsourceArchiveAdded(UniversalID sourceArchiveID, int type)voidsourceArchiveChanged(UniversalID sourceArchiveID, int type)voidsymbolAdded(Symbol symbol, int type, Address addr, java.lang.Object oldValue, java.lang.Object newValue)Notification that a symbol was added.voidsymbolChanged(Symbol symbol, int type, Address addr, java.lang.Object affectedObj, java.lang.Object oldValue, java.lang.Object newValue)Notification that a symbol was changed.voidtagChanged(FunctionTag tag, int type, java.lang.Object oldValue, java.lang.Object newValue)Notification that aFunctionTagwas changed.voidtagCreated(FunctionTag tag, int type)Notification that a newFunctionTagwas created.voidunlock()Release a modification lock previously granted with the lock method.protected voidupdateMetadata()This method is called before a save, saveAs, or saveToPackedFile to update common meta dataprotected voiduserDataChanged(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)Notification of property change-
Methods inherited from class ghidra.framework.data.DomainObjectAdapterDB
addSynchronizedDomainObject, addTransactionListener, canLock, canRedo, canSave, canUndo, clearUndo, clearUndo, dbError, endTransaction, getChangeSet, getCurrentTransaction, getDBHandle, getOptions, getOptionsNames, getRedoName, getSynchronizedDomainObjects, getUndoName, getUndoStackDepth, hasTerminatedTransaction, isChanged, isClosed, isLocked, loadMetadata, performPropertyListAlterations, propertyChanged, redo, releaseSynchronizedDomainObject, removeTransactionListener, save, saveMetadata, saveToPackedFile, startTransaction, startTransaction, undo
-
Methods inherited from class ghidra.framework.data.DomainObjectAdapter
addCloseListener, addConsumer, addListener, checkExclusiveAccess, createPrivateEventQueue, fatalErrorOccurred, fireEvent, flushEvents, flushPrivateEventQueue, getChangeStatus, getConsumerList, getContentHandler, getDomainFile, getLock, getModificationNumber, getName, hasExclusiveAccess, isSendingEvents, isTemporary, isUsedBy, release, removeCloseListener, removeListener, removePrivateEventQueue, setDefaultContentClass, setEventsEnabled, setTemporary, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ghidra.framework.model.DomainObject
addCloseListener, addConsumer, addListener, canLock, canSave, createPrivateEventQueue, flushEvents, flushPrivateEventQueue, getConsumerList, getDomainFile, getModificationNumber, getName, getOptions, getOptionsNames, hasExclusiveAccess, isChanged, isClosed, isLocked, isSendingEvents, isTemporary, isUsedBy, release, removeCloseListener, removeListener, removePrivateEventQueue, save, saveToPackedFile, setEventsEnabled, setTemporary
-
Methods inherited from interface ghidra.framework.model.Undoable
addTransactionListener, canRedo, canUndo, clearUndo, getRedoName, getUndoName, redo, removeTransactionListener, undo
-
Methods inherited from interface ghidra.framework.model.UndoableDomainObject
addSynchronizedDomainObject, endTransaction, getCurrentTransaction, getSynchronizedDomainObjects, hasTerminatedTransaction, releaseSynchronizedDomainObject, startTransaction, startTransaction
-
-
-
-
Field Detail
-
CONTENT_TYPE
public static final java.lang.String CONTENT_TYPE
- See Also:
- Constant Field Values
-
ANALYSIS_OPTIONS_MOVED_VERSION
public static final int ANALYSIS_OPTIONS_MOVED_VERSION
Key version numbers which require special upgrade handling- See Also:
- Constant Field Values
-
ADDED_VARIABLE_STORAGE_MANAGER_VERSION
public static final int ADDED_VARIABLE_STORAGE_MANAGER_VERSION
- See Also:
- Constant Field Values
-
METADATA_ADDED_VERSION
public static final int METADATA_ADDED_VERSION
- See Also:
- Constant Field Values
-
EXTERNAL_FUNCTIONS_ADDED_VERSION
public static final int EXTERNAL_FUNCTIONS_ADDED_VERSION
- See Also:
- Constant Field Values
-
COMPOUND_VARIABLE_STORAGE_ADDED_VERSION
public static final int COMPOUND_VARIABLE_STORAGE_ADDED_VERSION
- See Also:
- Constant Field Values
-
AUTO_PARAMETERS_ADDED_VERSION
public static final int AUTO_PARAMETERS_ADDED_VERSION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ProgramDB
public ProgramDB(java.lang.String name, Language language, CompilerSpec compilerSpec, java.lang.Object consumer) throws java.io.IOExceptionConstructs a new ProgramDB- Parameters:
name- the name of the programlanguageSuperFacade- the Language used by this programconsumer- the object that is using this program.- Throws:
java.io.IOException- if there is an error accessing the database.
-
ProgramDB
public ProgramDB(DBHandle dbh, int openMode, TaskMonitor monitor, java.lang.Object consumer) throws java.io.IOException, VersionException, LanguageNotFoundException, CancelledException
Constructs a new ProgramDB- Parameters:
dbh- a handle to an open program database.userDbh- a handle to the associated user dataservice- the LanguageService that will provide that language object once the name of the language is retrieved from the database.openMode- one of: READ_ONLY: the original database will not be modified UPDATE: the database can be written to. UPGRADE: the database is upgraded to the latest schema as it is opened.monitor- TaskMonitor that allows the open to be canceled.consumer- the object that keeping the program open.- Throws:
java.io.IOException- if an error accessing the database occurs.VersionException- if database version does not match implementation, UPGRADE may be possible.CancelledException- if instantiation is canceled by monitorLanguageNotFoundException
-
-
Method Detail
-
setDomainFile
protected void setDomainFile(DomainFile df)
- Overrides:
setDomainFilein classDomainObjectAdapter- See Also:
DomainObjectAdapter.setDomainFile(ghidra.framework.model.DomainFile)
-
getProgramUserData
public ProgramUserData getProgramUserData()
Description copied from interface:ProgramReturns the user-specific data manager for this program.- Specified by:
getProgramUserDatain interfaceProgram- See Also:
Program.getProgramUserData()
-
getAssociatedUserFilesystem
protected FileSystem getAssociatedUserFilesystem()
Description copied from class:DomainObjectAdapterReturns the hidden user-filesystem associated with this objects domain file, or null if unknown.- Overrides:
getAssociatedUserFilesystemin classDomainObjectAdapter- Returns:
- user data file system
-
getUserData
protected DomainObjectAdapterDB getUserData()
Description copied from class:DomainObjectAdapterDBReturns the user data object or null if not supported by this domain object.- Overrides:
getUserDatain classDomainObjectAdapterDB
-
getListing
public Listing getListing()
Description copied from interface:ProgramGet the listing object.- Specified by:
getListingin interfaceProgram- Returns:
- the Listing interface to the listing object.
- See Also:
Program.getListing()
-
getSymbolTable
public SymbolTable getSymbolTable()
Description copied from interface:ProgramGet the symbol table object.- Specified by:
getSymbolTablein interfaceProgram- Returns:
- the symbol table object.
- See Also:
Program.getSymbolTable()
-
getExternalManager
public ExternalManager getExternalManager()
Description copied from interface:ProgramReturns the external manager.- Specified by:
getExternalManagerin interfaceProgram- See Also:
Program.getExternalManager()
-
getEquateTable
public EquateTable getEquateTable()
Description copied from interface:ProgramGet the equate table object.- Specified by:
getEquateTablein interfaceProgram- Returns:
- the equate table.
- See Also:
Program.getEquateTable()
-
getMemory
public Memory getMemory()
Description copied from interface:ProgramGet the memory object.- Specified by:
getMemoryin interfaceProgram- Returns:
- the memory object.
- See Also:
Program.getMemory()
-
getNamespaceManager
public NamespaceManager getNamespaceManager()
returns the namespace manager
-
getReferenceManager
public ReferenceManager getReferenceManager()
Description copied from interface:ProgramGet the reference manager.- Specified by:
getReferenceManagerin interfaceProgram- See Also:
Program.getReferenceManager()
-
getCodeManager
public CodeManager getCodeManager()
Returns the CodeManager
-
getTreeManager
public TreeManager getTreeManager()
Returns the TreeManager
-
getDataTypeManager
public ProgramDataTypeManager getDataTypeManager()
Description copied from interface:ProgramReturns the program's datatype manager.- Specified by:
getDataTypeManagerin interfaceDataTypeManagerOwner- Specified by:
getDataTypeManagerin interfaceProgram- Returns:
- the data type manager.
- See Also:
Program.getDataTypeManager()
-
getFunctionManager
public FunctionManager getFunctionManager()
Returns the FunctionManager- Specified by:
getFunctionManagerin interfaceProgram
-
getBookmarkManager
public BookmarkManager getBookmarkManager()
Description copied from interface:ProgramGet the bookmark manager.- Specified by:
getBookmarkManagerin interfaceProgram- See Also:
Program.getBookmarkManager()
-
getRelocationTable
public RelocationTable getRelocationTable()
Description copied from interface:ProgramGets the relocation table.- Specified by:
getRelocationTablein interfaceProgram- See Also:
Program.getRelocationTable()
-
getCompiler
public java.lang.String getCompiler()
Description copied from interface:ProgramGets the name of the compiler believed to have been used to create this program. If the compiler hasn't been determined then "unknown" is returned.- Specified by:
getCompilerin interfaceProgram- Returns:
- name of the compiler or "unknown".
- See Also:
Program.getCompiler()
-
setCompiler
public void setCompiler(java.lang.String compiler)
Description copied from interface:ProgramSets the name of the compiler which created this program.- Specified by:
setCompilerin interfaceProgram- Parameters:
compiler- the name
-
getExecutablePath
public java.lang.String getExecutablePath()
Description copied from interface:ProgramGets the path to the program's executable file. For example,C:\Temp\test.exe. This will allow plugins to execute the program.- Specified by:
getExecutablePathin interfaceProgram- Returns:
- String path to program's exe file
- See Also:
Program.getExecutablePath()
-
setExecutablePath
public void setExecutablePath(java.lang.String path)
Description copied from interface:ProgramSets the path to the program's executable file. For example,C:\Temp\test.exe.- Specified by:
setExecutablePathin interfaceProgram- Parameters:
path- the path to the program's exe- See Also:
Program.setExecutablePath(java.lang.String)
-
getExecutableFormat
public java.lang.String getExecutableFormat()
Description copied from interface:ProgramReturns a value corresponding to the original file format.- Specified by:
getExecutableFormatin interfaceProgram- See Also:
Program.getExecutableFormat()
-
setExecutableFormat
public void setExecutableFormat(java.lang.String format)
Description copied from interface:ProgramSets the value corresponding to the original file format.- Specified by:
setExecutableFormatin interfaceProgram- Parameters:
format- the format string to set.- See Also:
Program.setExecutableFormat(java.lang.String)
-
getExecutableMD5
public java.lang.String getExecutableMD5()
Description copied from interface:ProgramReturns a value corresponding to the original binary file MD5 hash. May be null if program source did not correspond to a binary file.- Specified by:
getExecutableMD5in interfaceProgram- See Also:
Program.getExecutableMD5()
-
setExecutableMD5
public void setExecutableMD5(java.lang.String md5)
Description copied from interface:ProgramSets the value corresponding to the original binary file MD5 hash.- Specified by:
setExecutableMD5in interfaceProgram- Parameters:
md5- MD5 binary file hash- See Also:
Program.setExecutableMD5(java.lang.String)
-
getExecutableSHA256
public java.lang.String getExecutableSHA256()
Description copied from interface:ProgramReturns a value corresponding to the original binary file SHA256 hash. May be null if program source did not correspond to a binary file.- Specified by:
getExecutableSHA256in interfaceProgram- See Also:
Program.getExecutableSHA256()
-
setExecutableSHA256
public void setExecutableSHA256(java.lang.String sha256)
Description copied from interface:ProgramSets the value corresponding to the original binary file SHA256 hash.- Specified by:
setExecutableSHA256in interfaceProgram- Parameters:
sha256- SHA256 binary file hash- See Also:
Program.setExecutableSHA256(java.lang.String)
-
getCreationDate
public java.util.Date getCreationDate()
Description copied from interface:ProgramReturns the creation date of this program. If the program was created before this property existed, then Jan 1, 1970 is returned.- Specified by:
getCreationDatein interfaceProgram- Returns:
- the creation date of this program
- See Also:
Program.getCreationDate()
-
getDefaultPointerSize
public int getDefaultPointerSize()
Description copied from interface:ProgramGets the default pointer size in bytes as it may be stored within the program listing.- Specified by:
getDefaultPointerSizein interfaceProgram- Returns:
- default pointer size.
- See Also:
ghidra.program.model.listing.Program#getDefaultStoredPointerSize()
-
getLanguageID
public LanguageID getLanguageID()
Description copied from interface:ProgramReturn the name of the language used by this program.- Specified by:
getLanguageIDin interfaceProgram- Returns:
- the name of the language
- See Also:
Program.getLanguageID()
-
getLanguage
public Language getLanguage()
Description copied from interface:ProgramReturns the language used by this program.- Specified by:
getLanguagein interfaceProgram- Returns:
- the language used by this program.
- See Also:
Program.getLanguage()
-
getCompilerSpec
public CompilerSpec getCompilerSpec()
Description copied from interface:ProgramReturns the CompilerSpec currently used by this program.- Specified by:
getCompilerSpecin interfaceProgram- Returns:
- the compilerSpec currently used by this program.
- See Also:
Program.getCompilerSpec()
-
getUsrPropertyManager
public PropertyMapManager getUsrPropertyManager()
Description copied from interface:ProgramGet the user propertyMangager stored with this program. The user property manager is used to store arbitrary address indexed information associated with the program.- Specified by:
getUsrPropertyManagerin interfaceProgram- Returns:
- the user property manager.
- See Also:
Program.getUsrPropertyManager()
-
getProgramContext
public ProgramContext getProgramContext()
Description copied from interface:ProgramReturns the program context.- Specified by:
getProgramContextin interfaceProgram- See Also:
Program.getProgramContext()
-
getMinAddress
public Address getMinAddress()
Description copied from interface:Programget the program's minimum address.- Specified by:
getMinAddressin interfaceProgram- Returns:
- the program's minimum address or null if no memory blocks have been defined in the program.
- See Also:
Program.getMinAddress()
-
getMaxAddress
public Address getMaxAddress()
Description copied from interface:ProgramGet the programs maximum address.- Specified by:
getMaxAddressin interfaceProgram- Returns:
- the program's maximum address or null if no memory blocks have been defined in the program.
- See Also:
Program.getMaxAddress()
-
getChanges
public ProgramChangeSet getChanges()
Description copied from interface:ProgramGet the program changes since the last save as a set of addresses.- Specified by:
getChangesin interfaceProgram- Returns:
- set of changed addresses within program.
- See Also:
Program.getChanges()
-
getAddressFactory
public AddressFactory getAddressFactory()
Description copied from interface:ProgramReturns the AddressFactory for this program.- Specified by:
getAddressFactoryin interfaceProgram- See Also:
Program.getAddressFactory()
-
getAddressMap
public AddressMap getAddressMap()
Returns this programs address map. NOTE: This method has been dropped from the Program interface to help discourage the use of the program's address map since bad assumptions are frequently made about address keys which may not be ordered or sequential across an entire address space.- Specified by:
getAddressMapin interfaceProgram
-
parseAddress
public Address[] parseAddress(java.lang.String addrStr)
Description copied from interface:ProgramReturn an array of Addresses that could represent the given string.- Specified by:
parseAddressin interfaceProgram- Parameters:
addrStr- the string to parse.- Returns:
- zero length array if addrStr is properly formatted but no matching addresses were found or if the address is improperly formatted.
- See Also:
Program.parseAddress(java.lang.String)
-
parseAddress
public Address[] parseAddress(java.lang.String addrStr, boolean caseSensitive)
Description copied from interface:ProgramReturn an array of Addresses that could represent the given string.- Specified by:
parseAddressin interfaceProgram- Parameters:
addrStr- the string to parse.caseSensitive- whether or not to process any addressSpace names as case sensitive.- Returns:
- zero length array if addrStr is properly formatted but no matching addresses were found or if the address is improperly formatted.
-
dataTypeChanged
public void dataTypeChanged(long dataTypeID, int type, java.lang.Object oldValue, java.lang.Object newValue)notification the a datatype has changed- Parameters:
dataTypeID- the id of the datatype that changed.type- the type of the change (moved, renamed, etc.)oldValue- the old datatype.newValue- the new datatype.
-
dataTypeAdded
public void dataTypeAdded(long dataTypeID, int type, java.lang.Object oldValue, java.lang.Object newValue)Notification that a datatype was added.- Parameters:
dataTypeID- the id if the datatype that was added.type- should always be DATATYPE_ADDEDoldValue- always nullnewValue- the datatype added.
-
categoryChanged
public void categoryChanged(long categoryID, int type, java.lang.Object oldValue, java.lang.Object newValue)Notification that a category was changed.- Parameters:
categoryID- the id of the datatype that was added.type- the type of changedoldValue- old value depends on the type.newValue- new value depends on the type.
-
categoryAdded
public void categoryAdded(long categoryID, int type, java.lang.Object oldValue, java.lang.Object newValue)Notification that a category was added.- Parameters:
categoryID- the id of the datatype that was added.type- the type of changed (should always be CATEGORY_ADDED)oldValue- always nullnewValue- new value depends on the type.
-
sourceArchiveAdded
public void sourceArchiveAdded(UniversalID sourceArchiveID, int type)
-
sourceArchiveChanged
public void sourceArchiveChanged(UniversalID sourceArchiveID, int type)
-
programTreeAdded
public void programTreeAdded(long id, int type, java.lang.Object oldValue, java.lang.Object newValue)Notification that a program tree was added.- Parameters:
id- the id of the program tree that was added.type- the type of changedoldValue- old value is nullnewValue- new value depends the tree that was added.
-
programTreeChanged
public void programTreeChanged(long id, int type, java.lang.Object affectedObj, java.lang.Object oldValue, java.lang.Object newValue)Notification that a program tree was changed.- Parameters:
id- the id of the program tree that was changed.type- the type of changeoldValue- old value depends on the type of the changenewValue- old value depends on the type of the change
-
tagChanged
public void tagChanged(FunctionTag tag, int type, java.lang.Object oldValue, java.lang.Object newValue)
Notification that aFunctionTagwas changed. This can be either an edit or a delete.- Parameters:
tag- the tag that was changed.type- the type of changeoldValue- old valuenewValue- new value
-
tagCreated
public void tagCreated(FunctionTag tag, int type)
Notification that a newFunctionTagwas created.- Parameters:
tag- the tag that was created.type- the type of change
-
symbolChanged
public void symbolChanged(Symbol symbol, int type, Address addr, java.lang.Object affectedObj, java.lang.Object oldValue, java.lang.Object newValue)
Notification that a symbol was changed.- Parameters:
symbol- the symbol that was changed.type- the type of changeaddr- the address of the symbol that changedaffectedObj-oldValue- old value depends on the type of the changenewValue- old value depends on the type of the change
-
symbolAdded
public void symbolAdded(Symbol symbol, int type, Address addr, java.lang.Object oldValue, java.lang.Object newValue)
Notification that a symbol was added.- Parameters:
symbol- the symbol that was added.type- the type of changeaddr- the address of the symbol that addedoldValue- old value depends on the type of the changenewValue- old value depends on the type of the change
-
getChangedFunctionTagIDs
public java.util.HashSet<java.lang.Long> getChangedFunctionTagIDs()
-
setRegisterValuesChanged
public void setRegisterValuesChanged(Register register, Address start, Address end)
Description copied from interface:ChangeManagerNotifies that register values have changed over the indicated address range.- Specified by:
setRegisterValuesChangedin interfaceChangeManager- Parameters:
register- register value which was modified (a value of null indicates all registers affected or unknown)start- the start address for the range where values changedend- the end address (inclusive) for the range where values changed
-
setChanged
public void setChanged(int type, java.lang.Object oldValue, java.lang.Object newValue)Mark the state this Program as having changed and generate the event. Any or all parameters may be null.- Specified by:
setChangedin interfaceChangeManager- Parameters:
type- event typeoldValue- original valuenewValue- new value
-
setChanged
public void setChanged(int type, Address start, Address end, java.lang.Object oldValue, java.lang.Object newValue)Mark the state this Program as having changed and generate the event. Any or all parameters may be null.- Specified by:
setChangedin interfaceChangeManager- Parameters:
type- event typestart- starting address that is affected by the eventend- ending address that is affected by the eventoldValue- original valuenewValue- new value
-
setObjChanged
public void setObjChanged(int type, java.lang.Object affectedObj, java.lang.Object oldValue, java.lang.Object newValue)Mark the state of a Program as having changed and generate the event. Any or all parameters may be null. NOTE: ChangeSet data will not be updated since this a very generic change not related to a specific address.- Specified by:
setObjChangedin interfaceChangeManager- Parameters:
type- event typeaffectedObj- object that is the subject of the eventoldValue- original value or an Object that is related to the eventnewValue- new value or an Object that is related to the the event
-
setObjChanged
public void setObjChanged(int type, int subType, java.lang.Object affectedObj, java.lang.Object oldValue, java.lang.Object newValue)Mark the state of a Program as having changed and generate the event. Any or all parameters may be null. NOTE: ChangeSet data will not be updated since this a very generic change not related to a specific address.- Specified by:
setObjChangedin interfaceChangeManager- Parameters:
type- event typesubType- event sub-typeaffectedObj- object that is the subject of the eventoldValue- original value or an Object that is related to the eventnewValue- new value or an Object that is related to the the event
-
setObjChanged
public void setObjChanged(int type, Address addr, java.lang.Object affectedObj, java.lang.Object oldValue, java.lang.Object newValue)Mark the state of a Program as having changed and generate the event. Any or all parameters may be null.- Specified by:
setObjChangedin interfaceChangeManager- Parameters:
type- event typeaddr- program address affectedaffectedObj- object that is the subject of the eventoldValue- original value or an Object that is related to the eventnewValue- new value or an Object that is related to the the event
-
setObjChanged
public void setObjChanged(int type, int subType, Address addr, java.lang.Object affectedObj, java.lang.Object oldValue, java.lang.Object newValue)Mark the state of a Program as having changed and generate the event. Any or all parameters may be null.- Specified by:
setObjChangedin interfaceChangeManager- Parameters:
type- event typesubType- event sub-typeaddr- program address affectedaffectedObj- object that is the subject of the eventoldValue- original value or an Object that is related to the eventnewValue- new value or an Object that is related to the the event
-
setObjChanged
public void setObjChanged(int type, AddressSetView addrSet, java.lang.Object affectedObj, java.lang.Object oldValue, java.lang.Object newValue)Mark the state of a Program as having changed and generate the event. Any or all parameters may be null.- Specified by:
setObjChangedin interfaceChangeManager- Parameters:
type- event typeaddrSet- set of program addresses affectedaffectedObj- object that is the subject of the eventoldValue- original value or an Object that is related to the eventnewValue- new value or an Object that is related to the the event
-
setPropertyChanged
public void setPropertyChanged(java.lang.String propertyName, Address codeUnitAddr, java.lang.Object oldValue, java.lang.Object newValue)Mark the state of a Program as having changed and generate the DOCR_CODE_UNIT_PROPERTY_CHANGED event.- Specified by:
setPropertyChangedin interfaceChangeManager- Parameters:
propertyName-codeUnitAddr- address of the code unit with the property changeoldValue- old value for the propertynewValue- new value for the property
-
setPropertyRangeRemoved
public void setPropertyRangeRemoved(java.lang.String propertyName, Address start, Address end)Mark the state of a Program as having changed and generate the DOCR_CODE_UNIT_PROPERTY_RANGE_REMOVED event.- Specified by:
setPropertyRangeRemovedin interfaceChangeManager- Parameters:
propertyName- name of the propertystart- start of range of the property being removedend- end of the range of the property being removed
-
userDataChanged
protected void userDataChanged(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)Notification of property change- Parameters:
propertyName-oldValue-newValue-
-
setName
public void setName(java.lang.String newName)
Description copied from interface:DomainObjectSet the name for this domain object.- Specified by:
setNamein interfaceDomainObject- Overrides:
setNamein classDomainObjectAdapter- Parameters:
newName- object name- See Also:
DomainObject.setName(java.lang.String)
-
addOverlaySpace
public AddressSpace addOverlaySpace(java.lang.String overlaySpaceName, AddressSpace templateSpace, long minOffset, long maxOffset) throws DuplicateNameException, LockException, MemoryConflictException
Creates a new OverlayAddressSpace with the given name and base AddressSpace- Parameters:
overlaySpaceName- the name of the overlay space to createtemplateSpace- the base AddressSpace to overlay- Throws:
DuplicateNameException- if an AddressSpace already exists with the given name.LockException- if the program is shared and not checked out exclusively.MemoryConflictException- if image base override is active
-
renameOverlaySpace
public void renameOverlaySpace(java.lang.String oldName, java.lang.String newName) throws DuplicateNameException, LockException- Throws:
DuplicateNameExceptionLockException
-
removeOverlaySpace
public boolean removeOverlaySpace(AddressSpace overlaySpace) throws LockException
- Throws:
LockException
-
getImageBase
public Address getImageBase()
Description copied from interface:ProgramReturns the current program image base address;- Specified by:
getImageBasein interfaceProgram- See Also:
Program.getImageBase()
-
setImageBase
public void setImageBase(Address base, boolean commit) throws AddressOverflowException, LockException, java.lang.IllegalStateException
Description copied from interface:ProgramSets the program's image base address.- Specified by:
setImageBasein interfaceProgram- Parameters:
base- the new image base address;commit- if false, then the image base change is temporary and does not really change the program and will be lost once the program is closed. If true, the change is permanent and marks the program as "changed" (needs saving).- Throws:
AddressOverflowException- if the new image would cause a memory block to end past the the address space.LockException- if the program is shared and the user does not have an exclusive checkout. This will never be thrown if commit is false.java.lang.IllegalStateException- if the program state is not suitable for setting the image base.- See Also:
Program.setImageBase(ghidra.program.model.address.Address, boolean)
-
restoreImageBase
public void restoreImageBase()
Description copied from interface:ProgramRestores the last committed image base.- Specified by:
restoreImageBasein interfaceProgram- See Also:
Program.restoreImageBase()
-
getDescription
public java.lang.String getDescription()
Description copied from interface:DomainObjectReturns a word or short phrase that best describes or categorizes the object in terms that a user will understand.- Specified by:
getDescriptionin interfaceDomainObject- Specified by:
getDescriptionin classDomainObjectAdapter- See Also:
DomainObject.getDescription()
-
getStoredVersion
public int getStoredVersion() throws java.io.IOException- Throws:
java.io.IOException
-
clearCache
protected void clearCache(boolean all)
- Overrides:
clearCachein classDomainObjectAdapterDB- See Also:
ghidra.framework.data.DomainObjectAdapterDB#clearCache()
-
invalidate
public void invalidate()
Description copied from interface:ProgramInvalidates any caching in a program. NOTE: Over-using this method can adversely affect system performance.- Specified by:
invalidatein interfaceProgram- See Also:
Program.invalidate()
-
isChangeable
public boolean isChangeable()
Description copied from interface:DomainObjectReturns true if changes are permitted.- Specified by:
isChangeablein interfaceDomainObject- See Also:
DomainObject.isChangeable()
-
getRegister
public Register getRegister(Address addr)
Description copied from interface:ProgramReturns the largest register located at the specified address- Specified by:
getRegisterin interfaceProgram- Returns:
- largest register or null
- See Also:
ghidra.program.model.listing.Program#getRegister(int, int)
-
getRegisters
public Register[] getRegisters(Address addr)
Description copied from interface:ProgramReturns all registers located at the specified address- Specified by:
getRegistersin interfaceProgram- Returns:
- largest register
- See Also:
Program.getRegisters(ghidra.program.model.address.Address)
-
getRegister
public Register getRegister(Address addr, int size)
Description copied from interface:ProgramReturns a specific register based upon its address and size- Specified by:
getRegisterin interfaceProgram- Parameters:
addr- register addresssize- the size of the register (in bytes);- Returns:
- register or null
- See Also:
Program.getRegister(ghidra.program.model.address.Address, int)
-
getRegister
public Register getRegister(Varnode varnode)
Description copied from interface:ProgramReturns the register which corresponds to the specified varnode- Specified by:
getRegisterin interfaceProgram- Returns:
- register or null
-
getRegister
public Register getRegister(java.lang.String regName)
Description copied from interface:ProgramReturns the register with the given name;- Specified by:
getRegisterin interfaceProgram- Parameters:
regName- the name of the register to retrieve- Returns:
- register or null
- See Also:
Program.getRegister(java.lang.String)
-
setChanged
protected void setChanged(boolean b)
- Overrides:
setChangedin classDomainObjectAdapterDB
-
deleteAddressRange
public void deleteAddressRange(Address startAddr, Address endAddr, TaskMonitor monitor) throws RollbackException
Deletes given range from the program.- Parameters:
startAddr- the first address in the range.endAddr- the last address in the range.monitor- the task monitor to use while deleting information in the given range.- Throws:
RollbackException- if the user cancelled the operation via the task monitor.
-
moveAddressRange
public void moveAddressRange(Address fromAddr, Address toAddr, long length, TaskMonitor monitor) throws AddressOverflowException, RollbackException
Moves all information stored in the given range to the new location.- Parameters:
fromAddr- the first address in the range to be moved.toAddr- the address to move to.length- the number of addresses to move.monitor- the task monitor to use while deleting information in the given range.- Throws:
RollbackException- if the user cancelled the operation via the task monitor.AddressOverflowException
-
getGlobalNamespace
public Namespace getGlobalNamespace()
Description copied from interface:ProgramReturns the global namespace for this program- Specified by:
getGlobalNamespacein interfaceProgram- See Also:
Program.getGlobalNamespace()
-
setLanguage
public void setLanguage(Language newLanguage, CompilerSpecID newCompilerSpecID, boolean forceRedisassembly, TaskMonitor monitor) throws java.lang.IllegalStateException, IncompatibleLanguageException, LockException
Description copied from interface:ProgramSets the language for the program. If the new language is "compatible" with the old language, the addressMap is adjusted then the program is "re-disassembled".- Specified by:
setLanguagein interfaceProgram- Parameters:
newLanguage- the new language to use.forceRedisassembly- if true a redisassembly will be forced. This should always be false.monitor- the task monitor- Throws:
java.lang.IllegalStateException- thrown if any error occurs, including a cancelled monitor, which leaves this program object in an unusable state. The current transaction should be aborted and the program instance discarded.IncompatibleLanguageException- thrown if the new language is too different from the existing language.LockException- if the program is shared and not checked out exclusively.
-
setLanguage
public void setLanguage(LanguageTranslator translator, CompilerSpecID newCompilerSpecID, boolean forceRedisassembly, TaskMonitor monitor) throws LockException
Translate language- Parameters:
translator- language translator, if null only re-disassembly will occur.newCompilerSpecID- new compiler specification which corresponds to new language, may be null.forceRedisassembly- if true a redisassembly will be forced even if not requiredmonitor- task monitor- Throws:
LockException- if exclusive access is missing
-
createAddressSetPropertyMap
public AddressSetPropertyMap createAddressSetPropertyMap(java.lang.String mapName) throws DuplicateNameException
Description copied from interface:ProgramCreate a new AddressSetPropertyMap with the specified name.- Specified by:
createAddressSetPropertyMapin interfaceProgram- Parameters:
mapName- name of the property map.- Returns:
- the newly created property map.
- Throws:
DuplicateNameException- if a property map already exists with the given name.
-
getAddressSetPropertyMap
public AddressSetPropertyMap getAddressSetPropertyMap(java.lang.String mapName)
Description copied from interface:ProgramGet the property map with the given name.- Specified by:
getAddressSetPropertyMapin interfaceProgram- Parameters:
mapName- name of the property map- Returns:
- null if no property map exist with the given name
-
deleteAddressSetPropertyMap
public void deleteAddressSetPropertyMap(java.lang.String mapName)
Description copied from interface:ProgramRemove the property map from the program.- Specified by:
deleteAddressSetPropertyMapin interfaceProgram- Parameters:
mapName- name of the property map to remove
-
createIntRangeMap
public IntRangeMapDB createIntRangeMap(java.lang.String mapName) throws DuplicateNameException
Description copied from interface:ProgramCreate a new IntRangeMap with the specified name.- Specified by:
createIntRangeMapin interfaceProgram- Parameters:
mapName- name of the property map.- Returns:
- the newly created property map.
- Throws:
DuplicateNameException- if a property map already exists with the given name.
-
getIntRangeMap
public IntRangeMap getIntRangeMap(java.lang.String mapName)
Description copied from interface:ProgramGet the property map with the given name.- Specified by:
getIntRangeMapin interfaceProgram- Parameters:
mapName- name of the property map- Returns:
- null if no property map exist with the given name
-
deleteIntRangeMap
public void deleteIntRangeMap(java.lang.String mapName)
Description copied from interface:ProgramRemove the property map from the program.- Specified by:
deleteIntRangeMapin interfaceProgram- Parameters:
mapName- name of the property map to remove
-
close
protected void close()
- Overrides:
closein classDomainObjectAdapterDB
-
getMetadata
public java.util.Map<java.lang.String,java.lang.String> getMetadata()
Description copied from interface:DomainObjectReturns a map containing all the stored metadata associated with this domain object. The map contains key,value pairs and are ordered by their insertion order.- Specified by:
getMetadatain interfaceDomainObject- Overrides:
getMetadatain classDomainObjectAdapter- Returns:
- a map containing all the stored metadata associated with this domain object.
-
updateMetadata
protected void updateMetadata() throws java.io.IOExceptionDescription copied from class:DomainObjectAdapterDBThis method is called before a save, saveAs, or saveToPackedFile to update common meta data- Overrides:
updateMetadatain classDomainObjectAdapterDB- Throws:
java.io.IOException
-
lock
public boolean lock(java.lang.String reason)
Description copied from interface:DomainObjectAttempt to obtain a modification lock on the domain object. Multiple locks may be granted on this domain object, although all lock owners must release their lock in a timely fashion.- Specified by:
lockin interfaceDomainObject- Overrides:
lockin classDomainObjectAdapterDB- Parameters:
reason- very short reason for requesting lock- Returns:
- true if lock obtained successfully, else false which indicates that a modification is in process.
- See Also:
DomainObject.lock(String)
-
forceLock
public void forceLock(boolean rollback, java.lang.String reason)Description copied from interface:DomainObjectCancels any previous lock and aquires it.- Specified by:
forceLockin interfaceDomainObject- Overrides:
forceLockin classDomainObjectAdapterDB- Parameters:
rollback- if true, any changes in made with the previous lock should be discarded.reason- very short reason for requesting lock- See Also:
DomainObject.forceLock(boolean, String)
-
unlock
public void unlock()
Description copied from interface:DomainObjectRelease a modification lock previously granted with the lock method.- Specified by:
unlockin interfaceDomainObject- Overrides:
unlockin classDomainObjectAdapterDB- See Also:
DomainObject.unlock()
-
getUniqueProgramID
public long getUniqueProgramID()
Description copied from interface:ProgramReturns an ID that is unique for this program. This provides an easy way to store references to a program across client persistence.- Specified by:
getUniqueProgramIDin interfaceProgram
-
invalidateWriteCache
public void invalidateWriteCache()
Description copied from class:DomainObjectAdapterDBInvalidate (i.e., clear) any pending database changes not yet written. This method will be invoked by the transaction manager prior to aborting a transaction.- Overrides:
invalidateWriteCachein classDomainObjectAdapterDB
-
flushWriteCache
public void flushWriteCache()
Description copied from class:DomainObjectAdapterDBFlush any pending database changes. This method will be invoked by the transaction manager prior to closing a transaction.- Overrides:
flushWriteCachein classDomainObjectAdapterDB
-
-