public class CMISConnector
extends org.exoplatform.clouddrive.CloudDriveConnector
| Modifier and Type | Class and Description |
|---|---|
protected class |
CMISConnector.API
Internal API builder (logic based on OAuth2 flow used in Google Drive and Box connectors).
|
| Modifier and Type | Field and Description |
|---|---|
protected static String |
CONFIG_PREDEFINED |
config, CONFIG_CONNECTOR_HOST, CONFIG_CONNECTOR_SCHEMA, 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, predefinedServices, provider, PROVIDER_REQUEST_ATTEMPT_TIMEOUT, PROVIDER_REQUEST_ATTEMPTS, sessionProviders| Constructor and Description |
|---|
CMISConnector(org.exoplatform.services.jcr.RepositoryService jcrService,
org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders,
org.exoplatform.clouddrive.jcr.NodeFinder finder,
org.exoplatform.container.xml.InitParams params,
CodeAuthentication codeAuth) |
| Modifier and Type | Method and Description |
|---|---|
protected CMISUser |
authenticate(String code)
Authenticate an user by a code and return
CMISUser instance. |
protected CMISAPI |
createAPI(CodeAuthentication.Identity userId)
Create
CMISAPI instance. |
protected org.exoplatform.clouddrive.CloudDrive |
createDrive(org.exoplatform.clouddrive.CloudUser user,
javax.jcr.Node driveNode) |
protected org.exoplatform.clouddrive.CloudProvider |
createProvider() |
protected CMISUser |
createUser(CodeAuthentication.Identity userId)
|
protected String |
getAuthProviderId()
Provider id that should be used in authentication URL of the provider.
|
protected CMISProvider |
getProvider() |
protected org.exoplatform.clouddrive.CloudDrive |
loadDrive(javax.jcr.Node driveNode) |
getClientId, getClientSecret, getConnectorHost, getConnectorSchema, getProviderId, getProviderName, sessionProviderprotected static final String CONFIG_PREDEFINED
public CMISConnector(org.exoplatform.services.jcr.RepositoryService jcrService,
org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders,
org.exoplatform.clouddrive.jcr.NodeFinder finder,
org.exoplatform.container.xml.InitParams params,
CodeAuthentication codeAuth)
throws org.exoplatform.clouddrive.ConfigurationException
org.exoplatform.clouddrive.ConfigurationExceptionprotected CMISProvider getProvider()
getProvider in class org.exoplatform.clouddrive.CloudDriveConnectorprotected org.exoplatform.clouddrive.CloudProvider createProvider()
throws org.exoplatform.clouddrive.ConfigurationException
createProvider in class org.exoplatform.clouddrive.CloudDriveConnectororg.exoplatform.clouddrive.ConfigurationExceptionprotected CMISUser authenticate(String code) throws org.exoplatform.clouddrive.CloudDriveException
CMISUser instance. CMIS connector requires custom two
step authentication instead of OAuth2 flow. This two-step flow is similar to OAuth2 where user does
authentication to the service and then authorizes via OAuth2 protocol. This is done to support other
parts of Cloud Drive add-on.CMISUser instance will be created. This user instance will be stored in the connector mapped by
the code. At the same time the user identity should be late initialized with a context (CMIS repository
to connect by the user). If the identity will not be initialized before a second call (second step), this
method will fail with CloudDriveException.protected org.exoplatform.clouddrive.CloudDrive createDrive(org.exoplatform.clouddrive.CloudUser user,
javax.jcr.Node driveNode)
throws org.exoplatform.clouddrive.CloudDriveException,
javax.jcr.RepositoryException
createDrive in class org.exoplatform.clouddrive.CloudDriveConnectororg.exoplatform.clouddrive.CloudDriveExceptionjavax.jcr.RepositoryExceptionprotected org.exoplatform.clouddrive.CloudDrive loadDrive(javax.jcr.Node driveNode)
throws org.exoplatform.clouddrive.DriveRemovedException,
org.exoplatform.clouddrive.CloudDriveException,
javax.jcr.RepositoryException
loadDrive in class org.exoplatform.clouddrive.CloudDriveConnectororg.exoplatform.clouddrive.DriveRemovedExceptionorg.exoplatform.clouddrive.CloudDriveExceptionjavax.jcr.RepositoryExceptionprotected CMISAPI createAPI(CodeAuthentication.Identity userId) throws CMISException, org.exoplatform.clouddrive.CloudDriveException
CMISAPI instance.userId - CodeAuthentication.IdentityCMISAPI instanceCMISExceptionorg.exoplatform.clouddrive.CloudDriveExceptionprotected CMISUser createUser(CodeAuthentication.Identity userId) throws CMISException, org.exoplatform.clouddrive.CloudDriveException
userId - CodeAuthentication.Identityapi - CMISAPICMISUserCMISExceptionorg.exoplatform.clouddrive.CloudDriveExceptionprotected String getAuthProviderId() throws org.exoplatform.clouddrive.ConfigurationException
Stringorg.exoplatform.clouddrive.ConfigurationException - if provider id cannot be determined for this connector authentication flowCopyright © 2003–2014 eXo Platform SAS. All rights reserved.