Package org.apache.jetspeed.services.statemanager

Examples of org.apache.jetspeed.services.statemanager.SessionState


    }

    public void doDown(RunData data, Context context)
    {
        // get the customization state for this page
        SessionState customizationState = ((JetspeedRunData) data).getPageSessionState();

        List[] columns = (List[]) customizationState.getAttribute("customize-columns");
        int col = data.getParameters().getInt("col", -1);
        int row = data.getParameters().getInt("row", -1);
        if (columns == null)
        {
            return;
View Full Code Here


        {
            String[] moves = StringUtils.stringToArray(modelChangeList[0], ";");

            if(moves != null)
            {
              SessionState customizationState = ((JetspeedRunData) data).getPageSessionState();
              List[] columns = (List[]) customizationState.getAttribute("customize-columns");
 
              for (int i = 0; i < moves.length; i++)
              {
                  String[] values = StringUtils.stringToArray(moves[i], ",");
                  if(values != null  && values.length >= 4)
View Full Code Here

        // We want the save button to say different things based on whether we're about to save to persistent storage
        // (Save and Apply) or just go the next screen (Apply).
        JetspeedRunData jdata = (JetspeedRunData) rundata;

        // get the customization state for this page
        SessionState customizationState = jdata.getPageSessionState();

        String saveLabel = null;
        if (((String) customizationState.getAttribute("customize-paneName")).equalsIgnoreCase("*"))
        {
            saveLabel = CustomLocalization.getString("CUSTOMIZER_SAVEAPPLY", rundata);   
        }
        else
        {
View Full Code Here

        // We want the save button to say different things based on whether we're about to save to persistent storage
        // (Save and Apply) or just go the next screen (Apply).
        JetspeedRunData jdata = (JetspeedRunData) rundata;

        // get the customization state for this page
        SessionState customizationState = jdata.getPageSessionState();

        String saveLabel = null;
        if (((String) customizationState.getAttribute("customize-paneName")).equalsIgnoreCase("*"))
        {
            saveLabel = Localization.getString(rundata, "CUSTOMIZER_SAVEAPPLY");   
        }
        else
        {
View Full Code Here

    protected void buildNormalContext(VelocityPortlet portlet,
                                      Context context,
                                      RunData rundata) throws Exception
    {
        JetspeedRunData jdata = (JetspeedRunData) rundata;
        SessionState customizationState = jdata.getPageSessionState();
        Profile profile = jdata.getCustomizedProfile();
        String mediaType = profile.getMediaType ();

        // set velocity variable of mediatype (displayed in the customizer menu)
        context.put("mtype", profile.getMediaType());

        // make the list of already used panes/portlets available through the 'runs' reference
        context.put("runs", AutoProfile.getPortletList(rundata));
       
        // we should first retrieve the portlet to customize
        PortletSet set = (PortletSet) (jdata).getCustomized();

        //identify the portlet submode and build the appropriate subt-template path
        String mode = rundata.getParameters().getString("mode");
        if (mode == null)
        {
          mode = (String) customizationState.getAttribute("customize-mode");
          if ((mode == null) || (mode.equalsIgnoreCase("addset")) || (mode.equalsIgnoreCase("general")))
          {
            mode = "layout";
          }
         
        }
        else
        {
          if ((mediaType.equalsIgnoreCase("wml")) && (!mode.equalsIgnoreCase("add")))
          {
            mode = "layout";
          }

          customizationState.setAttribute("customize-mode", mode);
        }

        String template = (String) context.get("template");

        if (template != null)
        {
            int idx = template.lastIndexOf(".");
           
            if (idx > 0)
            {
                template = template.substring(0, idx);
            }
           
            StringBuffer buffer = new StringBuffer(template);
            buffer.append("-").append(mode).append(".vm");
           
            template = TemplateLocator.locatePortletTemplate(rundata, buffer.toString());
            context.put("feature", template);

        }
   
        if (set == null)
        {
            return;
        }

        // get the customization state for this page
        String customizedPaneName = (String) customizationState.getAttribute("customize-paneName");
        if (customizedPaneName == null)
        {
            customizedPaneName = "*";
        }

View Full Code Here

    /** Clean up the customization state */
    public void doCancel(RunData rundata, Context context)
    {
        //((JetspeedRunData)rundata).setCustomized(null);
        //rundata.setScreenTemplate("Home");
        SessionState customizationState = ((JetspeedRunData) rundata).getPageSessionState();
        customizationState.setAttribute("customize-mode", "layout");
    }
View Full Code Here

                }
                portlets.addPortlets(p);
            }
        }

        SessionState customizationState = ((JetspeedRunData) rundata).getPageSessionState();
        customizationState.setAttribute("customize-mode", "layout");
    }
View Full Code Here

                }
            }
        }
        // --------------------------------------------------------------------------

        SessionState customizationState = ((JetspeedRunData) rundata).getPageSessionState();
        customizationState.setAttribute("customize-mode", "layout");

        /**
         * Save changed wml profile
         * --------------------------------------------------------------------------
         * last modified: 10/31/01
View Full Code Here

                        logger.warn(message);
                    }
                }
            }
        }
        SessionState customizationState = ((JetspeedRunData) rundata).getPageSessionState();
        customizationState.setAttribute("customize-mode", "layout");
    }
View Full Code Here

        String editMediaType = jdata.getParameters().getString ("mtype");
        String resetStack = jdata.getParameters().getString ("reset");
        String peid = jdata.getParameters().getString("js_peid");

        // get the customization state for this page
        SessionState customizationState = jdata.getPageSessionState();

        // this will be the profile we are editing
        Profile profile = null;

        // the "reset" parameter's presence signals the start of customization
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.services.statemanager.SessionState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.