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
ConstructorDescriptionOffice365OneDriveServiceGroovy
(de.uplanet.lucy.server.odata.consumer.office365.IOffice365OneDriveService p_service, de.uplanet.lucy.server.odata.connector.IConfigurationRegistry p_registry) -
Method Summary
Modifier and TypeMethodDescriptionaddPermission
(String p_strCfgId, String p_strImpersonationGuid, String p_driveId, String p_itemId, PermissionRequest p_permissionRequest) Add a permission to the given drive item.createFolder
(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.HttpClient
createHttpClient
(String p_strCfgId, String p_strImpersonationGuid) Returns the HttpClient instance for the given configuration ID.org.apache.olingo.client.api.ODataClient
createODataClient
(String p_strCfgId, String p_strImpersonationGuid) Returns the ODataClient instance for the given configuration ID.createShareLink
(String p_strCfgId, String p_strImpersonationGuid, String p_driveId, String p_itemId) Create a link to share the given drive item.getConfigurationGuid
(String p_strCfgId) Returns the internal configuration GUID for the given configuration ID.getDriveItemMetadata
(String p_strCfgId, String p_strImpersonationGuid, String p_driveId, String p_itemId) Returns the metda data of the given drive item.getFolderContent
(String p_strCfgId, String p_strImpersonationGuid, String p_driveId, String p_folderId) Returns folder item instances.getPermission
(String p_strCfgId, String p_strImpersonationGuid, String p_driveId, String p_itemId, String p_permissionId) Get the information about an existing permission.getPermissions
(String p_strCfgId, String p_strImpersonationGuid, String p_driveId, String p_itemId) Returns a list of permissions of the given drive item.updatePermission
(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 Details
-
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 Details
-
getFolderContent
public List<DriveItem> getFolderContent(String p_strCfgId, String p_strImpersonationGuid, String p_driveId, String p_folderId) Description copied from interface:IOffice365OneDriveServiceGroovy
Returns folder item instances.- Specified by:
getFolderContent
in 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:IOffice365OneDriveServiceGroovy
Returns the metda data of the given drive item.- Specified by:
getDriveItemMetadata
in 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:IOffice365OneDriveServiceGroovy
Create a new folder in the given folder with the given folder name.- Specified by:
createFolder
in 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:IOffice365OneDriveServiceGroovy
Returns a list of permissions of the given drive item.- Specified by:
getPermissions
in 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:IOffice365OneDriveServiceGroovy
Add a permission to the given drive item.- Specified by:
addPermission
in 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.
-
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:IOffice365OneDriveServiceGroovy
Update a permission or rather configure the roles of an existing permission.- Specified by:
updatePermission
in 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:IOffice365OneDriveServiceGroovy
Get the information about an existing permission.- Specified by:
getPermission
in 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
Description copied from interface:IOffice365OneDriveServiceGroovy
Returns the internal configuration GUID for the given configuration ID. The configuration GUID is required for using non-scriptable connector classes.- Specified by:
getConfigurationGuid
in 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:IOffice365OneDriveServiceGroovy
Returns the ODataClient instance for the given configuration ID. Can be used for direct OData calls to MS Office365.- Specified by:
createODataClient
in 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:IOffice365OneDriveServiceGroovy
Returns the HttpClient instance for the given configuration ID. Can be used for raw HTTP calls to MS Office365.- Specified by:
createHttpClient
in 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.
-