view src/main/java/de/mpiwg/web/jsp/CreateFilePage.java @ 30:ab2fae5c5156

new: check our Chinese Local Gazetteers dataverse for login
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Fri, 11 Sep 2015 15:54:01 +0200
parents 3e62083dbcbf
children
line wrap: on
line source

package de.mpiwg.web.jsp;

import java.sql.SQLException;

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

import org.apache.log4j.Logger;

import de.mpiwg.gazetteer.db.DBSection;
import de.mpiwg.gazetteer.utils.DBService;

public class CreateFilePage extends AbstractJSPPage{
	
	private static Logger logger = Logger.getLogger(CreateFilePage.class);
	
	public static String bean = "createFileBean";
	public static String page = "pages/createFile.jsp";
	
	private Long sectionId;
	private DBSection section;

	public void loadParameters(HttpServletRequest request, HttpServletResponse response){
		this.request = request;
		this.response = response;
		
		this.sectionId = getLongParameter("sectionId");
	}
	
	public void loadSection(){
		System.out.println("$$$$$ loadSection= " + sectionId);
		try {
			
			this.section = DBService.getSectionWithContent(sectionId);
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}
	
	public void reset(){
		this.section = null;
		this.sectionId = null;
	}
	
	public Long getSectionId() {
		return sectionId;
	}

	public void setSectionId(Long sectionId) {
		this.sectionId = sectionId;
	}

	public DBSection getSection() {
		return section;
	}

	public void setSection(DBSection section) {
		this.section = section;
	}
	
	

}