Package br.net.woodstock.rockframework.web.struts2

Source Code of br.net.woodstock.rockframework.web.struts2.AbstractResult

/*
* This file is part of rockframework.
*
* rockframework is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* rockframework is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>;.
*/
package br.net.woodstock.rockframework.web.struts2;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import br.net.woodstock.rockframework.core.RockFrameworkVersion;
import br.net.woodstock.rockframework.web.struts2.utils.Struts2;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.util.ValueStack;

public abstract class AbstractResult implements com.opensymphony.xwork2.Result {

  private static final long  serialVersionUID  = RockFrameworkVersion.VERSION;

  protected Object findValue(final ActionInvocation invocation, final String expr) {
    ValueStack stack = invocation.getStack();
    return stack.findValue(expr);
  }

  protected HttpServletRequest getRequest() {
    return Struts2.getRequest();
  }

  protected HttpServletResponse getResponse() {
    return Struts2.getResponse();
  }

  protected ServletContext getServletContext() {
    return Struts2.getServletContext();
  }

  protected HttpSession getSession() {
    return Struts2.getSession();
  }

}
TOP

Related Classes of br.net.woodstock.rockframework.web.struts2.AbstractResult

TOP
Copyright © 2018 www.massapi.com. 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.