view src/main/java/de/mpiwg/web/ApplicationBean.java @ 5:5316e79f9a27

Implementation of search pagination and lazy loading to display the result set of a search.
author "jurzua <jurzua@mpiwg-berlin.mpg.de>"
date Mon, 16 Mar 2015 11:25:36 +0100
parents 7682c04c63a8
children
line wrap: on
line source

package de.mpiwg.web;

import java.io.Serializable;

import org.apache.log4j.Logger;

import de.mpiwg.gazetteer.utils.PropertiesUtils;

public class ApplicationBean  implements Serializable{
	
	private static final long serialVersionUID = 804932192506497432L;

	private static Logger logger = Logger.getLogger(ApplicationBean.class);

	public static final String BEAN_NAME = "appBean";

	public String getExtractionInterfaceUrl(){
		String value = null;
		try {
			value = PropertiesUtils.getPropValue("extraction_interface");
		} catch (Exception e) {
			e.printStackTrace();
		}
		return value;
	}
	
	public String getRootServer(){
		String value = null;
		try {
			value = PropertiesUtils.getPropValue("root_server");
		} catch (Exception e) {
			e.printStackTrace();
		}
		return value;	
	}
	
	public String getDvnRootServer(){
		String value = null;
		try {
			value = PropertiesUtils.getPropValue("dvn_server");
		} catch (Exception e) {
			e.printStackTrace();
		}
		return value;	
	}
	
	public String getShowImage(){
		return getRootServer() + "/resources/images/show_16.png";
	}
	
	public String getEditImage(){
		return getRootServer() + "/resources/images/edit_16.png";
	}
	
	public String getPublishImage(){
		return getRootServer() + "/resources/images/publish_16.png";
	}
	
	public String getBranchDetailsImage(){
		return getRootServer() + "/resources/images/branch_details_16.png";
	}
	
	public String getNewBranchImage(){
		return getRootServer() + "/resources/images/new_branch_16.png";
	}
	
	public String getEditBranchImage(){
		return getRootServer() + "/resources/images/edit_branch_16.png";
	}
	
	public String getSearchImage(){
		return getRootServer() + "/resources/images/search_32.png";
	}
	
	public String getPaginatorFirst(){
		return getRootServer() + "/resources/images/arrow-first.gif";
	}
	
	public String getPaginatorFr(){
		return getRootServer() + "/resources/images/arrow-fr.gif";
	}
	
	public String getPaginatorPrevious(){
		return getRootServer() + "/resources/images/arrow-previous.gif";
	}
	
	public String getPaginatorNext(){
		return getRootServer() + "/resources/images/arrow-next.gif";
	}
	public String getPaginatorFf(){
		return getRootServer() + "/resources/images/arrow-ff.gif";
	}
	
	public String getPaginatorLast(){
		return getRootServer() + "/resources/images/arrow-last.gif";
	}
	
	public String getJSConfirmationDelete(){
		return "if(!confirm('Do you really want to delete this?')){ return false; };";
	}
	
	public String getJSConfirmationSave(){
		return "if(!confirm('Do you really want to save this?')){ return false; };";
	}
}