Method renderMethod = renderModeHandlingMethodsMap.get(mode.toString()); if (renderMethod != null) { renderMethod.invoke(this, request, response);
public DefaultFriendlyURLMapper() { defaultIgnoredParameters = new LinkedHashSet<>(); defaultIgnoredParameters.add("p_p_id"); defaultReservedParameters = new LinkedHashMap<>(); defaultReservedParameters.put("p_p_lifecycle", "0"); defaultReservedParameters.put( "p_p_state", WindowState.NORMAL.toString()); defaultReservedParameters.put("p_p_mode", PortletMode.VIEW.toString()); }
public DecoratorActionTemplate(PortletMode mode, PortletMode customMode) { this(mode.toString(), mode, customMode, null, null); }
public void setPortletMode(PortletMode portletMode) { this.portletMode = portletMode; this.modeName = portletMode == null ? null : portletMode.toString(); }
/** * @see org.hibernate.usertype.UserType#disassemble(java.lang.Object) */ public Serializable disassemble(Object value) throws HibernateException { final PortletMode mode = (PortletMode)value; return mode.toString(); }
protected String getNext(Iterator iterator) { PortletMode mode = (PortletMode)iterator.next(); return mode.toString(); }
/** * @see org.hibernate.usertype.UserType#nullSafeSet(java.sql.PreparedStatement, java.lang.Object, int) */ public void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { if (value == null) { st.setNull(index, Types.VARCHAR); } else { final PortletMode mode = (PortletMode)value; st.setString(index, mode.toString()); } }
public org.gatein.pc.api.Mode getMode() { if (portletMode != null) { return org.gatein.pc.api.Mode.create(portletMode.toString()); } return null; }
private void writeObject(ObjectOutputStream oos) throws IOException { oos.defaultWriteObject(); oos.writeObject(this.portletMode.toString()); oos.writeObject(this.windowState.toString()); }
private void writeObject(ObjectOutputStream out) throws IOException { if (LOG.isDebugEnabled()) { LOG.debug("Serializing PortletState [action=" + action + "]"); } out.writeObject(id); out.writeBoolean(action); out.writeBoolean(secure); out.writeObject(parameters); out.writeObject(portletMode.toString()); out.writeObject(windowState.toString()); }
private void writeObject(ObjectOutputStream oos) throws IOException { oos.defaultWriteObject(); oos.writeObject(this.portletMode.toString()); oos.writeObject(this.windowState.toString()); }
private void writeObject(ObjectOutputStream oos) throws IOException { oos.defaultWriteObject(); oos.writeObject(this.parentUrlState.toString()); oos.writeObject(this.parentUrlMode.toString()); }
private boolean isPortletModeAllowed(PortletMode mode) throws PortletModeException { Enumeration supportedModes = portalContext.getSupportedPortletModes(); while (supportedModes.hasMoreElements()) { if (supportedModes.nextElement().toString().toUpperCase().equals( (mode.toString().toUpperCase()))) { return true; } } return false; }
protected void selectWingSClass(RenderRequest request) { String portletMode = request.getPortletMode().toString(); if (portletMode.equals(PortletMode.EDIT.toString()) && editClass != null) request.setAttribute(Const.REQUEST_ATTR_WINGS_CLASS, editClass); else if (portletMode.equals(PortletMode.HELP.toString()) && helpClass != null) request.setAttribute(Const.REQUEST_ATTR_WINGS_CLASS, helpClass); else request.setAttribute(Const.REQUEST_ATTR_WINGS_CLASS, viewClass); }
private boolean isNonFacesRequest(PortletRequest request, PortletResponse response) { // Non Faces request is identified by either the presence of the _jsfBridgeNonFacesView // parameter or the request being for a portlet mode which doesn't have a default // Faces view configured for it. if (request.getParameter(Bridge.NONFACES_TARGET_PATH_PARAMETER) != null) { return true; } String modeDefaultViewId = mDefaultViewIdMap.get(request.getPortletMode().toString()); return modeDefaultViewId == null; }
/** * Sets the "javax.portlet.faces.viewIdHistory.<code>portletMode</code>" session attribute according to the * requirements in Section 5.4.3 of the Bridge Spec. There is no corresponding getter method, because the value is * meant to be retrieved by developers via an EL expression. * * @param viewId The current Faces viewId. */ protected void setViewHistory(String viewId) { String attributeName = Bridge.VIEWID_HISTORY.concat(".").concat(renderRequest.getPortletMode().toString()); PortletSession portletSession = renderRequest.getPortletSession(); portletSession.setAttribute(attributeName, viewId); }
@Override public ModelAndView handleRenderRequest(RenderRequest request, RenderResponse response) { return new ModelAndView(request.getPortletMode().toString()); }
throw new PortletException(portletMode.toString());
private String createBridgeRequestScope(PortletRequest request) { // Generate an RMI UID, which is a unique identifier WITHIN the local // host. This will be used as the new lifecyleID UID uid = new UID(); return qualifyScopeId(mPortletConfig.getPortletName(), request.getPortletSession(true).getId(), request.getPortletMode().toString(), uid.toString()); }