Coverage Report - org.kuali.rice.core.api.config.property.Config
 
Classes in this File Line Coverage Branch Coverage Complexity
Config
N/A
N/A
1
 
 1  
 /**
 2  
  * Copyright 2005-2011 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.config.property;
 17  
 
 18  
 import java.io.IOException;
 19  
 import java.util.Map;
 20  
 import java.util.Properties;
 21  
 
 22  
 /**
 23  
  * Interface encapsulating central config settings. This interface was taken
 24  
  * directly from BundleUtility which it replaces.
 25  
  *
 26  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 27  
  */
 28  
 public interface Config {
 29  
 
 30  
         public static final String KEYSTORE_ALIAS = "keystore.alias";
 31  
         public static final String KEYSTORE_PASSWORD = "keystore.password";
 32  
         public static final String KEYSTORE_FILE = "keystore.file";
 33  
 
 34  
         public static final String BASE_WEB_SERVICE_URL_WORKFLOW_CLIENT_FILE = "webservices.settings.url";
 35  
 
 36  
         public static final String BASE_WEB_SERVICE_WSDL_PATH = "webservices.settings.wsdl.path";
 37  
 
 38  
         public static final String WSDL_LOCATION_WORKFLOW_CLIENT_FILE = "webservices.settings.wsdd.path";
 39  
 
 40  
         public static final String WEB_SERVICE_CONNECT_RETRY = "webservices.settings.connect.retry";
 41  
 
 42  
         /**
 43  
          * Configuration key under which to specify inlined Log4J configuration in XML/DOM configurer syntax
 44  
          */
 45  
         public static final String LOG4J_SETTINGS_XML = "log4j.settings.xml";
 46  
 
 47  
         /**
 48  
          * Configuration key under which to specify inlined Log4J configuration in properties configurer syntax
 49  
          */
 50  
         public static final String LOG4J_SETTINGS_PROPS = "log4j.settings.props";
 51  
 
 52  
         /**
 53  
          * Configuration key under which to specify an external Log4J configuration file path
 54  
          */
 55  
 
 56  
         public static final String LOG4J_SETTINGS_PATH = "log4j.settings.path";
 57  
 
 58  
         /**
 59  
          * Configuration key under which to specify the Log4J configuration reload interval in minutes
 60  
          */
 61  
         public static final String LOG4J_SETTINGS_RELOADINTERVAL_MINS = "log4j.settings.reloadInterval";
 62  
 
 63  
         public static final String TRANSACTION_TIMEOUT = "transaction.timeout";
 64  
 
 65  
         public static final String DOCUMENT_LOCK_TIMEOUT = "document.lock.timeout";
 66  
 
 67  
         public static final String EMAIL_SECURITY_PATH = "email.security.path";
 68  
 
 69  
     /**
 70  
      * The application "environment".  This parameter is by convention used in many places, and
 71  
      * is also reported on outbound service calls.
 72  
      */
 73  
         public static final String ENVIRONMENT = "environment";
 74  
 
 75  
     /**
 76  
      * The code that represents the production environment.
 77  
      */
 78  
     public static final String PROD_ENVIRONMENT_CODE = "production.environment.code";
 79  
 
 80  
     /**
 81  
      * The Rice version is by default determined automatically by inspecting the classloader
 82  
      * (@see {@ServiceCallVersioningHelper}.  However, this property is available for special
 83  
      * cases such as testing or workarounds, in order to override the reported Rice version.
 84  
      */
 85  
     public static final String RICE_VERSION = "rice.version";
 86  
 
 87  
     /**
 88  
      * "module.name" is the historical de-facto parameter used to configure "module" names.
 89  
      * This convention was adopted by client applications (e.g. sample-app) and is now
 90  
      * consulted to determine client application name for service call version reporting.
 91  
      */
 92  
     public static final String MODULE_NAME = "module.name";
 93  
     /**
 94  
      * Property a client can set to specify Rice client application name.  This value is
 95  
      * reported in outbound Rice service calls.
 96  
      */
 97  
     public static final String APPLICATION_NAME = "application.name";
 98  
 
 99  
     /**
 100  
      * These properties are consulted to determine application version explicitly set by
 101  
      * the client application.  "version" is available as a convenience fallback for existing
 102  
      * configurations (e.g. sample-app).
 103  
      */
 104  
     public static final String VERSION = "version";
 105  
     /**
 106  
      * Property consulted to determine application version explicitly set by the client application
 107  
      */
 108  
     public static final String APPLICATION_VERSION = "application.version";
 109  
 
 110  
     
 111  
     public static final String PLUGIN_DIR = "plugin.dir";
 112  
 
 113  
         public static final String EXTRA_CLASSES_DIR = "extra.classes.dir";
 114  
 
 115  
         public static final String EXTRA_LIB_DIR = "extra.lib.dir";
 116  
 
 117  
         public static final String EDL_CONFIG_LOCATION = "edl.config.loc";
 118  
 
 119  
         public static final String THREAD_POOL_SIZE = "threadPool.size";
 120  
         
 121  
         public static final String BAM_ENABLED = "bam.enabled";
 122  
 
 123  
         public static final String EMBEDDED_PLUGIN_LOCATIAON = "embedded.plugin.location";
 124  
 
 125  
         public static final String DATASOURCE_PLATFORM = "datasource.platform";
 126  
 
 127  
         public static final String OJB_PLATFORM = "datasource.ojb.platform";
 128  
 
 129  
         public static final String NODE_PROPERTIES_PATH = "node.properties.path";
 130  
 
 131  
         public static final String DATASOURCE_OJB_SEQUENCE_MANAGER = "datasource.ojb.sequenceManager";
 132  
         public static final String DATASOURCE_OJB_SEQUENCE_MANAGER_CLASS = "datasource.ojb.sequenceManager.className";
 133  
         public static final String DATASOURCE_DRIVER_NAME = "datasource.driver.name";
 134  
         public static final String DATASOURCE_URL = "datasource.url";
 135  
         public static final String DATASOURCE_POOL_SIZE = "datasource.pool.size";
 136  
         public static final String DATASOURCE_POOL_MIN_SIZE = "datasource.pool.minSize";
 137  
         public static final String DATASOURCE_POOL_MAX_SIZE = "datasource.pool.maxSize";
 138  
         public static final String DATASOURCE_POOL_MAXWAIT = "datasource.pool.maxWait";
 139  
         public static final String DATASOURCE_POOL_VALIDATION_QUERY = "datasource.pool.validationQuery";
 140  
         public static final String DATASOURCE_USERNAME = "datasource.username";
 141  
         public static final String DATASOURCE_PASSWORD = "datasource.password";
 142  
 
 143  
         /**
 144  
          * Configuration key under which to specify the base url for workflow
 145  
          */
 146  
         public static final String KEW_URL = "kew.url";
 147  
 
 148  
         /**
 149  
          * Configuration key under which to specify the base url for rice
 150  
          */
 151  
         public static final String KR_URL = "kr.url";
 152  
 
 153  
         /**
 154  
          * Configuration key under which to specify the base url for kim
 155  
          */
 156  
         public static final String KIM_URL = "kim.url";
 157  
         
 158  
         /**
 159  
          * Configuration key under which to specify the base url for kim
 160  
          */
 161  
         public static final String KEN_URL = "ken.url";
 162  
 
 163  
     public static final String DEFAULT_KEW_NOTE_CLASS = "default.kew.note.class";
 164  
         public static final String M_BEANS = "mBeans";
 165  
         public static final String ALT_SPRING_FILE = "config.spring.file";
 166  
         public static final String ALT_OJB_FILE        = "config.obj.file";
 167  
 
 168  
         //bus stuff
 169  
         public static final String SERVICE_SERVLET_URL = "serviceServletUrl";
 170  
         public static final String MESSAGE_PERSISTENCE = "message.persistence";
 171  
         public static final String REFRESH_RATE = "bus.refresh.rate";
 172  
         public static final String DEV_MODE = "dev.mode";
 173  
         public static final String BATCH_MODE = "rice.ksb.batch.mode";
 174  
         
 175  
         public static final String CREDENTIALS_SOURCE_FACTORY = "credentialsSourceFactory";
 176  
 
 177  
         public static final String EMBEDDED_PLUGIN_DEFAULT_CURRENT_CLASS_LOADER = "embedded.plugin.default.current.classloader";
 178  
 
 179  
         public static final String FIRST_DAILY_EMAIL_DELIVERY_DATE = "email.daily.firstDeliveryDate";
 180  
         public static final String FIRST_WEEKLY_EMAIL_DELIVERY_DATE = "email.weekly.firstDeliveryDate";
 181  
 
 182  
         public static final String ENABLE_EMAIL_REMINDER_LIFECYCLE = "email.reminder.lifecycle.enabled";
 183  
         public static final String ENABLE_XML_PIPELINE_LIFECYCLE = "xml.pipeline.lifecycle.enabled";
 184  
         
 185  
         public static final String OUT_BOX_MODE = "actionlist.outbox";
 186  
 
 187  
         public void parseConfig() throws IOException;
 188  
 
 189  
         public String getDailyEmailFirstDeliveryDate();
 190  
 
 191  
         public String getWeeklyEmailFirstDeliveryDate();
 192  
 
 193  
         public String getBaseWebServiceURL();
 194  
 
 195  
         public String getBaseWebServiceWsdlPath();
 196  
 
 197  
         public String getClientWSDLFullPathAndFileName();
 198  
 
 199  
         public String getWebServicesConnectRetry();
 200  
         
 201  
         /**
 202  
          * @return the base URL for KEW
 203  
          */
 204  
         public String getKEWBaseURL();
 205  
         
 206  
         /**
 207  
          * @return the base URL for KIM
 208  
          */
 209  
         public String getKIMBaseURL();
 210  
         
 211  
         /**
 212  
          * @return the base URL for KRice
 213  
          */
 214  
         public String getKRBaseURL();
 215  
 
 216  
         /**
 217  
          * @return the base URL for KEN
 218  
          */
 219  
         public String getKENBaseURL();
 220  
 
 221  
         public String getLog4jFileLocation();
 222  
 
 223  
         public String getLog4jReloadInterval();
 224  
 
 225  
         public String getTransactionTimeout();
 226  
 
 227  
         public String getEmailConfigurationPath();
 228  
 
 229  
     public String getRiceVersion();
 230  
 
 231  
         public String getApplicationName();
 232  
 
 233  
     public String getApplicationVersion();
 234  
 
 235  
     public String getEnvironment();
 236  
 
 237  
     public String getProductionEnvironmentCode();
 238  
 
 239  
         public String getEDLConfigLocation();
 240  
 
 241  
     public String getDefaultKewNoteClass();
 242  
 
 243  
     public String getEmbeddedPluginLocation();
 244  
 
 245  
         public Integer getRefreshRate();
 246  
 
 247  
         public String getEndPointUrl();
 248  
 
 249  
         public String getAlternateSpringFile();
 250  
 
 251  
         public String getAlternateOJBFile();
 252  
 
 253  
         public String getKeystoreAlias();
 254  
 
 255  
         public String getKeystorePassword();
 256  
 
 257  
         public String getKeystoreFile();
 258  
 
 259  
         public String getDocumentLockTimeout();
 260  
         
 261  
     public Boolean getEmailReminderLifecycleEnabled();
 262  
 
 263  
     public Boolean getXmlPipelineLifeCycleEnabled();
 264  
 
 265  
         public Boolean getDevMode();
 266  
         
 267  
         public Boolean getBatchMode();
 268  
         
 269  
         public Boolean getOutBoxOn();
 270  
 
 271  
     /**
 272  
      * Returns whether this Config object defines a production environment
 273  
      */
 274  
     public boolean isProductionEnvironment();
 275  
 
 276  
     /**
 277  
          * Returns properties explicitly configured in this Config
 278  
          *
 279  
          * @return properties explicitly configured in this Config
 280  
          */
 281  
         public Properties getProperties();
 282  
 
 283  
         public String getProperty(String key);
 284  
 
 285  
         public boolean getBooleanProperty(String key, boolean defaultValue);
 286  
 
 287  
     public Boolean getBooleanProperty(String key);
 288  
 
 289  
     public long getNumericProperty(String key, long defaultValue);
 290  
 
 291  
     public Long getNumericProperty(String key);
 292  
 
 293  
         public Map<String, String> getPropertiesWithPrefix(String prefix, boolean stripPrefix);
 294  
 
 295  
         public Map<String, Object> getObjects();
 296  
 
 297  
         public Object getObject(String key);
 298  
 
 299  
         /**
 300  
          * 
 301  
          * This method takes a config object and merges it with the current
 302  
          * object.  
 303  
          * 
 304  
          * @param config
 305  
          */
 306  
         public void putConfig(Config config);
 307  
         
 308  
         public void putProperties(Properties properties);
 309  
         public void putProperty(String key, String value);
 310  
         public void removeProperty(String key);
 311  
         public void putObjects(Map<String, Object> objects);
 312  
         public void putObject(String key, Object value);
 313  
         public void removeObject(String key);        
 314  
 }