Package ghidra.framework.remote

# Interface RemoteRepositoryHandle

All Superinterfaces:
  `Remote`, `RepositoryHandle`

public interface RemoteRepositoryHandle extends RepositoryHandle, Remote
`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 Type
  Method
  Description
  `boolean`
  `anonymousAccessAllowed()`
  `ItemCheckoutStatus`
  `checkout(String parentPath, String itemName, CheckoutType checkoutType, String projectPath)`
  Perform a checkout on the specified item.
  `void`
  `close()`
  Notification to server that client is dropping handle.
  `ManagedBufferFileHandle`
  `createDatabase(String parentPath, String itemName, String fileID, int bufferSize, String contentType, String projectPath)`
  Create a new empty database item within the repository.
  `void`
  `deleteItem(String parentPath, String itemName, int version)`
  Delete the specified version of an item.
  `boolean`
  `fileExists(String parentPath, String itemName)`
  Returns true if the specified item exists.
  `boolean`
  `folderExists(String folderPath)`
  Returns true if the specified folder path exists.
  `ItemCheckoutStatus`
  `getCheckout(String parentPath, String itemName, long checkoutId)`
  Returns specific checkout data for an item.
  `ItemCheckoutStatus[]`
  `getCheckouts(String parentPath, String itemName)`
  Get a list of all checkouts for an item.
  `RepositoryChangeEvent[]`
  `getEvents()`
  Get pending change events.
  `RepositoryItem`
  `getItem(String fileID)`
  Returns the RepositoryItem with the given unique file ID
  `RepositoryItem`
  `getItem(String parentPath, String name)`
  Returns the RepositoryItem in the given folder with the given name
  `int`
  `getItemCount()`
  Returns the number of folder items contained within this file-system.
  `RepositoryItem[]`
  `getItemList(String folderPath)`
  Get of all items found within the specified parent folder path.
  `long`
  `getLength(String parentPath, String itemName)`
  Returns the length of this domain file.
  `String`
  `getName()`
  Returns the name of this repository.
  `String[]`
  `getServerUserList()`
  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.
  `User`
  `getUser()`
  Returns user object associated with this handle.
  `User[]`
  `getUserList()`
  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.
  `boolean`
  `hasCheckouts(String parentPath, String itemName)`
  Returns true if the specified item has one or more checkouts.
  `boolean`
  `isCheckinActive(String parentPath, String itemName)`
  Returns true if the specified item has an active checkin.
  `void`
  `moveFolder(String oldParentPath, String newParentPath, String oldFolderName, String newFolderName)`
  Move an entire folder
  `void`
  `moveItem(String oldParentPath, String newParentPath, String oldItemName, String newItemName)`
  Move an item to another folder
  `ManagedBufferFileHandle`
  `openDatabase(String parentPath, String itemName, int version, int minChangeDataVer)`
  Open an existing version of a database buffer file for non-update read-only use.
  `ManagedBufferFileHandle`
  `openDatabase(String parentPath, String itemName, long checkoutId)`
  Open the current version for checkin of new version.
  `void`
  `setUserList(User[] users, boolean anonymousAccessAllowed)`
  Set the list of authorized users for this repository.
  `void`
  `terminateCheckout(String parentPath, String itemName, long checkoutId, boolean notify)`
  Terminate an existing item checkout.
  `void`
  `updateCheckoutVersion(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

    String getName() throws IOException
    Description copied from interface: `RepositoryHandle`
    Returns the name of this repository.
    Specified by:
      `getName` in interface `RepositoryHandle`
    Throws:
      `IOException` - if an IO error occurs

  - ### getUser

    User getUser() throws IOException
    Description copied from interface: `RepositoryHandle`
    Returns user object associated with this handle.
    Specified by:
      `getUser` in interface `RepositoryHandle`
    Throws:
      `IOException` - if an IO error occurs

  - ### getUserList

    User[] getUserList() throws IOException
    Description copied from interface: `RepositoryHandle`
    Returns a list of users authorized for this repository.
    Specified by:
      `getUserList` in interface `RepositoryHandle`
    Throws:
      `UserAccessException`
      `IOException` - if an IO error occurs

  - ### anonymousAccessAllowed

    boolean anonymousAccessAllowed() throws IOException
    Specified by:
      `anonymousAccessAllowed` in interface `RepositoryHandle`
    Returns:
      true if anonymous access allowed by this repository
    Throws:
      `IOException` - if an IO error occurs

  - ### getServerUserList

    String[] getServerUserList() throws IOException
    Description copied from interface: `RepositoryHandle`
    Convenience method for obtaining a list of all users known to the server.
    Specified by:
      `getServerUserList` in interface `RepositoryHandle`
    Returns:
      list of user names.
    Throws:
      `IOException` - if an IO error occurs
    See Also:
      - `RemoteRepositoryServerHandle.getAllUsers()`

  - ### setUserList

    void setUserList(User[] users, boolean anonymousAccessAllowed) throws IOException
    Description copied from interface: `RepositoryHandle`
    Set the list of authorized users for this repository.
    Specified by:
      `setUserList` in interface `RepositoryHandle`
    Parameters:
      `users` - list of user and access permissions.
      `anonymousAccessAllowed` - true if anonymous access should be permitted to this repository
    Throws:
      `UserAccessException`
      `IOException` - if an IO error occurs

  - ### getSubfolderList

    String[] getSubfolderList(String folderPath) throws IOException
    Description copied from interface: `RepositoryHandle`
    Get list of subfolders contained within the specified parent folder.
    Specified by:
      `getSubfolderList` in interface `RepositoryHandle`
    Parameters:
      `folderPath` - parent folder path
    Returns:
      list of subfolder names
    Throws:
      `UserAccessException` - if user does not have adequate permission within the repository.
      `FileNotFoundException` - if specified parent folder path not found
      `IOException` - if an IO error occurs

  - ### getItemCount

    int getItemCount() throws IOException
    Description copied from interface: `RepositoryHandle`
    Returns the number of folder items contained within this file-system.
    Specified by:
      `getItemCount` in interface `RepositoryHandle`
    Throws:
      `IOException` - if an IO error occurs

  - ### getItemList

    RepositoryItem[] getItemList(String folderPath) throws IOException
    Description copied from interface: `RepositoryHandle`
    Get of all items found within the specified parent folder path.
    Specified by:
      `getItemList` in interface `RepositoryHandle`
    Parameters:
      `folderPath` - parent folder path
    Returns:
      list of items contained within specified parent folder
    Throws:
      `UserAccessException`
      `FileNotFoundException` - if parent folder not found
      `IOException` - if an IO error occurs

  - ### getItem

    RepositoryItem getItem(String parentPath, String name) throws IOException
    Description copied from interface: `RepositoryHandle`
    Returns the RepositoryItem in the given folder with the given name
    Specified by:
      `getItem` in interface `RepositoryHandle`
    Parameters:
      `parentPath` - folder path
      `name` - item name
    Returns:
      item or null if not found
    Throws:
      `IOException` - if an IO error occurs

  - ### getItem

    RepositoryItem getItem(String fileID) throws IOException
    Description copied from interface: `RepositoryHandle`
    Returns the RepositoryItem with the given unique file ID
    Specified by:
      `getItem` in interface `RepositoryHandle`
    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: `RepositoryHandle`
    Create a new empty database item within the repository.
    Specified by:
      `createDatabase` in interface `RepositoryHandle`
    Parameters:
      `parentPath` - parent folder path
      `itemName` - new item name
      `fileID` - unique file ID
      `bufferSize` - buffer file buffer size
      `contentType` - application content type
      `projectPath` - 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 repository
      `IOException` - if an IO error occurs
      `InvalidNameException` - if itemName or parentPath contains invalid characters

  - ### openDatabase

    ManagedBufferFileHandle openDatabase(String parentPath, String itemName, int version, int minChangeDataVer) throws IOException
    Description copied from interface: `RepositoryHandle`
    Open an existing version of a database buffer file for non-update read-only use.
    Specified by:
      `openDatabase` in interface `RepositoryHandle`
    Parameters:
      `parentPath` - parent folder path
      `itemName` - name of existing data file
      `version` - 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.
      `FileNotFoundException` - if database version not found
      `IOException` - if an IO error occurs

  - ### openDatabase

    ManagedBufferFileHandle openDatabase(String parentPath, String itemName, long checkoutId) throws IOException
    Description copied from interface: `RepositoryHandle`
    Open the current version for checkin of new version.
    Specified by:
      `openDatabase` in interface `RepositoryHandle`
    Parameters:
      `parentPath` - parent folder path
      `itemName` - name of existing data file
      `checkoutId` - checkout ID
    Returns:
      remote buffer file for updateable read-only use
    Throws:
      `UserAccessException` - if user does not have adequate permission within the repository.
      `FileNotFoundException` - if database version not found
      `IOException` - if an IO error occurs

  - ### getVersions

    Version[] getVersions(String parentPath, String itemName) throws IOException
    Description copied from interface: `RepositoryHandle`
    Returns a list of all versions for the specified item.
    Specified by:
      `getVersions` in interface `RepositoryHandle`
    Parameters:
      `parentPath` - parent folder path
      `itemName` - name of item
    Returns:
      version list
    Throws:
      `IOException` - if an IO error occurs

  - ### deleteItem

    void deleteItem(String parentPath, String itemName, int version) throws IOException
    Description copied from interface: `RepositoryHandle`
    Delete the specified version of an item.
    Specified by:
      `deleteItem` in interface `RepositoryHandle`
    Parameters:
      `parentPath` - parent folder path
      `itemName` - name of item
      `version` - 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: `RepositoryHandle`
    Move an entire folder
    Specified by:
      `moveFolder` in interface `RepositoryHandle`
    Parameters:
      `oldParentPath` - current parent folder path
      `newParentPath` - new parent folder path
      `oldFolderName` - current folder name
      `newFolderName` - new folder name
    Throws:
      `InvalidNameException` - if newFolderName is invalid
      `DuplicateFileException` - if target folder already exists
      `IOException` - if an IO error occurs

  - ### moveItem

    void moveItem(String oldParentPath, String newParentPath, String oldItemName, String newItemName) throws InvalidNameException, IOException
    Description copied from interface: `RepositoryHandle`
    Move an item to another folder
    Specified by:
      `moveItem` in interface `RepositoryHandle`
    Parameters:
      `oldParentPath` - current parent folder path
      `newParentPath` - new parent folder path
      `oldItemName` - current item name
      `newItemName` - new item name
    Throws:
      `InvalidNameException` - if newItemName is invalid
      `DuplicateFileException` - if target item already exists
      `IOException` - if an IO error occurs

  - ### checkout

    ItemCheckoutStatus checkout(String parentPath, String itemName, CheckoutType checkoutType, String projectPath) throws IOException
    Description copied from interface: `RepositoryHandle`
    Perform a checkout on the specified item.
    Specified by:
      `checkout` in interface `RepositoryHandle`
    Parameters:
      `parentPath` - parent folder path
      `itemName` - name of item
      `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.
      `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: `RepositoryHandle`
    Terminate an existing item checkout.
    Specified by:
      `terminateCheckout` in interface `RepositoryHandle`
    Parameters:
      `parentPath` - parent folder path
      `itemName` - name of item
      `checkoutId` - checkout ID
      `notify` - 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: `RepositoryHandle`
    Returns specific checkout data for an item.
    Specified by:
      `getCheckout` in interface `RepositoryHandle`
    Parameters:
      `parentPath` - parent folder path
      `itemName` - name of item
      `checkoutId` - checkout ID
    Returns:
      checkout data
    Throws:
      `IOException` - if an IO error occurs

  - ### getCheckouts

    ItemCheckoutStatus[] getCheckouts(String parentPath, String itemName) throws IOException
    Description copied from interface: `RepositoryHandle`
    Get a list of all checkouts for an item.
    Specified by:
      `getCheckouts` in interface `RepositoryHandle`
    Parameters:
      `parentPath` - parent folder path
      `itemName` - name of item
    Returns:
      checkout data list
    Throws:
      `FileNotFoundException` - if folder item not found
      `IOException` - if an IO error occurs

  - ### folderExists

    boolean folderExists(String folderPath) throws IOException
    Description copied from interface: `RepositoryHandle`
    Returns true if the specified folder path exists.
    Specified by:
      `folderExists` in interface `RepositoryHandle`
    Parameters:
      `folderPath` - folder path
    Throws:
      `IOException` - if an IO error occurs

  - ### fileExists

    boolean fileExists(String parentPath, String itemName) throws IOException
    Description copied from interface: `RepositoryHandle`
    Returns true if the specified item exists.
    Specified by:
      `fileExists` in interface `RepositoryHandle`
    Parameters:
      `parentPath` - parent folder path
      `itemName` - name of item
    Throws:
      `IOException` - if an IO error occurs

  - ### getLength

    long getLength(String parentPath, String itemName) throws IOException
    Description copied from interface: `RepositoryHandle`
    Returns 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:
      `getLength` in interface `RepositoryHandle`
    Parameters:
      `parentPath` - parent folder path
      `itemName` - name of item
    Returns:
      file length
    Throws:
      `IOException` - if an IO error occurs

  - ### hasCheckouts

    boolean hasCheckouts(String parentPath, String itemName) throws IOException
    Description copied from interface: `RepositoryHandle`
    Returns true if the specified item has one or more checkouts.
    Specified by:
      `hasCheckouts` in interface `RepositoryHandle`
    Parameters:
      `parentPath` - parent folder path
      `itemName` - name of item
    Throws:
      `IOException`

  - ### isCheckinActive

    boolean isCheckinActive(String parentPath, String itemName) throws IOException
    Description copied from interface: `RepositoryHandle`
    Returns true if the specified item has an active checkin.
    Specified by:
      `isCheckinActive` in interface `RepositoryHandle`
    Parameters:
      `parentPath` - parent folder path
      `itemName` - name of item
    Throws:
      `IOException`

  - ### updateCheckoutVersion

    void updateCheckoutVersion(String parentPath, String itemName, long checkoutId, int checkoutVersion) throws IOException
    Description copied from interface: `RepositoryHandle`
    Update checkout data for an item following an update of a local checkout file.
    Specified by:
      `updateCheckoutVersion` in interface `RepositoryHandle`
    Parameters:
      `parentPath` - parent folder path
      `itemName` - name of item
      `checkoutId` - checkout ID
      `checkoutVersion` - item version used for update
    Throws:
      `IOException` - if error occurs

  - ### getEvents

    RepositoryChangeEvent[] getEvents() throws IOException
    Description copied from interface: `RepositoryHandle`
    Get pending change events. Call will block until an event is available.
    Specified by:
      `getEvents` in interface `RepositoryHandle`
    Returns:
      array of events
    Throws:
      `IOException` - if error occurs.

  - ### close

    void close() throws IOException
    Description copied from interface: `RepositoryHandle`
    Notification to server that client is dropping handle.
    Specified by:
      `close` in interface `RepositoryHandle`
    Throws:
      `IOException` - if error occurs