View Javadoc

1   /*
2    * Copyright 2007-2008 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.core.util;
17  
18  import java.text.DateFormat;
19  import java.text.SimpleDateFormat;
20  
21  /**
22   * This is a class to hold constant values that will be used across multiple modules of Rice
23   * 
24   * @author Kuali Rice Team (rice.collab@kuali.org)
25   */
26  public class RiceConstants extends JSTLConstants {
27  
28      private static final long serialVersionUID = 3625085403351858951L;
29  
30  	public static final String DB_PLATFORM = "dbPlatform";
31  
32      public static final String RICE_JPA_ENABLED = "rice.jpa.enabled";
33      public static final String JPA_ENABLED_SUFFIX = ".jpa.enabled";
34      
35      public static final String SERVICES_TO_CACHE = "rice.resourceloader.servicesToCache";
36      public static final String RICE_LOGGING_CONFIGURE = "rice.logging.configure";
37  
38      public static final String SPRING_TRANSACTION_MANAGER = "SPRING_TRANSACTION_MANAGER";
39  
40      public static final String ROOT_RESOURCE_LOADER_CONTAINER_NAME = "RootResourceLoaderContainer";
41      public static final String DEFAULT_ROOT_RESOURCE_LOADER_NAME = "RootResourceLoader";
42  
43      public static final String RICE_CONFIGURER_CONFIG_NAME = "riceConfigurer";
44  
45      
46      // Configuration Objects
47  
48  	public static final String DATASOURCE_OBJ = "datasource";
49  	public static final String NON_TRANSACTIONAL_DATASOURCE_OBJ = "nonTransactionalDatasource";
50  	public static final String SERVER_DATASOURCE_OBJ = "serverDatasource";
51  	public static final String TRANSACTION_MANAGER_OBJ = "transactionManager";
52  	public static final String USER_TRANSACTION_OBJ = "userTransaction";
53  	public static final String M_BEANS = "mBeans";
54  	public static final String ALT_SPRING_FILE = "config.spring.file";
55  	public static final String ALT_OJB_FILE	= "config.obj.file";
56  
57  	// JNDI configuration 
58  	
59  	public static final String TRANSACTION_MANAGER_JNDI = "transactionManager.jndi.location";
60  	public static final String USER_TRANSACTION_JNDI = "userTransaction.jndi.location";//"transactionManager.jndi.location";
61      public static final String DATASOURCE_JNDI = "datasource.jndi.location";
62      public static final String NON_TRANSACTIONAL_DATASOURCE_JNDI = "nonTransactional.datasource.jndi.location";
63      public static final String SERVER_DATASOURCE_JNDI = "serverDatasource.jndi.location";
64  
65  	
66      // Default struts mapping forward key
67      public static final String MAPPING_BASIC = "basic";
68  
69      // Default date formatting
70      public static final String SIMPLE_DATE_FORMAT_FOR_DATE = "MM/dd/yyyy";
71      public static final String SIMPLE_DATE_FORMAT_FOR_TIME = "hh:mm a";
72      public static final String DEFAULT_DATE_FORMAT_PATTERN = SIMPLE_DATE_FORMAT_FOR_TIME + " " + SIMPLE_DATE_FORMAT_FOR_DATE;
73  
74      public static DateFormat getDefaultDateFormat() {
75          return new SimpleDateFormat(SIMPLE_DATE_FORMAT_FOR_DATE);
76      }
77  
78      public static DateFormat getDefaultTimeFormat() {
79          return new SimpleDateFormat(SIMPLE_DATE_FORMAT_FOR_TIME);
80      }
81  
82      public static DateFormat getDefaultDateAndTimeFormat() {
83          return new SimpleDateFormat(DEFAULT_DATE_FORMAT_PATTERN);
84      }
85  
86  	public static final long NO_WAIT = 0;
87  
88  	public static final String RICE_JAXWS_TARGET_NAMESPACE_BASE = "http://rice.kuali.org/wsdl";
89  }