Ignore:
Timestamp:
09/28/17 09:09:03 (7 years ago)
Author:
Leif-Jöran
Message:

Adding new configuration option 'additionalFCSEndpoints' for sideloading v2 endpoints explicitly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/scan/Institution.java

    r5957 r7150  
    2828                endpoints.add(new Endpoint(endpointUrl, FCSProtocolVersion.LEGACY));
    2929                return endpointUrl;
     30        }
     31
     32        public String addEndpoint(String endpointUrl, FCSProtocolVersion version) {
     33            if (version.equals(FCSProtocolVersion.VERSION_2)) {
     34                endpoints.add(new Endpoint(endpointUrl, FCSProtocolVersion.VERSION_2));
     35            } else if (version.equals(FCSProtocolVersion.VERSION_1)) {
     36                endpoints.add(new Endpoint(endpointUrl, FCSProtocolVersion.VERSION_1));
     37            } else if (version.equals(FCSProtocolVersion.LEGACY)) {
     38                endpoints.add(new Endpoint(endpointUrl, FCSProtocolVersion.LEGACY));
     39            } else {
     40                endpoints.add(new Endpoint(endpointUrl, FCSProtocolVersion.LEGACY));
     41            }
     42            return endpointUrl;
    3043        }
    3144
Note: See TracChangeset for help on using the changeset viewer.