|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.wiki.utils.Utils
public class Utils
| Field Summary | |
|---|---|
static String |
COMPARE_REVISION
|
static String |
DOT
|
static String |
PAGE
|
static String |
SLASH
|
static String |
SPACE
|
static String |
VER_NAME
|
static String |
WIKI_RESOUCE_BUNDLE_NAME
|
| Constructor Summary | |
|---|---|
Utils()
|
|
| Method Summary | |
|---|---|
static long |
countSearchResult(WikiSearchData data)
|
static org.exoplatform.services.jcr.ext.common.SessionProvider |
createSystemProvider()
|
static HashMap<String,IDType> |
getACLForAdmins()
|
static Wiki[] |
getAllWikiSpace()
|
static List<NTVersion> |
getCurrentPageRevisions(Page wikipage)
|
static String |
getCurrentRepositoryWebDavUri()
|
static String |
getCurrentUser()
|
static String |
getDefaultRestBaseURI()
|
static String |
getDocumentURL(WikiContext wikiContext)
|
static String |
getEmailUser(String userName)
|
static String |
getGroupIdByJcrPath(String jcrPath)
|
static NTVersion |
getLastRevisionOfPage(Page wikipage)
|
static List<String> |
getListOfUserEditingPage(String pageId)
Get the list of user that're editing the wiki page |
static Map<String,WikiPageHistory> |
getLogOfPage(String pageId)
Get the editting log of wiki page |
static Object |
getObject(String path,
String type)
|
static Object |
getObjectFromParams(WikiPageParams param)
|
static String |
getPermanlink(WikiPageParams params)
Get the permalink of current wiki page With the current page param: type = "group" owner = "spaces/test_space" pageId = "test_page" The permalink will be: http://int.exoplatform.org/portal/intranet/wiki/group/spaces/test_space/test_page |
static String |
getPortalIdByJcrPath(String jcrPath)
|
static String |
getPortalName()
|
static String |
getPortalWikisPath()
|
static String |
getSpaceIdByJcrPath(String jcrPath)
|
static Stack<WikiPageParams> |
getStackParams(PageImpl page)
|
static String |
getURL(String url,
String verName)
|
static String |
getUserIdByJcrPath(String jcrPath)
|
static Wiki |
getWiki(WikiPageParams params)
|
static WikiPageParams |
getWikiPageParams(Page page)
|
static String |
getWikiResourceBundle(String key,
ClassLoader cl)
Get resource bundle from given resource file |
static Collection<Wiki> |
getWikisByType(WikiType wikiType)
|
static String |
getWikiType(String jcrPath)
|
static boolean |
hasPermission(org.exoplatform.services.jcr.access.AccessControlList acl,
String[] permission,
org.exoplatform.services.security.Identity user)
Has permission. |
static boolean |
isDescendantPage(PageImpl page,
PageImpl parentPage)
|
static boolean |
isWikiAvailable(String wikiType,
String wikiOwner)
|
static void |
logEditPageTime(WikiPageParams pageParams,
String username,
long updateTime,
String draftName,
boolean isNewPage)
Log the edit page action of user |
static void |
sendMailOnChangeContent(AttachmentImpl content)
|
static String |
validateWikiOwner(String wikiType,
String wikiOwner)
Validate wikiOwner depending on wikiType. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SLASH
public static final String DOT
public static final String SPACE
public static final String PAGE
public static final String COMPARE_REVISION
public static final String VER_NAME
public static final String WIKI_RESOUCE_BUNDLE_NAME
| Constructor Detail |
|---|
public Utils()
| Method Detail |
|---|
public static String getPortalName()
public static String getWikiResourceBundle(String key,
ClassLoader cl)
key - keycl - ClassLoader to load resource file
public static void logEditPageTime(WikiPageParams pageParams,
String username,
long updateTime,
String draftName,
boolean isNewPage)
pageParams - The page that has been editingusername - The name of user that editing wiki pageupdateTime - The time that this page is editeddraftName - The name of draft for this editisNewPage - Is the wiki page a draft or notpublic static List<String> getListOfUserEditingPage(String pageId)
pageId - The id of wiki page
public static String getPermanlink(WikiPageParams params)
throws Exception
Exceptionpublic static Map<String,WikiPageHistory> getLogOfPage(String pageId)
pageId - The id of wiki page to get log
public static String getPortalWikisPath()
public static String getSpaceIdByJcrPath(String jcrPath)
throws IllegalArgumentException
IllegalArgumentException - if jcr path is not of a wiki page node.
public static String getGroupIdByJcrPath(String jcrPath)
throws IllegalArgumentException
jcrPath - follows the format /Groups/$GROUP/ApplicationData/eXoWiki/[wikipage]
IllegalArgumentException - if jcrPath is not as expected.
public static List<NTVersion> getCurrentPageRevisions(Page wikipage)
throws Exception
Exception
public static String getUserIdByJcrPath(String jcrPath)
throws IllegalArgumentException
jcrPath - follows the format /Users/$USERNAME/ApplicationData/eXoWiki/...
IllegalArgumentException - if jcrPath is not as expected.
public static String getPortalIdByJcrPath(String jcrPath)
throws IllegalArgumentException
jcrPath - follows the format /exo:applications/eXoWiki/wikis/$PORTAL/...
IllegalArgumentException - if jcrPath is not as expected.
public static String getWikiType(String jcrPath)
throws IllegalArgumentException
jcrPath - absolute jcr path of page node.
IllegalArgumentException
public static String validateWikiOwner(String wikiType,
String wikiOwner)
wikiOwner depending on wikiType. PortalConfig.GROUP_TYPE, wikiOwner is checked to removed slashes at the begin and the end point of it.
wikiType - wikiOwner -
public static String getDefaultRestBaseURI()
public static String getCurrentRepositoryWebDavUri()
public static String getDocumentURL(WikiContext wikiContext)
public static String getCurrentUser()
public static Collection<Wiki> getWikisByType(WikiType wikiType)
public static Wiki getWiki(WikiPageParams params)
public static Wiki[] getAllWikiSpace()
public static boolean isDescendantPage(PageImpl page,
PageImpl parentPage)
throws Exception
Exception
public static Object getObject(String path,
String type)
throws Exception
Exception
public static NTVersion getLastRevisionOfPage(Page wikipage)
throws Exception
Exception
public static Object getObjectFromParams(WikiPageParams param)
throws Exception
Exception
public static Stack<WikiPageParams> getStackParams(PageImpl page)
throws Exception
Exceptionpublic static WikiPageParams getWikiPageParams(Page page)
public static void sendMailOnChangeContent(AttachmentImpl content)
throws Exception
Exception
public static String getEmailUser(String userName)
throws Exception
Exception
public static boolean isWikiAvailable(String wikiType,
String wikiOwner)
public static HashMap<String,IDType> getACLForAdmins()
public static boolean hasPermission(org.exoplatform.services.jcr.access.AccessControlList acl,
String[] permission,
org.exoplatform.services.security.Identity user)
acl - access control listpermission - permissions arrayuser - user Identity
public static String getURL(String url,
String verName)
public static org.exoplatform.services.jcr.ext.common.SessionProvider createSystemProvider()
public static long countSearchResult(WikiSearchData data)
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||