Package ghidra.framework.data
Class GhidraFile
java.lang.Object
ghidra.framework.data.GhidraFile
- All Implemented Interfaces:
- DomainFile,- Comparable<DomainFile>
- 
Field SummaryFieldsFields inherited from interface ghidra.framework.model.DomainFileDEFAULT_VERSION, READ_ONLY_PROPERTY, UNSUPPORTED_FILE_ICON
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddToVersionControl(String comment, boolean keepCheckedOut, TaskMonitor monitor) Adds this private file to version control.booleanReturns true if this private file may be added to the associated repository.booleanReturns true if this file may be checked-in to the associated repository.booleanReturns true if this file may be checked-out from the associated repository.booleancanMerge()Returns true if this file can be merged with the current versioned file.booleanPrior to invoking getDomainObject, this method can be used to determine if unsaved changes can be recovered on the next open.booleancanSave()Return whether this domain object can be saved (i.e., updated/overwritten).voidcheckin(CheckinHandler checkinHandler, TaskMonitor monitor) Performs check in to associated repository.booleancheckout(boolean exclusive, TaskMonitor monitor) Checkout this file for update.intcompareTo(DomainFile df) copyTo(DomainFolder newParent, TaskMonitor monitor) Copy this file into the newParent folder as a private file.copyToAsLink(DomainFolder newParent) Copy this file into the newParent folder as a link file.copyVersionTo(int version, DomainFolder destFolder, TaskMonitor monitor) Copy a specific version of this file to the specified destFolder.voiddelete()Delete the entire database for this file, including any version files.voiddelete(int version) Deletes a specific version of a file from the versioned filesystem.booleanbooleanexists()Check for existence of domain file.If this is a folder-link file get the corresponding linked folder.Returns changes made to versioned file by others since checkout was performed.Get a list of checkouts by all users for the associated versioned file.Get checkout status associated with a versioned file.ArrayList<?> Get the list of consumers (Objects) for this domain file.Returns content-type string for this filegetDomainObject(Object consumer, boolean okToUpgrade, boolean okToRecover, TaskMonitor monitor) Opens and returns the current domain object.Class<? extends DomainObject> Returns the underlying Class for the domain object in this domain file.Returns a unique file-ID if one has been established or null.getIcon(boolean disabled) Get the state based Icon image for the domain file based upon its content class.getImmutableDomainObject(Object consumer, int version, TaskMonitor monitor) Returns a new DomainObject that cannot be changed or saved to its original file.longGet a long value representing the time when the data was last modified.intReturn the latest versiongetLocalProjectURL(String ref) Get a local Ghidra URL for this domain file if available within the associated non-transient local project.Returns an ordered map containing the metadata that has been associated with the corresponding domain object.getName()Get the name of this project filegetOpenedDomainObject(Object consumer) Returns the domainObject for this DomainFile only if it is already open.Get the parent domain folder for this domain file.Returns the full path name to this fileReturns the local storage location for the project that this DomainFile belongs to.getReadOnlyDomainObject(Object consumer, int version, TaskMonitor monitor) Returns a "read-only" version of the domain object.Get a remote Ghidra URL for this domain file if available within an associated shared project repository.intReturn either the latest version if the file is not checked-out or the version that was checked-out or a specific version that was requested.Version[]Returns list of all available versions.inthashCode()booleanisBusy()Returns true if the domain object in this domain file exists and has an open transaction.booleanReturn whether the domain object in this domain file has changed.booleanReturns true if this is a checked-out file.booleanReturns true if this a checked-out file with exclusive access.booleanReturns true if the file is versioned but a private copy also exists.booleanReturns true if this file is in a writable project.booleanReturns true if this file represents the latest version of the associated domain object.booleanDetermine if this file is a link file which corresponds to either a file or folder link.booleanDetermine if this file's content type supports linking.booleanisOpen()Returns true if there is an open domainObject for this file.booleanReturns whether this file is explicitly marked as read-only.booleanReturn true if this is a versioned database, else falselonglength()Returns the length of this domain file.voidmerge(boolean okToUpgrade, TaskMonitor monitor) Performs merge from current version of versioned file into local checked-out file.booleanReturns true if this is a checked-out file which has been modified since it was checked-out.moveTo(DomainFolder newParent) Move this file into the newParent folder.voidpackFile(File file, TaskMonitor monitor) Pack domain file into specified file.voidsave(TaskMonitor monitor) Save theDomainObjectassociated with this file.Set the name on this domain file.voidsetReadOnly(boolean state) Sets the object to read-only.booleanIf the file has an updatable domain object with unsaved changes, generate a recovery snapshot.voidterminateCheckout(long checkoutId) Forcefully terminate a checkout for the associated versioned file.toString()voidundoCheckout(boolean keep) Undo "checked-out" file.voidundoCheckout(boolean keep, boolean force) Undo "checked-out" file.Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ghidra.framework.model.DomainFilecheckin
- 
Field Details- 
projectData
 
- 
- 
Method Details- 
getUserFileSystem
- 
existspublic boolean exists()Description copied from interface:DomainFileCheck for existence of domain file.- Specified by:
- existsin interface- DomainFile
- Returns:
- true if file exists. A proxy domain file will always return false.
 
- 
getFileIDDescription copied from interface:DomainFileReturns a unique file-ID if one has been established or null. Examples which may result in null ID:- Very old project file which pre-dates introduction of file ID, or
- Remote versioned file with lost connection
 - Specified by:
- getFileIDin interface- DomainFile
- Returns:
- the file-ID or null if failed to obtain ID.
 
- 
setNameDescription copied from interface:DomainFileSet the name on this domain file.- Specified by:
- setNamein interface- DomainFile
- Parameters:
- newName- domain file name
- Returns:
- renamed domain file (the original DomainFile object becomes invalid since it is immutable)
- Throws:
- InvalidNameException- if newName contains illegal characters
- IOException- if an IO or access error occurs.
 
- 
getNameDescription copied from interface:DomainFileGet the name of this project file- Specified by:
- getNamein interface- DomainFile
- Returns:
- the name
 
- 
getPathnameDescription copied from interface:DomainFileReturns the full path name to this file- Specified by:
- getPathnamein interface- DomainFile
- Returns:
- the path name
 
- 
getProjectLocatorDescription copied from interface:DomainFileReturns the local storage location for the project that this DomainFile belongs to.- Specified by:
- getProjectLocatorin interface- DomainFile
- Returns:
- the location
 
- 
getLocalProjectURLDescription copied from interface:DomainFileGet a local Ghidra URL for this domain file if available within the associated non-transient local project. A null value will be returned if project is transient.- Specified by:
- getLocalProjectURLin interface- DomainFile
- Parameters:
- ref- reference within a file, may be null. NOTE: such reference interpretation is specific to a domain object and tooling with limited support.
- Returns:
- local Ghidra URL for this file or null if transient or not applicable
 
- 
getContentTypeDescription copied from interface:DomainFileReturns content-type string for this file- Specified by:
- getContentTypein interface- DomainFile
- Returns:
- the file content type or a reserved content type ContentHandler.MISSING_CONTENTorContentHandler.UNKNOWN_CONTENT.
 
