org.exoplatform.wiki.commons
Class Utils

java.lang.Object
  extended by org.exoplatform.wiki.commons.Utils

public class Utils
extends Object


Field Summary
static int DEFAULT_VALUE_UPLOAD_PORTAL
           
static String SLASH
           
 
Constructor Summary
Utils()
           
 
Method Summary
static void ajaxRedirect(org.exoplatform.webui.event.Event<? extends org.exoplatform.webui.core.UIComponent> event, String redirectLink)
           
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)
           
static boolean canModifyPagePermission()
           
static boolean canPublicAndRetrictPage()
           
static String createFormActionLink(org.exoplatform.webui.core.UIComponent uiComponent, String action, String beanId)
           
static String createURLWithMode(org.exoplatform.wiki.service.WikiPageParams pageParams, WikiMode mode, Map<String,String[]> params)
           
static org.exoplatform.wiki.service.WikiContext createWikiContext(UIWikiPortlet wikiPortlet)
           
static void feedDataForWYSIWYGEditor(UIWikiPageEditForm pageEditForm, String markup)
           
static String getActionFromWikiMode(WikiMode mode)
           
static String getBaseUrl()
           
static org.exoplatform.wiki.mow.api.Page getCurrentNewDraftWikiPage()
           
static List<org.exoplatform.wiki.chromattic.ext.ntdef.NTVersion> getCurrentPageRevisions()
           
static org.exoplatform.wiki.mow.core.api.wiki.Preferences getCurrentPreferences()
           
static String getCurrentRequestURL()
           
static String getCurrentRestURL()
           
static String getCurrentSpaceName()
           
static org.exoplatform.wiki.mow.api.Wiki getCurrentWiki()
           
static String getCurrentWikiNodeUri()
           
static org.exoplatform.wiki.mow.api.Page getCurrentWikiPage()
           
static org.exoplatform.wiki.service.WikiPageParams getCurrentWikiPageParams()
           
static String getCurrentWikiPagePath()
           
static String getDefaultSyntax()
           
static String getExtension(String filename)
           
static String getFullName(String userId)
           
static int getLimitUploadSize()
           
static WikiMode getModeFromAction(String actionParam)
           
static String getSpaceHomeURL(String spaceGroupId)
           
static String getSpaceName(org.exoplatform.wiki.mow.api.Wiki space)
           
static String getURLFromParams(org.exoplatform.wiki.service.WikiPageParams params)
           
static boolean hasPermission(String[] permissions)
           
static boolean isCurrentPagePublic()
           
static void redirect(String url)
           
static void redirect(org.exoplatform.wiki.service.WikiPageParams pageParams, WikiMode mode)
           
static void redirect(org.exoplatform.wiki.service.WikiPageParams pageParams, WikiMode mode, Map<String,String[]> params)
           
static void removeWikiContext()
           
static String renderMacroToXHtml(org.exoplatform.webui.core.UIComponent uiComponent, String macroName, String wikiSyntax)
          render macro to XHtml string.
static org.exoplatform.wiki.service.WikiContext setUpWikiContext(UIWikiPortlet wikiPortlet)
           
static String upperFirstCharacter(String str)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
Constructor Detail

Utils

public Utils()
Method Detail

upperFirstCharacter

public static String upperFirstCharacter(String str)

getCurrentSpaceName

public static String getCurrentSpaceName()
                                  throws Exception
Throws:
Exception

getSpaceName

public static String getSpaceName(org.exoplatform.wiki.mow.api.Wiki space)
                           throws Exception
Throws:
Exception

getCurrentRequestURL

public static String getCurrentRequestURL()
                                   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
Throws:
Exception

canModifyPagePermission

public static boolean canModifyPagePermission()
                                       throws Exception
Throws:
Exception

canPublicAndRetrictPage

public static boolean canPublicAndRetrictPage()
                                       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

getExtension

public static String getExtension(String filename)
                           throws Exception
Throws:
Exception

getCurrentWiki

public static org.exoplatform.wiki.mow.api.Wiki getCurrentWiki()
                                                        throws Exception
Throws:
Exception

setUpWikiContext

public static org.exoplatform.wiki.service.WikiContext setUpWikiContext(UIWikiPortlet wikiPortlet)
                                                                 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()
                               throws Exception
Throws:
Exception

getCurrentPreferences

public static org.exoplatform.wiki.mow.core.api.wiki.Preferences getCurrentPreferences()
                                                                                throws Exception
Throws:
Exception

createWikiContext

public static org.exoplatform.wiki.service.WikiContext createWikiContext(UIWikiPortlet wikiPortlet)
                                                                  throws Exception
Throws:
Exception

getBaseUrl

public static String getBaseUrl()
                         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

redirect

public static void redirect(org.exoplatform.wiki.service.WikiPageParams pageParams,
                            WikiMode mode,
                            Map<String,String[]> params)
                     throws Exception
Throws:
Exception

redirect

public static void redirect(String url)
                     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

getActionFromWikiMode

public static String getActionFromWikiMode(WikiMode mode)

getCurrentRestURL

public static String getCurrentRestURL()

hasPermission

public static boolean hasPermission(String[] permissions)
                             throws Exception
Throws:
Exception

getModeFromAction

public static WikiMode getModeFromAction(String actionParam)

renderMacroToXHtml

public static String renderMacroToXHtml(org.exoplatform.webui.core.UIComponent uiComponent,
                                        String macroName,
                                        String wikiSyntax)
render macro to XHtml string.

Parameters:
uiComponent - - component that contain the macro.
macroName - - name of macro
wikiSyntax - - wiki syntax referred from Syntax
Returns:
String in format Syntax.XHTML_1_0

removeWikiContext

public static void removeWikiContext()
                              throws Exception
Throws:
Exception

getCurrentPageRevisions

public static List<org.exoplatform.wiki.chromattic.ext.ntdef.NTVersion> getCurrentPageRevisions()
                                                                                         throws Exception
Throws:
Exception

getLimitUploadSize

public static int getLimitUploadSize()

getFullName

public static String getFullName(String userId)


Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.