Package org.exoplatform.clouddrive.box
Class BoxConnector
- java.lang.Object
-
- org.exoplatform.container.component.BaseComponentPlugin
-
- org.exoplatform.services.cms.clouddrives.CloudDriveConnector
-
- org.exoplatform.clouddrive.box.BoxConnector
-
- All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin
public class BoxConnector extends org.exoplatform.services.cms.clouddrives.CloudDriveConnectorCreated by The eXo Platform SAS.- Version:
- $Id: BoxConnector.java 00000 Aug 30, 2013 pnedonosko $
- Author:
- Peter Nedonosko
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONFIG_LOGIN_SSO_PARTNERIDPIDPartner's PartnerIdpId used by Box SSO support.static StringCONFIG_LOGIN_SSO_URLFull 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
-
-
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.CloudUserauthenticate(Map<String,String> params)protected org.exoplatform.services.cms.clouddrives.CloudDrivecreateDrive(org.exoplatform.services.cms.clouddrives.CloudUser user, javax.jcr.Node driveNode)protected org.exoplatform.services.cms.clouddrives.CloudProvidercreateProvider()protected StringgetConnectorHost()protected BoxProvidergetProvider()protected org.exoplatform.services.cms.clouddrives.CloudDriveloadDrive(javax.jcr.Node driveNode)-
Methods inherited from class org.exoplatform.services.cms.clouddrives.CloudDriveConnector
currentUser, getClientId, getClientSecret, getConnectorSchema, getProviderId, getProviderName, isDisabled, redirectLink, sessionProvider
-
-
-
-
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 fromCONFIG_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.ConfigurationExceptionInstantiates a new box connector.- Parameters:
jcrService- the jcr servicesessionProviders- the session providersfinder- the findermimeTypes- the mime typesparams- the params- Throws:
org.exoplatform.services.cms.clouddrives.ConfigurationException- the configuration exception
-
-
Method Detail
-
getProvider
protected BoxProvider getProvider()
- Overrides:
getProviderin classorg.exoplatform.services.cms.clouddrives.CloudDriveConnector
-
getConnectorHost
protected String getConnectorHost()
- Overrides:
getConnectorHostin classorg.exoplatform.services.cms.clouddrives.CloudDriveConnector
-
createProvider
protected org.exoplatform.services.cms.clouddrives.CloudProvider createProvider()
- Specified by:
createProviderin classorg.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:
authenticatein classorg.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:
createDrivein classorg.exoplatform.services.cms.clouddrives.CloudDriveConnector- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.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:
loadDrivein classorg.exoplatform.services.cms.clouddrives.CloudDriveConnector- Throws:
org.exoplatform.services.cms.clouddrives.DriveRemovedExceptionorg.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
-