Package ghidra.framework.remote
Interface RemoteRepositoryHandle
-
- All Superinterfaces:
java.rmi.Remote,RepositoryHandle
public interface RemoteRepositoryHandle extends RepositoryHandle, java.rmi.Remote
RepositoryHandleprovides access to a remote repository via RMI.Methods from
RepositoryHandlemust be re-declared here so they may be properly marshalled for remote invocation via RMI. This became neccessary with an OpenJDK 11.0.6 change made toRemoteObjectInvocationHandler.
-
-
Field Summary
-
Fields inherited from interface ghidra.framework.remote.RepositoryHandle
CLIENT_CHECK_PERIOD
-
-
Method Summary
All Methods Instance Methods Abstract Methods Change Modifier and Type Method Description NEW booleananonymousAccessAllowed()NEW ItemCheckoutStatuscheckout(java.lang.String parentPath, java.lang.String itemName, CheckoutType checkoutType, java.lang.String projectPath)Perform a checkout on the specified item.NEW voidclose()Notification to server that client is dropping handle.NEW ManagedBufferFileHandlecreateDatabase(java.lang.String parentPath, java.lang.String itemName, java.lang.String fileID, int bufferSize, java.lang.String contentType, java.lang.String projectPath)Create a new empty database item within the repository.NEW voiddeleteItem(java.lang.String parentPath, java.lang.String itemName, int version)Delete the specified version of an item.NEW booleanfileExists(java.lang.String parentPath, java.lang.String itemName)Returns true if the specified item exists.NEW booleanfolderExists(java.lang.String folderPath)Returns true if the specified folder path exists.NEW ItemCheckoutStatusgetCheckout(java.lang.String parentPath, java.lang.String itemName, long checkoutId)Returns specific checkout data for an item.NEW ItemCheckoutStatus[]getCheckouts(java.lang.String parentPath, java.lang.String itemName)Get a list of all checkouts for an item.NEW RepositoryChangeEvent[]getEvents()Get pending change events.NEW RepositoryItemgetItem(java.lang.String fileID)Returns the RepositoryItem with the given unique file IDNEW RepositoryItemgetItem(java.lang.String parentPath, java.lang.String name)Returns the RepositoryItem in the given folder with the given nameNEW intgetItemCount()Returns the number of folder items contained within this file-system.NEW RepositoryItem[]getItemList(java.lang.String folderPath)Get of all items found within the specified parent folder path.NEW longgetLength(java.lang.String parentPath, java.lang.String itemName)Returns the length of this domain file.NEW java.lang.StringgetName()Returns the name of this repository.NEW java.lang.String[]getServerUserList()Convenience method for obtaining a list of all users known to the server.NEW java.lang.String[]getSubfolderList(java.lang.String folderPath)Get list of subfolders contained within the specified parent folder.NEW UsergetUser()Returns user object associated with this handle.NEW User[]getUserList()Returns a list of users authorized for this repository.NEW Version[]getVersions(java.lang.String parentPath, java.lang.String itemName)Returns a list of all versions for the specified item.NEW booleanhasCheckouts(java.lang.String parentPath, java.lang.String itemName)Returns true if the specified item has one or more checkouts.NEW booleanisCheckinActive(java.lang.String parentPath, java.lang.String itemName)Returns true if the specified item has an active checkin.NEW voidmoveFolder(java.lang.String oldParentPath, java.lang.String newParentPath, java.lang.String oldFolderName, java.lang.String newFolderName)Move an entire folderNEW voidmoveItem(java.lang.String oldParentPath, java.lang.String newParentPath, java.lang.String oldItemName, java.lang.String newItemName)Move an item to another folderNEW ManagedBufferFileHandleopenDatabase(java.lang.String parentPath, java.lang.String itemName, int version, int minChangeDataVer)Open an existing version of a database buffer file for non-update read-only use.NEW ManagedBufferFileHandleopenDatabase(java.lang.String parentPath, java.lang.String itemName, long checkoutId)Open the current version for checkin of new version.voidsetUserList(User[] users, boolean anonymousAccessAllowed)Set the list of authorized users for this repository.NEW voidterminateCheckout(java.lang.String parentPath, java.lang.String itemName, long checkoutId, boolean notify)Terminate an existing item checkout.NEW voidupdateCheckoutVersion(java.lang.String parentPath, java.lang.String itemName, long checkoutId, int checkoutVersion)Update checkout data for an item following an update of a local checkout file.
-
-
-
Method Detail
-
getName NEW
java.lang.String getName() throws java.io.IOExceptionDescription copied from interface:RepositoryHandleReturns the name of this repository.- Specified by:
getNamein interfaceRepositoryHandle- Throws:
java.io.IOException- if an IO error occurs
-
getUser NEW
User getUser() throws java.io.IOException
Description copied from interface:RepositoryHandleReturns user object associated with this handle.- Specified by:
getUserin interfaceRepositoryHandle- Throws:
java.io.IOException- if an IO error occurs
-
getUserList NEW
User[] getUserList() throws java.io.IOException
Description copied from interface:RepositoryHandleReturns a list of users authorized for this repository.- Specified by:
getUserListin interfaceRepositoryHandle- Throws:
UserAccessExceptionjava.io.IOException- if an IO error occurs
-
anonymousAccessAllowed NEW
boolean anonymousAccessAllowed() throws java.io.IOException- Specified by:
anonymousAccessAllowedin interfaceRepositoryHandle- Returns:
- true if anonymous access allowed by this repository
- Throws:
java.io.IOException- if an IO error occurs
-
getServerUserList NEW
java.lang.String[] getServerUserList() throws java.io.IOExceptionDescription copied from interface:RepositoryHandleConvenience method for obtaining a list of all users known to the server.- Specified by:
getServerUserListin interfaceRepositoryHandle- Returns:
- list of user names.
- Throws:
java.io.IOException- if an IO error occurs- See Also:
RemoteRepositoryServerHandle.getAllUsers()
-
setUserList NEW
void setUserList(User[] users, boolean anonymousAccessAllowed) throws java.io.IOException
Description copied from interface:RepositoryHandleSet the list of authorized users for this repository.- Specified by:
setUserListin interfaceRepositoryHandle- Parameters:
users- list of user and access permissions.anonymousAccessAllowed- true if anonymous access should be permitted to this repository- Throws:
UserAccessExceptionjava.io.IOException- if an IO error occurs
-
getSubfolderList NEW
java.lang.String[] getSubfolderList(java.lang.String folderPath) throws java.io.IOExceptionDescription copied from interface:RepositoryHandleGet list of subfolders contained within the specified parent folder.- Specified by:
getSubfolderListin interfaceRepositoryHandle- Parameters:
folderPath- parent folder path- Returns:
- list of subfolder names
- Throws:
UserAccessException- if user does not have adequate permission within the repository.java.io.FileNotFoundException- if specified parent folder path not foundjava.io.IOException- if an IO error occurs
-
getItemCount NEW
int getItemCount() throws java.io.IOExceptionDescription copied from interface:RepositoryHandleReturns the number of folder items contained within this file-system.- Specified by:
getItemCountin interfaceRepositoryHandle- Throws:
java.io.IOException- if an IO error occurs
-
getItemList NEW
RepositoryItem[] getItemList(java.lang.String folderPath) throws java.io.IOException
Description copied from interface:RepositoryHandleGet of all items found within the specified parent folder path.- Specified by:
getItemListin interfaceRepositoryHandle- Parameters:
folderPath- parent folder path- Returns:
- list of items contained within specified parent folder
- Throws:
UserAccessExceptionjava.io.FileNotFoundException- if parent folder not foundjava.io.IOException- if an IO error occurs
-
getItem NEW
RepositoryItem getItem(java.lang.String parentPath, java.lang.String name) throws java.io.IOException
Description copied from interface:RepositoryHandleReturns the RepositoryItem in the given folder with the given name- Specified by:
getItemin interfaceRepositoryHandle- Parameters:
parentPath- folder pathname- item name- Returns:
- item or null if not found
- Throws:
java.io.IOException- if an IO error occurs
-
getItem NEW
RepositoryItem getItem(java.lang.String fileID) throws java.io.IOException
Description copied from interface:RepositoryHandleReturns the RepositoryItem with the given unique file ID- Specified by:
getItemin interfaceRepositoryHandle- Parameters:
fileID- unique file ID- Returns:
- item or null if not found
- Throws:
java.io.IOException- if an IO error occurs
-
createDatabase NEW
ManagedBufferFileHandle createDatabase(java.lang.String parentPath, java.lang.String itemName, java.lang.String fileID, int bufferSize, java.lang.String contentType, java.lang.String projectPath) throws java.io.IOException, InvalidNameException
Description copied from interface:RepositoryHandleCreate a new empty database item within the repository.- Specified by:
createDatabasein interfaceRepositoryHandle- Parameters:
parentPath- parent folder pathitemName- new item namefileID- unique file IDbufferSize- buffer file buffer sizecontentType- application content typeprojectPath- path of user's project- Returns:
- initial buffer file open for writing
- Throws:
UserAccessException- if user does not have adequate permission within the repository.DuplicateFileException- item path already exists within repositoryjava.io.IOException- if an IO error occursInvalidNameException- if itemName or parentPath contains invalid characters
-
openDatabase NEW
ManagedBufferFileHandle openDatabase(java.lang.String parentPath, java.lang.String itemName, int version, int minChangeDataVer) throws java.io.IOException
Description copied from interface:RepositoryHandleOpen an existing version of a database buffer file for non-update read-only use.- Specified by:
openDatabasein interfaceRepositoryHandle- Parameters:
parentPath- parent folder pathitemName- name of existing data fileversion- existing version of data file (-1 = latest version)minChangeDataVer- indicates the oldest change data buffer file to be included. A -1 indicates only the last change data buffer file is applicable.- Returns:
- remote buffer file for non-update read-only use
- Throws:
UserAccessException- if user does not have adequate permission within the repository.java.io.FileNotFoundException- if database version not foundjava.io.IOException- if an IO error occurs
-
openDatabase NEW
ManagedBufferFileHandle openDatabase(java.lang.String parentPath, java.lang.String itemName, long checkoutId) throws java.io.IOException
Description copied from interface:RepositoryHandleOpen the current version for checkin of new version.- Specified by:
openDatabasein interfaceRepositoryHandle- Parameters:
parentPath- parent folder pathitemName- name of existing data filecheckoutId- checkout ID- Returns:
- remote buffer file for updateable read-only use
- Throws:
UserAccessException- if user does not have adequate permission within the repository.java.io.FileNotFoundException- if database version not foundjava.io.IOException- if an IO error occurs
-
getVersions NEW
Version[] getVersions(java.lang.String parentPath, java.lang.String itemName) throws java.io.IOException
Description copied from interface:RepositoryHandleReturns a list of all versions for the specified item.- Specified by:
getVersionsin interfaceRepositoryHandle- Parameters:
parentPath- parent folder pathitemName- name of item- Returns:
- version list
- Throws:
java.io.IOException- if an IO error occurs
-
deleteItem NEW
void deleteItem(java.lang.String parentPath, java.lang.String itemName, int version) throws java.io.IOExceptionDescription copied from interface:RepositoryHandleDelete the specified version of an item.- Specified by:
deleteItemin interfaceRepositoryHandle- Parameters:
parentPath- parent folder pathitemName- name of itemversion- oldest or latest version of item to be deleted, or -1 to delete the entire item. User must be Admin or owner of version to be deleted.- Throws:
java.io.IOException- if an IO error occurs
-
moveFolder NEW
void moveFolder(java.lang.String oldParentPath, java.lang.String newParentPath, java.lang.String oldFolderName, java.lang.String newFolderName) throws InvalidNameException, java.io.IOExceptionDescription copied from interface:RepositoryHandleMove an entire folder- Specified by:
moveFolderin interfaceRepositoryHandle- Parameters:
oldParentPath- current parent folder pathnewParentPath- new parent folder patholdFolderName- current folder namenewFolderName- new folder name- Throws:
InvalidNameException- if newFolderName is invalidDuplicateFileException- if target folder already existsjava.io.IOException- if an IO error occurs
-
moveItem NEW
void moveItem(java.lang.String oldParentPath, java.lang.String newParentPath, java.lang.String oldItemName, java.lang.String newItemName) throws InvalidNameException, java.io.IOExceptionDescription copied from interface:RepositoryHandleMove an item to another folder- Specified by:
moveItemin interfaceRepositoryHandle- Parameters:
oldParentPath- current parent folder pathnewParentPath- new parent folder patholdItemName- current item namenewItemName- new item name- Throws:
InvalidNameException- if newItemName is invalidDuplicateFileException- if target item already existsjava.io.IOException- if an IO error occurs
-
checkout NEW
ItemCheckoutStatus checkout(java.lang.String parentPath, java.lang.String itemName, CheckoutType checkoutType, java.lang.String projectPath) throws java.io.IOException
Description copied from interface:RepositoryHandlePerform a checkout on the specified item.- Specified by:
checkoutin interfaceRepositoryHandle- Parameters:
parentPath- parent folder pathitemName- name of itemprojectPath- path of user's project- Returns:
- checkout data
- Throws:
java.io.IOException- if an IO error occurs
-
terminateCheckout NEW
void terminateCheckout(java.lang.String parentPath, java.lang.String itemName, long checkoutId, boolean notify) throws java.io.IOExceptionDescription copied from interface:RepositoryHandleTerminate an existing item checkout.- Specified by:
terminateCheckoutin interfaceRepositoryHandle- Parameters:
parentPath- parent folder pathitemName- name of itemcheckoutId- checkout IDnotify- notify listeners of item status change- Throws:
java.io.IOException- if an IO error occurs
-
getCheckout NEW
ItemCheckoutStatus getCheckout(java.lang.String parentPath, java.lang.String itemName, long checkoutId) throws java.io.IOException
Description copied from interface:RepositoryHandleReturns specific checkout data for an item.- Specified by:
getCheckoutin interfaceRepositoryHandle- Parameters:
parentPath- parent folder pathitemName- name of itemcheckoutId- checkout ID- Returns:
- checkout data
- Throws:
java.io.IOException- if an IO error occurs
-
getCheckouts NEW
ItemCheckoutStatus[] getCheckouts(java.lang.String parentPath, java.lang.String itemName) throws java.io.IOException
Description copied from interface:RepositoryHandleGet a list of all checkouts for an item.- Specified by:
getCheckoutsin interfaceRepositoryHandle- Parameters:
parentPath- parent folder pathitemName- name of item- Returns:
- checkout data list
- Throws:
java.io.IOException- if an IO error occurs
-
folderExists NEW
boolean folderExists(java.lang.String folderPath) throws java.io.IOExceptionDescription copied from interface:RepositoryHandleReturns true if the specified folder path exists.- Specified by:
folderExistsin interfaceRepositoryHandle- Parameters:
folderPath- folder path- Throws:
java.io.IOException- if an IO error occurs
-
fileExists NEW
boolean fileExists(java.lang.String parentPath, java.lang.String itemName) throws java.io.IOExceptionDescription copied from interface:RepositoryHandleReturns true if the specified item exists.- Specified by:
fileExistsin interfaceRepositoryHandle- Parameters:
parentPath- parent folder pathitemName- name of item- Throws:
java.io.IOException- if an IO error occurs
-
getLength NEW
long getLength(java.lang.String parentPath, java.lang.String itemName) throws java.io.IOExceptionDescription copied from interface:RepositoryHandleReturns 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 tracks changes, etc.- Specified by:
getLengthin interfaceRepositoryHandle- Parameters:
parentPath- parent folder pathitemName- name of item- Returns:
- file length
- Throws:
java.io.IOException- if an IO error occurs
-
hasCheckouts NEW
boolean hasCheckouts(java.lang.String parentPath, java.lang.String itemName) throws java.io.IOExceptionDescription copied from interface:RepositoryHandleReturns true if the specified item has one or more checkouts.- Specified by:
hasCheckoutsin interfaceRepositoryHandle- Parameters:
parentPath- parent folder pathitemName- name of item- Throws:
java.io.IOException
-
isCheckinActive NEW
boolean isCheckinActive(java.lang.String parentPath, java.lang.String itemName) throws java.io.IOExceptionDescription copied from interface:RepositoryHandleReturns true if the specified item has an active checkin.- Specified by:
isCheckinActivein interfaceRepositoryHandle- Parameters:
parentPath- parent folder pathitemName- name of item- Throws:
java.io.IOException
-
updateCheckoutVersion NEW
void updateCheckoutVersion(java.lang.String parentPath, java.lang.String itemName, long checkoutId, int checkoutVersion) throws java.io.IOExceptionDescription copied from interface:RepositoryHandleUpdate checkout data for an item following an update of a local checkout file.- Specified by:
updateCheckoutVersionin interfaceRepositoryHandle- Parameters:
parentPath- parent folder pathitemName- name of itemcheckoutId- checkout IDcheckoutVersion- item version used for update- Throws:
java.io.IOException- if error occurs
-
getEvents NEW
RepositoryChangeEvent[] getEvents() throws java.io.IOException
Description copied from interface:RepositoryHandleGet pending change events. Call will block until an event is available.- Specified by:
getEventsin interfaceRepositoryHandle- Returns:
- array of events
- Throws:
java.io.IOException- if error occurs.
-
close NEW
void close() throws java.io.IOExceptionDescription copied from interface:RepositoryHandleNotification to server that client is dropping handle.- Specified by:
closein interfaceRepositoryHandle- Throws:
java.io.IOException- if error occurs
-
-