mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 03:50:02 +02:00
Merge branch 'GT-3362_ryanmkurtz_PR-1287_astrelsky_DocumentationFixes'
Conflicts: Ghidra/Framework/Docking/src/main/java/docking/action/DockingAction.java
This commit is contained in:
commit
6e6bdffe86
659 changed files with 1740 additions and 4136 deletions
|
@ -38,14 +38,14 @@ public interface ClientAuthenticator extends KeyStorePasswordProvider {
|
|||
* @param serverType type of server (label associated with serverName)
|
||||
* @param serverName name of server
|
||||
* @param nameCb provides storage for user login name. A null indicates
|
||||
* that the default user name will be used, @see ClientUtil#getUserName().
|
||||
* that the default user name will be used, @see ClientUtil#getUserName()
|
||||
* @param passCb provides storage for user password, @see PasswordCallback#setPassword(char[])
|
||||
* @param choiceCb specifies choice between NT Domain authentication (index=0) and local password
|
||||
* file authentication (index=1). Set selected index to specify authenticator to be used,
|
||||
* @param anonymousCb may be used to request anonymous read-only access to
|
||||
* the server. A null is specified if anonymous access has not been enabed on the server.
|
||||
* @param loginError previous login error message or null for first attempt
|
||||
* @see ChoiceCallback#setSelectedIndex(int).
|
||||
* @see ChoiceCallback#setSelectedIndex(int)
|
||||
* A null is specified if no choice is available (password authenticator determined by server configuration).
|
||||
* @see AnonymousCallback#setAnonymousAccessRequested(boolean)
|
||||
* @return
|
||||
|
|
|
@ -84,8 +84,6 @@ public class ClientUtil {
|
|||
* @param host server name or address
|
||||
* @param port server port, 0 indicates that default port should be used.
|
||||
* @return repository server adapter
|
||||
* @throws LoginException thrown if server fails to authenticate user or
|
||||
* general access is denied.
|
||||
*/
|
||||
public static RepositoryServerAdapter getRepositoryServer(String host, int port) {
|
||||
return getRepositoryServer(host, port, false);
|
||||
|
@ -100,8 +98,6 @@ public class ClientUtil {
|
|||
* @param forceConnect if true and the server adapter is disconnected, an
|
||||
* attempt will be made to reconnect.
|
||||
* @return repository server handle
|
||||
* @throws LoginException thrown if server fails to authenticate user or
|
||||
* general access is denied.
|
||||
*/
|
||||
public static RepositoryServerAdapter getRepositoryServer(String host, int port,
|
||||
boolean forceConnect) {
|
||||
|
|
|
@ -158,7 +158,6 @@ public class RepositoryAdapter implements RemoteAdapterListener {
|
|||
|
||||
/**
|
||||
* Attempt to connect to the server.
|
||||
* @return true if connected
|
||||
*/
|
||||
public void connect() throws IOException {
|
||||
synchronized (serverAdapter) {
|
||||
|
@ -326,7 +325,7 @@ public class RepositoryAdapter implements RemoteAdapterListener {
|
|||
* @throws IOException
|
||||
* @throws UserAccessException user no longer has any permission to use repository.
|
||||
* @throws NotConnectedException if server/repository connection is down (user already informed)
|
||||
* @see ghidra.framework.remote.RemoteRepositoryHandle#getUserList()
|
||||
* @see RemoteRepositoryHandle#getUserList()
|
||||
*/
|
||||
public User[] getUserList() throws IOException {
|
||||
synchronized (serverAdapter) {
|
||||
|
@ -348,7 +347,7 @@ public class RepositoryAdapter implements RemoteAdapterListener {
|
|||
* @throws IOException
|
||||
* @throws UserAccessException user no longer has any permission to use repository.
|
||||
* @throws NotConnectedException if server/repository connection is down (user already informed)
|
||||
* @see ghidra.framework.remote.RemoteRepositoryHandle#getServerUserList()
|
||||
* @see RemoteRepositoryHandle#getServerUserList()
|
||||
*/
|
||||
public String[] getServerUserList() throws IOException {
|
||||
synchronized (serverAdapter) {
|
||||
|
@ -373,7 +372,7 @@ public class RepositoryAdapter implements RemoteAdapterListener {
|
|||
* @throws UserAccessException
|
||||
* @throws IOException
|
||||
* @throws NotConnectedException if server/repository connection is down (user already informed)
|
||||
* @see ghidra.framework.remote.RemoteRepositoryHandle#setUserList(ghidra.framework.remote.User[])
|
||||
* @see RemoteRepositoryHandle#setUserList(User[], boolean)
|
||||
*/
|
||||
public void setUserList(User[] users, boolean anonymousAccessAllowed) throws IOException {
|
||||
synchronized (serverAdapter) {
|
||||
|
@ -391,8 +390,8 @@ public class RepositoryAdapter implements RemoteAdapterListener {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* @see ghidra.framework.remote.RepositoryHandle#createDatabase(java.lang.String, java.lang.String, java.lang.String, int, java.lang.String, java.lang.String)
|
||||
/**
|
||||
* @see RepositoryHandle#createDatabase(String, String, String, int, String, String)
|
||||
*/
|
||||
public ManagedBufferFileAdapter createDatabase(String parentPath, String itemName,
|
||||
int bufferSize, String contentType, String fileID, String projectPath)
|
||||
|
|
|
@ -299,7 +299,7 @@ public class RepositoryServerAdapter {
|
|||
* @throws UserAccessException
|
||||
* @throws IOException
|
||||
* @throws NotConnectedException if server connection is down (user already informed)
|
||||
* @see ghidra.framework.remote.RemoteRepositoryServerHandle#createRepository(java.lang.String, long)
|
||||
* @see ghidra.framework.remote.RemoteRepositoryServerHandle#createRepository(String)
|
||||
*/
|
||||
public synchronized RepositoryAdapter createRepository(String name)
|
||||
throws DuplicateNameException, UserAccessException, IOException, NotConnectedException {
|
||||
|
@ -398,7 +398,7 @@ public class RepositoryServerAdapter {
|
|||
}
|
||||
|
||||
/**
|
||||
* @returns true if server allows anonymous access.
|
||||
* @return true if server allows anonymous access.
|
||||
* Individual repositories must grant anonymous access separately.
|
||||
* @throws IOException
|
||||
* @throws NotConnectedException if server connection is down (user already informed)
|
||||
|
@ -418,7 +418,7 @@ public class RepositoryServerAdapter {
|
|||
}
|
||||
|
||||
/**
|
||||
* @returns true if user has restricted read-only access to server (e.g., anonymous user)
|
||||
* @return true if user has restricted read-only access to server (e.g., anonymous user)
|
||||
* @throws IOException
|
||||
* @throws NotConnectedException if server connection is down (user already informed)
|
||||
* @see ghidra.framework.remote.RemoteRepositoryServerHandle#isReadOnly()
|
||||
|
@ -469,7 +469,7 @@ public class RepositoryServerAdapter {
|
|||
* @throws IOException if user data can't be written to file
|
||||
* @throws NotConnectedException if server connection is down (user already informed)
|
||||
* @see ghidra.framework.remote.RemoteRepositoryServerHandle#setPassword(char[])
|
||||
* @see HashUtilities#getSaltedHash("SHA-256", char[])
|
||||
* @see ghidra.util.HashUtilities#getSaltedHash(String, char[]) HashUtilities.getSaltedHash("SHA-256", char[])
|
||||
*/
|
||||
public synchronized boolean setPassword(char[] saltedSHA256PasswordHash)
|
||||
throws IOException, NotConnectedException {
|
||||
|
@ -487,8 +487,6 @@ public class RepositoryServerAdapter {
|
|||
|
||||
/**
|
||||
* Returns true if this server allows the user to change their password.
|
||||
* @throws IOException
|
||||
* @throws NotConnectedException if server connection is down (user already informed)
|
||||
* @see ghidra.framework.remote.RemoteRepositoryServerHandle#canSetPassword()
|
||||
*/
|
||||
public synchronized boolean canSetPassword() {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -35,7 +34,7 @@ public class AnonymousCallback implements Callback, Serializable {
|
|||
}
|
||||
|
||||
/**
|
||||
* @returns true if anonymous access requested
|
||||
* @return true if anonymous access requested
|
||||
*/
|
||||
public boolean anonymousAccessRequested() {
|
||||
return anonymousAccessRequested;
|
||||
|
|
|
@ -219,7 +219,7 @@ public interface RepositoryHandle {
|
|||
* Perform a checkout on the specified item.
|
||||
* @param parentPath parent folder path
|
||||
* @param itemName name of item
|
||||
* @param CheckoutType checkout type. If exclusive or transient, checkout is only successful
|
||||
* @param checkoutType checkout type. If exclusive or transient, checkout is only successful
|
||||
* if no other checkouts exist. No new checkouts of item will be permitted while an
|
||||
* exclusive/transient checkout is active.
|
||||
* @param projectPath path of user's project
|
||||
|
|
|
@ -52,7 +52,6 @@ public class RepositoryItem implements java.io.Serializable {
|
|||
* @param contentType content type associated with item
|
||||
* @param version repository item version or -1 if versioning not supported
|
||||
* @param versionTime version creation time
|
||||
* @param checkoutList list of checkouts for the associated repository item.
|
||||
*/
|
||||
public RepositoryItem(String folderPath, String itemName, String fileID, int itemType,
|
||||
String contentType, int version, long versionTime) {
|
||||
|
|
|
@ -26,14 +26,14 @@ import ghidra.util.exception.UserAccessException;
|
|||
public interface RepositoryServerHandle {
|
||||
|
||||
/**
|
||||
* @returns true if server allows anonymous access.
|
||||
* @return true if server allows anonymous access.
|
||||
* Individual repositories must grant anonymous access separately.
|
||||
* @throws IOException if an IO error occurs
|
||||
*/
|
||||
boolean anonymousAccessAllowed() throws IOException;
|
||||
|
||||
/**
|
||||
* @returns true if user has restricted read-only access to server (e.g., anonymous user)
|
||||
* @return true if user has restricted read-only access to server (e.g., anonymous user)
|
||||
* @throws IOException if an IO error occurs
|
||||
*/
|
||||
boolean isReadOnly() throws IOException;
|
||||
|
@ -102,9 +102,9 @@ public interface RepositoryServerHandle {
|
|||
/**
|
||||
* Set the password for the user.
|
||||
* @param saltedSHA256PasswordHash SHA256 salted password hash
|
||||
* @returns true if password changed
|
||||
* @return true if password changed
|
||||
* @throws IOException if an IO error occurs
|
||||
* @see HashUtilities#getSaltedHash("SHA-256", char[])
|
||||
* @see ghidra.util.HashUtilities#getSaltedHash(String, char[]) HashUtilities.getSaltedHash("SHA-256", char[])
|
||||
*/
|
||||
boolean setPassword(char[] saltedSHA256PasswordHash) throws IOException;
|
||||
|
||||
|
|
|
@ -52,28 +52,28 @@ public class SSHSignatureCallback implements Callback, Serializable {
|
|||
}
|
||||
|
||||
/**
|
||||
* @returns token to be signed using user certificate.
|
||||
* @return token to be signed using user certificate.
|
||||
*/
|
||||
public byte[] getToken() {
|
||||
return (token == null ? null : (byte[]) token.clone());
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns signed token bytes set by callback handler.
|
||||
* @return signed token bytes set by callback handler.
|
||||
*/
|
||||
public byte[] getSignature() {
|
||||
return (signature == null ? null : (byte[]) signature.clone());
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns the server's signature of the token bytes.
|
||||
* @return the server's signature of the token bytes.
|
||||
*/
|
||||
public byte[] getServerSignature() {
|
||||
return serverSignature;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns true if callback has been signed
|
||||
* @return true if callback has been signed
|
||||
*/
|
||||
public boolean isSigned() {
|
||||
return signature != null;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -37,7 +36,7 @@ public interface DataFileHandle {
|
|||
* read, the end of the stream is detected, or an exception is thrown.
|
||||
*
|
||||
* @param b the buffer into which the data is read.
|
||||
* @exception EOFException if this file reaches the end before reading
|
||||
* @exception java.io.EOFException if this file reaches the end before reading
|
||||
* all the bytes.
|
||||
* @exception IOException if an I/O error occurs.
|
||||
*/
|
||||
|
@ -53,7 +52,7 @@ public interface DataFileHandle {
|
|||
* @param b the buffer into which the data is read.
|
||||
* @param off the start offset of the data.
|
||||
* @param len the number of bytes to read.
|
||||
* @exception EOFException if this file reaches the end before reading
|
||||
* @exception java.io.EOFException if this file reaches the end before reading
|
||||
* all the bytes.
|
||||
* @exception IOException if an I/O error occurs.
|
||||
*/
|
||||
|
|
|
@ -143,7 +143,6 @@ public interface FileSystem {
|
|||
* @param parentPath folder path of parent
|
||||
* @param name new database name
|
||||
* @param fileID file ID to be associated with new database or null
|
||||
* @param bufferFile data source
|
||||
* @param contentType application defined content type
|
||||
* @param bufferSize buffer size. If copying an existing BufferFile, the buffer
|
||||
* size must be the same as the source file.
|
||||
|
@ -164,7 +163,7 @@ public interface FileSystem {
|
|||
* Creates a new empty data file within the specified parent folder.
|
||||
* @param parentPath folder path of parent
|
||||
* @param name new data file name
|
||||
* @param inputStream source data
|
||||
* @param istream source data
|
||||
* @param comment version comment (used for versioned file system only)
|
||||
* @param contentType application defined content type
|
||||
* @param monitor progress monitor (used for cancel support,
|
||||
|
@ -286,7 +285,7 @@ public interface FileSystem {
|
|||
public boolean isShared();
|
||||
|
||||
/**
|
||||
* Cleanup & release resources
|
||||
* Cleanup and release resources
|
||||
*/
|
||||
public void dispose();
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -70,14 +69,14 @@ public interface FileSystemListener {
|
|||
* Notification that an item was renamed.
|
||||
* @param folderPath the path of the folder that contains the renamed item
|
||||
* @param oldItemName the old name of the item.
|
||||
* @param newITemName the new name of the item.
|
||||
* @param newItemName the new name of the item.
|
||||
*/
|
||||
void itemRenamed(String folderPath, String oldItemName, String newItemName);
|
||||
|
||||
/**
|
||||
* Notification that an item was moved.
|
||||
* @param parentPath the path of the folder that used to contain the item.
|
||||
* @param itemName the name of the item that was moved.
|
||||
* @param name the name of the item that was moved.
|
||||
* @param newParentPath the path of the folder that the item was moved to.
|
||||
* @param newName the new name of the item.
|
||||
*/
|
||||
|
|
|
@ -39,7 +39,7 @@ public class FileSystemListenerList implements FileSystemListener {
|
|||
|
||||
/**
|
||||
* Construct FileSystemListenerList
|
||||
* @param enableAsyncronousDispatching if true a seperate dispatch thread will be used
|
||||
* @param enableAsynchronousDispatching if true a seperate dispatch thread will be used
|
||||
* to notify listeners. If false, blocking notification will be performed.
|
||||
*/
|
||||
public FileSystemListenerList(boolean enableAsynchronousDispatching) {
|
||||
|
@ -83,7 +83,7 @@ public class FileSystemListenerList implements FileSystemListener {
|
|||
|
||||
/**
|
||||
* Forwards itemMoved callback to all listeners within this list.
|
||||
* @see ghidra.framework.store.FileSystemListener#itemMoved(java.lang.String, java.lang.String, java.lang.String)
|
||||
* @see ghidra.framework.store.FileSystemListener#itemMoved(String, String, String, String)
|
||||
*/
|
||||
@Override
|
||||
public void itemMoved(String parentPath, String name, String newParentPath, String newName) {
|
||||
|
@ -99,7 +99,7 @@ public class FileSystemListenerList implements FileSystemListener {
|
|||
|
||||
/**
|
||||
* Forwards itemRenamed callback to all listeners within this list.
|
||||
* @see ghidra.framework.store.FileSystemListener#itemRenamed(java.lang.String, java.lang.String, java.lang.String)
|
||||
* @see ghidra.framework.store.FileSystemListener#itemRenamed(String, String, String)
|
||||
*/
|
||||
@Override
|
||||
public void itemRenamed(String parentPath, String itemName, String newName) {
|
||||
|
@ -115,7 +115,7 @@ public class FileSystemListenerList implements FileSystemListener {
|
|||
|
||||
/**
|
||||
* Forwards itemDeleted callback to all listeners within this list.
|
||||
* @see ghidra.framework.store.FileSystemListener#itemDeleted(java.lang.String, java.lang.String)
|
||||
* @see ghidra.framework.store.FileSystemListener#itemDeleted(String, String)
|
||||
*/
|
||||
@Override
|
||||
public void itemDeleted(String parentPath, String itemName) {
|
||||
|
@ -131,7 +131,7 @@ public class FileSystemListenerList implements FileSystemListener {
|
|||
|
||||
/**
|
||||
* Forwards folderRenamed callback to all listeners within this list.
|
||||
* @see ghidra.framework.store.FileSystemListener#folderRenamed(java.lang.String, java.lang.String, java.lang.String)
|
||||
* @see ghidra.framework.store.FileSystemListener#folderRenamed(String, String, String)
|
||||
*/
|
||||
@Override
|
||||
public void folderRenamed(String parentPath, String folderName, String newFolderName) {
|
||||
|
@ -147,7 +147,7 @@ public class FileSystemListenerList implements FileSystemListener {
|
|||
|
||||
/**
|
||||
* Forwards folderMoved callback to all listeners within this list.
|
||||
* @see ghidra.framework.store.FileSystemListener#folderMoved(java.lang.String, java.lang.String, java.lang.String)
|
||||
* @see ghidra.framework.store.FileSystemListener#folderMoved(String, String, String)
|
||||
*/
|
||||
@Override
|
||||
public void folderMoved(String parentPath, String folderName, String newParentPath) {
|
||||
|
@ -163,7 +163,7 @@ public class FileSystemListenerList implements FileSystemListener {
|
|||
|
||||
/**
|
||||
* Forwards folderDeleted callback to all listeners within this list.
|
||||
* @see ghidra.framework.store.FileSystemListener#folderDeleted(java.lang.String, java.lang.String)
|
||||
* @see ghidra.framework.store.FileSystemListener#folderDeleted(String, String)
|
||||
*/
|
||||
@Override
|
||||
public void folderDeleted(String parentPath, String folderName) {
|
||||
|
@ -179,7 +179,7 @@ public class FileSystemListenerList implements FileSystemListener {
|
|||
|
||||
/**
|
||||
* Forwards itemCreated callback to all listeners within this list.
|
||||
* @see ghidra.framework.store.FileSystemListener#itemCreated(java.lang.String, java.lang.String)
|
||||
* @see ghidra.framework.store.FileSystemListener#itemCreated(String, String)
|
||||
*/
|
||||
@Override
|
||||
public void itemCreated(String parentPath, String itemName) {
|
||||
|
@ -195,7 +195,7 @@ public class FileSystemListenerList implements FileSystemListener {
|
|||
|
||||
/**
|
||||
* Forwards folderCreated callback to all listeners within this list.
|
||||
* @see ghidra.framework.store.FileSystemListener#folderCreated(java.lang.String, java.lang.String)
|
||||
* @see ghidra.framework.store.FileSystemListener#folderCreated(String, String)
|
||||
*/
|
||||
@Override
|
||||
public void folderCreated(String parentPath, String folderName) {
|
||||
|
@ -211,7 +211,7 @@ public class FileSystemListenerList implements FileSystemListener {
|
|||
|
||||
/**
|
||||
* Forwards itemChanged callback to all listeners within this list.
|
||||
* @see ghidra.framework.store.FileSystemListener#itemChanged(java.lang.String, java.lang.String)
|
||||
* @see ghidra.framework.store.FileSystemListener#itemChanged(String, String)
|
||||
*/
|
||||
@Override
|
||||
public void itemChanged(String parentPath, String itemName) {
|
||||
|
|
|
@ -258,9 +258,7 @@ public interface FolderItem {
|
|||
|
||||
/**
|
||||
* Get all current checkouts for this item.
|
||||
* @param parentPath
|
||||
* @param itemName
|
||||
* @return list of checkouts
|
||||
* @return array of checkouts
|
||||
* @throws IOException if an IO error occurs or this item is not versioned
|
||||
*/
|
||||
ItemCheckoutStatus[] getCheckouts() throws IOException;
|
||||
|
|
|
@ -60,9 +60,6 @@ public class PackedDBHandle extends DBHandle {
|
|||
this.contentType = pdb.getContentType();
|
||||
}
|
||||
|
||||
/*
|
||||
* @see ghidra.framework.store.db.DBHandle#save(java.lang.String, ghidra.framework.model.ChangeSet, ghidra.util.task.TaskMonitor)
|
||||
*/
|
||||
@Override
|
||||
public synchronized void save(String comment, DBChangeSet changeSet, TaskMonitor monitor)
|
||||
throws IOException, CancelledException {
|
||||
|
@ -125,7 +122,6 @@ public class PackedDBHandle extends DBHandle {
|
|||
* @throws CancelledException if task monitor cancelled operation.
|
||||
* @throws IOException
|
||||
* @throws DuplicateFileException
|
||||
* @see db.DBHandle#saveAs(java.io.File, java.lang.String, ghidra.util.task.TaskMonitor)
|
||||
*/
|
||||
public synchronized PackedDatabase saveAs(String itemName, File dir, String packedFileName,
|
||||
TaskMonitor monitor) throws IOException, DuplicateFileException, CancelledException {
|
||||
|
@ -154,7 +150,6 @@ public class PackedDBHandle extends DBHandle {
|
|||
* @throws CancelledException if task monitor cancelled operation.
|
||||
* @throws IOException
|
||||
* @throws DuplicateFileException
|
||||
* @see db.DBHandle#saveAs(java.io.File, java.lang.String, ghidra.util.task.TaskMonitor)
|
||||
*/
|
||||
public synchronized PackedDatabase saveAs(String itemName, File dir, String packedFileName,
|
||||
Long newDatabaseId, TaskMonitor monitor)
|
||||
|
|
|
@ -493,11 +493,10 @@ public class PackedDatabase extends Database {
|
|||
|
||||
/**
|
||||
* Create a new Database with data provided by an ItemDeserializer.
|
||||
* @param dir the parent directory which contains the "Hidden" database directory.
|
||||
* @param dbName the unmangled database name
|
||||
* @param checkinId
|
||||
* @param packedFile
|
||||
* @param monitor
|
||||
* @param bfMgr the buffer manager for the database
|
||||
* @param checkinId the check-in id
|
||||
* @param packedFile the file to unpack
|
||||
* @param monitor the task monitor
|
||||
* @throws CancelledException
|
||||
*/
|
||||
public static void unpackDatabase(BufferFileManager bfMgr, long checkinId, File packedFile,
|
||||
|
|
|
@ -154,11 +154,8 @@ public class PrivateDatabase extends Database {
|
|||
|
||||
/**
|
||||
* Open the current version of this database for update use.
|
||||
* @param recover if true an attempt will be made to recover unsaved changes
|
||||
* from a previous crash.
|
||||
* @param monitor task monitor
|
||||
* @return updateable buffer file
|
||||
* @throws IOException
|
||||
* @throws IOException if updating this database file is not allowed
|
||||
*/
|
||||
public LocalManagedBufferFile openBufferFileForUpdate() throws IOException {
|
||||
if (!updateAllowed) {
|
||||
|
@ -181,7 +178,8 @@ public class PrivateDatabase extends Database {
|
|||
* Following a move of the database directory,
|
||||
* this method should be invoked if this instance will
|
||||
* continue to be used.
|
||||
* @param dirir new database directory
|
||||
* @param dir new database directory
|
||||
* @throws FileNotFoundException if the database directory cannot be found
|
||||
*/
|
||||
public void dbMoved(File dir) throws FileNotFoundException {
|
||||
synchronized (syncObject) {
|
||||
|
@ -246,7 +244,7 @@ public class PrivateDatabase extends Database {
|
|||
* If already open for update, a save should not be done or the database
|
||||
* may become corrupted. All existing handles should be closed and reopened
|
||||
* when this method is complete.
|
||||
* @param privateDb
|
||||
* @param otherDb the other database.
|
||||
* @throws IOException if an IO error occurs. An attempt will be made to restore
|
||||
* this database to its original state, however the otherDb will not be repaired
|
||||
* and may become unusable.
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -31,8 +30,6 @@ public interface FileChangeListener {
|
|||
* on behalf of the caller. This method should not attempt to alter the
|
||||
* lock.
|
||||
* @param file the modified file.
|
||||
* @param haveLock is true if a file lock has been granted (LockFile was
|
||||
* supplied at time of construction).
|
||||
*/
|
||||
public void fileModified(File file);
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -54,8 +53,7 @@ public class ItemDeserializer {
|
|||
|
||||
/**
|
||||
* Constructor.
|
||||
* @param in input stream. The input stream must not be read again until
|
||||
* after the saveItem method has been invoked successfully.
|
||||
* @param packedFile item to deserialize.
|
||||
* @throws IOException
|
||||
*/
|
||||
public ItemDeserializer(File packedFile) throws IOException {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -162,7 +161,7 @@ public class ItemSerializer {
|
|||
* @param inputStream a stream for accessing bytes of what may be a packed file
|
||||
* @return true if the bytes from the inputStream represent the bytes of a packed file
|
||||
* @throws IOException If there is a problem accessing the inputStream
|
||||
* @see {@link #isPackedFile(File)}
|
||||
* @see #isPackedFile(File)
|
||||
*/
|
||||
public static boolean isPackedFile(InputStream inputStream) throws IOException {
|
||||
inputStream.skip(MAGIC_NUMBER_POS);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -121,16 +120,12 @@ public class LocalDataFile extends LocalFolderItem implements DataFileItem {
|
|||
return new File(getDataDir(), DATA_FILE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ghidra.framework.store.DataFile#getInputStream()
|
||||
*/
|
||||
@Override
|
||||
public InputStream getInputStream() throws FileNotFoundException {
|
||||
return new FileInputStream(getDataFile());
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ghidra.framework.store.DataFileItem#getInputStream(int)
|
||||
*/
|
||||
@Override
|
||||
public InputStream getInputStream(int version) throws FileNotFoundException {
|
||||
|
||||
// TODO Versions for DataFiles are not supported
|
||||
|
@ -138,16 +133,11 @@ public class LocalDataFile extends LocalFolderItem implements DataFileItem {
|
|||
return new FileInputStream(getDataFile());
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ghidra.framework.store.DataFile#getOutputStream()
|
||||
*/
|
||||
@Override
|
||||
public OutputStream getOutputStream() throws FileNotFoundException {
|
||||
return new FileOutputStream(getDataFile());
|
||||
}
|
||||
|
||||
/*
|
||||
* @see ghidra.framework.store.FolderItem#updateCheckout(ghidra.framework.store.FolderItem, boolean, ghidra.util.task.TaskMonitor)
|
||||
*/
|
||||
@Override
|
||||
public void updateCheckout(FolderItem versionedFolderItem, boolean updateItem,
|
||||
TaskMonitor monitor) throws IOException {
|
||||
|
@ -156,9 +146,6 @@ public class LocalDataFile extends LocalFolderItem implements DataFileItem {
|
|||
|
||||
}
|
||||
|
||||
/*
|
||||
* @see ghidra.framework.store.FolderItem#updateCheckout(ghidra.framework.store.FolderItem, int)
|
||||
*/
|
||||
@Override
|
||||
public void updateCheckout(FolderItem item, int checkoutVersion) throws IOException {
|
||||
|
||||
|
@ -166,9 +153,6 @@ public class LocalDataFile extends LocalFolderItem implements DataFileItem {
|
|||
|
||||
}
|
||||
|
||||
/*
|
||||
* @see ghidra.framework.store.local.LocalFolderItem#deleteMinimumVersion(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
void deleteMinimumVersion(String user) throws IOException {
|
||||
|
||||
|
@ -176,9 +160,6 @@ public class LocalDataFile extends LocalFolderItem implements DataFileItem {
|
|||
|
||||
}
|
||||
|
||||
/*
|
||||
* @see ghidra.framework.store.local.LocalFolderItem#deleteCurrentVersion(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
void deleteCurrentVersion(String user) throws IOException {
|
||||
|
||||
|
@ -186,33 +167,24 @@ public class LocalDataFile extends LocalFolderItem implements DataFileItem {
|
|||
|
||||
}
|
||||
|
||||
/*
|
||||
* @see ghidra.framework.store.FolderItem#output(java.io.File, int, ghidra.util.task.TaskMonitor)
|
||||
*/
|
||||
@Override
|
||||
public void output(File outputFile, int version, TaskMonitor monitor) throws IOException {
|
||||
|
||||
throw new UnsupportedOperationException("Output not yet supported for DataFiles");
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* @see ghidra.framework.store.local.LocalFolderItem#getMinimumVersion()
|
||||
*/
|
||||
@Override
|
||||
int getMinimumVersion() throws IOException {
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see ghidra.framework.store.FolderItem#getCurrentVersion()
|
||||
*/
|
||||
@Override
|
||||
public int getCurrentVersion() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see ghidra.framework.store.FolderItem#canRecover()
|
||||
*/
|
||||
@Override
|
||||
public boolean canRecover() {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ public abstract class LocalFileSystem implements FileSystem {
|
|||
/**
|
||||
* Hidden directory name prefix.
|
||||
* Should only be prepended to an escaped base-name.
|
||||
* @see #escapeHiddenPrefixChars(String)
|
||||
* @see #escapeHiddenDirPrefixChars(String)
|
||||
*/
|
||||
public static final char HIDDEN_DIR_PREFIX_CHAR = '~';
|
||||
public static final String HIDDEN_DIR_PREFIX = Character.toString(HIDDEN_DIR_PREFIX_CHAR);
|
||||
|
@ -169,7 +169,7 @@ public abstract class LocalFileSystem implements FileSystem {
|
|||
|
||||
/**
|
||||
* Constructor.
|
||||
* @param file path path for root directory.
|
||||
* @param rootPath root path directory.
|
||||
* @param isVersioned if true item versioning will be enabled.
|
||||
* @param readOnly if true modifications within this file-system will not be allowed
|
||||
* and result in an ReadOnlyException
|
||||
|
@ -273,14 +273,13 @@ public abstract class LocalFileSystem implements FileSystem {
|
|||
* significant performance impact. This does not provide locking which may be
|
||||
* required for a shared environment (e.g., checkin locking is only managed by a
|
||||
* single instance).
|
||||
* @param validationRequired
|
||||
*/
|
||||
public static void setValidationRequired() {
|
||||
refreshRequired = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns true if folder item resources must be refreshed.
|
||||
* @return true if folder item resources must be refreshed.
|
||||
* @see #setValidationRequired()
|
||||
*/
|
||||
public static boolean isRefreshRequired() {
|
||||
|
@ -699,7 +698,7 @@ public abstract class LocalFileSystem implements FileSystem {
|
|||
}
|
||||
|
||||
/**
|
||||
* @returns the maximum name length permitted for folders or items.
|
||||
* @return the maximum name length permitted for folders or items.
|
||||
*/
|
||||
public abstract int getMaxNameLength();
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -239,7 +238,7 @@ public class LockFile {
|
|||
|
||||
/**
|
||||
* Return the name of the current lock owner
|
||||
* or "<Unknown>" if not locked or could not be determined.
|
||||
* or {@code "<Unknown>"} if not locked or could not be determined.
|
||||
*/
|
||||
public String getLockOwner() {
|
||||
return getLockOwner(false);
|
||||
|
@ -346,7 +345,6 @@ public class LockFile {
|
|||
/**
|
||||
* Create the lock file using the default timeout.
|
||||
* Lock is guaranteed for MAX_LOCK_LEASE_PERIOD seconds.
|
||||
* @param timeout maximum time in seconds to wait for lock.
|
||||
* @return true if lock creation was successful.
|
||||
*/
|
||||
public boolean createLock() {
|
||||
|
|
|
@ -46,7 +46,6 @@ public class RemoteFileSystem implements FileSystem, RemoteAdapterListener {
|
|||
/**
|
||||
* Construct a new remote file system which corresponds to a remote repository.
|
||||
* @param repository remote Repository
|
||||
* @throws IOException
|
||||
*/
|
||||
public RemoteFileSystem(RepositoryAdapter repository) {
|
||||
this.repository = repository;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -147,7 +146,7 @@ public class PropertyFile {
|
|||
|
||||
/**
|
||||
* Returns the FileID associated with this file.
|
||||
* @returns FileID associated with this file
|
||||
* @return FileID associated with this file
|
||||
*/
|
||||
public String getFileID() {
|
||||
return getString(FILE_ID, null);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue