Package org.nuxeo.easyshare
Class EasyShare
-
- All Implemented Interfaces:
ModuleResource,Resource,Adaptable
public class EasyShare extends ModuleRoot
The root entry for the WebEngine module.- Author:
- mikeobrebski
-
-
Constructor Summary
Constructors Constructor Description EasyShare()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static StringbuildQuery(DocumentModel documentModel)EasyShareUnrestrictedRunnerbuildUnrestrictedRunner(String docId, Long pageIndex)ObjectdoGet()StringgetFileName(DocumentModel doc)javax.ws.rs.core.ResponsegetFileStream(String shareId, String fileId)ObjectgetFolderListing(String shareId, String folderId, Long pageIndex)protected StringgetIpAddr()ObjectgetShareListing(String shareId, Long pageIndex)static booleanisSharedDocument(CoreSession session, DocumentModel sharedDoc, DocumentModel doc)Returnstrueif the givendocis either: A member of the givensharedDoccollection. A descendant of a foldersish member of the givensharedDoccollection. A descendant of the givensharedDocfolderish document.protected booleanisShareValid(DocumentModel docShare)protected javax.ws.rs.core.ResponsenotFound()voidsendNotification(String notification, DocumentModel docShare, Map<String,Object> mail)-
Methods inherited from class org.nuxeo.ecm.webengine.model.impl.ModuleRoot
getLink, getSkinResource, handleError, setContext
-
Methods inherited from class org.nuxeo.ecm.webengine.model.impl.DefaultObject
disptachAdapter, isAdapter
-
Methods inherited from class org.nuxeo.ecm.webengine.model.impl.AbstractResource
checkGuard, dispose, getActiveAdapter, getAdapter, getContext, getFacets, getLinks, getModule, getName, getNext, getNextSegment, getPath, getPrevious, getTemplate, getTrailingPath, getType, getURL, getView, hasFacet, initialize, initialize, isInstanceOf, isRoot, newAdapter, newObject, redirect, setNext, setPrevious, setRoot, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.nuxeo.runtime.model.Adaptable
getAdapter
-
Methods inherited from interface org.nuxeo.ecm.webengine.model.Resource
checkGuard, dispose, getActiveAdapter, getContext, getFacets, getLinks, getModule, getName, getNext, getNextSegment, getPath, getPrevious, getTemplate, getTrailingPath, getType, getURL, getView, hasFacet, initialize, isAdapter, isInstanceOf, isRoot, newAdapter, newObject, redirect, setNext, setPrevious, setRoot
-
-
-
-
Field Detail
-
log
protected final Log log
-
-
Method Detail
-
isSharedDocument
public static boolean isSharedDocument(CoreSession session, DocumentModel sharedDoc, DocumentModel doc)
Returnstrueif the givendocis either:- A member of the given
sharedDoccollection. - A descendant of a foldersish member of the given
sharedDoccollection. - A descendant of the given
sharedDocfolderish document.
- A member of the given
-
doGet
public Object doGet()
-
buildUnrestrictedRunner
public EasyShareUnrestrictedRunner buildUnrestrictedRunner(String docId, Long pageIndex)
-
buildQuery
protected static String buildQuery(DocumentModel documentModel)
-
isShareValid
protected boolean isShareValid(DocumentModel docShare)
-
notFound
protected javax.ws.rs.core.Response notFound()
-
getFileName
public String getFileName(DocumentModel doc) throws NuxeoException
- Throws:
NuxeoException
-
getFileStream
public javax.ws.rs.core.Response getFileStream(String shareId, String fileId) throws NuxeoException
- Throws:
NuxeoException
-
sendNotification
public void sendNotification(String notification, DocumentModel docShare, Map<String,Object> mail)
-
getIpAddr
protected String getIpAddr()
-
-