comparison src/main/java/de/mpiwg/web/jsp/ApplicationBean.java @ 0:3e62083dbcbf

First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
author "jurzua <jurzua@mpiwg-berlin.mpg.de>"
date Thu, 23 Apr 2015 15:46:01 +0200
parents
children 3387d855a194
comparison
equal deleted inserted replaced
-1:000000000000 0:3e62083dbcbf
1 package de.mpiwg.web.jsp;
2
3 import java.io.Serializable;
4
5 import org.apache.log4j.Logger;
6
7 import de.mpiwg.gazetteer.utils.PropertiesUtils;
8
9 public class ApplicationBean implements Serializable{
10
11 private static final long serialVersionUID = 804932192506497432L;
12
13 private static Logger logger = Logger.getLogger(ApplicationBean.class);
14
15 private static ApplicationBean instance;
16
17 public static ApplicationBean getInstance(){
18 if(instance == null){
19 instance = new ApplicationBean();
20 }
21 return instance;
22 }
23
24 public ApplicationBean(){
25 System.out.println("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");
26 System.out.println("Starting Application Bean");
27 System.out.println("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");
28 }
29
30
31 public String getExtractionInterfaceUrl(){
32 String value = null;
33 try {
34 value = PropertiesUtils.getPropValue("extraction_interface");
35 } catch (Exception e) {
36 e.printStackTrace();
37 }
38 return value;
39 }
40
41 public String getTocInterfaceUrl(){
42 String value = null;
43 try {
44 value = PropertiesUtils.getPropValue("toc_interface");
45 } catch (Exception e) {
46 e.printStackTrace();
47 }
48 return value;
49 }
50
51 public String getRootServer(){
52 String value = null;
53 try {
54 value = PropertiesUtils.getPropValue("root_server");
55 } catch (Exception e) {
56 e.printStackTrace();
57 }
58 return value;
59 }
60
61 public String getDvnRootServer(){
62 String value = null;
63 try {
64 value = PropertiesUtils.getPropValue("dvn_server");
65 } catch (Exception e) {
66 e.printStackTrace();
67 }
68 return value;
69 }
70
71 public String getShowImage(){
72 return getRootServer() + "/resources/images/show_16.png";
73 }
74
75 public String getEditImage(){
76 return getRootServer() + "/resources/images/edit_16.png";
77 }
78
79 public String getPublishImage(){
80 return getRootServer() + "/resources/images/publish_16.png";
81 }
82
83 public String getBranchDetailsImage(){
84 return getRootServer() + "/resources/images/branch_details_16.png";
85 }
86
87 public String getNewBranchImage(){
88 return getRootServer() + "/resources/images/new_branch_16.png";
89 }
90
91 public String getEditBranchImage(){
92 return getRootServer() + "/resources/images/edit_branch_16.png";
93 }
94
95 public String getSearchImage(){
96 return getRootServer() + "/resources/images/search_32.png";
97 }
98
99 public String getPaginatorFirst(){
100 return getRootServer() + "/resources/images/arrow-first.gif";
101 }
102
103 public String getPaginatorFr(){
104 return getRootServer() + "/resources/images/arrow-fr.gif";
105 }
106
107 public String getPaginatorPrevious(){
108 return getRootServer() + "/resources/images/arrow-previous.gif";
109 }
110
111 public String getPaginatorNext(){
112 return getRootServer() + "/resources/images/arrow-next.gif";
113 }
114 public String getPaginatorFf(){
115 return getRootServer() + "/resources/images/arrow-ff.gif";
116 }
117
118 public String getPaginatorLast(){
119 return getRootServer() + "/resources/images/arrow-last.gif";
120 }
121
122 public String getUpImage(){
123 return getRootServer() + "/resources/images/up_16.png";
124 }
125
126 public String getFilterImage(){
127 return getRootServer() + "/resources/images/filter_16.png";
128 }
129
130 public String getDownImage(){
131 return getRootServer() + "/resources/images/down_16.png";
132 }
133
134 public String getDeleteImage(){
135 return getRootServer() + "/resources/images/delete_16.png";
136 }
137
138 public String getMoreInfoImage(){
139 return getRootServer() + "/resources/images/more_info_16.png";
140 }
141
142 public String getJSConfirmationDelete(){
143 return "if(!confirm('Do you really want to delete this?')){ return false; };";
144 }
145
146 public String getJSConfirmationPublish(){
147 return "if(!confirm('Do you really want to publish this?')){ return false; };";
148 }
149
150 public String getJSConfirmationSave(){
151 return "if(!confirm('Do you really want to save this?')){ return false; };";
152 }
153 }