Package org.apache.turbine.util

Examples of org.apache.turbine.util.RunData


    private void populateWithSessionTools(List<ToolData> tools, Context context,
            PipelineData pipelineData, User user)
    {
        //Map runDataMap = (Map)pipelineData.get(RunData.class);
        //RunData data = (RunData) runDataMap.get(RunData.class);
        RunData runData = (RunData)pipelineData;
        // Iterate the tools
        for (Iterator<ToolData> it = tools.iterator(); it.hasNext();)
        {
            ToolData toolData = it.next();
            try
            {
                // ensure that tool is created only once for a user
                // by synchronizing against the user object
                synchronized (runData.getSession())
                {
                    // first try and fetch the tool from the user's
                    // hashtable
                    Object tool = runData.getSession().getAttribute(
                            SESSION_TOOLS_ATTRIBUTE_PREFIX
                            + toolData.toolClassName);

                    if (tool == null)
                    {
                        // if not there, an instance must be fetched from
                        // the pool
                        tool = pool.getInstance(toolData.toolClass);

                        // session tools are init'd with the User object
                        initTool(tool, user);

                        // store the newly created tool in the session
                        runData.getSession().setAttribute(
                                SESSION_TOOLS_ATTRIBUTE_PREFIX
                                + tool.getClass().getName(), tool);
                    }

                    // *NOT* else
 
View Full Code Here


            {
                ((PipelineDataApplicationTool) tool).init(param);
            }
            else if (tool instanceof RunDataApplicationTool)
            {
                RunData data = getRunData((PipelineData)param);
                ((RunDataApplicationTool) tool).init(data);
            }
            else if (tool instanceof ApplicationTool)
            {
                RunData data = getRunData((PipelineData)param);
                ((ApplicationTool) tool).init(data);
            }
        }
        else
        {
View Full Code Here

     * @param tool A Tool Object
     * @param data The current RunData Object
     */
    private void refreshTool(Object tool, Object dataObject)
    {
        RunData data = null;
        PipelineData pipelineData = null;
        if (dataObject instanceof PipelineData)
        {
            pipelineData = (PipelineData)dataObject;
            data = getRunData(pipelineData);
View Full Code Here

     */
    @Override
    public void doBuild(PipelineData pipelineData)
        throws Exception
    {
        RunData data = getRunData(pipelineData);
        data.getResponse().setContentType("text/html");
        data.declareDirectResponse();

        // variable to reference the screen in the layout template
        data.getRequest()
            .setAttribute(TurbineConstants.SCREEN_PLACEHOLDER,
                          new JspScreenPlaceholder(data));

        // variable to reference the navigations in the layout template
        data.getRequest().setAttribute(
            TurbineConstants.NAVIGATION_PLACEHOLDER,
            new JspNavigation(data));

        // Grab the layout template set in the TemplatePage.
        String templateName = data.getTemplateInfo().getLayoutTemplate();

        TurbineJsp.handleRequest(pipelineData, prefix + templateName, true);
    }
View Full Code Here

     */
    @Override
    public void doBuild(PipelineData pipelineData)
        throws Exception
    {
        RunData data = getRunData(pipelineData);
        // Get the context needed by Velocity.
        Context context = TurbineVelocity.getContext(pipelineData);

        // variable for the screen in the layout template
        context.put(TurbineConstants.SCREEN_PLACEHOLDER,
                    new TemplateScreen(data));

        // variable to reference the navigation screen in the layout template
        context.put(TurbineConstants.NAVIGATION_PLACEHOLDER,
                    new TemplateNavigation(data));

        // Grab the layout template set in the VelocityPage.
        // If null, then use the default layout template
        // (done by the TemplateInfo object)
        String templateName = data.getTemplateInfo().getLayoutTemplate();

        // Set the locale and content type
        data.getResponse().setLocale(data.getLocale());
        data.getResponse().setContentType(data.getContentType());

        log.debug("Now trying to render layout " + templateName);

        // Finally, generate the layout template and send it to the browser
        TurbineVelocity.handleRequest(context,
                prefix + templateName, data.getResponse().getOutputStream());
    }
View Full Code Here

     */
    @Override
    public void doPerform(PipelineData pipelineData)
            throws TurbineSecurityException
    {
        RunData data = getRunData(pipelineData);
        doPerform(data);
    }
View Full Code Here

     */
    @Override
    public void doPerform(PipelineData pipelineData)
            throws TurbineSecurityException
    {
        RunData data = getRunData(pipelineData);
        doPerform(data);
    }
View Full Code Here

     */
    @Override
    public void doPerform(PipelineData pipelineData)
            throws Exception
    {
        RunData data = getRunData(pipelineData);
        doPerform(data);
    }
View Full Code Here

     * @throws Exception a generic exception.
     */
    public void doPerform(PipelineData pipelineData, Context context)
            throws Exception
    {
        RunData data = getRunData(pipelineData);
        doPerform(data, context);
    }
View Full Code Here

     */
    @Override
    public void doPerform(PipelineData pipelineData)
      throws TurbineSecurityException
    {
        RunData data = getRunData(pipelineData);
        doPerform(data);
    }
View Full Code Here

TOP

Related Classes of org.apache.turbine.util.RunData

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.