Class Office365OneDriveServiceGroovy
- java.lang.Object
-
- de.uplanet.lucy.server.odata.consumer.office365.Office365OneDriveServiceGroovy
-
- All Implemented Interfaces:
IOffice365OneDriveServiceGroovy
@Scriptable public final class Office365OneDriveServiceGroovy extends Object implements IOffice365OneDriveServiceGroovy
-
-
Constructor Summary
Constructors Constructor Description Office365OneDriveServiceGroovy()Office365OneDriveServiceGroovy(de.uplanet.lucy.server.odata.consumer.office365.IOffice365OneDriveService p_service, de.uplanet.lucy.server.odata.connector.IConfigurationRegistry p_registry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Permission>addPermission(String p_strCfgId, String p_strImpersonationGuid, String p_driveId, String p_itemId, PermissionRequest p_permissionRequest)Add a permission to the given drive item.DriveItemcreateFolder(String p_strCfgId, String p_strImpersonationGuid, String p_driveId, String p_itemId, String p_folderName)Create a new folder in the given folder with the given folder name.org.apache.http.client.HttpClientcreateHttpClient(String p_strCfgId, String p_strImpersonationGuid)Returns the HttpClient instance for the given configuration ID.org.apache.olingo.client.api.ODataClientcreateODataClient(String p_strCfgId, String p_strImpersonationGuid)Returns the ODataClient instance for the given configuration ID.SharingLinkcreateShareLink(String p_strCfgId, String p_strImpersonationGuid, String p_driveId, String p_itemId)Create a link to share the given drive item.StringgetConfigurationGuid(String p_strCfgId)Returns the internal configuration GUID for the given configuration ID.DriveItemgetDriveItemMetadata(String p_strCfgId, String p_strImpersonationGuid, String p_driveId, String p_itemId)Returns the metda data of the given drive item.List<DriveItem>getFolderContent(String p_strCfgId, String p_strImpersonationGuid, String p_driveId, String p_folderId)Returns folder item instances.PermissiongetPermission(String p_strCfgId, String p_strImpersonationGuid, String p_driveId, String p_itemId, String p_permissionId)Get the information about an existing permission.List<Permission>getPermissions(String p_strCfgId, String p_strImpersonationGuid, String p_driveId, String p_itemId)Returns a list of permissions of the given drive item.PermissionupdatePermission(String p_strCfgId, String p_strImpersonationGuid, String p_driveId, String p_itemId, String p_permissionId, String[] p_roles)Update a permission or rather configure the roles of an existing permission.
-
-
-
Constructor Detail
-
Office365OneDriveServiceGroovy
public Office365OneDriveServiceGroovy()
-
Office365OneDriveServiceGroovy
public Office365OneDriveServiceGroovy(de.uplanet.lucy.server.odata.consumer.office365.IOffice365OneDriveService p_service, de.uplanet.lucy.server.odata.connector.IConfigurationRegistry p_registry)
-
-
Method Detail
-
getFolderContent
public List<DriveItem> getFolderContent(String p_strCfgId, String p_strImpersonationGuid, String p_driveId, String p_folderId)
Description copied from interface:IOffice365OneDriveServiceGroovyReturns folder item instances.- Specified by:
getFolderContentin interfaceIOffice365OneDriveServiceGroovy- Parameters:
p_strCfgId- The connector configuration ID (name of the configuration XML file).p_strImpersonationGuid- If null, runs in current user context, otherwise in context of the given static user GUID which must be defined in the connector configuration.p_driveId- The drive ID.p_folderId- The folder ID.- Returns:
- A list of drive items.
-
getDriveItemMetadata
public DriveItem getDriveItemMetadata(String p_strCfgId, String p_strImpersonationGuid, String p_driveId, String p_itemId)
Description copied from interface:IOffice365OneDriveServiceGroovyReturns the metda data of the given drive item.- Specified by:
getDriveItemMetadatain interfaceIOffice365OneDriveServiceGroovy- Parameters:
p_strCfgId- The connector configuration ID (name of the configuration XML file).p_strImpersonationGuid- If null, runs in current user context, otherwise in context of the given static user GUID which must be defined in the connector configuration.p_driveId- The drive ID.p_itemId- The folder ID.- Returns:
- The meta data of the given drive item.
-
createFolder
public DriveItem createFolder(String p_strCfgId, String p_strImpersonationGuid, String p_driveId, String p_itemId, String p_folderName)
Description copied from interface:IOffice365OneDriveServiceGroovyCreate a new folder in the given folder with the given folder name.- Specified by:
createFolderin interfaceIOffice365OneDriveServiceGroovy- Parameters:
p_strCfgId- The connector configuration ID (name of the configuration XML file).p_strImpersonationGuid- If null, runs in current user context, otherwise in context of the given static user GUID which must be defined in the connector configuration.p_driveId- The drive ID.p_itemId- The folder ID.p_folderName- The name of the new folder.- Returns:
- The created folder.
-
getPermissions
public List<Permission> getPermissions(String p_strCfgId, String p_strImpersonationGuid, String p_driveId, String p_itemId)
Description copied from interface:IOffice365OneDriveServiceGroovyReturns a list of permissions of the given drive item.- Specified by:
getPermissionsin interfaceIOffice365OneDriveServiceGroovy- Parameters:
p_strCfgId- The connector configuration ID (name of the configuration XML file).p_strImpersonationGuid- If null, runs in current user context, otherwise in context of the given static user GUID which must be defined in the connector configuration.p_driveId- The drive ID.p_itemId- The folder ID.- Returns:
- A list of the drive item's permissions.
-
addPermission
public List<Permission> addPermission(String p_strCfgId, String p_strImpersonationGuid, String p_driveId, String p_itemId, PermissionRequest p_permissionRequest)
Description copied from interface:IOffice365OneDriveServiceGroovyAdd a permission to the given drive item.- Specified by:
addPermissionin interfaceIOffice365OneDriveServiceGroovy- Parameters:
p_strCfgId- The connector configuration ID (name of the configuration XML file).p_strImpersonationGuid- If null, runs in current user context, otherwise in context of the given static user GUID which must be defined in the connector configuration.p_driveId- The drive ID.p_itemId- The folder ID.p_permissionRequest- The permisson request containing all information about the permission, which should be created.- Returns:
- A list of the drive item's permissions.
-
createShareLink
public SharingLink createShareLink(String p_strCfgId, String p_strImpersonationGuid, String p_driveId, String p_itemId)
Description copied from interface:IOffice365OneDriveServiceGroovyCreate a link to share the given drive item.- Specified by:
createShareLinkin interfaceIOffice365OneDriveServiceGroovy- Parameters:
p_strCfgId- The connector configuration ID (name of the configuration XML file).p_strImpersonationGuid- If null, runs in current user context, otherwise in context of the given static user GUID which must be defined in the connector configuration.p_driveId- The drive ID.p_itemId- The folder ID.- Returns:
- The created sharing link.
-
updatePermission
public Permission updatePermission(String p_strCfgId, String p_strImpersonationGuid, String p_driveId, String p_itemId, String p_permissionId, String[] p_roles)
Description copied from interface:IOffice365OneDriveServiceGroovyUpdate a permission or rather configure the roles of an existing permission.- Specified by:
updatePermissionin interfaceIOffice365OneDriveServiceGroovy- Parameters:
p_strCfgId- The connector configuration ID (name of the configuration XML file).p_strImpersonationGuid- If null, runs in current user context, otherwise in context of the given static user GUID which must be defined in the connector configuration.p_driveId- The drive ID.p_itemId- The folder ID.p_permissionId- The ID of the permission, which should be updated.p_roles- A list of roles to set in the permission.- Returns:
- The updated permission.
-
getPermission
public Permission getPermission(String p_strCfgId, String p_strImpersonationGuid, String p_driveId, String p_itemId, String p_permissionId)
Description copied from interface:IOffice365OneDriveServiceGroovyGet the information about an existing permission.- Specified by:
getPermissionin interfaceIOffice365OneDriveServiceGroovy- Parameters:
p_strCfgId- The connector configuration ID (name of the configuration XML file).p_strImpersonationGuid- If null, runs in current user context, otherwise in context of the given static user GUID which must be defined in the connector configuration.p_driveId- The drive ID.p_itemId- The folder ID.p_permissionId- The permission ID.- Returns:
- The requested permission.
-
getConfigurationGuid
public String getConfigurationGuid(String p_strCfgId)
Description copied from interface:IOffice365OneDriveServiceGroovyReturns the internal configuration GUID for the given configuration ID. The configuration GUID is required for using non-scriptable connector classes.- Specified by:
getConfigurationGuidin interfaceIOffice365OneDriveServiceGroovy- Parameters:
p_strCfgId- The configuration ID (connector-id + "_" + configuration-name).- Returns:
- The internal configuration GUID.
-
createODataClient
public org.apache.olingo.client.api.ODataClient createODataClient(String p_strCfgId, String p_strImpersonationGuid)
Description copied from interface:IOffice365OneDriveServiceGroovyReturns the ODataClient instance for the given configuration ID. Can be used for direct OData calls to MS Office365.- Specified by:
createODataClientin interfaceIOffice365OneDriveServiceGroovy- Parameters:
p_strCfgId- The connector configuration ID (name of the configuration XML file).p_strImpersonationGuid- If null, runs in current user context, otherwise in context of the given static user GUID which must be defined in the connector configuration.- Returns:
- The OData client.
-
createHttpClient
public org.apache.http.client.HttpClient createHttpClient(String p_strCfgId, String p_strImpersonationGuid)
Description copied from interface:IOffice365OneDriveServiceGroovyReturns the HttpClient instance for the given configuration ID. Can be used for raw HTTP calls to MS Office365.- Specified by:
createHttpClientin interfaceIOffice365OneDriveServiceGroovy- Parameters:
p_strCfgId- The connector configuration ID (name of the configuration XML file).p_strImpersonationGuid- If null, runs in current user context, otherwise in context of the given static user GUID which must be defined in the connector configuration.- Returns:
- The OData client.
-
-