- Timestamp:
- 11/09/15 18:07:09 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
SRUServer/trunk/src/main/java/eu/clarin/sru/server/utils/SRUServerServlet.java
r6780 r6781 84 84 "eu.clarin.sru.server.utils.sruServerConfigLocation"; 85 85 /** 86 * @deprecated use {@link #SRU_SERVER_CONFIG_LOCATION_PARAM}87 */88 @Deprecated89 private static final String LEGACY_SRU_SERVER_CONFIG_LOCATION_PARAM =90 "sruServerConfigLocation";91 /**92 86 * Servlet initialization parameter name for the class that implements the 93 87 * SRU search engine. … … 95 89 public static final String SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM = 96 90 "eu.clarin.sru.server.utils.sruServerSearchEngineClass"; 97 /**98 * @deprecated use {@link #SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM}99 */100 @Deprecated101 private static final String LEGACY_SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM_1 =102 "sruServerSerachEngineClass";103 /**104 * @deprecated use {@link #SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM}105 */106 @Deprecated107 private static final String LEGACY_SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM_2 =108 "eu.clarin.sru.server.utils.sruServerSerachEngineClass";109 91 /** 110 92 * Default value for the location of the SRU server configuration. … … 132 114 cfg.getInitParameter(SRU_SERVER_CONFIG_LOCATION_PARAM); 133 115 if (sruServerConfigLocation == null) { 134 sruServerConfigLocation = cfg.getInitParameter( 135 LEGACY_SRU_SERVER_CONFIG_LOCATION_PARAM); 136 if (sruServerConfigLocation != null) { 137 logger.warn("init parameter '" + 138 LEGACY_SRU_SERVER_CONFIG_LOCATION_PARAM + 139 "' is deprecated, please use init-parameter '" + 140 SRU_SERVER_CONFIG_LOCATION_PARAM + "' instead!"); 141 } else { 142 sruServerConfigLocation = SRU_SERVER_CONFIG_LOCATION_DEFAULT; 143 } 116 sruServerConfigLocation = SRU_SERVER_CONFIG_LOCATION_DEFAULT; 144 117 } 145 118 … … 162 135 String sruServerSearchEngineClass = 163 136 cfg.getInitParameter(SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM); 164 165 /* legacy compatibility (first try) */166 if (sruServerSearchEngineClass == null) {167 sruServerSearchEngineClass = cfg.getInitParameter(168 LEGACY_SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM_1);169 if (sruServerSearchEngineClass != null) {170 logger.warn("init-parameter '" +171 LEGACY_SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM_1 +172 "' is deprecated, please use init-parameter '" +173 SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM + "' instead!");174 }175 }176 177 /* legacy compatibility (second try) */178 if (sruServerSearchEngineClass == null) {179 sruServerSearchEngineClass = cfg.getInitParameter(180 LEGACY_SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM_2);181 if (sruServerSearchEngineClass != null) {182 logger.warn("init-parameter '" +183 LEGACY_SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM_2 +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 137 if (sruServerSearchEngineClass == null) { 191 138 throw new ServletException("init-parameter '" + … … 270 217 */ 271 218 try { 219 logger.debug("creating new serach engine from class {}", 220 sruServerSearchEngineClass); 272 221 @SuppressWarnings("unchecked") 273 222 Class<SRUSearchEngineBase> clazz = (Class<SRUSearchEngineBase>)
Note: See TracChangeset
for help on using the changeset viewer.