|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.webengine.sites.utils.SiteUtils
public class SiteUtils
Utility class for sites implementation.
Method Summary | |
---|---|
static DocumentModel |
createDocument(javax.servlet.http.HttpServletRequest request,
CoreSession session,
java.lang.String parentPath,
java.lang.String documentType)
Creates a document type that is received as parameter, as document model. |
static Blob |
getBlob(DocumentModel d,
java.lang.String xpath)
|
static boolean |
getBoolean(DocumentModel d,
java.lang.String xpath)
|
static boolean |
getBoolean(DocumentModel d,
java.lang.String xpath,
boolean defaultValue)
|
static CommentManager |
getCommentManager()
|
static DocumentModel |
getFirstWebSiteParent(CoreSession session,
DocumentModel doc)
Gets the first mini-site parent. |
static java.lang.String |
getFistNWordsFromString(java.lang.String string,
int n)
|
static java.util.GregorianCalendar |
getGregorianCalendar(DocumentModel d,
java.lang.String xpath)
|
static javax.ws.rs.core.Response |
getLogoResponse(DocumentModel document)
|
static java.lang.String |
getModerationType(CoreSession session,
DocumentModel doc)
|
static java.util.ArrayList<java.lang.String> |
getModerators(CoreSession session,
DocumentModel doc)
|
static java.lang.Long |
getNumber(DocumentModel d,
java.lang.String xpath)
|
static java.lang.Long |
getNumber(DocumentModel d,
java.lang.String xpath,
java.lang.Long defaultValue)
|
static int |
getNumberCommentsForPage(CoreSession session,
DocumentModel page)
Gets the number of comments added on a page (published actually, if the moderation is on). |
static DocumentModel |
getPageForComment(DocumentModel comment)
This method is used to retrieve the WebPage where this WebComment was published. |
static java.lang.String |
getPagePath(DocumentModel ws,
DocumentModel documentModel)
Returns the path for a webPage from a webSite. |
static java.util.Map<java.lang.String,java.lang.Object> |
getRssFeedArguments(WebContext ctx,
java.lang.String key)
Computes the arguments for rss feed. |
static java.lang.String |
getString(DocumentModel d,
java.lang.String xpath)
|
static java.lang.String |
getString(DocumentModel d,
java.lang.String xpath,
java.lang.String defaultValue)
|
static java.lang.String |
getUserDetails(java.lang.String username)
Retrieves user details for a certain username. |
static UserManager |
getUserManager()
|
static java.util.ArrayList<java.lang.String> |
getUsersWithPermission(CoreSession session,
DocumentModel doc,
java.util.Set<java.lang.String> permissions)
|
static java.lang.StringBuilder |
getWebContainersPath()
Returns the path to all the existing web containers. |
static boolean |
isCurrentModerated(CoreSession session,
DocumentModel doc)
|
static boolean |
isModeratedByCurrentUser(CoreSession session,
DocumentModel doc)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static javax.ws.rs.core.Response getLogoResponse(DocumentModel document) throws java.lang.Exception
java.lang.Exception
public static DocumentModel getFirstWebSiteParent(CoreSession session, DocumentModel doc) throws java.lang.Exception
java.lang.Exception
public static int getNumberCommentsForPage(CoreSession session, DocumentModel page) throws java.lang.Exception
java.lang.Exception
public static java.lang.String getUserDetails(java.lang.String username) throws java.lang.Exception
java.lang.Exception
public static java.lang.StringBuilder getWebContainersPath()
public static java.lang.String getPagePath(DocumentModel ws, DocumentModel documentModel)
ws
- the web sitedocumentModel
- the webPage
public static DocumentModel createDocument(javax.servlet.http.HttpServletRequest request, CoreSession session, java.lang.String parentPath, java.lang.String documentType) throws java.lang.Exception
java.lang.Exception
public static java.util.ArrayList<java.lang.String> getUsersWithPermission(CoreSession session, DocumentModel doc, java.util.Set<java.lang.String> permissions) throws java.lang.Exception
java.lang.Exception
public static boolean isCurrentModerated(CoreSession session, DocumentModel doc) throws java.lang.Exception
java.lang.Exception
public static boolean isModeratedByCurrentUser(CoreSession session, DocumentModel doc) throws java.lang.Exception
java.lang.Exception
public static CommentManager getCommentManager() throws java.lang.Exception
java.lang.Exception
public static UserManager getUserManager() throws java.lang.Exception
java.lang.Exception
public static DocumentModel getPageForComment(DocumentModel comment) throws java.lang.Exception
comment
-
java.lang.Exception
public static java.util.ArrayList<java.lang.String> getModerators(CoreSession session, DocumentModel doc) throws java.lang.Exception
java.lang.Exception
public static java.lang.String getModerationType(CoreSession session, DocumentModel doc) throws java.lang.Exception
java.lang.Exception
public static java.lang.String getString(DocumentModel d, java.lang.String xpath, java.lang.String defaultValue)
public static java.lang.String getString(DocumentModel d, java.lang.String xpath) throws ClientException
ClientException
public static java.util.GregorianCalendar getGregorianCalendar(DocumentModel d, java.lang.String xpath) throws ClientException
ClientException
public static java.lang.Long getNumber(DocumentModel d, java.lang.String xpath) throws ClientException
ClientException
public static java.lang.Long getNumber(DocumentModel d, java.lang.String xpath, java.lang.Long defaultValue)
public static Blob getBlob(DocumentModel d, java.lang.String xpath) throws ClientException
ClientException
public static boolean getBoolean(DocumentModel d, java.lang.String xpath, boolean defaultValue)
public static boolean getBoolean(DocumentModel d, java.lang.String xpath) throws ClientException
ClientException
public static java.lang.String getFistNWordsFromString(java.lang.String string, int n)
public static java.util.Map<java.lang.String,java.lang.Object> getRssFeedArguments(WebContext ctx, java.lang.String key) throws java.lang.Exception
java.lang.Exception
|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |