org.exoplatform.clouddrive.cmis.rest
Class ContentService

java.lang.Object
  extended by org.exoplatform.clouddrive.cmis.rest.ContentService
All Implemented Interfaces:
org.exoplatform.services.rest.resource.ResourceContainer

public class ContentService
extends Object
implements org.exoplatform.services.rest.resource.ResourceContainer

RESTful service to access file content in CMIS connector operations.


Field Summary
protected  org.exoplatform.clouddrive.CloudDriveService cloudDrives
           
protected  org.exoplatform.clouddrive.features.CloudDriveFeatures features
           
protected  org.exoplatform.services.jcr.RepositoryService jcrService
           
protected static org.exoplatform.services.log.Log LOG
           
protected  PDFViewerStorage pdfStorage
           
static String SERVICE_PATH
          REST service URL path.
protected  org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders
           
 
Constructor Summary
ContentService(org.exoplatform.clouddrive.CloudDriveService cloudDrives, org.exoplatform.clouddrive.features.CloudDriveFeatures features, PDFViewerStorage pdfStorage, org.exoplatform.services.jcr.RepositoryService jcrService, org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders)
          Constructor.
 
Method Summary
 javax.ws.rs.core.Response get(String workspace, String path, String contentId)
          Return file content reading it from cloud side.
 javax.ws.rs.core.Response getPageImage(String workspace, String path, String contentId, String strPage, String strRotation, String strScale)
          Return image (PNG) representation of cloud file content (page) reading it from local PDF storage.
 javax.ws.rs.core.Response getPDF(String workspace, String path, String contentId)
          Return cloud file representation reading it from local PDF storage.
protected  String normalizePath(String path)
          Normalize JCR path (as eXo WebDAV does).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

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

SERVICE_PATH

public static String SERVICE_PATH
REST service URL path.


features

protected final org.exoplatform.clouddrive.features.CloudDriveFeatures features

cloudDrives

protected final org.exoplatform.clouddrive.CloudDriveService cloudDrives

jcrService

protected final org.exoplatform.services.jcr.RepositoryService jcrService

sessionProviders

protected final org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders

pdfStorage

protected final PDFViewerStorage pdfStorage
Constructor Detail

ContentService

public ContentService(org.exoplatform.clouddrive.CloudDriveService cloudDrives,
                      org.exoplatform.clouddrive.features.CloudDriveFeatures features,
                      PDFViewerStorage pdfStorage,
                      org.exoplatform.services.jcr.RepositoryService jcrService,
                      org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders)
Constructor.

Parameters:
cloudDrives -
features -
jcrService -
sessionProviders -
Method Detail

get

@RolesAllowed(value="users")
public javax.ws.rs.core.Response get(String workspace,
                                                  String path,
                                                  String contentId)
Return file content reading it from cloud side.

Parameters:
uriInfo -
workspace -
path -
providerId -
Returns:

getPageImage

@RolesAllowed(value="users")
public javax.ws.rs.core.Response getPageImage(String workspace,
                                                           String path,
                                                           String contentId,
                                                           String strPage,
                                                           String strRotation,
                                                           String strScale)
Return image (PNG) representation of cloud file content (page) reading it from local PDF storage. File should be previously created in the storage to be successfully returned by this method, an empty response (204 No Content) will be returned otherwise.

Parameters:
uriInfo -
workspace -
path -
providerId -
Returns:

getPDF

@RolesAllowed(value="users")
public javax.ws.rs.core.Response getPDF(String workspace,
                                                     String path,
                                                     String contentId)
Return cloud file representation reading it from local PDF storage. File should be previously created in the storage to be successfully returned by this method, an empty response (204 No Content) will be returned otherwise.

Parameters:
uriInfo -
workspace -
path -
providerId -
Returns:

normalizePath

protected String normalizePath(String path)
Normalize JCR path (as eXo WebDAV does).

Parameters:
path - String
Returns:
normalized path


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