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 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 interface IOffice365OneDriveServiceGroovy
      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 interface IOffice365OneDriveServiceGroovy
      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 interface IOffice365OneDriveServiceGroovy
      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 interface IOffice365OneDriveServiceGroovy
      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 interface IOffice365OneDriveServiceGroovy
      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: IOffice365OneDriveServiceGroovy
      Create a link to share the given drive item.
      Specified by:
      createShareLink in interface IOffice365OneDriveServiceGroovy
      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: IOffice365OneDriveServiceGroovy
      Update a permission or rather configure the roles of an existing permission.
      Specified by:
      updatePermission in interface IOffice365OneDriveServiceGroovy
      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 interface IOffice365OneDriveServiceGroovy
      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: 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 interface IOffice365OneDriveServiceGroovy
      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 interface IOffice365OneDriveServiceGroovy
      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 interface IOffice365OneDriveServiceGroovy
      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.