Package ghidra.framework.remote
Interface RepositoryServerHandle
-
- All Known Subinterfaces:
RemoteRepositoryServerHandle
public interface RepositoryServerHandleRepositoryServerHandleprovides access to a repository server.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleananonymousAccessAllowed()booleancanSetPassword()Returns true if the user's password can be changed.voidconnected()Verify that server is alive and connected.RepositoryHandlecreateRepository(java.lang.String name)Create a new repository on the server.voiddeleteRepository(java.lang.String name)Delete a repository.java.lang.String[]getAllUsers()Returns a list of all known users.longgetPasswordExpiration()Returns the amount of time in milliseconds until the user's password will expire.RepositoryHandlegetRepository(java.lang.String name)Get a handle to an existing repository.java.lang.String[]getRepositoryNames()Returns a list of all repository names which are accessable by the current user.java.lang.StringgetUser()Returns current user for which this handle belongs.booleanisReadOnly()booleansetPassword(char[] saltedSHA256PasswordHash)Set the password for the user.
-
-
-
Method Detail
-
anonymousAccessAllowed
boolean anonymousAccessAllowed() throws java.io.IOException- Throws:
java.io.IOException- if an IO error occurs
-
isReadOnly
boolean isReadOnly() throws java.io.IOException- Throws:
java.io.IOException- if an IO error occurs
-
createRepository
RepositoryHandle createRepository(java.lang.String name) throws java.io.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:
DuplicateFileExceptionUserAccessExceptionjava.io.IOException- if an IO error occurs
-
getRepository
RepositoryHandle getRepository(java.lang.String name) throws java.io.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 repositoryjava.io.IOException- if an IO error occurs
-
deleteRepository
void deleteRepository(java.lang.String name) throws java.io.IOExceptionDelete a repository.- Parameters:
name- repository name.- Throws:
UserAccessException- if user does not have permission to delete repositoryjava.io.IOException- if an IO error occurs
-
getRepositoryNames
java.lang.String[] getRepositoryNames() throws java.io.IOExceptionReturns a list of all repository names which are accessable by the current user.- Throws:
java.io.IOException- if an IO error occurs
-
getUser
java.lang.String getUser() throws java.io.IOExceptionReturns current user for which this handle belongs.- Throws:
java.io.IOException- if an IO error occurs
-
getAllUsers
java.lang.String[] getAllUsers() throws java.io.IOExceptionReturns a list of all known users.- Throws:
java.io.IOException- if an IO error occurs
-
canSetPassword
boolean canSetPassword() throws java.io.IOExceptionReturns true if the user's password can be changed.- Throws:
java.io.IOException- if an IO error occurs
-
getPasswordExpiration
long getPasswordExpiration() throws java.io.IOExceptionReturns 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:
java.io.IOException- if an IO error occurs
-
setPassword
boolean setPassword(char[] saltedSHA256PasswordHash) throws java.io.IOExceptionSet the password for the user.- Parameters:
saltedSHA256PasswordHash- SHA256 salted password hash- Throws:
java.io.IOException- if an IO error occurs
-
connected
void connected() throws java.io.IOExceptionVerify that server is alive and connected.- Throws:
java.io.IOException- if connection verification fails
-
-