public class JahiaPortletUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
JAHIA_SHARED_MAP |
static String |
PLUTO_ACTION |
static String |
PLUTO_PREFIX |
static String |
PLUTO_RESOURCE |
| Constructor and Description |
|---|
JahiaPortletUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Object |
convertValue(javax.jcr.Value val)
Convert Value jcr object to Object
|
static Object |
convertValues(javax.jcr.Value[] val)
convert Values[] jcr object to Object[]
|
static void |
copyAttribute(String attributeName,
javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletRequest portalRequest,
org.apache.pluto.container.PortletWindow window)
Copy jahia request attibute in portlet request attribute
|
static void |
copyAttribute(String attributeName,
javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletRequest portalRequest,
org.apache.pluto.container.PortletWindow window,
Object defaultValue,
boolean fromSession)
Copy jahia session or request attribute into the portalRequest.
|
static void |
copyJahiaAttributes(EntryPointInstance entryPointInstance,
javax.servlet.http.HttpServletRequest httpServletRequest,
org.apache.pluto.container.PortletWindow window,
javax.servlet.http.HttpServletRequest portalRequest,
boolean canModifySharedMap,
String workspaceName)
Copy some jahia attributes into attributes if the portlet request
|
static void |
copyNodeProperties(EntryPointInstance entryPointInstance,
org.apache.pluto.container.PortletWindow window,
javax.servlet.http.HttpServletRequest portalRequest,
String workspaceName)
Copy node properties into request attribute
|
static void |
copySharedMapFromJahiaToPortlet(javax.servlet.http.HttpServletRequest originalRequest,
javax.servlet.http.HttpServletRequest portalRequest,
org.apache.pluto.container.PortletWindow window,
boolean canModify)
Handle shared map
|
static void |
copySharedMapFromPortletToJahia(javax.servlet.http.HttpSession session,
javax.servlet.http.HttpServletRequest portalRequest,
org.apache.pluto.container.PortletWindow window)
Save shared map from portler request to jahia Session
|
static Map<String,Object> |
filterJahiaAttributes(javax.servlet.http.HttpServletRequest portalRequest)
Remove from request useless attributes
|
static String |
getRealAttributeName(org.apache.pluto.container.PortletWindow window,
String attributeName)
Get real attribute name
|
static boolean |
isPortletRequest(String pathInfo)
Return true is the request is a portlet request
|
static String |
removePlutoPart(String pathInfo)
Return an path without the pluto part
|
static void |
setJahiaAttributes(javax.servlet.http.HttpServletRequest portalRequest,
Map<String,Object> jahiaAttributes)
Set jahia attributes
|
public static final String JAHIA_SHARED_MAP
public static final String PLUTO_PREFIX
public static final String PLUTO_ACTION
public static final String PLUTO_RESOURCE
public static String removePlutoPart(String pathInfo)
pathInfo - public static boolean isPortletRequest(String pathInfo)
pathInfo - public static void copyJahiaAttributes(EntryPointInstance entryPointInstance, javax.servlet.http.HttpServletRequest httpServletRequest, org.apache.pluto.container.PortletWindow window, javax.servlet.http.HttpServletRequest portalRequest, boolean canModifySharedMap, String workspaceName)
httpServletRequest - the original request to copy fromwindow - portalRequest - public static void copyAttribute(String attributeName, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletRequest portalRequest, org.apache.pluto.container.PortletWindow window)
attributeName - httpServletRequest - the original request to copy from.portalRequest - window - public static void copyAttribute(String attributeName, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletRequest portalRequest, org.apache.pluto.container.PortletWindow window, Object defaultValue, boolean fromSession)
attributeName - httpServletRequest - the original request to copy from.portalRequest - window - fromSession - true means that the attribute is in Jahia Session else it's taked from the requestpublic static void copyNodeProperties(EntryPointInstance entryPointInstance, org.apache.pluto.container.PortletWindow window, javax.servlet.http.HttpServletRequest portalRequest, String workspaceName)
entryPointInstance - window - portalRequest - public static Object convertValues(javax.jcr.Value[] val) throws javax.jcr.RepositoryException
val - javax.jcr.RepositoryException - in case of JCR-related errorspublic static Object convertValue(javax.jcr.Value val) throws javax.jcr.RepositoryException
val - javax.jcr.RepositoryException - in case of JCR-related errorspublic static void copySharedMapFromJahiaToPortlet(javax.servlet.http.HttpServletRequest originalRequest,
javax.servlet.http.HttpServletRequest portalRequest,
org.apache.pluto.container.PortletWindow window,
boolean canModify)
originalRequest - the original Jahia request to copy from.portalRequest - window - public static void copySharedMapFromPortletToJahia(javax.servlet.http.HttpSession session,
javax.servlet.http.HttpServletRequest portalRequest,
org.apache.pluto.container.PortletWindow window)
portalRequest - public static String getRealAttributeName(org.apache.pluto.container.PortletWindow window, String attributeName)
window - attributeName - public static Map<String,Object> filterJahiaAttributes(javax.servlet.http.HttpServletRequest portalRequest)
portalRequest - Copyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.