Changeset 2665


Ignore:
Timestamp:
03/08/13 10:31:21 (11 years ago)
Author:
oschonef
Message:
  • re-shuffle legacy init-parameter stuff
File:
1 edited

Legend:

Unmodified
Added
Removed
  • SRUServer/trunk/src/main/java/eu/clarin/sru/server/utils/SRUServerServlet.java

    r2664 r2665  
    9999     */
    100100    @Deprecated
    101     private static final String LEGACY_SRU_SERVER_SERACH_ENGINE_CLASS_PARAM =
     101    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    @Deprecated
     107    private static final String LEGACY_SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM_2 =
    102108            "eu.clarin.sru.server.utils.sruServerSerachEngineClass";
    103     /**
    104      * @deprecated use {@link #SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM}
    105      */
    106     @Deprecated
    107     private static final String LEGACY_SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM =
    108             "sruServerSerachEngineClass";
    109109    /**
    110110     * Default value for the location of the SRU server configuration.
     
    137137                logger.warn("init parameter '" +
    138138                        LEGACY_SRU_SERVER_CONFIG_LOCATION_PARAM +
    139                         "' is deprecated, please use init parameter '" +
     139                        "' is deprecated, please use init-parameter '" +
    140140                        SRU_SERVER_CONFIG_LOCATION_PARAM + "' instead!");
    141141            } else {
     
    148148            sruServerConfigFile = ctx.getResource(sruServerConfigLocation);
    149149        } catch (MalformedURLException e) {
    150             throw new ServletException("init parameter '" +
     150            throw new ServletException("init-parameter '" +
    151151                    SRU_SERVER_CONFIG_LOCATION_PARAM + "' is not a valid URL",
    152152                    e);
    153153        }
    154154        if (sruServerConfigFile == null) {
    155             throw new ServletException("init parameter '" +
     155            throw new ServletException("init-parameter '" +
    156156                    SRU_SERVER_CONFIG_LOCATION_PARAM +
    157157                    "' points to non-existing resource (" +
     
    159159        }
    160160
    161         /* get search engine class name from Servlet init parameters */
     161        /* get search engine class name from Servlet init-parameters */
    162162        String sruServerSearchEngineClass =
    163163                cfg.getInitParameter(SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM);
     
    166166        if (sruServerSearchEngineClass == null) {
    167167            sruServerSearchEngineClass = cfg.getInitParameter(
    168                     LEGACY_SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM);
     168                    LEGACY_SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM_1);
    169169            if (sruServerSearchEngineClass != null) {
    170                 logger.warn("init parameter '" +
    171                         LEGACY_SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM +
    172                         "' is deprecated, please use init parameter '" +
     170                logger.warn("init-parameter '" +
     171                        LEGACY_SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM_1 +
     172                        "' is deprecated, please use init-parameter '" +
    173173                        SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM + "' instead!");
    174174            }
     
    178178        if (sruServerSearchEngineClass == null) {
    179179            sruServerSearchEngineClass = cfg.getInitParameter(
    180                     LEGACY_SRU_SERVER_SERACH_ENGINE_CLASS_PARAM);
     180                    LEGACY_SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM_2);
    181181            if (sruServerSearchEngineClass != null) {
    182                 logger.warn("init parameter '" +
    183                         LEGACY_SRU_SERVER_SERACH_ENGINE_CLASS_PARAM +
    184                         "' is deprecated, please use init parameter '" +
     182                logger.warn("init-parameter '" +
     183                        LEGACY_SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM_2 +
     184                        "' is deprecated, please use init-parameter '" +
    185185                        SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM + "' instead!");
    186186            }
     
    189189        /* if still nothing, give up */
    190190        if (sruServerSearchEngineClass == null) {
    191             throw new ServletException("init parameter '" +
     191            throw new ServletException("init-parameter '" +
    192192                    SRU_SERVER_SEARCH_ENGINE_CLASS_PARAM +
    193193                    "' not defined in servlet configuration");
Note: See TracChangeset for help on using the changeset viewer.