private static String _getWindowState(HttpServletRequest request) { WindowState windowState = (WindowState)request.getAttribute( WebKeys.WINDOW_STATE); if (windowState != null) { return windowState.toString(); } return request.getParameter("p_p_state"); }
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 static boolean isExclusive(HttpServletRequest request) { String state = _getWindowState(request); if ((state != null) && state.equals(EXCLUSIVE.toString())) { return true; } return false; }
public static boolean isPopUp(HttpServletRequest request) { String state = _getWindowState(request); if ((state != null) && state.equals(POP_UP.toString())) { return true; } return false; }
public static boolean isMaximized(HttpServletRequest request) { String state = _getWindowState(request); if ((state != null) && state.equals(WindowState.MAXIMIZED.toString())) { return true; } return false; }
public void setWindowState(WindowState windowState) { this.windowState = windowState; this.stateName = windowState == null ? null : windowState.toString(); }
@Override public String toNonNullValue(WindowState value) { return value.toString(); } }
@Override public String toNonNullValue(WindowState value) { return value.toString(); } }
/** * @see org.hibernate.usertype.UserType#disassemble(java.lang.Object) */ public Serializable disassemble(Object value) throws HibernateException { final WindowState state = (WindowState)value; return state.toString(); }
public static boolean isExclusive(HttpServletRequest request) { String state = request.getParameter("p_p_state"); if ((state != null) && (state.equals(EXCLUSIVE.toString()))) { return true; } else { return false; } }
public static boolean isMaximized(HttpServletRequest request) { String state = request.getParameter("p_p_state"); if ((state != null) && (state.equals(WindowState.MAXIMIZED.toString()))) { return true; } else { return false; } }
public static boolean isPopUp(HttpServletRequest request) { String state = request.getParameter("p_p_state"); if ((state != null) && (state.equals(POP_UP.toString()))) { return true; } else { return false; } }
/** * @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 WindowState state = (WindowState)value; st.setString(index, state.toString()); } }
private boolean isWindowStateAllowed(WindowState state) { Enumeration supportedStates = portalContext.getSupportedWindowStates(); while (supportedStates.hasMoreElements()) { if (supportedStates.nextElement().toString().toUpperCase().equals( (state.toString().toUpperCase()))) { return true; } } return false; } // --------------------------------------------------------------------------------------------
public org.gatein.pc.api.WindowState getWindowState() { if (windowState != null) { return org.gatein.pc.api.WindowState.create(windowState.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 oos) throws IOException { oos.defaultWriteObject(); oos.writeObject(this.parentUrlState.toString()); oos.writeObject(this.parentUrlMode.toString()); }
private void writeObject(ObjectOutputStream oos) throws IOException { oos.defaultWriteObject(); oos.writeObject(this.portletMode.toString()); oos.writeObject(this.windowState.toString()); }
public void setWindowState(WindowState windowState) throws WindowStateException { WantUpdate update = requireUpdate("Window state cannot be set after redirect"); // if (!preq.isWindowStateAllowed(windowState)) { throw new WindowStateException("Not supported", windowState); } // update.windowState = org.gatein.pc.api.WindowState.create(windowState.toString()); }