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 the
WebContext . |
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 , null if 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, setUriInfo
disptachAdapter, isAdapter
checkGuard, 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, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
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
getAdapter
public Object index(@Context javax.servlet.http.HttpServletRequest request) throws Exception
Exception
public Object documentList(@Context javax.servlet.http.HttpServletRequest request) throws Exception
parameters:
Exception
public Object documentListGet(@Context javax.servlet.http.HttpServletRequest request) throws Exception
Exception
public Object search(@Context javax.servlet.http.HttpServletRequest request) throws Exception
Exception
public Object publishDocument(@Context javax.servlet.http.HttpServletRequest request) throws Exception
Exception
public Object deleteDocument(@Context javax.servlet.http.HttpServletRequest request) throws Exception
Exception
public Object createDocumentForm(String ref, String docTypeId, String lang) throws Exception
Exception
public Object selectDocTypeToCreate(String ref, String lang) throws ClientException
ClientException
public Object createDocument(@Context javax.servlet.http.HttpServletRequest request) throws Exception
Exception
public Blob getAttachment(DocumentModel doc) throws ClientException
doc
, null
if there is no main file available.ClientException
public boolean hasAddChildrenRight(String docId)
docId
- the reference of the documentpublic List<DocumentModel> getComments(DocumentModel doc) throws ClientException
ClientException
public Object documentCommentList(String ref) throws Exception
Exception
public List<DocumentModel> getCommentChildren(DocumentModel doc, DocumentModel parent) throws ClientException
ClientException
public Object addComment() throws ClientException
ClientException
public Object docLike(String docRef) throws Exception
Exception
public boolean hasUserLiked(DocumentModel doc)
public long getLikesCount(DocumentModel doc)
public String getAvatarURL(String commentUser) throws ClientException
ClientException
public String computeDocumentURL(DocumentModel doc)
doc
, using the document link builder sets in the
WebContext
.Copyright © 2015 Nuxeo SA. All rights reserved.