org.exoplatform.clouddrive.ecms
Class CloudDriveContext

java.lang.Object
  extended by org.exoplatform.clouddrive.ecms.CloudDriveContext

public class CloudDriveContext
extends Object

Initialize Cloud Drive support in portal request.
Created by The eXo Platform SAS.

Version:
$Id: CloudDriveContext.java 00000 Oct 22, 2012 pnedonosko $
Author:
Peter Nedonosko

Field Summary
protected static String JAVASCRIPT
           
protected static org.exoplatform.services.log.Log LOG
           
 
Method Summary
static boolean init(org.exoplatform.web.application.RequestContext requestContext, String workspace, String nodePath)
          Initialize request with Cloud Drive support for given JCR location.
static boolean init(org.exoplatform.web.application.RequestContext requestContext, String workspace, String nodePath, org.exoplatform.clouddrive.CloudProvider provider)
          Initialize request with Cloud Drive support for given JCR location and CloudProvider.
static boolean initNodes(org.exoplatform.web.application.RequestContext requestContext, javax.jcr.Node parent)
          Initialize already connected drives for a request and given JCR location.
static boolean initProviders(org.exoplatform.web.application.RequestContext requestContext, org.exoplatform.clouddrive.CloudProvider... providers)
          Initialize request with Cloud Drive providers CloudProvider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAVASCRIPT

protected static final String JAVASCRIPT

LOG

protected static final org.exoplatform.services.log.Log LOG
Method Detail

init

public static boolean init(org.exoplatform.web.application.RequestContext requestContext,
                           String workspace,
                           String nodePath,
                           org.exoplatform.clouddrive.CloudProvider provider)
                    throws org.exoplatform.clouddrive.CloudDriveException
Initialize request with Cloud Drive support for given JCR location and CloudProvider.

Parameters:
requestContext - RequestContext
workspace - String
nodePath - String
provider - CloudProvider optional, if null then any provider will be assumed
Returns:
boolean true if request successfully initialized, false if request already initialized
Throws:
org.exoplatform.clouddrive.CloudDriveException - if cannot auth url from the provider

init

public static boolean init(org.exoplatform.web.application.RequestContext requestContext,
                           String workspace,
                           String nodePath)
                    throws org.exoplatform.clouddrive.CloudDriveException
Initialize request with Cloud Drive support for given JCR location.

Parameters:
requestContext - RequestContext
workspace - String
nodePath - String
Returns:
boolean true if request successfully initialized, false if request already initialized
Throws:
org.exoplatform.clouddrive.CloudDriveException - if cannot auth url from the provider

initNodes

public static boolean initNodes(org.exoplatform.web.application.RequestContext requestContext,
                                javax.jcr.Node parent)
                         throws javax.jcr.RepositoryException,
                                org.exoplatform.clouddrive.CloudDriveException
Initialize already connected drives for a request and given JCR location. This method assumes that request already initialized by init(RequestContext, String, String, CloudProvider) method.

Parameters:
requestContext - RequestContext
parent - Node
Returns:
boolean true if nodes successfully initialized, false if nodes already initialized
Throws:
javax.jcr.RepositoryException
org.exoplatform.clouddrive.CloudDriveException
See Also:
#init(RequestContext, String, String)}, #init(RequestContext, String, String, CloudProvider)}

initProviders

public static boolean initProviders(org.exoplatform.web.application.RequestContext requestContext,
                                    org.exoplatform.clouddrive.CloudProvider... providers)
                             throws org.exoplatform.clouddrive.CloudDriveException
Initialize request with Cloud Drive providers CloudProvider.

Parameters:
requestContext - RequestContext
providers - array of CloudProvider to add to the request context
Throws:
org.exoplatform.clouddrive.CloudDriveException - if cannot auth url from the provider


Copyright © 2003–2014 eXo Platform SAS. All rights reserved.