Package ghidra.framework.remote
Interface RemoteRepositoryHandle
- All Superinterfaces:
Remote,RepositoryHandle
RepositoryHandle provides access to a remote repository via RMI.
Methods from RepositoryHandle must 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 to
RemoteObjectInvocationHandler.
-
Field Summary
Fields inherited from interface ghidra.framework.remote.RepositoryHandle
CLIENT_CHECK_PERIOD -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckout(String parentPath, String itemName, CheckoutType checkoutType, String projectPath) Perform a checkout on the specified item.voidclose()Notification to server that client is dropping handle.createDatabase(String parentPath, String itemName, String fileID, int bufferSize, String contentType, String projectPath) Create a new empty database item within the repository.voiddeleteItem(String parentPath, String itemName, int version) Delete the specified version of an item.booleanfileExists(String parentPath, String itemName) Returns true if the specified item exists.booleanfolderExists(String folderPath) Returns true if the specified folder path exists.getCheckout(String parentPath, String itemName, long checkoutId) Returns specific checkout data for an item.getCheckouts(String parentPath, String itemName) Get a list of all checkouts for an item.Get pending change events.Returns the RepositoryItem with the given unique file IDReturns the RepositoryItem in the given folder with the given nameintReturns the number of folder items contained within this file-system.getItemList(String folderPath) Get of all items found within the specified parent folder path.longReturns the length of this domain file.getName()Returns the name of this repository.String[]Convenience method for obtaining a list of all users known to the server.String[]getSubfolderList(String folderPath) Get list of subfolders contained within the specified parent folder.getUser()Returns user object associated with this handle.User[]Returns a list of users authorized for this repository.Version[]getVersions(String parentPath, String itemName) Returns a list of all versions for the specified item.booleanhasCheckouts(String parentPath, String itemName) Returns true if the specified item has one or more checkouts.booleanisCheckinActive(String parentPath, String itemName) Returns true if the specified item has an active checkin.voidmoveFolder(String oldParentPath, String newParentPath, String oldFolderName, String newFolderName) Move an entire foldervoidMove an item to another folderopenDatabase(String parentPath, String itemName, int version, int minChangeDataVer) Open an existing version of a database buffer file for non-update read-only use.openDatabase(String parentPath, 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.voidterminateCheckout(String parentPath, String itemName, long checkoutId, boolean notify) Terminate an existing item checkout.voidupdateCheckoutVersion(String parentPath, String itemName, long checkoutId, int checkoutVersion) Update checkout data for an item following an update of a local checkout file.
-
Method Details
-
getName
Description copied from interface:RepositoryHandleReturns the name of this repository.- Specified by:
getNamein interfaceRepositoryHandle- Throws:
IOException- if an IO error occurs
-
getUser
Description copied from interface:RepositoryHandleReturns user object associated with this handle.- Specified by:
getUserin interfaceRepositoryHandle- Throws:
IOException- if an IO error occurs
-
getUserList
Description copied from interface:RepositoryHandleReturns a list of users authorized for this repository.- Specified by:
getUserListin interfaceRepositoryHandle- Throws:
IOException- if an IO error occurs
-
anonymousAccessAllowed
- Specified by:
anonymousAccessAllowedin interfaceRepositoryHandle- Returns:
- true if anonymous access allowed by this repository
- Throws:
IOException- if an IO error occurs
-
getServerUserList
Description 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:
IOException- if an IO error occurs- See Also:
-
setUserList
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:
IOException- if an IO error occurs
-
getSubfolderList
Description 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:
IOException- if an IO error occurs
-
getItemCount
Description copied from interface:RepositoryHandleReturns the number of folder items contained within this file-system.- Specified by:
getItemCountin interfaceRepositoryHandle- Throws:
IOException- if an IO error occurs
-
getItemList
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:
IOException- if an IO error occurs
-
getItem
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:
IOException- if an IO error occurs
-
getItem
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:
IOException- if an IO error occurs
-
createDatabase
ManagedBufferFileHandle createDatabase(String parentPath, String itemName, String fileID, int bufferSize, String contentType, String projectPath) throws 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:
IOException- if an IO error occursInvalidNameException- if itemName or parentPath contains invalid characters
-
openDatabase
ManagedBufferFileHandle openDatabase(String parentPath, String itemName, int version, int minChangeDataVer) throws 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:
IOException- if an IO error occurs
-
openDatabase
ManagedBufferFileHandle openDatabase(String parentPath, String itemName, long checkoutId) throws 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:
IOException- if an IO error occurs
-
getVersions
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:
IOException- if an IO error occurs
-
deleteItem
Description 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:
IOException- if an IO error occurs
-
moveFolder
void moveFolder(String oldParentPath, String newParentPath, String oldFolderName, String newFolderName) throws InvalidNameException, IOException Description 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 invalidIOException- if an IO error occurs
-
moveItem
void moveItem(String oldParentPath, String newParentPath, String oldItemName, String newItemName) throws InvalidNameException, IOException Description 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 invalidIOException- if an IO error occurs
-
checkout
ItemCheckoutStatus checkout(String parentPath, String itemName, CheckoutType checkoutType, String projectPath) throws IOException Description copied from interface:RepositoryHandlePerform a checkout on the specified item.- Specified by:
checkoutin interfaceRepositoryHandle- Parameters:
parentPath- parent folder pathitemName- name of itemcheckoutType- 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.projectPath- path of user's project- Returns:
- checkout data
- Throws:
IOException- if an IO error occurs
-
terminateCheckout
void terminateCheckout(String parentPath, String itemName, long checkoutId, boolean notify) throws IOException Description 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:
IOException- if an IO error occurs
-
getCheckout
ItemCheckoutStatus getCheckout(String parentPath, String itemName, long checkoutId) throws 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:
IOException- if an IO error occurs
-
getCheckouts
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:
IOException- if an IO error occurs
-
folderExists
Description copied from interface:RepositoryHandleReturns true if the specified folder path exists.- Specified by:
folderExistsin interfaceRepositoryHandle- Parameters:
folderPath- folder path- Throws:
IOException- if an IO error occurs
-
fileExists
Description copied from interface:RepositoryHandleReturns true if the specified item exists.- Specified by:
fileExistsin interfaceRepositoryHandle- Parameters:
parentPath- parent folder pathitemName- name of item- Throws:
IOException- if an IO error occurs
-
getLength
Description 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:
IOException- if an IO error occurs
-
hasCheckouts
Description 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:
IOException
-
isCheckinActive
Description 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:
IOException
-
updateCheckoutVersion
void updateCheckoutVersion(String parentPath, String itemName, long checkoutId, int checkoutVersion) throws IOException Description 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:
IOException- if error occurs
-
getEvents
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:
IOException- if error occurs.
-
close
Description copied from interface:RepositoryHandleNotification to server that client is dropping handle.- Specified by:
closein interfaceRepositoryHandle- Throws:
IOException- if error occurs
-