1 16 package org.apache.cocoon; 17 18 import java.io.IOException ; 19 import java.io.InputStream ; 20 import java.util.Properties ; 21 22 29 public final class Constants { 30 31 32 private static final String PROPS_FILE = "org/apache/cocoon/cocoon.properties"; 33 34 static final Properties properties; 35 36 39 static { 40 properties = new Properties (); 41 try { 42 final InputStream is = Constants.class.getClassLoader().getResourceAsStream(PROPS_FILE); 43 if ( null == is ) { 44 throw new RuntimeException ("Cocoon cannot find required properties from " + PROPS_FILE); 45 } 46 properties.load(is); 47 } catch (IOException ioe) { 48 throw new RuntimeException ("Cocoon cannot load required properties from " + PROPS_FILE); 49 } 50 51 } 52 53 54 public static final String NAME = properties.getProperty("name"); 55 56 57 public static final String VERSION = properties.getProperty("version"); 58 59 60 public static final String COMPLETE_NAME = properties.getProperty("fullname") + " " + VERSION; 61 62 63 public static final String CONF_VERSION = "2.1"; 64 65 66 public static final String YEAR = properties.getProperty("year"); 67 68 73 public static final String RELOAD_PARAM = "cocoon-reload"; 74 75 80 public static final String SHOWTIME_PARAM = "cocoon-showtime"; 81 82 87 public static final String VIEW_PARAM = "cocoon-view"; 88 89 94 public static final String ACTION_PARAM = "cocoon-action"; 95 96 101 public static final String ACTION_PARAM_PREFIX = "cocoon-action-"; 102 103 104 public static final String PARSER_PROPERTY = "org.apache.excalibur.xml.sax.SAXParser"; 105 106 107 public static final String DEFAULT_PARSER = "org.apache.excalibur.xml.impl.JaxpParser"; 108 109 111 public static final String DEPRECATED_PARSER_PROPERTY = "org.apache.cocoon.components.parser.Parser"; 112 113 114 public static final String XSP_URI = "http://apache.org/xsp"; 115 116 121 public static final String XSP_REQUEST_PREFIX = "xsp-request"; 122 123 128 public static final String XSP_REQUEST_URI = XSP_URI + "/request/2.0"; 129 130 135 public static final String XSP_RESPONSE_PREFIX = "xsp-response"; 136 137 142 public static final String XSP_RESPONSE_URI = XSP_URI + "/response/2.0"; 143 144 149 public static final String XSP_COOKIE_PREFIX = "xsp-cookie"; 150 151 156 public static final String XSP_COOKIE_URI = XSP_URI + "/cookie/2.0"; 157 158 163 public static final String XSP_FORMVALIDATOR_PATH = "org.apache.cocoon.acting.FormValidatorAction.results"; 164 165 166 public static final String XML_NAMESPACE_URI = "http://www.w3.org/XML/1998/namespace"; 167 168 173 public static final String LINK_CONTENT_TYPE = "application/x-cocoon-links"; 174 175 180 public static final String LINK_VIEW = "links"; 181 182 183 public static final String LINK_CRAWLING_ROLE = "static"; 184 185 196 public static final String LINK_OBJECT = "link"; 197 198 206 public static final String LINK_COLLECTION_OBJECT = "link-collection"; 207 208 211 public static final String NOTIFYING_OBJECT = "notifying-object"; 212 213 217 public static final String INDEX_URI = "index"; 218 219 222 public static final String DEFAULT_CONTEXT_DIR = "./webapp"; 223 224 227 public static final String DEFAULT_DEST_DIR = "./site"; 228 229 232 public static final String DEFAULT_WORK_DIR = "./work"; 233 234 237 public static final String DEFAULT_CONF_FILE = "cocoon.xconf"; 238 239 240 public static final String ERROR_NAMESPACE_URI = "http://apache.org/cocoon/error/2.1"; 241 242 243 public static final String ERROR_NAMESPACE_PREFIX = "error"; 244 245 246 public static final String CONTEXT_ENVIRONMENT_CONTEXT = "environment-context"; 247 248 249 public static final String CONTEXT_CLASS_LOADER = "class-loader"; 250 251 252 public static final String CONTEXT_WORK_DIR = "work-directory"; 253 254 255 public static final String CONTEXT_UPLOAD_DIR = "upload-directory"; 256 257 258 public static final String CONTEXT_CACHE_DIR = "cache-directory"; 259 260 261 public static final String CONTEXT_CLASSPATH = "classpath"; 262 263 267 public static final String CONTEXT_CONFIG_URL = "config-url"; 268 269 270 public static final String CONTEXT_DEFAULT_ENCODING = "default-encoding"; 271 272 273 278 public static final boolean DESCRIPTOR_RELOADABLE_DEFAULT = true; 279 280 } 281 282 283 284 285 286 287 288 289 290 291 292 293 | Popular Tags |