Interface RepositoryServerHandle

All Known Subinterfaces:
RemoteRepositoryServerHandle

public interface RepositoryServerHandle
RepositoryServerHandle provides access to a repository server.
  • Method Details

    • anonymousAccessAllowed

      boolean anonymousAccessAllowed() throws IOException
      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
      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
      Create a new repository on the server. The newly created RepositoryHandle will contain a unique project ID for the client.
      Parameters:
      name - repository name. This ID will be used to identify and maintain checkout data.
      Returns:
      handle to new repository.
      Throws:
      DuplicateFileException
      UserAccessException
      IOException - if an IO error occurs
    • getRepository

      RepositoryHandle getRepository(String name) throws IOException
      Get a handle to an existing repository.
      Parameters:
      name - repository name.
      Returns:
      repository handle or null if repository does not exist.
      Throws:
      UserAccessException - if user does not have permission to access repository
      IOException - if an IO error occurs
    • deleteRepository

      void deleteRepository(String name) throws IOException
      Delete a repository.
      Parameters:
      name - repository name.
      Throws:
      UserAccessException - if user does not have permission to delete repository
      IOException - if an IO error occurs
    • getRepositoryNames

      String[] getRepositoryNames() throws IOException
      Returns a list of all repository names which are accessable by the current user.
      Throws:
      IOException - if an IO error occurs
    • getUser

      String getUser() throws IOException
      Returns current user for which this handle belongs.
      Throws:
      IOException - if an IO error occurs
    • getAllUsers

      String[] getAllUsers() throws IOException
      Returns a list of all known users.
      Throws:
      IOException - if an IO error occurs
    • canSetPassword

      boolean canSetPassword() throws IOException
      Returns true if the user's password can be changed.
      Throws:
      IOException - if an IO error occurs
    • getPasswordExpiration

      long getPasswordExpiration() throws IOException
      Returns the amount of time in milliseconds until the user's password will expire.
      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
      Set the password for the user.
      Parameters:
      saltedSHA256PasswordHash - SHA256 salted password hash
      Returns:
      true if password changed
      Throws:
      IOException - if an IO error occurs
      See Also:
    • connected

      void connected() throws IOException
      Verify that server is alive and connected.
      Throws:
      IOException - if connection verification fails