1 20 package org.openi.application; 21 22 import java.io.*; 23 24 import org.apache.log4j.*; 25 26 27 33 public class Application implements Serializable { 34 private static Logger logger = LogManager.getLogger(Application.class); 35 private static Application application = null; 36 37 private String applicationAdmins = null; private String poweredByLogoName = null; 40 private String logonImageName = null; 41 private boolean basicAuthentication = false; private String applicationAdminPermissions = null; private String projectAdminPermissions = null; private String projectUserPermissions = null; 46 private String applicationTitle = "OpenI Open Intelligence Portal"; 48 49 private String customerSupport = "http://sourceforge.net/forum/?group_id=142873"; 51 52 private String copyrightMessage = "\u00a9 2005 - 2006, Loyalty Matrix, Inc."; 54 55 private long maxFileUploadSize = 1000000; 56 57 private boolean sql2005Compatiblilty = false; 58 59 private String projectXsl = ""; 61 62 63 private Application() { 64 } 65 66 70 public static Application getInstance() { 71 if (application == null) { 72 logger.info("Creating instance of application config"); 73 application = new Application(); 74 } 75 76 return application; 77 } 78 79 83 public String getLogonImageName() { 84 return logonImageName; 85 } 86 87 91 public String getPoweredByLogoName() { 92 return poweredByLogoName; 93 } 94 95 99 public String getApplicationAdmins() { 100 return applicationAdmins; 101 } 102 103 107 public boolean isBasicAuthentication() { 108 return basicAuthentication; 109 } 110 111 115 public String getProjectAdminPermissions() { 116 return projectAdminPermissions; 117 } 118 119 123 public String getProjectUserPermissions() { 124 return projectUserPermissions; 125 } 126 127 131 public String getApplicationAdminPermissions() { 132 return applicationAdminPermissions; 133 } 134 135 139 public void setLogonImageName(String logonImageName) { 140 this.logonImageName = logonImageName; 141 } 142 143 147 public void setPoweredByLogoName(String poweredByLogoName) { 148 this.poweredByLogoName = poweredByLogoName; 149 } 150 151 155 public void setApplicationAdmins(String applicationAdmins) { 156 this.applicationAdmins = applicationAdmins; 157 } 158 159 163 public void setBasicAuthentication(boolean basicAuthentication) { 164 this.basicAuthentication = basicAuthentication; 165 } 166 167 171 public void setProjectAdminPermissions(String projectAdminPermissions) { 172 this.projectAdminPermissions = projectAdminPermissions; 173 } 174 175 179 public void setProjectUserPermissions(String projectUserPermissions) { 180 this.projectUserPermissions = projectUserPermissions; 181 } 182 183 187 public void setApplicationAdminPermissions( 188 String applicationAdminPermissions) { 189 this.applicationAdminPermissions = applicationAdminPermissions; 190 } 191 192 196 private Object readResolve() throws ObjectStreamException { 197 return application; 198 } 199 200 203 public String getApplicationTitle() { 204 return applicationTitle; 205 } 206 207 211 public String getCustomerSupport() { 212 return customerSupport; 213 } 214 215 public String getCopyrightMessage() { 216 return copyrightMessage; 217 } 218 219 public long getMaxFileUploadSize() { 220 return maxFileUploadSize; 221 } 222 223 226 public void setApplicationTitle(String applicationTitle) { 227 this.applicationTitle = applicationTitle; 228 } 229 230 234 public void setCustomerSupport(String customerSupport) { 235 this.customerSupport = customerSupport; 236 } 237 238 public void setCopyrightMessage(String copyrightMessage) { 239 this.copyrightMessage = copyrightMessage; 240 } 241 242 public void setMaxFileUploadSize(long maxFileUploadSize) { 243 this.maxFileUploadSize = maxFileUploadSize; 244 } 245 246 247 public boolean isSql2005Compatiblilty() { 248 return this.sql2005Compatiblilty; 249 } 250 251 public void setSql2005Compatiblilty(boolean sql2005Compatiblilty) { 252 this.sql2005Compatiblilty = sql2005Compatiblilty; 253 } 254 255 public String getProjectXsl() { 256 return projectXsl; 257 } 258 259 public void setProjectXsl(String projectXsl) { 260 this.projectXsl = projectXsl; 261 } 262 263 } 264 | Popular Tags |