1 16 17 package org.apache.jetspeed.services.resources; 18 19 import org.apache.turbine.services.resources.TurbineResources; 20 21 37 public class JetspeedResources extends TurbineResources { 38 39 public static final String SITE_HEADER_LOGO_KEY = "site.header.logo"; 41 public static final String SITE_HEADER_WELCOME_KEY = "site.header.welcome"; 42 public static final String SITE_FOOTER_LOGO_KEY = "site.footer.logo"; 43 44 46 public static final String PROFILER_DEFAULT_CLASSNAME_KEY = "profiler.default.classname"; 47 public static final String PROFILER_CONFIGURATION_KEY = "profiler.configuration"; 48 public static final String SKIN_DEFAULT_KEY = "skin.default"; 49 public static final String PORTLETCONTROL_DEFAULT_CLASSNAME_KEY = "portletcontrol.default.classname"; 50 public static final String PORTLETCONTROL_MAXIMIZED_CLASSNAME_KEY = "portletcontrol.maximized.classname"; 51 public static final String PORTLETCONTROLLER_DEFAULT_CLASSNAME_KEY = "portletcontroller.default.classname"; 52 53 public static final String CACHE_DIRECTORY_KEY = "cache.directory"; 55 public static final String CACHE_REQUIRE_CACHED_KEY = "cache.require.cached"; 56 public static final String DEFAULT_DCE_EXPIRATION_TIME_KEY = "cache.default.expiration"; 57 58 public static final String DEFAULTPORTLETCONTROL_WIDTH_KEY = "defaultportletcontrol.width"; 59 public static final String DEFAULTPORTLETCONTROLLER_NUMCOLUMNS_KEY = "defaultportletcontroller.numcolumns"; 60 public static final String DEFAULTPORTLETCONTROLLER_WIDTH_KEY = "defaultportletcontroller.width"; 61 public static final String XMLPORTLETCONTROLLER_WIDTH_KEY = "xmlportletcontroller.width"; 62 public static final String XMLPORTLETCONTROLLER_STYLESHEET_KEY = "xmlportletcontroller.stylesheet"; 63 public static final String PORTLETMARKUP_ALL_KEY = "portletmarkup.all"; 64 public static final String CONTENTFEEDS_STYLESHEET_URL_KEY = "contentfeeds.stylesheet.url"; 65 public static final String CONTENTFEEDS_FETCHALL_KEY = "contentfeeds.fetchall"; 66 public static final String CONTENTFEEDS_PORTLETBROWSER_PREVIEW_MAXPORTLETS_KEY = "contentfeeds.portletbrowser.preview.maxportlets"; 67 public static final String CONTENTFEEDS_PORTLETBROWSER_OVERVIEW_MAXPORTLETS_KEY = "contentfeeds.portletbrowser.overview.maxportlets"; 68 public static final String CONFIGURATION_DIRECTORY_KEY = "configuration.directory"; 69 public static final String CONTENT_ROOT_URL_KEY = "content.root.url"; 70 public static final String TEMP_DIRECTORY_KEY = "temp.directory"; 71 public static final String ADMIN_PORTLET_NAME_KEY = "admin.portlet.name"; 72 public static final String ADMIN_USERNAME_KEY = "admin.username"; 73 public static final String ADMIN_PASSWORD_KEY = "admin.password"; 74 public static final String DAEMON_ENTRY = "daemon.entry"; 75 public static final String PSML_REGISTRY_URL_KEY = "psml.registry.url"; 76 public static final String NAVIGATIONS_TOP_KEY = "navigations.top"; 77 public static final String NAVIGATIONS_BOTTOM_KEY = "navigations.bottom"; 78 public static final String AUTOCREATE_PORTLETS_KEY = "autocreate.portlets"; 79 public static final String CONTENT_PROVIDER_LIST_KEY = "content.provider.list"; 80 public static final String DEFAULT_TITLE_KEY = "metadata.default.title"; 81 public static final String DEFAULT_DESCRIPTION_KEY = "metadata.default.description"; 82 public static final String DEFAULT_IMAGE_KEY = "metadata.default.image"; 83 public static final String JETSPEED_CONFIG_KEY = "jetspeed.config"; 84 85 public static final String CONTENT_ENCODING_KEY = "content.defaultencoding"; 86 87 public static final String CUSTOMIZATION_RESOURCE_KEY = "customization.psml"; 88 public static final String CUSTOMIZATION_MAX_NUMBER = "customization.display.maxNumberOfPortlets"; 89 90 public static final String HTML_HEX_COLOR_KEY = "html.hex.color."; 92 public static final String HTML_COLOR_NAME_KEY = "html.color.name."; 93 public static final String MANDATORY_PORTLET = "portlet.mandatory"; 94 95 public static final String CHANGE_PASSWORD_TEMPLATE = "template.change.password"; 96 97 99 public static final String MAX_IMAGE = getString( CONTENT_ROOT_URL_KEY, "" ) + "images/max.gif"; 100 public static final String INFO_IMAGE = getString( CONTENT_ROOT_URL_KEY, "" ) + "images/info.gif"; 101 public static final String EDIT_IMAGE = getString( CONTENT_ROOT_URL_KEY, "" ) + "images/edit.gif"; 102 public static final String TRANSPARENT_IMAGE = getString( CONTENT_ROOT_URL_KEY, "" ) + "images/dot.gif"; 103 public static final String RESTORE_IMAGE = getString( CONTENT_ROOT_URL_KEY, "" ) + "images/restore.gif"; 104 public static final String SITE_HEADER_LOGO = getString( CONTENT_ROOT_URL_KEY, "" ) + getString( SITE_HEADER_LOGO_KEY, "images/jetspeed-logo.gif" ); 105 public static final String SITE_FOOTER_LOGO = getString( CONTENT_ROOT_URL_KEY, "" ) + getString( SITE_FOOTER_LOGO_KEY, "images/feather.gif"); 106 public static final String SITE_WELCOME = getString( SITE_HEADER_WELCOME_KEY, "Welcome to Jetspeed" ); 107 public static final String SITE_STYLESHEET = getString( CONTENT_ROOT_URL_KEY, "" ) + getString( "site.stylesheet" ); 108 109 public static final String CONFIRM_VALUE = "CONFIRMED"; 111 public static final String CONFIRM_VALUE_PENDING = "PENDING"; 112 public static final String CONFIRM_VALUE_REJECTED = "REJECTED"; 113 114 public static final String PATH_ACTION_KEY = "action"; 116 public static final String PATH_PANEID_KEY = "js_pane"; 117 public static final String PATH_PANENAME_KEY = "js_panename"; 118 public static final String PATH_PORTLETID_KEY = "js_peid"; 119 public static final String PATH_SCREEN_KEY = "screen"; 120 public static final String PATH_TEMPLATE_KEY = "template"; 121 public static final String PATH_PORTLET_KEY = "portlet"; 122 public static final String PATH_SUBPANE_SEPARATOR = ","; 123 124 public static final String JETSPEED_NAME_KEY = "jetspeed.name"; 126 public static final String JETSPEED_VERSION_KEY = "jetspeed.version"; 127 128 131 public static final String TIME_TO_LIVE = "_TimeToLive"; 132 133 136 public static final String PATH_PANEL_KEY = "select-panel"; 137 138 145 public static boolean getBoolean(String name) 146 { 147 try 148 { 149 return TurbineResources.getBoolean (name); 150 } 151 catch (ClassCastException e) 152 { 153 String [] values = getStringArray(name); 155 156 if ((values != null) && (values.length > 0)) 158 return new Boolean (values[0]).booleanValue(); 159 160 throw e; 162 } 163 } 164 165 174 public static boolean getBoolean(String name, 175 boolean def) 176 { 177 try 178 { 179 return TurbineResources.getBoolean(name, def); 180 } 181 catch (ClassCastException e) 182 { 183 String [] values = getStringArray(name); 185 186 if ((values != null) && (values.length > 0)) 188 return new Boolean (values[0]).booleanValue(); 189 190 throw e; 192 } 193 } 194 195 202 public static double getDouble(String name) 203 { 204 try 205 { 206 return TurbineResources.getDouble(name); 207 } 208 catch (ClassCastException e) 209 { 210 String [] values = getStringArray(name); 212 213 if ((values != null) && (values.length > 0)) 215 return Double.parseDouble(values[0]); 216 217 throw e; 219 } 220 } 221 222 230 public static double getDouble(String name, 231 double def) 232 { 233 try 234 { 235 return TurbineResources.getDouble(name, def); 236 } 237 catch (ClassCastException e) 238 { 239 String [] values = getStringArray(name); 241 242 if ((values != null) && (values.length > 0)) 244 return Double.parseDouble(values[0]); 245 246 throw e; 248 } 249 } 250 251 258 public static float getFloat(String name) 259 { 260 try 261 { 262 return TurbineResources.getFloat(name); 263 } 264 catch (ClassCastException e) 265 { 266 String [] values = getStringArray(name); 268 269 if ((values != null) && (values.length > 0)) 271 return Float.parseFloat(values[0]); 272 273 throw e; 275 } 276 } 277 278 286 public static float getFloat(String name, 287 float def) 288 { 289 try 290 { 291 return TurbineResources.getFloat(name, def); 292 } 293 catch (ClassCastException e) 294 { 295 String [] values = getStringArray(name); 297 298 if ((values != null) && (values.length > 0)) 300 return Float.parseFloat(values[0]); 301 302 throw e; 304 } 305 } 306 307 314 public static int getInt(String name) 315 { 316 try 317 { 318 return TurbineResources.getInt(name); 319 } 320 catch (ClassCastException e) 321 { 322 String [] values = getStringArray(name); 324 325 if ((values != null) && (values.length > 0)) 327 return Integer.parseInt(values[0]); 328 329 throw e; 331 } 332 } 333 334 342 public static int getInt(String name, 343 int def) 344 { 345 try 346 { 347 return TurbineResources.getInt(name, def); 348 } 349 catch (ClassCastException e) 350 { 351 String [] values = getStringArray(name); 353 354 if ((values != null) && (values.length > 0)) 356 return Integer.parseInt(values[0]); 357 358 throw e; 360 } 361 } 362 363 370 public static long getLong(String name) 371 { 372 try 373 { 374 return TurbineResources.getLong(name); 375 } 376 catch (ClassCastException e) 377 { 378 String [] values = getStringArray(name); 380 381 if ((values != null) && (values.length > 0)) 383 return Long.parseLong(values[0]); 384 385 throw e; 387 } 388 } 389 390 398 public static long getLong(String name, 399 long def) 400 { 401 try 402 { 403 return TurbineResources.getLong(name, def); 404 } 405 catch (ClassCastException e) 406 { 407 String [] values = getStringArray(name); 409 410 if ((values != null) && (values.length > 0)) 412 return Long.parseLong(values[0]); 413 414 throw e; 416 } 417 } 418 419 426 public static String getString(String name) 427 { 428 String [] values = getStringArray(name); 430 if ((values != null) && (values.length > 0)) 431 return values[0]; 432 433 return TurbineResources.getString(name); 434 } 435 436 444 public static String getString(String name, 445 String def) 446 { 447 String [] values = getStringArray(name); 449 if ((values != null) && (values.length > 0)) 450 return values[0]; 451 452 return TurbineResources.getString(name, def); 453 } 454 } 455 456 | Popular Tags |