Class BoxConnector

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

    public class BoxConnector
    extends org.exoplatform.services.cms.clouddrives.CloudDriveConnector
    Created by The eXo Platform SAS.
    Version:
    $Id: BoxConnector.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 CONFIG_LOGIN_SSO_PARTNERIDPID
      Partner's PartnerIdpId used by Box SSO support.
      static String CONFIG_LOGIN_SSO_URL
      Full URL for Box SSO support without redirect URL at the end.
      • 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
      BoxConnector​(org.exoplatform.services.jcr.RepositoryService jcrService, org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders, 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 box connector.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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 String getConnectorHost()
      protected BoxProvider 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, getConnectorSchema, getProviderId, getProviderName, isDisabled, redirectLink, sessionProvider
      • Methods inherited from class org.exoplatform.container.component.BaseComponentPlugin

        getDescription, getName, setDescription, setName
    • Field Detail

      • CONFIG_LOGIN_SSO_PARTNERIDPID

        public static final String CONFIG_LOGIN_SSO_PARTNERIDPID
        Partner's PartnerIdpId used by Box SSO support. It will be used to construct the SSO auth link.
        See Also:
        Constant Field Values
      • CONFIG_LOGIN_SSO_URL

        public static final String CONFIG_LOGIN_SSO_URL
        Full URL for Box SSO support without redirect URL at the end. This URL will be used to construct auth link by adding encoded redirect URL at the end. If this parameter present in the configuration it will be preferred to use instead of constructing from CONFIG_LOGIN_SSO_PARTNERIDPID.
        See Also:
        Constant Field Values
    • Constructor Detail

      • BoxConnector

        public BoxConnector​(org.exoplatform.services.jcr.RepositoryService jcrService,
                            org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders,
                            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 box connector.
        Parameters:
        jcrService - the jcr service
        sessionProviders - the session providers
        finder - the finder
        mimeTypes - the mime types
        params - the params
        Throws:
        org.exoplatform.services.cms.clouddrives.ConfigurationException - the configuration exception
    • Method Detail

      • getProvider

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

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

        protected org.exoplatform.services.cms.clouddrives.CloudProvider createProvider()
        Specified by:
        createProvider in class org.exoplatform.services.cms.clouddrives.CloudDriveConnector
      • 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