All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xworker.http.ResultView Maven / Gradle / Ivy

There is a newer version: 2.0.3
Show newest version
/*******************************************************************************
* Copyright 2007-2013 See AUTHORS file.
 * 
* 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 xworker.http;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.List;

import javax.servlet.http.HttpServletResponse;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xmeta.ActionContext;
import org.xmeta.Bindings;
import org.xmeta.Thing;
import org.xmeta.World;

import xworker.util.UtilTemplate;
import freemarker.template.TemplateException;

/**
 * HttpControl的Result和一些界面处理。
 *  
 * @author zyx
 *
 */
public class ResultView {
	private static Logger log = LoggerFactory.getLogger(ResultView.class);
	
	public static void doResult(ActionContext actionContext) throws IOException, TemplateException{		
		//long start = System.currentTimeMillis();
		Thing resultObject = (Thing) actionContext.get("self");
		HttpServletResponse response = (HttpServletResponse) actionContext.get("response");
        
        //取得子区域的定义,处理区域
        List regions = resultObject.getChilds("region");
        if(regions != null){
            for(int k=0; k




© 2015 - 2025 Weber Informatics LLC | Privacy Policy