/** * Copyright (c) 2011-2017, James Zhan 詹波 (inlet@126.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.zzwtec.wechat.sdk.render; import org.springframework.beans.factory.annotation.Autowired; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * Render. */ public abstract class Render { protected String view; @Autowired protected HttpServletRequest request; @Autowired protected HttpServletResponse response; private static String encoding = "UTF-8"; private static boolean devMode = false; public static String getEncoding() { return encoding; } public static boolean getDevMode() { return devMode; } public String getView() { return view; } public void setView(String view) { this.view = view; } public HttpServletRequest getRequest() { return request; } public void setRequest(HttpServletRequest request) { this.request = request; } public HttpServletResponse getResponse() { return response; } public void setResponse(HttpServletResponse response) { this.response = response; } /** * Render to client */ public abstract void render(); }