View Javadoc

1   /**
2    * Copyright 2005-2013 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.api;
17  
18  /**
19   * This class contains constants used by the core module. They are public to all and both clients 
20   * and other rice modules are allowed to use them. 
21   *
22   * @author Kuali Rice Team (rice.collab@kuali.org)
23   *
24   */
25  public final class CoreConstants {
26  
27      public static final class Services {
28          public static final String DATETIME_SERVICE = "dateTimeService";
29          public static final String ENCRYPTION_SERVICE = "encryptionService";
30          public static final String MAILER = "mailer";
31  
32          private Services() {
33      		throw new UnsupportedOperationException("do not call");
34      	}
35  	}
36  
37      public final static String SERVICE_PATH_SOAP = "soap/" + Namespaces.MODULE_NAME + "/" + Versions.VERSION_2_0;
38      
39      public static final class Versions {
40      	    	
41      	public static final String UNSPECIFIED = "unspecifiedVersion";
42      	
43      	/**
44      	 * Name for major version 2.0 of Kuali Rice which should be used in XML namespaces for data elements compatible with Kuali Rice 2.0.x.
45      	 * This constant value should never be changed!  If it is changed then it will break compatibility with legacy clients.
46      	 */
47      	public static final String VERSION_2_0 = "v2_0";
48  
49          /**
50           *  Name for complete version 2.1.2 of Kuali Rice which is used to compare against the version of callback services to ensure
51           *  that backwards compatibility is not broken
52           */
53          public static final String VERSION_2_1_2 = "2.1.2";
54  
55          /**
56           *  Name for complete version 2.3.0 of Kuali Rice which is used to compare against the version of callback services to ensure
57           *  that backwards compatibility is not broken
58           */
59          public static final String VERSION_2_3_0 = "2.3.0";
60      	
61      }
62      
63      public static final class Namespaces {
64      	public static final String ROOT_NAMESPACE_PREFIX = "http://rice.kuali.org";
65          public static final String MODULE_NAME = "core";
66          public static final String CORE_NAMESPACE_PREFIX = CoreConstants.Namespaces.ROOT_NAMESPACE_PREFIX + "/" + MODULE_NAME;
67  
68          public static final String UNSPECIFIED = "unspecifiedNamespace";
69  
70      	/**
71      	 * Namespace for the core module which is compatible with Kuali Rice 2.0.x.
72      	 */
73      	public static final String CORE_NAMESPACE_2_0 = CORE_NAMESPACE_PREFIX + "/" + Versions.VERSION_2_0;
74  
75          private Namespaces() {
76  		    throw new UnsupportedOperationException("do not call");
77  	    }
78      }
79      
80      public static final String CORE_SERVICE_DISTRIBUTED_CACHE = "coreServiceDistributedCacheManager";
81  
82      public static final class CommonElements {
83          public static final String FUTURE_ELEMENTS = "_futureElements";
84          public static final String VERSION_NUMBER = "versionNumber";
85          public static final String OBJECT_ID = "objectId";
86          public static final String ACTIVE = "active";
87          public static final String ACTIVE_FROM_DATE = "activeFromDate";
88          public static final String ACTIVE_TO_DATE = "activeToDate";
89          public static final String ATTRIBUTES = "attributes";
90          public static final String HISTORY_ID = "historyId";
91  
92          private CommonElements() {
93  		    throw new UnsupportedOperationException("do not call");
94  	    }
95      }
96  	
97  	public static final String STRING_TO_DATE_FORMATS = "STRING_TO_DATE_FORMATS";
98      public static final String STRING_TO_TIMESTAMP_FORMATS = "STRING_TO_TIMESTAMP_FORMATS";
99      public static final String DATE_TO_STRING_FORMAT_FOR_USER_INTERFACE = "DATE_TO_STRING_FORMAT_FOR_USER_INTERFACE";
100     public static final String TIMESTAMP_TO_STRING_FORMAT_FOR_USER_INTERFACE = "TIMESTAMP_TO_STRING_FORMAT_FOR_USER_INTERFACE";
101     public static final String DATE_TO_STRING_FORMAT_FOR_FILE_NAME = "DATE_TO_STRING_FORMAT_FOR_FILE_NAME";
102     public static final String TIMESTAMP_TO_STRING_FORMAT_FOR_FILE_NAME = "TIMESTAMP_TO_STRING_FORMAT_FOR_FILE_NAME";
103 
104     public static final String DATA_TYPE_STRING = "string";
105     public static final String DATA_TYPE_DATE = "datetime";
106     public static final String DATA_TYPE_LONG = "long";
107     public static final String DATA_TYPE_FLOAT = "float";
108     public static final String DATA_TYPE_BOOLEAN = "boolean";
109     public static final String EMPTY_STRING = "";
110     
111     public static final class Config {
112     	public static final String APPLICATION_ID = "application.id";
113         //FIXME: this should be a core config property
114         public static final String INSTANCE_ID = "rice.ksb.bus.instanceId";
115     }
116     
117 	private CoreConstants() {
118 		throw new UnsupportedOperationException("do not call");
119 	}
120 }