|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.wcm.webui.Utils
public class Utils
Created by The eXo Platform SAS Author : Hoa Pham hoa.phamvu@exoplatform.com Oct 23, 2008
| Field Summary | |
|---|---|
static java.lang.String |
TURN_ON_QUICK_EDIT
The Quick edit attribute for HTTPSession |
| Constructor Summary | |
|---|---|
Utils()
|
|
| Method Summary | ||
|---|---|---|
static boolean |
canEditCurrentPortal(java.lang.String remoteUser)
Can edit current portal. |
|
static java.lang.String |
cleanString(java.lang.String str)
Clean string. |
|
static void |
closePopupWindow(org.exoplatform.webui.core.UIContainer container,
java.lang.String popupWindowId)
Close popup window. |
|
static void |
createPopupMessage(org.exoplatform.webui.core.UIContainer container,
java.lang.String message,
java.lang.Object[] args,
int type)
Creates the popup message. |
|
static void |
createPopupWindow(org.exoplatform.webui.core.UIContainer container,
org.exoplatform.webui.core.UIComponent component,
java.lang.String popupWindowId,
int width,
int height)
Creates the popup window. |
|
static java.lang.String |
getCurrentMode()
Gets the current mode of the site |
|
static javax.jcr.Node |
getNodeView(javax.jcr.Node originalNode)
Deprecated. Since 1.2.2, we don't get content directly like this. Replaced by getViewableNodeByComposer(String, String, String)
and by getViewableNodeByComposer(String, String, String, String)} |
|
static org.exoplatform.webui.core.UIPopupContainer |
getPopupContainer(org.exoplatform.webui.core.UIContainer container)
Gets the popup container. |
|
static
|
getService(java.lang.Class<T> clazz)
Gets the service. |
|
static org.exoplatform.services.jcr.ext.common.SessionProvider |
getSessionProvider()
Gets the session provider. |
|
static org.exoplatform.services.jcr.ext.common.SessionProvider |
getSessionProvider(org.exoplatform.webui.core.UIComponent component)
Deprecated. Replaced by getSessionProvider() |
|
static org.exoplatform.services.jcr.ext.common.SessionProvider |
getSystemProvider()
Gets the system session provider. |
|
static org.exoplatform.services.jcr.ext.common.SessionProvider |
getSystemProvider(org.exoplatform.webui.core.UIComponent component)
Deprecated. Replaced by getSystemProvider() |
|
static javax.jcr.Node |
getViewableNodeByComposer(java.lang.String repository,
java.lang.String workspace,
java.lang.String nodeIdentifier)
Gets the viewable node by WCMComposer (depends on site mode) |
|
static javax.jcr.Node |
getViewableNodeByComposer(java.lang.String repository,
java.lang.String workspace,
java.lang.String nodeIdentifier,
java.lang.String version)
Gets the viewable node by WCMComposer (depends on site mode) |
|
static boolean |
isEditPortletInCreatePageWizard()
Checks if is edits the portlet in create page wizard. |
|
static boolean |
isQuickEditMode(org.exoplatform.webui.core.UIContainer container,
java.lang.String popupWindowId)
Checks if is quick editmode. |
|
static boolean |
isShowDraft(javax.jcr.Node content)
Check if the content is draft and current mode of the site is edit mode |
|
static boolean |
isShowQuickEdit()
Check if the current mode of the site is edit mode |
|
static boolean |
isShowQuickEdit(javax.jcr.Node content)
Check if the content is editable and current mode of the site is edit mode |
|
static boolean |
isViewable(javax.jcr.Node node)
Check if the node is viewable for the current user or not viewable. |
|
static void |
updatePopupWindow(org.exoplatform.webui.core.UIContainer container,
org.exoplatform.webui.core.UIComponent component,
java.lang.String popupWindowId)
Update popup window. |
|
static void |
updatePortal(org.exoplatform.webui.application.portlet.PortletRequestContext context)
Refresh whole portal by AJAX. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String TURN_ON_QUICK_EDIT
| Constructor Detail |
|---|
public Utils()
| Method Detail |
|---|
public static boolean isEditPortletInCreatePageWizard()
public static boolean isQuickEditMode(org.exoplatform.webui.core.UIContainer container,
java.lang.String popupWindowId)
container - the current containerpopupWindowId - the popup window id
public static boolean canEditCurrentPortal(java.lang.String remoteUser)
throws java.lang.Exception
remoteUser - the remote user
java.lang.Exception - the exceptionpublic static java.lang.String cleanString(java.lang.String str)
str - the str
public static void updatePortal(org.exoplatform.webui.application.portlet.PortletRequestContext context)
context - the portlet request context@Deprecated public static javax.jcr.Node getNodeView(javax.jcr.Node originalNode)
getViewableNodeByComposer(String, String, String)
and by getViewableNodeByComposer(String, String, String, String)}
originalNode - the original node
public static javax.jcr.Node getViewableNodeByComposer(java.lang.String repository,
java.lang.String workspace,
java.lang.String nodeIdentifier)
repository - the repository's nameworkspace - the workspace's namenodeIdentifier - the node's path or node's UUID
null if nodeIdentifier is invalidgetViewableNodeByComposer()
public static javax.jcr.Node getViewableNodeByComposer(java.lang.String repository,
java.lang.String workspace,
java.lang.String nodeIdentifier,
java.lang.String version)
repository - the repository's nameworkspace - the workspace's namenodeIdentifier - the node's path or node's UUIDversion - the base version (e.g. WCMComposer.BASE_VERSION)
null if nodeIdentifier is invalidgetViewableNodeByComposer(),
WCMComposerpublic static java.lang.String getCurrentMode()
WCMComposer.MODE_EDIT)WCMComposerpublic static boolean isShowDraft(javax.jcr.Node content)
content - the content node.
public static boolean isShowQuickEdit()
public static boolean isShowQuickEdit(javax.jcr.Node content)
content - the content node
public static boolean isViewable(javax.jcr.Node node)
node: - The node to check
public static void createPopupWindow(org.exoplatform.webui.core.UIContainer container,
org.exoplatform.webui.core.UIComponent component,
java.lang.String popupWindowId,
int width,
int height)
throws java.lang.Exception
UIPopupContainer. UIPopupWindow created by this method is belong to this container.
container - the current containercomponent - the component which will be display as a popuppopupWindowId - the popup's IDwidth - the width of the popupheight - the height of the popup
java.lang.Exception - the exception
public static void closePopupWindow(org.exoplatform.webui.core.UIContainer container,
java.lang.String popupWindowId)
container - the current containerpopupWindowId - the popup's ID
public static void updatePopupWindow(org.exoplatform.webui.core.UIContainer container,
org.exoplatform.webui.core.UIComponent component,
java.lang.String popupWindowId)
container - the containercomponent - the component which will be replace for the old one in the same popuppopupWindowId - the popup's IDpublic static org.exoplatform.webui.core.UIPopupContainer getPopupContainer(org.exoplatform.webui.core.UIContainer container)
container - the current container
public static void createPopupMessage(org.exoplatform.webui.core.UIContainer container,
java.lang.String message,
java.lang.Object[] args,
int type)
container - the current containermessage - the message keyargs - the arguments to show in the messagetype - the message's type (e.g. ApplicationMessage.INFO)ApplicationMessagepublic static <T> T getService(java.lang.Class<T> clazz)
clazz - the class of the service
@Deprecated public static org.exoplatform.services.jcr.ext.common.SessionProvider getSessionProvider(org.exoplatform.webui.core.UIComponent component)
getSessionProvider()
SessionProviderFactorypublic static org.exoplatform.services.jcr.ext.common.SessionProvider getSessionProvider()
SessionProviderFactory@Deprecated public static org.exoplatform.services.jcr.ext.common.SessionProvider getSystemProvider(org.exoplatform.webui.core.UIComponent component)
getSystemProvider()
SessionProviderFactorypublic static org.exoplatform.services.jcr.ext.common.SessionProvider getSystemProvider()
SessionProviderFactory
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||