- 
isLinkFilepublic boolean isLinkFile()Description copied from interface:DomainFileDetermine if this file is a link file which corresponds to either a file or folder link. TheDomainObjectreferenced by a link-file may be opened usingDomainFile.getReadOnlyDomainObject(Object, int, TaskMonitor). TheDomainFile.getDomainObject(Object, boolean, boolean, TaskMonitor)method may also be used to obtain a read-only instance.DomainFile.getImmutableDomainObject(Object, int, TaskMonitor)use is not supported. If the link-file content type equals "FolderLink" the methodDomainFile.followLink()can be used to get the linked domain folder. The associated link URL may be obtained withLinkHandler.getURL(DomainFile). The content type (seeDomainFile.getContentType()of a link file will differ from that of the linked object (e.g., "LinkedProgram" vs "Program").- Specified by:
- isLinkFilein interface- DomainFile
- Returns:
- true if link file else false for a normal domain file
 
- 
followLinkDescription copied from interface:DomainFileIf this is a folder-link file get the corresponding linked folder.- Specified by:
- followLinkin interface- DomainFile
- Returns:
- a linked domain folder or null if not a folder-link.
 
- 
isLinkingSupportedpublic boolean isLinkingSupported()Description copied from interface:DomainFileDetermine if this file's content type supports linking.- Specified by:
- isLinkingSupportedin interface- DomainFile
- Returns:
- true if linking is supported, else false.
 
- 
getDomainObjectClassDescription copied from interface:DomainFileReturns the underlying Class for the domain object in this domain file.- Specified by:
- getDomainObjectClassin interface- DomainFile
- Returns:
- the class or null if does not correspond to a domain object.
 
- 
getParentDescription copied from interface:DomainFileGet the parent domain folder for this domain file.- Specified by:
- getParentin interface- DomainFile
- Returns:
- the parent
 
- 
compareTo- Specified by:
- compareToin interface- Comparable<DomainFile>
 
- 
getChangesByOthersSinceCheckoutDescription copied from interface:DomainFileReturns changes made to versioned file by others since checkout was performed. NOTE: This method is unable to cope with version issues which may require an upgrade.- Specified by:
- getChangesByOthersSinceCheckoutin interface- DomainFile
- Returns:
- change set or null
- Throws:
- VersionException- latest version was created with a different version of software which prevents rapid determination of change set.
- IOException- if a folder item access error occurs or change set was produced by newer version of software and can not be read
 
- 
getOpenedDomainObjectDescription copied from interface:DomainFileReturns the domainObject for this DomainFile only if it is already open.- Specified by:
- getOpenedDomainObjectin interface- DomainFile
- Parameters:
- consumer- the consumer that will use the object.
- Returns:
- the already opened domainObject or null if it is not currently open.
 
- 
getDomainObjectpublic DomainObject getDomainObject(Object consumer, boolean okToUpgrade, boolean okToRecover, TaskMonitor monitor) throws VersionException, IOException, CancelledException Description copied from interface:DomainFileOpens and returns the current domain object. If the domain object is already opened, then the existing open domain object is returned.- Specified by:
- getDomainObjectin interface- DomainFile
- Parameters:
- consumer- consumer of the domain object which is responsible for releasing it after use. When all the consumers using the domain object release it, then the object is closed and its resources released.
- okToUpgrade- if true, allows the system to upgrade out of data domain objects to be in compliance with the current version of Ghidra. A Version exception will be thrown if the domain object cannot be upgraded OR okToUpgrade is false and the domain object is out of date.
- okToRecover- if true, allows the system to recover unsaved file changes which resulted from a crash. If false, any existing recovery data will be deleted. This flag is only relevant if project is open for update (isInProject) and the file can be opened for update.
- monitor- permits monitoring of open progress.
- Returns:
- an open domain object can be modified and saved. (Not read-only)
- Throws:
- VersionException- if the domain object could not be read due to a version format change. If okToUpgrade is true, then a VersionException indicates that the domain object cannot be upgraded to the current format. If okToUpgrade is false, then the VersionException only means the object is not in the current format - it may or may not be possible to upgrade.
- IOException- if an IO or access error occurs.
- CancelledException- if monitor cancelled operation
 
- 
getReadOnlyDomainObjectpublic DomainObject getReadOnlyDomainObject(Object consumer, int version, TaskMonitor monitor) throws VersionException, IOException, CancelledException Description copied from interface:DomainFileReturns a "read-only" version of the domain object. "Read-only" means that the domain object cannot be saved back into its original domain object. It can still be modified and saved to a new domain file. The domain object will be assigned a temporary domain file that will not allow a "save" operation. The user must do a "save as" to a new filename.- Specified by:
- getReadOnlyDomainObjectin interface- DomainFile
- Parameters:
- consumer- consumer of the domain object which is responsible for releasing it after use.
- version- the domain object version requested. DEFAULT_VERSION should be specified to open the current version.
- monitor- permits monitoring of open progress.
- Returns:
- a new domain object that is disassociated from its original domain file.
- Throws:
- VersionException- if the domain object could not be read due to a version format change.
- IOException- if an IO or access error occurs.
- CancelledException- if monitor cancelled operation
 
- 
getImmutableDomainObjectpublic DomainObject getImmutableDomainObject(Object consumer, int version, TaskMonitor monitor) throws VersionException, IOException, CancelledException Description copied from interface:DomainFileReturns a new DomainObject that cannot be changed or saved to its original file. NOTE: The use of this method should generally be avoided since it can't handle version changes that may have occured and require a data upgrade (e.g., DB schema change).- Specified by:
- getImmutableDomainObjectin interface- DomainFile
- Parameters:
- consumer- consumer of the domain object which is responsible for releasing it after use.
- version- the domain object version requested. DEFAULT_VERSION should be specified to open the current version.
- monitor- permits monitoring of open progress.
- Returns:
- a new domain object that is disassociated from its original domain file and cannot be modified
- Throws:
- VersionException- if the domain object could not be read due to a version format change.
- IOException- if an IO or access error occurs.
- CancelledException- if monitor cancelled operation
 
- 
saveDescription copied from interface:DomainFileSave theDomainObjectassociated with this file.- Specified by:
- savein interface- DomainFile
- Parameters:
- monitor- monitor for the task that is doing the save on the file
- Throws:
- IOException- if an IO error occurs.
- CancelledException- if monitor cancelled operation
 
- 
canSavepublic boolean canSave()Description copied from interface:DomainFileReturn whether this domain object can be saved (i.e., updated/overwritten).- Specified by:
- canSavein interface- DomainFile
- Returns:
- true if the user is the owner AND the file is in the active project AND the file is not read-only.
 
- 
canRecoverpublic boolean canRecover()Description copied from interface:DomainFilePrior to invoking getDomainObject, this method can be used to determine if unsaved changes can be recovered on the next open.- Specified by:
- canRecoverin interface- DomainFile
- Returns:
- true if recovery data exists.
 
- 
takeRecoverySnapshotDescription copied from interface:DomainFileIf the file has an updatable domain object with unsaved changes, generate a recovery snapshot.- Specified by:
- takeRecoverySnapshotin interface- DomainFile
- Returns:
- true if snapshot successful or not needed, false if file is busy which prevents snapshot, or snapshot was cancelled.
- Throws:
- IOException- if there is an exception saving the snapshot
 
- 
isInWritableProjectpublic boolean isInWritableProject()Description copied from interface:DomainFileReturns true if this file is in a writable project.- Specified by:
- isInWritableProjectin interface- DomainFile
- Returns:
- true if writable
 
- 
getLastModifiedTimepublic long getLastModifiedTime()Description copied from interface:DomainFileGet a long value representing the time when the data was last modified.- Specified by:
- getLastModifiedTimein interface- DomainFile
- Returns:
- the time
 
- 
getIconDescription copied from interface:DomainFileGet the state based Icon image for the domain file based upon its content class.- Specified by:
- getIconin interface- DomainFile
- Parameters:
- disabled- true if the icon return should be rendered as not enabled
- Returns:
- image icon
 
- 
isCheckedOutpublic boolean isCheckedOut()Description copied from interface:DomainFileReturns true if this is a checked-out file.- Specified by:
- isCheckedOutin interface- DomainFile
- Returns:
- true if checked-out
 
- 
isCheckedOutExclusivepublic boolean isCheckedOutExclusive()Description copied from interface:DomainFileReturns true if this a checked-out file with exclusive access.- Specified by:
- isCheckedOutExclusivein interface- DomainFile
- Returns:
- true if checked-out exclusively
 
- 
modifiedSinceCheckoutpublic boolean modifiedSinceCheckout()Description copied from interface:DomainFileReturns true if this is a checked-out file which has been modified since it was checked-out.- Specified by:
- modifiedSinceCheckoutin interface- DomainFile
- Returns:
- true if modified since check-out
 
- 
canCheckoutpublic boolean canCheckout()Description copied from interface:DomainFileReturns true if this file may be checked-out from the associated repository. User's with read-only repository access will not have checkout ability.- Specified by:
- canCheckoutin interface- DomainFile
- Returns:
- true if can checkout
 
- 
canCheckinpublic boolean canCheckin()Description copied from interface:DomainFileReturns true if this file may be checked-in to the associated repository. Note: this does not take into consideration cases where the file is currently in-use which may cause a failure if a checkin is attempted.- Specified by:
- canCheckinin interface- DomainFile
- Returns:
- true if a check-in can be attempted (i.e., file is checked-out with changes), else false
 
- 
canMergepublic boolean canMerge()Description copied from interface:DomainFileReturns true if this file can be merged with the current versioned file. Note: this does not take into consideration cases where the file is currently in-use which may cause a failure if a merge is attempted.- Specified by:
- canMergein interface- DomainFile
- Returns:
- true if a merge can be attempted (i.e., file is checked-out and a newer version exists), else false
 
- 
canAddToRepositorypublic boolean canAddToRepository()Description copied from interface:DomainFileReturns true if this private file may be added to the associated repository. Note: this does not take into consideration cases where the file is currently in-use which may cause a failure if add to repository is attempted.- Specified by:
- canAddToRepositoryin interface- DomainFile
- Returns:
- true if add to the repository can be attempted (i.e., file in active project is not versioned or hijacked)
 
- 
setReadOnlyDescription copied from interface:DomainFileSets the object to read-only. This method may only be invoked for private files (i.e., not versioned).- Specified by:
- setReadOnlyin interface- DomainFile
- Parameters:
- state- if true file will be read-only and may not be updated, if false the file may be updated.
- Throws:
- IOException- if an IO error occurs.
 
- 
isReadOnlypublic boolean isReadOnly()Description copied from interface:DomainFileReturns whether this file is explicitly marked as read-only. This method is only supported by the local file system and does not apply to a versioned file that is not checked-out. A versioned file that is not checked-out will always return false, while aDomainFileProxywill always return true. From a framework point of view a read-only file can never be changed.- Specified by:
- isReadOnlyin interface- DomainFile
- Returns:
- true if this file is marked read-only
 
- 
isVersionedpublic boolean isVersioned()Description copied from interface:DomainFileReturn true if this is a versioned database, else false- Specified by:
- isVersionedin interface- DomainFile
- Returns:
- true if versioned
 
- 
isHijackedpublic boolean isHijacked()Description copied from interface:DomainFileReturns true if the file is versioned but a private copy also exists.- Specified by:
- isHijackedin interface- DomainFile
- Returns:
- true if hijacked
 
- 
getLatestVersionpublic int getLatestVersion()Description copied from interface:DomainFileReturn the latest version- Specified by:
- getLatestVersionin interface- DomainFile
- Returns:
- the version
 
- 
isLatestVersionpublic boolean isLatestVersion()Description copied from interface:DomainFileReturns true if this file represents the latest version of the associated domain object.- Specified by:
- isLatestVersionin interface- DomainFile
- Returns:
- true if the latest version
 
- 
getVersionpublic int getVersion()Description copied from interface:DomainFileReturn either the latest version if the file is not checked-out or the version that was checked-out or a specific version that was requested.- Specified by:
- getVersionin interface- DomainFile
- Returns:
- the version
 
- 
getVersionHistoryDescription copied from interface:DomainFileReturns list of all available versions.- Specified by:
- getVersionHistoryin interface- DomainFile
- Returns:
- the versions
- Throws:
- IOException- if there is an exception getting the history
 
- 
addToVersionControlpublic void addToVersionControl(String comment, boolean keepCheckedOut, TaskMonitor monitor) throws IOException, CancelledException Description copied from interface:DomainFileAdds this private file to version control.- Specified by:
- addToVersionControlin interface- DomainFile
- Parameters:
- comment- new version comment
- keepCheckedOut- if true, the file will be initially checked-out. This option will be ignored if file is currently open in which case file will remain checked-out.
- monitor- progress monitor
- Throws:
- IOException- if an IO or access error occurs. Also if file is not private.
- CancelledException- if the monitor cancelled the operation
 
- 
checkoutpublic boolean checkout(boolean exclusive, TaskMonitor monitor) throws IOException, CancelledException Description copied from interface:DomainFileCheckout this file for update. If this file is already private, this method does nothing.- Specified by:
- checkoutin interface- DomainFile
- Parameters:
- exclusive- if true an exclusive checkout will be requested
- monitor- progress monitor
- Returns:
- true if checkout successful, false if an exclusive checkout was not possible due to other users having checkouts of this file. A request for a non-exclusive checkout will never return false.
- Throws:
- IOException- if an IO or access error occurs.
- CancelledException- if task monitor cancelled operation.
 
- 
checkinpublic void checkin(CheckinHandler checkinHandler, TaskMonitor monitor) throws IOException, VersionException, CancelledException Description copied from interface:DomainFilePerforms check in to associated repository. File must be checked-out and modified since checkout.- Specified by:
- checkinin interface- DomainFile
- Parameters:
- checkinHandler- provides user input data to complete checkin process. The keep-checked-out option supplied by this handler will be ignored if file is currently open in which case file will remain checked-out.
- monitor- the TaskMonitor.
- Throws:
- IOException- if an IO or access error occurs
- VersionException- if unable to handle domain object version in versioned filesystem. We are unable to upgrade since this would only occur if checkout is not exclusive.
- CancelledException- if task monitor cancelled operation
 
- 
mergepublic void merge(boolean okToUpgrade, TaskMonitor monitor) throws IOException, VersionException, CancelledException Description copied from interface:DomainFilePerforms merge from current version of versioned file into local checked-out file.- Specified by:
- mergein interface- DomainFile
- Parameters:
- okToUpgrade- if true an upgrade will be performed if needed
- monitor- task monitor
- Throws:
- IOException- if an IO or access error occurs
- VersionException- if unable to handle domain object version in versioned filesystem. If okToUpgrade was false, check exception to see if it can be upgraded
- CancelledException- if task monitor cancelled operation
 
- 
undoCheckoutDescription copied from interface:DomainFileUndo "checked-out" file. The original repository file is restored.- Specified by:
- undoCheckoutin interface- DomainFile
- Parameters:
- keep- if true, the private database will be renamed with a .keep extension.
- Throws:
- IOException- if file is not checked-out or an IO / access error occurs.
 
- 
undoCheckoutDescription copied from interface:DomainFileUndo "checked-out" file. The original repository file is restored.- Specified by:
- undoCheckoutin interface- DomainFile
- Parameters:
- keep- if true, the private database will be renamed with a .keep extension.
- force- if not connected to the repository the local checkout file will be removed. Warning: forcing undo checkout will leave a stale checkout in place for the associated repository if not connected.
- Throws:
- IOException- thrown if file is not checked-out or an IO / access error occurs.
 
- 
terminateCheckoutDescription copied from interface:DomainFileForcefully terminate a checkout for the associated versioned file. The user must be the owner of the checkout or have administrator privilege on the versioned filesystem (i.e., repository).- Specified by:
- terminateCheckoutin interface- DomainFile
- Parameters:
- checkoutId- checkout ID
- Throws:
- IOException- if an IO or access error occurs
 
- 
getCheckoutsDescription copied from interface:DomainFileGet a list of checkouts by all users for the associated versioned file.- Specified by:
- getCheckoutsin interface- DomainFile
- Returns:
- list of checkouts
- Throws:
- IOException- if an IO or access error occurs
 
- 
getCheckoutStatusDescription copied from interface:DomainFileGet checkout status associated with a versioned file.- Specified by:
- getCheckoutStatusin interface- DomainFile
- Returns:
- checkout status or null if not checked-out to current associated project.
- Throws:
- IOException- if an IO or access error occurs
 
- 
deleteDescription copied from interface:DomainFileDelete the entire database for this file, including any version files.- Specified by:
- deletein interface- DomainFile
- Throws:
- IOException- if an IO or access error occurs.
 
- 
deleteDescription copied from interface:DomainFileDeletes a specific version of a file from the versioned filesystem.- Specified by:
- deletein interface- DomainFile
- Parameters:
- version- specific version to be deleted. The version must either be the oldest or latest, or -1 which will attempt to remove all versions. When deleting the latest version, this method could take a long time to return since the previous version must be reconstructed within the versioned filesystem.
- Throws:
- IOException- if an IO error occurs, including the inability to delete a version because this item is checked-out, the user does not have permission, or the specified version is not the oldest or latest.
 
- 
moveToDescription copied from interface:DomainFileMove this file into the newParent folder.- Specified by:
- moveToin interface- DomainFile
- Parameters:
- newParent- new parent folder within the same project
- Returns:
- the newly relocated domain file (the original DomainFile object becomes invalid since it is immutable)
- Throws:
- IOException- if an IO or access error occurs.
 
- 
copyTopublic DomainFile copyTo(DomainFolder newParent, TaskMonitor monitor) throws IOException, CancelledException Description copied from interface:DomainFileCopy this file into the newParent folder as a private file.- Specified by:
- copyToin interface- DomainFile
- Parameters:
- newParent- new parent folder
- monitor- task monitor
- Returns:
- newly created domain file
- Throws:
- IOException- if an IO or access error occurs.
- CancelledException- if task monitor cancelled operation.
 
- 
copyToAsLinkDescription copied from interface:DomainFileCopy this file into the newParent folder as a link file. Restrictions:- Specified newParent must reside within a different project since internal linking is not currently supported.
- Content type must support linking (see DomainFile.isLinkingSupported()).
 - Specified by:
- copyToAsLinkin interface- DomainFile
- Parameters:
- newParent- new parent folder
- Returns:
- newly created domain file or null if content type does not support link use.
- Throws:
- IOException- if an IO or access error occurs.
 
- 
copyVersionTopublic DomainFile copyVersionTo(int version, DomainFolder destFolder, TaskMonitor monitor) throws IOException, CancelledException Description copied from interface:DomainFileCopy a specific version of this file to the specified destFolder.- Specified by:
- copyVersionToin interface- DomainFile
- Parameters:
- version- version to copy
- destFolder- destination parent folder
- monitor- task monitor
- Returns:
- the copied file
- Throws:
- IOException- if an IO or access error occurs.
- CancelledException- if task monitor cancelled operation.
 
- 
getConsumersDescription copied from interface:DomainFileGet the list of consumers (Objects) for this domain file.- Specified by:
- getConsumersin interface- DomainFile
- Returns:
- true if linking is supported allowing a link-file to be created which references this file, else false.
 
- 
isChangedpublic boolean isChanged()Description copied from interface:DomainFileReturn whether the domain object in this domain file has changed.- Specified by:
- isChangedin interface- DomainFile
- Returns:
- true if changed
 
- 
isOpenpublic boolean isOpen()Description copied from interface:DomainFileReturns true if there is an open domainObject for this file.- Specified by:
- isOpenin interface- DomainFile
- Returns:
- true if open
 
- 
isBusypublic boolean isBusy()Description copied from interface:DomainFileReturns true if the domain object in this domain file exists and has an open transaction.- Specified by:
- isBusyin interface- DomainFile
- Returns:
- true if busy
 
- 
packFileDescription copied from interface:DomainFilePack domain file into specified file. Specified file will be overwritten if it already exists.- Specified by:
- packFilein interface- DomainFile
- Parameters:
- file- destination file
- monitor- the task monitor
- Throws:
- IOException- if there is an exception packing the file
- CancelledException- if monitor cancels operation
 
- 
getMetadataDescription copied from interface:DomainFileReturns an ordered map containing the metadata that has been associated with the corresponding domain object. The map contains key,value pairs and are ordered by their insertion order.- Specified by:
- getMetadatain interface- DomainFile
- Returns:
- a map containing the metadata that has been associated with the corresponding domain object.
 
- 
lengthDescription copied from interface:DomainFileReturns the length of this domain file. This size is the minimum disk space used for storing this file, but does not account for additional storage space used to track changes, etc.- Specified by:
- lengthin interface- DomainFile
- Returns:
- file length
- Throws:
- IOException- if IO or access error occurs
 
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
 
-