Changeset 2643
- Timestamp:
- 03/01/13 11:26:19 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
SRUServer/trunk/src/main/java/eu/clarin/sru/server/utils/SRUServerServlet.java
r2642 r2643 89 89 private static final String LEGACY_SRU_SERVER_CONFIG_LOCATION_PARAM = 90 90 "sruServerConfigLocation"; 91 92 91 /** 93 92 * Servlet initialization parameter name for the class that implements the … … 96 95 public static final String SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM = 97 96 "eu.clarin.sru.server.utils.sruServerSearchEngineClass"; 97 /** 98 * @deprecated use {@link #SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM} 99 */ 100 @Deprecated 101 private static final String LEGACY_SRU_SERVER_SERACH_ENGINE_CLASS_PARAM = 102 "sruServerSerachEngineClass"; 98 103 /** 99 104 * @deprecated use {@link #SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM} … … 102 107 private static final String LEGACY_SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM = 103 108 "sruServerSearchEngineClass"; 104 105 109 /** 106 110 * Default value for the location of the SRU server configuration. … … 128 132 cfg.getInitParameter(SRU_SERVER_CONFIG_LOCATION_PARAM); 129 133 if (sruServerConfigLocation == null) { 130 sruServerConfigLocation = cfg.getInitParameter(LEGACY_SRU_SERVER_CONFIG_LOCATION_PARAM); 134 sruServerConfigLocation = cfg.getInitParameter( 135 LEGACY_SRU_SERVER_CONFIG_LOCATION_PARAM); 131 136 if (sruServerConfigLocation != null) { 132 137 logger.warn("init parameter '" + … … 154 159 } 155 160 161 /* get search engine class name from servelet init parameters */ 156 162 String sruServerSearchEngineClass = 157 163 cfg.getInitParameter(SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM); 164 165 /* legacy compatibility (first try) */ 158 166 if (sruServerSearchEngineClass == null) { 159 sruServerSearchEngineClass = cfg.getInitParameter(LEGACY_SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM); 167 sruServerSearchEngineClass = cfg.getInitParameter( 168 LEGACY_SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM); 160 169 if (sruServerSearchEngineClass != null) { 161 170 logger.warn("init parameter '" + … … 163 172 "' is deprecated, please use init parameter '" + 164 173 SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM + "' instead!"); 165 } else { 166 throw new ServletException("init parameter '" + 167 SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM + 168 "' not defined in servlet configuration"); 169 } 174 } 175 } 176 177 /* legacy compatibility (second try) */ 178 if (sruServerSearchEngineClass == null) { 179 sruServerSearchEngineClass = cfg.getInitParameter( 180 LEGACY_SRU_SERVER_SERACH_ENGINE_CLASS_PARAM); 181 if (sruServerSearchEngineClass != null) { 182 logger.warn("init parameter '" + 183 LEGACY_SRU_SERVER_SERACH_ENGINE_CLASS_PARAM + 184 "' is deprecated, please use init parameter '" + 185 SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM + "' instead!"); 186 } 187 } 188 189 /* if still nothing, give up */ 190 if (sruServerSearchEngineClass == null) { 191 throw new ServletException("init parameter '" + 192 SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM + 193 "' not defined in servlet configuration"); 170 194 } 171 195
Note: See TracChangeset
for help on using the changeset viewer.