Package com.amilesend.onedrive
Class BusinessOneDrive
java.lang.Object
com.amilesend.onedrive.OneDrive
com.amilesend.onedrive.BusinessOneDrive
The primary exposed object to consumers to access drives available to the authenticated user for business accounts.
While this object can be instantiated directly by consumers, it is recommended to leverage the
OneDriveFactoryStateManager
instead. Doing so simplifies OAUTH authentication and persists the
authentication tokens for reuse. Without it, consumers are responsible for initiating the OAUTH handshake
to obtain the authorization code and managing persisted refresh tokens for future instantiation without
requiring the user to re-authorize the consumer application with their OneDrive account.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBusinessOneDrive
(OneDriveConnection connection) Creates a newBusinessOneDrive
. -
Method Summary
Modifier and TypeMethodDescriptiongetDefaultDriveForGroup
(String groupId) Gets the defaultDrive
for the givengroupId
.getDefaultDriveForSite
(String siteId) Gets the defaultDrive
for the givensiteId
.getDrivesForGroup
(String groupId) Gets the list of drives available to the givengroupId
.getDrivesForSite
(String siteId) Gets the list of drives available to the givensiteId
.getDrivesForUser
(String userId) Gets the list of drives available to the givenuserId
.Gets the root site.Gets the list ofSite
s in an organization.Gets theSite
for the givensiteId
.getSiteForGroup
(String groupId) Gets the rootSite
for the givengroupId
.searchForSite
(String query) Searches for sites for the givenquery
.Methods inherited from class com.amilesend.onedrive.OneDrive
getAuthInfo, getAvailableDrives, getDrive, getUserDisplayName, getUserDrive
-
Constructor Details
-
BusinessOneDrive
Creates a newBusinessOneDrive
.- Parameters:
connection
- the authenticated connection
-
-
Method Details
-
getRootSite
Gets the root site.- Returns:
- the root site
- See Also:
-
getSite
- Parameters:
siteId
- the site identifier- Returns:
- the site
- See Also:
-
getSiteForGroup
- Parameters:
groupId
- the group identifier- Returns:
- the site
-
getRootSites
Gets the list ofSite
s in an organization.- Returns:
- the list of sites
- See Also:
-
searchForSite
Searches for sites for the givenquery
.- Parameters:
query
- the search query- Returns:
- the list of sites
- See Also:
-
getDefaultDriveForGroup
- Parameters:
groupId
- the group identifier- Returns:
- the drive
-
getDefaultDriveForSite
- Parameters:
siteId
- the site identifier- Returns:
- the drive
-
getDrivesForSite
Gets the list of drives available to the givensiteId
.- Parameters:
siteId
- the site identifier- Returns:
- the list of drives
-
getDrivesForGroup
Gets the list of drives available to the givengroupId
. Note: Business accounts only- Parameters:
groupId
- the group identifier- Returns:
- the list of drives
-
getDrivesForUser
Gets the list of drives available to the givenuserId
. Note: Business accounts only- Parameters:
userId
- the user identifier- Returns:
- the list of drives
-