Package ghidra.framework.remote

# Interface RemoteRepositoryServerHandle

All Superinterfaces:
  `Remote`, `RepositoryServerHandle`

public interface RemoteRepositoryServerHandle extends RepositoryServerHandle, Remote
`RepositoryServerHandle` provides access to a remote repository server via RMI.

Methods from `RepositoryServerHandle` 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`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `anonymousAccessAllowed()`
  `boolean`
  `canSetPassword()`
  Returns true if the user's password can be changed.
  `void`
  `connected()`
  Verify that server is alive and connected.
  `RepositoryHandle`
  `createRepository(String name)`
  Create a new repository on the server.
  `void`
  `deleteRepository(String name)`
  Delete a repository.
  `String[]`
  `getAllUsers()`
  Returns a list of all known users.
  `long`
  `getPasswordExpiration()`
  Returns the amount of time in milliseconds until the user's password will expire.
  `RepositoryHandle`
  `getRepository(String name)`
  Get a handle to an existing repository.
  `String[]`
  `getRepositoryNames()`
  Returns a list of all repository names which are accessable by the current user.
  `String`
  `getUser()`
  Returns current user for which this handle belongs.
  `boolean`
  `isReadOnly()`
  `boolean`
  `setPassword(char[] saltedSHA256PasswordHash)`
  Set the password for the user.

- ## Method Details

  - ### anonymousAccessAllowed

    boolean anonymousAccessAllowed() throws IOException
    Specified by:
      `anonymousAccessAllowed` in interface `RepositoryServerHandle`
    Returns:
      true if server allows anonymous access. Individual repositories must grant anonymous access separately.
    Throws:
      `IOException` - if an IO error occurs

  - ### isReadOnly

    boolean isReadOnly() throws IOException
    Specified by:
      `isReadOnly` in interface `RepositoryServerHandle`
    Returns:
      true if user has restricted read-only access to server (e.g., anonymous user)
    Throws:
      `IOException` - if an IO error occurs

  - ### createRepository

    RepositoryHandle createRepository(String name) throws IOException
    Description copied from interface: `RepositoryServerHandle`
    Create a new repository on the server. The newly created RepositoryHandle will contain a unique project ID for the client.
    Specified by:
      `createRepository` in interface `RepositoryServerHandle`
    Parameters:
      `name` - repository name. This ID will be used to identify and maintain checkout data.
    Returns:
      handle to new repository.
    Throws:
      `IOException` - if an IO error occurs

  - ### getRepository

    RepositoryHandle getRepository(String name) throws IOException
    Description copied from interface: `RepositoryServerHandle`
    Get a handle to an existing repository.
    Specified by:
      `getRepository` in interface `RepositoryServerHandle`
    Parameters:
      `name` - repository name.
    Returns:
      repository handle or null if repository does not exist.
    Throws:
      `IOException` - if an IO error occurs

  - ### deleteRepository

    void deleteRepository(String name) throws IOException
    Description copied from interface: `RepositoryServerHandle`
    Delete a repository.
    Specified by:
      `deleteRepository` in interface `RepositoryServerHandle`
    Parameters:
      `name` - repository name.
    Throws:
      `IOException` - if an IO error occurs

  - ### getRepositoryNames

    String[] getRepositoryNames() throws IOException
    Description copied from interface: `RepositoryServerHandle`
    Returns a list of all repository names which are accessable by the current user.
    Specified by:
      `getRepositoryNames` in interface `RepositoryServerHandle`
    Throws:
      `IOException` - if an IO error occurs

  - ### getUser

    String getUser() throws IOException
    Description copied from interface: `RepositoryServerHandle`
    Returns current user for which this handle belongs.
    Specified by:
      `getUser` in interface `RepositoryServerHandle`
    Throws:
      `IOException` - if an IO error occurs

  - ### getAllUsers

    String[] getAllUsers() throws IOException
    Description copied from interface: `RepositoryServerHandle`
    Returns a list of all known users.
    Specified by:
      `getAllUsers` in interface `RepositoryServerHandle`
    Throws:
      `IOException` - if an IO error occurs

  - ### canSetPassword

    boolean canSetPassword() throws IOException
    Description copied from interface: `RepositoryServerHandle`
    Returns true if the user's password can be changed.
    Specified by:
      `canSetPassword` in interface `RepositoryServerHandle`
    Throws:
      `IOException` - if an IO error occurs

  - ### getPasswordExpiration

    long getPasswordExpiration() throws IOException
    Description copied from interface: `RepositoryServerHandle`
    Returns the amount of time in milliseconds until the user's password will expire.
    Specified by:
      `getPasswordExpiration` in interface `RepositoryServerHandle`
    Returns:
      time until expiration or -1 if it will not expire
    Throws:
      `IOException` - if an IO error occurs

  - ### setPassword

    boolean setPassword(char[] saltedSHA256PasswordHash) throws IOException
    Description copied from interface: `RepositoryServerHandle`
    Set the password for the user.
    Specified by:
      `setPassword` in interface `RepositoryServerHandle`
    Parameters:
      `saltedSHA256PasswordHash` - SHA256 salted password hash
    Returns:
      true if password changed
    Throws:
      `IOException` - if an IO error occurs
    See Also:
      - `HashUtilities.getSaltedHash("SHA-256", char[])`

  - ### connected

    void connected() throws IOException
    Description copied from interface: `RepositoryServerHandle`
    Verify that server is alive and connected.
    Specified by:
      `connected` in interface `RepositoryServerHandle`
    Throws:
      `IOException` - if connection verification fails