public class OneDriveAPI extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
SCOPES
The Constant SCOPES.
|
| Modifier and Type | Method and Description |
|---|---|
org.exoplatform.services.cms.clouddrives.onedrive.OneDriveAPI.ChangesIterator |
changes(String deltaToken)
Changes.
|
com.microsoft.graph.models.extensions.DriveItem |
copy(String parentId,
String fileName,
String fileId,
boolean isFile)
Copy.
|
com.microsoft.graph.models.extensions.DriveItem |
copyFile(String parentId,
String fileName,
String fileId)
Copy file.
|
com.microsoft.graph.models.extensions.DriveItem |
copyFolder(String parentId,
String name,
String folderId)
Copy folder.
|
com.microsoft.graph.models.extensions.DriveItem |
createFolder(String parentId,
String name,
Calendar created)
Creates the folder.
|
com.microsoft.graph.models.extensions.SharingLink |
createLink(String itemId,
String type)
Creates a public link to view a file content.
|
org.exoplatform.services.cms.clouddrives.onedrive.DeltaDriveFiles |
getAllFiles()
Gets all the drive items.
|
String |
getBusinessPreviewLink(String itemId)
Gets short-lived embeddable URLs for an item (currently only for OneDrive business account by documentation).
|
org.exoplatform.services.cms.clouddrives.onedrive.OneDriveAPI.ChildIterator |
getChildIterator(String folderId)
Gets the child iterator.
|
com.microsoft.graph.models.extensions.Drive |
getDrive()
Gets the current user drive.
|
com.microsoft.graph.requests.extensions.IDriveItemCollectionPage |
getDriveItemCollectionPage(String folderId)
Gets a list of children of the folder, with pagination.
|
List<com.microsoft.graph.models.extensions.DriveItem> |
getFiles(String folderId)
Deprecated.
|
String |
getInsertUploadUrl(String parentId,
String name,
String conflictBehavior)
Gets url on which uploading should be done.
|
com.microsoft.graph.models.extensions.DriveItem |
getItem(String itemId)
Gets the item.
|
String |
getNotificationUrl()
Deprecated.
|
String |
getRootId()
Gets the root id.
|
org.exoplatform.services.cms.clouddrives.onedrive.OneDriveAPI.SimpleChildIterator |
getSimpleChildIterator(Collection<org.exoplatform.services.cms.clouddrives.onedrive.HashSetCompatibleDriveItem> items)
Gets the simple child iterator.
|
org.exoplatform.services.cms.clouddrives.onedrive.OneDriveStoredToken |
getStoredToken()
Gets the stored token.
|
com.microsoft.graph.models.extensions.Subscription |
getSubscription()
Subscribes to receive drive changes using web socket.
|
com.microsoft.graph.models.extensions.User |
getUser()
Gets the user.
|
String |
getUserId()
Gets the user id.
|
com.microsoft.graph.models.extensions.DriveItem |
insert(String parentId,
String fileName,
Calendar created,
Calendar modified,
InputStream inputStream,
String conflictBehavior)
Insert.
|
void |
removeFile(String fileId)
Removes the file.
|
void |
removeFolder(String fileId)
Removes the folder.
|
com.microsoft.graph.models.extensions.DriveItem |
updateFile(com.microsoft.graph.models.extensions.DriveItem driveItem)
Update file.
|
com.microsoft.graph.models.extensions.DriveItem |
updateFileContent(String itemId,
Calendar created,
Calendar modified,
InputStream inputStream)
Update file content.
|
void |
updateToken(org.exoplatform.services.cms.clouddrives.onedrive.OneDriveStoredToken newToken)
Update token.
|
public static final String SCOPES
public com.microsoft.graph.models.extensions.SharingLink createLink(String itemId, String type) throws OneDriveException
itemId - the item idtype - must be view or embedOneDriveException - the one drive exceptionpublic void updateToken(org.exoplatform.services.cms.clouddrives.onedrive.OneDriveStoredToken newToken)
throws org.exoplatform.services.cms.clouddrives.CloudDriveException
newToken - the new tokenorg.exoplatform.services.cms.clouddrives.CloudDriveException - the cloud drive exceptionpublic void removeFolder(String fileId)
fileId - the file idpublic void removeFile(String fileId)
fileId - the file idpublic com.microsoft.graph.models.extensions.User getUser()
public String getRootId()
public String getUserId()
public com.microsoft.graph.models.extensions.DriveItem createFolder(String parentId, String name, Calendar created)
parentId - the parent idname - the namecreated - the createdpublic com.microsoft.graph.models.extensions.DriveItem copyFile(String parentId, String fileName, String fileId) throws IOException, org.exoplatform.services.cms.clouddrives.CloudDriveException
parentId - the parent idfileName - the file namefileId - the file idIOException - Signals that an I/O exception has occurred.org.exoplatform.services.cms.clouddrives.CloudDriveException - the cloud drive exceptionpublic com.microsoft.graph.models.extensions.DriveItem copyFolder(String parentId, String name, String folderId) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, IOException
parentId - the parent idname - the namefolderId - the folder idorg.exoplatform.services.cms.clouddrives.CloudDriveException - the cloud drive exceptionIOException - Signals that an I/O exception has occurred.public org.exoplatform.services.cms.clouddrives.onedrive.OneDriveStoredToken getStoredToken()
@Deprecated public String getNotificationUrl()
public com.microsoft.graph.models.extensions.Subscription getSubscription()
public com.microsoft.graph.models.extensions.DriveItem copy(String parentId, String fileName, String fileId, boolean isFile) throws org.exoplatform.services.cms.clouddrives.RefreshAccessException, OneDriveException
parentId - the parent idfileName - the file namefileId - the file idisFile - the is fileorg.exoplatform.services.cms.clouddrives.RefreshAccessException - the refresh access exceptionOneDriveException - the one drive exceptionpublic com.microsoft.graph.requests.extensions.IDriveItemCollectionPage getDriveItemCollectionPage(String folderId)
folderId - the folder id@Deprecated public List<com.microsoft.graph.models.extensions.DriveItem> getFiles(String folderId)
folderId - the folder idpublic org.exoplatform.services.cms.clouddrives.onedrive.OneDriveAPI.ChangesIterator changes(String deltaToken)
deltaToken - starting from which to get changes.ChangesIteratorpublic String getInsertUploadUrl(String parentId, String name, String conflictBehavior) throws org.exoplatform.services.cms.clouddrives.RefreshAccessException, OneDriveException
parentId - where should the new file be added.name - the nameconflictBehavior - determines the behavior if a file with the name is
already present. must be 'fail' or 'rename';insertUpdate(String, InputStream)org.exoplatform.services.cms.clouddrives.RefreshAccessException - the refresh access exceptionOneDriveException - the one drive exceptionpublic com.microsoft.graph.models.extensions.DriveItem insert(String parentId, String fileName, Calendar created, Calendar modified, InputStream inputStream, String conflictBehavior) throws OneDriveException
parentId - the parent idfileName - the file namecreated - the createdmodified - the modifiedinputStream - the input streamconflictBehavior - the conflict behaviorOneDriveException - the one drive exceptionpublic com.microsoft.graph.models.extensions.DriveItem updateFileContent(String itemId, Calendar created, Calendar modified, InputStream inputStream) throws OneDriveException
itemId - the item idcreated - the createdmodified - the modifiedinputStream - the input streamOneDriveException - the one drive exceptionpublic org.exoplatform.services.cms.clouddrives.onedrive.DeltaDriveFiles getAllFiles()
DeltaDriveFilespublic com.microsoft.graph.models.extensions.DriveItem updateFile(com.microsoft.graph.models.extensions.DriveItem driveItem)
driveItem - the drive itempublic com.microsoft.graph.models.extensions.DriveItem getItem(String itemId)
itemId - the item idpublic com.microsoft.graph.models.extensions.Drive getDrive()
Drive the drivepublic String getBusinessPreviewLink(String itemId)
itemId - the item idpublic org.exoplatform.services.cms.clouddrives.onedrive.OneDriveAPI.SimpleChildIterator getSimpleChildIterator(Collection<org.exoplatform.services.cms.clouddrives.onedrive.HashSetCompatibleDriveItem> items) throws org.exoplatform.services.cms.clouddrives.CloudDriveException
items - the itemsorg.exoplatform.services.cms.clouddrives.CloudDriveException - the cloud drive exceptionpublic org.exoplatform.services.cms.clouddrives.onedrive.OneDriveAPI.ChildIterator getChildIterator(String folderId)
folderId - the folder idCopyright © 2003–2021 eXo Platform SAS. All rights reserved.