public interface OneDriveSDK
| Modifier and Type | Method and Description |
|---|---|
void |
authenticate(java.lang.String oAuthCode)
Used to authorize the session with the OAuth Response Code (used for first authentication)
|
void |
authenticateWithRefreshToken(java.lang.String refreshToken)
Used to authorize the session with a RefreshToken
|
void |
disconnect()
Disconnect from the current session.
|
java.util.List<OneDrive> |
getAllDrives()
Gets all drives of the user.
|
java.lang.String |
getAuthenticationURL()
Returns the OneDrive oAuth URL.
|
OneDrive |
getDefaultDrive()
Get user's default drive on OneDrive.
|
OneDrive |
getDrive(java.lang.String driveId)
Gets drive by the specified drive id.
|
OneFile |
getFileById(java.lang.String id)
Gets file by id.
|
OneFile |
getFileByPath(java.lang.String pathToFile)
Gets file by path.
|
OneFile |
getFileByPath(java.lang.String pathToFile,
OneDrive drive)
Gets file by path.
|
OneFolder |
getFolderById(java.lang.String id)
Gets folder by id.
|
OneFolder |
getFolderByPath(java.lang.String pathToFolder)
Gets folder by path.
|
OneFolder |
getFolderByPath(java.lang.String pathToFolder,
OneDrive drive)
Gets folder by path.
|
java.lang.String |
getRefreshToken()
Returns the RefreshToken of the Current Session, if any exists and
the current session is valid.
|
OneFolder |
getRootFolder()
Gets the root folder of the default drive.
|
OneFolder |
getRootFolder(OneDrive drive)
Gets the root folder of the given dive.
|
boolean |
isAuthenticated()
Returns true if the session is authenticated.
|
void |
startSessionAutoRefresh()
used to start a thread that request a new authentication token
|
OneDrive getDefaultDrive() throws java.io.IOException, OneDriveException
java.io.IOExceptionjava.io.IOExceptionOneDriveExceptionOneDrive getDrive(java.lang.String driveId) throws java.io.IOException, OneDriveException
driveId - the drive idjava.io.IOExceptionjava.io.IOExceptionOneDriveExceptionjava.util.List<OneDrive> getAllDrives() throws java.io.IOException, OneDriveException
java.io.IOExceptionOneDriveExceptionOneFolder getRootFolder() throws java.io.IOException, OneDriveException
java.io.IOExceptionjava.io.IOExceptionOneDriveExceptionOneFolder getRootFolder(OneDrive drive) throws java.io.IOException, OneDriveException
drive - java.io.IOExceptionjava.io.IOExceptionOneDriveExceptionOneFolder getFolderById(java.lang.String id) throws java.io.IOException, OneDriveException
id - java.io.IOExceptionjava.io.IOExceptionOneDriveExceptionOneFolder getFolderByPath(java.lang.String pathToFolder) throws java.io.IOException, OneDriveException
pathToFolder - java.io.IOExceptionOneDriveExceptionOneFile getFileById(java.lang.String id) throws java.io.IOException, OneDriveException
id - java.io.IOExceptionOneDriveExceptionOneFile getFileByPath(java.lang.String pathToFile) throws java.io.IOException, OneDriveException
pathToFile - java.io.IOExceptionOneDriveExceptionOneFolder getFolderByPath(java.lang.String pathToFolder, OneDrive drive) throws java.io.IOException, OneDriveException
pathToFolder - drive - java.io.IOExceptionOneDriveExceptionOneFile getFileByPath(java.lang.String pathToFile, OneDrive drive) throws java.io.IOException, OneDriveException
pathToFile - drive - java.io.IOExceptionOneDriveExceptionvoid authenticate(java.lang.String oAuthCode)
throws java.io.IOException,
OneDriveException
oAuthCode - the code from the OneDrive OAuth authentication process.java.io.IOExceptionOneDriveExceptionvoid authenticateWithRefreshToken(java.lang.String refreshToken)
throws java.io.IOException,
OneDriveException
refreshToken - java.io.IOExceptionOneDriveExceptionjava.lang.String getRefreshToken()
throws OneDriveException
OneDriveExceptionvoid disconnect()
throws java.io.IOException
java.io.IOExceptionjava.lang.String getAuthenticationURL()
boolean isAuthenticated()
void startSessionAutoRefresh()