Package org.exoplatform.wiki.commons
Class Utils
- java.lang.Object
-
- org.exoplatform.wiki.commons.Utils
-
public class Utils extends Object
-
-
Constructor Summary
Constructors Constructor Description Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidajaxRedirect(org.exoplatform.webui.event.Event<? extends org.exoplatform.webui.core.UIComponent> event, String redirectLink)static voidajaxRedirect(org.exoplatform.webui.event.Event<? extends org.exoplatform.webui.core.UIComponent> event, org.exoplatform.wiki.service.WikiPageParams pageParams, WikiMode mode, Map<String,String[]> params)static booleancanModifyPagePermission()static StringcreateFormActionLink(org.exoplatform.webui.core.UIComponent uiComponent, String action, String beanId)static StringcreateURLWithMode(org.exoplatform.wiki.service.WikiPageParams pageParams, WikiMode mode, Map<String,String[]> params)static org.exoplatform.wiki.service.WikiContextcreateWikiContext(UIWikiPortlet wikiPortlet)static voidfeedDataForWYSIWYGEditor(UIWikiPageEditForm pageEditForm, String markup)static StringgetActionFromWikiMode(WikiMode mode)static StringgetBaseUrl()static org.exoplatform.wiki.mow.api.PagegetCurrentNewDraftWikiPage()static org.exoplatform.wiki.mow.api.WikiPreferencesgetCurrentPreferences()static StringgetCurrentRequestURL()static StringgetCurrentRestURL()static StringgetCurrentSpaceName()static org.exoplatform.wiki.mow.api.WikigetCurrentWiki()static StringgetCurrentWikiNodeUri()static org.exoplatform.wiki.mow.api.PagegetCurrentWikiPage()Gets current wiki page directly from data basestatic org.exoplatform.wiki.service.WikiPageParamsgetCurrentWikiPageParams()static StringgetCurrentWikiPagePath()static StringgetDefaultSyntax()static StringgetDraftIdSessionKey()static StringgetExtension(String filename)static StringgetFullName(String userId)static intgetLimitUploadSize()static WikiModegetModeFromAction(String actionParam)static StringgetPageLink()Get the full path for current wiki pagestatic StringgetSpaceHomeURL(String spaceGroupId)static StringgetSpaceName(org.exoplatform.wiki.mow.api.Wiki wiki)static StringgetURLFromParams(org.exoplatform.wiki.service.WikiPageParams params)static WikiModegetWikiMode()static StringgetWikiOwnerFromWikiId(String wikiId)static StringgetWikiTypeFromWikiId(String wikiId)static booleanisCurrentPagePublic()static booleanisPagePublic(org.exoplatform.wiki.mow.api.Page page)static voidredirect(String url)static voidredirect(org.exoplatform.wiki.service.WikiPageParams pageParams, WikiMode mode)static voidredirect(org.exoplatform.wiki.service.WikiPageParams pageParams, WikiMode mode, Map<String,String[]> params)static StringupperFirstCharacter(String str)
-
-
-
Field Detail
-
DEFAULT_VALUE_UPLOAD_PORTAL
public static final int DEFAULT_VALUE_UPLOAD_PORTAL
- See Also:
- Constant Field Values
-
SLASH
public static final String SLASH
- See Also:
- Constant Field Values
-
DRAFT_ID
public static final String DRAFT_ID
- See Also:
- Constant Field Values
-
WIKI_MODE
public static final String WIKI_MODE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSpaceName
public static String getSpaceName(org.exoplatform.wiki.mow.api.Wiki wiki) throws Exception
- Throws:
Exception
-
getCurrentWikiPageParams
public static org.exoplatform.wiki.service.WikiPageParams getCurrentWikiPageParams() throws Exception- Throws:
Exception
-
getCurrentWikiPage
public static org.exoplatform.wiki.mow.api.Page getCurrentWikiPage() throws ExceptionGets current wiki page directly from data base- Returns:
- current wiki page
- Throws:
Exception
-
canModifyPagePermission
public static boolean canModifyPagePermission() throws Exception- Throws:
Exception
-
isPagePublic
public static boolean isPagePublic(org.exoplatform.wiki.mow.api.Page page) throws Exception- Throws:
Exception
-
getURLFromParams
public static String getURLFromParams(org.exoplatform.wiki.service.WikiPageParams params) throws Exception
- Throws:
Exception
-
getCurrentNewDraftWikiPage
public static org.exoplatform.wiki.mow.api.Page getCurrentNewDraftWikiPage() throws Exception- Throws:
Exception
-
getCurrentWiki
public static org.exoplatform.wiki.mow.api.Wiki getCurrentWiki() throws Exception- Throws:
Exception
-
feedDataForWYSIWYGEditor
public static void feedDataForWYSIWYGEditor(UIWikiPageEditForm pageEditForm, String markup) throws Exception
- Throws:
Exception
-
getCurrentWikiPagePath
public static String getCurrentWikiPagePath() throws Exception
- Throws:
Exception
-
getDefaultSyntax
public static String getDefaultSyntax()
-
getCurrentPreferences
public static org.exoplatform.wiki.mow.api.WikiPreferences getCurrentPreferences() throws Exception- Throws:
Exception
-
createWikiContext
public static org.exoplatform.wiki.service.WikiContext createWikiContext(UIWikiPortlet wikiPortlet) throws Exception
- Throws:
Exception
-
getCurrentWikiNodeUri
public static String getCurrentWikiNodeUri() throws Exception
- Throws:
Exception
-
redirect
public static void redirect(org.exoplatform.wiki.service.WikiPageParams pageParams, WikiMode mode) throws Exception- Throws:
Exception
-
getPageLink
public static String getPageLink() throws Exception
Get the full path for current wiki page- Throws:
Exception
-
redirect
public static void redirect(org.exoplatform.wiki.service.WikiPageParams pageParams, WikiMode mode, Map<String,String[]> params) throws Exception- Throws:
Exception
-
ajaxRedirect
public static void ajaxRedirect(org.exoplatform.webui.event.Event<? extends org.exoplatform.webui.core.UIComponent> event, org.exoplatform.wiki.service.WikiPageParams pageParams, WikiMode mode, Map<String,String[]> params) throws Exception- Throws:
Exception
-
ajaxRedirect
public static void ajaxRedirect(org.exoplatform.webui.event.Event<? extends org.exoplatform.webui.core.UIComponent> event, String redirectLink) throws Exception- Throws:
Exception
-
createURLWithMode
public static String createURLWithMode(org.exoplatform.wiki.service.WikiPageParams pageParams, WikiMode mode, Map<String,String[]> params) throws Exception
- Throws:
Exception
-
createFormActionLink
public static String createFormActionLink(org.exoplatform.webui.core.UIComponent uiComponent, String action, String beanId) throws Exception
- Throws:
Exception
-
getCurrentRestURL
public static String getCurrentRestURL()
-
getLimitUploadSize
public static int getLimitUploadSize()
-
getDraftIdSessionKey
public static String getDraftIdSessionKey()
-
getWikiMode
public static WikiMode getWikiMode()
-
-