public class SocialWebEngineRoot extends ModuleRoot
| Constructor and Description | 
|---|
| SocialWebEngineRoot() | 
| Modifier and Type | Method and Description | 
|---|---|
| Object | addComment()Add comment to the related document and parent comment | 
| String | computeDocumentURL(DocumentModel doc)Computes and returns the URL for the given  doc, using the
 document link builder sets in theWebContext. | 
| Object | createDocument(javax.servlet.http.HttpServletRequest request)Create the document given a post request where input item name is the
 field name ("dc:title", ...) and "docRef" value is the target document
 where to create the given document | 
| Object | createDocumentForm(String ref,
                  String docTypeId,
                  String lang)Return the html form for creation of a document | 
| Object | deleteDocument(javax.servlet.http.HttpServletRequest request)Remove the document specified in request | 
| Object | docLike(String docRef)Like/Unlike the related document | 
| Object | documentCommentList(String ref) | 
| Object | documentList(javax.servlet.http.HttpServletRequest request)Main method that return a html snipped with the list of documents
 specified in request. | 
| Object | documentListGet(javax.servlet.http.HttpServletRequest request) | 
| String | escape(String text) | 
| String | escapePath(String text) | 
| Blob | getAttachment(DocumentModel doc)Returns the main blob for the given  doc,nullif there is
 no main file available. | 
| String | getAvatarURL(String commentUser)Get the related user avatar to display in the UI comment | 
| List<DocumentModel> | getCommentChildren(DocumentModel doc,
                  DocumentModel parent) | 
| List<DocumentModel> | getComments(DocumentModel doc) | 
| long | getLikesCount(DocumentModel doc) | 
| String | getTranslatedLabel(String label) | 
| boolean | hasAddChildrenRight(String docId)Indicates if the current user has the right to Add Children to the
 current Document | 
| boolean | hasUserLiked(DocumentModel doc) | 
| Object | index(javax.servlet.http.HttpServletRequest request) | 
| Object | publishDocument(javax.servlet.http.HttpServletRequest request) | 
| Object | search(javax.servlet.http.HttpServletRequest request) | 
| Object | selectDocTypeToCreate(String ref,
                     String lang)return a form to select a doctype the user wants to create | 
getLink, getSkinResource, handleError, setHttpHeaders, setHttpRequest, setUriInfodisptachAdapter, isAdaptercheckGuard, dispose, getActiveAdapter, getAdapter, getContext, getFacets, getLinks, getModule, getName, getNext, getNextSegment, getPath, getPrevious, getTemplate, getTrailingPath, getType, getURL, getView, hasFacet, initialize, isInstanceOf, isRoot, newAdapter, newObject, redirect, setNext, setPrevious, setRoot, toStringequals, getClass, hashCode, notify, notifyAll, wait, wait, waitcheckGuard, 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, setRootgetAdapterpublic Object index(@Context javax.servlet.http.HttpServletRequest request) throws Exception
Exceptionpublic Object documentList(@Context javax.servlet.http.HttpServletRequest request) throws Exception
parameters:
Exceptionpublic Object documentListGet(@Context javax.servlet.http.HttpServletRequest request) throws Exception
Exceptionpublic Object search(@Context javax.servlet.http.HttpServletRequest request) throws Exception
Exceptionpublic Object publishDocument(@Context javax.servlet.http.HttpServletRequest request) throws Exception
Exceptionpublic Object deleteDocument(@Context javax.servlet.http.HttpServletRequest request) throws Exception
Exceptionpublic Object createDocumentForm(String ref, String docTypeId, String lang) throws Exception
Exceptionpublic Object selectDocTypeToCreate(String ref, String lang) throws ClientException
ClientExceptionpublic Object createDocument(@Context javax.servlet.http.HttpServletRequest request) throws Exception
Exceptionpublic Blob getAttachment(DocumentModel doc) throws ClientException
doc, null if there is
 no main file available.ClientExceptionpublic boolean hasAddChildrenRight(String docId)
docId - the reference of the documentpublic List<DocumentModel> getComments(DocumentModel doc) throws ClientException
ClientExceptionpublic Object documentCommentList(String ref) throws Exception
Exceptionpublic List<DocumentModel> getCommentChildren(DocumentModel doc, DocumentModel parent) throws ClientException
ClientExceptionpublic Object addComment() throws ClientException
ClientExceptionpublic Object docLike(String docRef) throws Exception
Exceptionpublic boolean hasUserLiked(DocumentModel doc)
public long getLikesCount(DocumentModel doc)
public String getAvatarURL(String commentUser) throws ClientException
ClientExceptionpublic String computeDocumentURL(DocumentModel doc)
doc, using the
 document link builder sets in the
 WebContext.Copyright © 2014 Nuxeo SA. All rights reserved.