blob: fc2b6f2926e9c6128fe2321b8a072614609225c2 [file] [log] [blame]
alshabib77b88482015-04-07 15:47:50 -07001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2016-present Open Networking Foundation
alshabib77b88482015-04-07 15:47:50 -07003 *
4 * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0
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 */
Andrea Campanella238d96e2016-01-20 11:52:02 -080016package org.onosproject.net.driver;
alshabib77b88482015-04-07 15:47:50 -070017
Jonathan Hart17d00452015-04-21 17:10:00 -070018import org.apache.felix.scr.annotations.Component;
Thomas Vachuska866b46a2015-04-30 00:26:55 -070019import org.apache.felix.scr.annotations.Reference;
20import org.apache.felix.scr.annotations.ReferenceCardinality;
alshabib77b88482015-04-07 15:47:50 -070021
alshabib77b88482015-04-07 15:47:50 -070022/**
Thomas Vachuska43de6ee2017-03-15 15:45:23 -070023 * Abstract bootstrapper for loading and registering driver definitions that
24 * are dependent on the default driver definitions.
alshabib77b88482015-04-07 15:47:50 -070025 */
Andrea Campanella238d96e2016-01-20 11:52:02 -080026@Component
Thomas Vachuska43de6ee2017-03-15 15:45:23 -070027public abstract class AbstractDriverLoader extends AbstractIndependentDriverLoader {
alshabib77b88482015-04-07 15:47:50 -070028
Thomas Vachuska11b99fc2017-04-27 12:51:04 -070029 // FIXME: This requirement should be removed and the driver extensions that
30 // depend on the default drivers being loaded should be modified to instead
31 // express the dependency using the application dependency mechanism.
Thomas Vachuska866b46a2015-04-30 00:26:55 -070032 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
Thomas Vachuska43de6ee2017-03-15 15:45:23 -070033 protected DefaultDriverProviderService defaultDriverProviderService;
Thomas Vachuska866b46a2015-04-30 00:26:55 -070034
Thomas Vachuska800a7a42016-02-16 16:11:13 -080035 /**
36 * Creates a new loader for resource with the specified path.
37 *
38 * @param path drivers definition XML resource path
39 */
40 protected AbstractDriverLoader(String path) {
Thomas Vachuska43de6ee2017-03-15 15:45:23 -070041 super(path);
alshabib77b88482015-04-07 15:47:50 -070042 }
43
alshabib77b88482015-04-07 15:47:50 -070044}