Class OneDriveConnector

java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.microsoft365.OneDriveConnector
All Implemented Interfaces:
LogEnabled, Component, Serviceable

Component for OneDrive connector
  • Field Details

  • Constructor Details

  • Method Details

    • service

      public void service(ServiceManager manager) throws ServiceException
      Specified by:
      service in interface Serviceable
      Throws:
      ServiceException
    • getFiles

      public Map<String,Object> getFiles(String zoneItemId, String itemId, String driveId, Map<String,Object> contextualParameters)
      Get the user OneDrive resources according the type of resources defined in services parameters
      Parameters:
      zoneItemId - The zone item id. Can be null or empty if itemId is not blank.
      itemId - the parent folder item id
      driveId - the parent folder drive id or empty for the current user drive
      contextualParameters - the contextual parameters
      Returns:
      the OneDrive resources
    • userFiles

      public Map<String,Object> userFiles(UserIdentity user, ZoneItem zoneItem)
      Get the user OneDrive repository content
      Parameters:
      user - The user
      zoneItem - the service zone item
      Returns:
      the user items
    • recentFiles

      public Map<String,Object> recentFiles(UserIdentity user, int maxResults)
      Get a list of recent item accessed by the current user
      Parameters:
      user - the user
      maxResults - the max number of results to return
      Returns:
      the list of recent files
    • sharedFiles

      public Map<String,Object> sharedFiles(UserIdentity user, int maxResults)
      Get a list of item shared with the current user
      Parameters:
      user - the user
      maxResults - the max number of results to return
      Returns:
      the list of item as JSON
    • getChildren

      public Map<String,Object> getChildren(UserIdentity user, String itemId, String driveId, Map<String,Object> contextualParameters)
      Get resources of a OneDrive folder
      Parameters:
      user - The user identity
      itemId - the parent folder item id
      driveId - the parent folder drive id or empty for the current user drive
      contextualParameters - The contextual parameters
      Returns:
      the child resources
    • searchFiles

      public Map<String,Object> searchFiles(String zoneItemId, String pattern, Map<String,Object> contextualParameters)
      Search resources into a OneDrive folder
      Parameters:
      pattern - the search pattern
      zoneItemId - the zone item Id of the service
      contextualParameters - The contextual parameters
      Returns:
      the child resources