Class DropboxConnector

  • All Implemented Interfaces:
    org.exoplatform.container.component.ComponentPlugin

    public class DropboxConnector
    extends org.exoplatform.services.cms.clouddrives.CloudDriveConnector
    Cloud Drive Connector for Dropbox.
    Created by The eXo Platform SAS
    Version:
    $Id: DropboxConnector.java 00000 Aug 30, 2013 pnedonosko $
    Author:
    Peter Nedonosko
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.exoplatform.services.cms.clouddrives.CloudDriveConnector

        org.exoplatform.services.cms.clouddrives.CloudDriveConnector.PredefinedServices
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String CLIENT_NAME
      The Constant CLIENT_NAME.
      protected org.exoplatform.services.organization.OrganizationService organization
      The organization.
      • Fields inherited from class org.exoplatform.services.cms.clouddrives.CloudDriveConnector

        config, CONFIG_CONNECTOR_HOST, CONFIG_CONNECTOR_SCHEMA, CONFIG_DISABLE, CONFIG_LOGIN_SSO, CONFIG_PREDEFINED_SERVICES, CONFIG_PROVIDER_CLIENT_ID, CONFIG_PROVIDER_CLIENT_SECRET, CONFIG_PROVIDER_ID, CONFIG_PROVIDER_NAME, connectorHost, connectorSchema, jcrFinder, jcrService, LOG, loginSSO, mimeTypes, OAUTH2_CODE, OAUTH2_ERROR, OAUTH2_ERROR_DESCRIPTION, OAUTH2_SERVER_URL, OAUTH2_STATE, predefinedServices, provider, PROVIDER_REQUEST_ATTEMPT_TIMEOUT, PROVIDER_REQUEST_ATTEMPTS, sessionProviders
      • Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin

        desc, name
    • Constructor Summary

      Constructors 
      Constructor Description
      DropboxConnector​(org.exoplatform.services.jcr.RepositoryService jcrService, org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders, org.exoplatform.services.organization.OrganizationService organization, org.exoplatform.services.cms.clouddrives.jcr.NodeFinder finder, org.exoplatform.services.cms.clouddrives.utils.ExtendedMimeTypeResolver mimeTypes, org.exoplatform.container.xml.InitParams params)
      Instantiates a new Dropbox connector.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.exoplatform.clouddrive.dropbox.DropboxConnector.API apiFactory()
      On-demand creator of API factory.
      protected org.exoplatform.services.cms.clouddrives.CloudUser authenticate​(Map<String,​String> params)
      protected org.exoplatform.services.cms.clouddrives.CloudDrive createDrive​(org.exoplatform.services.cms.clouddrives.CloudUser user, javax.jcr.Node driveNode)
      protected org.exoplatform.services.cms.clouddrives.CloudProvider createProvider()
      protected DropboxProvider getProvider()
      protected org.exoplatform.services.cms.clouddrives.CloudDrive loadDrive​(javax.jcr.Node driveNode)
      • Methods inherited from class org.exoplatform.services.cms.clouddrives.CloudDriveConnector

        currentUser, getClientId, getClientSecret, getConnectorHost, getConnectorSchema, getProviderId, getProviderName, isDisabled, redirectLink, sessionProvider
      • Methods inherited from class org.exoplatform.container.component.BaseComponentPlugin

        getDescription, getName, setDescription, setName
    • Field Detail

      • organization

        protected final org.exoplatform.services.organization.OrganizationService organization
        The organization.
    • Constructor Detail

      • DropboxConnector

        public DropboxConnector​(org.exoplatform.services.jcr.RepositoryService jcrService,
                                org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders,
                                org.exoplatform.services.organization.OrganizationService organization,
                                org.exoplatform.services.cms.clouddrives.jcr.NodeFinder finder,
                                org.exoplatform.services.cms.clouddrives.utils.ExtendedMimeTypeResolver mimeTypes,
                                org.exoplatform.container.xml.InitParams params)
                         throws org.exoplatform.services.cms.clouddrives.ConfigurationException
        Instantiates a new Dropbox connector.
        Parameters:
        jcrService - the jcr service
        sessionProviders - the session providers
        organization - the organization
        finder - the finder
        mimeTypes - the mime types
        params - the params
        Throws:
        org.exoplatform.services.cms.clouddrives.ConfigurationException - the configuration exception
    • Method Detail

      • getProvider

        protected DropboxProvider getProvider()
        Overrides:
        getProvider in class org.exoplatform.services.cms.clouddrives.CloudDriveConnector
      • createProvider

        protected org.exoplatform.services.cms.clouddrives.CloudProvider createProvider()
                                                                                 throws org.exoplatform.services.cms.clouddrives.ConfigurationException
        Specified by:
        createProvider in class org.exoplatform.services.cms.clouddrives.CloudDriveConnector
        Throws:
        org.exoplatform.services.cms.clouddrives.ConfigurationException
      • authenticate

        protected org.exoplatform.services.cms.clouddrives.CloudUser authenticate​(Map<String,​String> params)
                                                                           throws org.exoplatform.services.cms.clouddrives.CloudDriveException
        Specified by:
        authenticate in class org.exoplatform.services.cms.clouddrives.CloudDriveConnector
        Throws:
        org.exoplatform.services.cms.clouddrives.CloudDriveException
      • createDrive

        protected org.exoplatform.services.cms.clouddrives.CloudDrive createDrive​(org.exoplatform.services.cms.clouddrives.CloudUser user,
                                                                                  javax.jcr.Node driveNode)
                                                                           throws org.exoplatform.services.cms.clouddrives.CloudDriveException,
                                                                                  javax.jcr.RepositoryException
        Specified by:
        createDrive in class org.exoplatform.services.cms.clouddrives.CloudDriveConnector
        Throws:
        org.exoplatform.services.cms.clouddrives.CloudDriveException
        javax.jcr.RepositoryException
      • loadDrive

        protected org.exoplatform.services.cms.clouddrives.CloudDrive loadDrive​(javax.jcr.Node driveNode)
                                                                         throws org.exoplatform.services.cms.clouddrives.DriveRemovedException,
                                                                                org.exoplatform.services.cms.clouddrives.CloudDriveException,
                                                                                javax.jcr.RepositoryException
        Specified by:
        loadDrive in class org.exoplatform.services.cms.clouddrives.CloudDriveConnector
        Throws:
        org.exoplatform.services.cms.clouddrives.DriveRemovedException
        org.exoplatform.services.cms.clouddrives.CloudDriveException
        javax.jcr.RepositoryException
      • apiFactory

        protected org.exoplatform.clouddrive.dropbox.DropboxConnector.API apiFactory()
        On-demand creator of API factory.
        Returns:
        the API factory.