Class DropboxV2
java.lang.Object
org.jenkinsci.plugins.publishoverdropbox.domain.DropboxV2
- All Implemented Interfaces:
DropboxAdapter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanchangeWorkingDirectory(String relativePath) voidbooleanconnect()static SecretconvertAuthorizationToAccessCode(Secret secretAuthorizationCode) static com.google.gson.GsonbooleanintbooleanmakeDirectory(String path) voidpruneFolder(String path, int pruneRootDays) voidsetTimeout(int timeout) Change the timeout value, values lower then 1000 are ignored and reset to default.voidstoreFile(String name, InputStream content, long length)
-
Constructor Details
-
DropboxV2
-
-
Method Details
-
createGson
public static com.google.gson.Gson createGson() -
setTimeout
public void setTimeout(int timeout) Change the timeout value, values lower then 1000 are ignored and reset to default.- Specified by:
setTimeoutin interfaceDropboxAdapter- Parameters:
timeout- timeout in miliseconds
-
getTimeout
public int getTimeout()- Specified by:
getTimeoutin interfaceDropboxAdapter
-
connect
- Specified by:
connectin interfaceDropboxAdapter- Throws:
RestException
-
isConnected
public boolean isConnected()- Specified by:
isConnectedin interfaceDropboxAdapter
-
disconnect
public boolean disconnect()- Specified by:
disconnectin interfaceDropboxAdapter
-
changeWorkingDirectory
- Specified by:
changeWorkingDirectoryin interfaceDropboxAdapter- Throws:
RestException
-
makeDirectory
- Specified by:
makeDirectoryin interfaceDropboxAdapter- Throws:
RestException
-
cleanWorkingFolder
- Specified by:
cleanWorkingFolderin interfaceDropboxAdapter- Throws:
RestException
-
pruneFolder
- Specified by:
pruneFolderin interfaceDropboxAdapter- Throws:
RestException
-
storeFile
public void storeFile(@Nonnull String name, @Nonnull InputStream content, long length) throws RestException - Specified by:
storeFilein interfaceDropboxAdapter- Parameters:
name- name of the new file to store the content incontent- data stream of the contentlength- content size in bytes- Throws:
RestException
-
convertAuthorizationToAccessCode
public static Secret convertAuthorizationToAccessCode(Secret secretAuthorizationCode) throws RestException - Throws:
RestException
-