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.IOException
java.io.IOException
OneDriveException
OneDrive getDrive(java.lang.String driveId) throws java.io.IOException, OneDriveException
driveId
- the drive idjava.io.IOException
java.io.IOException
OneDriveException
java.util.List<OneDrive> getAllDrives() throws java.io.IOException, OneDriveException
java.io.IOException
OneDriveException
OneFolder getRootFolder() throws java.io.IOException, OneDriveException
java.io.IOException
java.io.IOException
OneDriveException
OneFolder getRootFolder(OneDrive drive) throws java.io.IOException, OneDriveException
drive
- java.io.IOException
java.io.IOException
OneDriveException
OneFolder getFolderById(java.lang.String id) throws java.io.IOException, OneDriveException
id
- java.io.IOException
java.io.IOException
OneDriveException
OneFolder getFolderByPath(java.lang.String pathToFolder) throws java.io.IOException, OneDriveException
pathToFolder
- java.io.IOException
OneDriveException
OneFile getFileById(java.lang.String id) throws java.io.IOException, OneDriveException
id
- java.io.IOException
OneDriveException
OneFile getFileByPath(java.lang.String pathToFile) throws java.io.IOException, OneDriveException
pathToFile
- java.io.IOException
OneDriveException
OneFolder getFolderByPath(java.lang.String pathToFolder, OneDrive drive) throws java.io.IOException, OneDriveException
pathToFolder
- drive
- java.io.IOException
OneDriveException
OneFile getFileByPath(java.lang.String pathToFile, OneDrive drive) throws java.io.IOException, OneDriveException
pathToFile
- drive
- java.io.IOException
OneDriveException
void authenticate(java.lang.String oAuthCode) throws java.io.IOException, OneDriveException
oAuthCode
- the code from the OneDrive OAuth authentication process.java.io.IOException
OneDriveException
void authenticateWithRefreshToken(java.lang.String refreshToken) throws java.io.IOException, OneDriveException
refreshToken
- java.io.IOException
OneDriveException
java.lang.String getRefreshToken() throws OneDriveException
OneDriveException
void disconnect() throws java.io.IOException
java.io.IOException
java.lang.String getAuthenticationURL()
boolean isAuthenticated()
void startSessionAutoRefresh()