Class Utils


  • public class Utils
    extends Object
    • Constructor Detail

      • Utils

        public Utils()
    • Method Detail

      • upperFirstCharacter

        public static String upperFirstCharacter​(String str)
      • 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 Exception
        Gets 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
      • isCurrentPagePublic

        public static boolean isCurrentPagePublic()
                                           throws Exception
        Throws:
        Exception
      • getSpaceHomeURL

        public static String getSpaceHomeURL​(String spaceGroupId)
      • 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
      • 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
      • 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
      • 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
      • createFormActionLink

        public static String createFormActionLink​(org.exoplatform.webui.core.UIComponent uiComponent,
                                                  String action,
                                                  String beanId)
                                           throws Exception
        Throws:
        Exception
      • getActionFromWikiMode

        public static String getActionFromWikiMode​(WikiMode mode)
      • getCurrentRestURL

        public static String getCurrentRestURL()
      • getModeFromAction

        public static WikiMode getModeFromAction​(String actionParam)
      • getLimitUploadSize

        public static int getLimitUploadSize()
      • getFullName

        public static String getFullName​(String userId)
      • getDraftIdSessionKey

        public static String getDraftIdSessionKey()
      • getWikiTypeFromWikiId

        public static String getWikiTypeFromWikiId​(String wikiId)
      • getWikiOwnerFromWikiId

        public static String getWikiOwnerFromWikiId​(String wikiId)
      • getWikiMode

        public static WikiMode getWikiMode()