blob: 9271fd96fa92679841a3b723edd3f16c04fd531d [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
Ray Milkeyd84f89b2018-08-17 14:54:17 -070018import org.osgi.service.component.annotations.Component;
19import org.osgi.service.component.annotations.Reference;
20import org.osgi.service.component.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 */
Thomas Vachuska43de6ee2017-03-15 15:45:23 -070026public abstract class AbstractDriverLoader extends AbstractIndependentDriverLoader {
alshabib77b88482015-04-07 15:47:50 -070027
Thomas Vachuska11b99fc2017-04-27 12:51:04 -070028 // FIXME: This requirement should be removed and the driver extensions that
29 // depend on the default drivers being loaded should be modified to instead
30 // express the dependency using the application dependency mechanism.
Ray Milkeyd84f89b2018-08-17 14:54:17 -070031 @Reference(cardinality = ReferenceCardinality.MANDATORY)
Thomas Vachuska43de6ee2017-03-15 15:45:23 -070032 protected DefaultDriverProviderService defaultDriverProviderService;
Thomas Vachuska866b46a2015-04-30 00:26:55 -070033
Thomas Vachuska800a7a42016-02-16 16:11:13 -080034 /**
35 * Creates a new loader for resource with the specified path.
36 *
37 * @param path drivers definition XML resource path
38 */
39 protected AbstractDriverLoader(String path) {
Thomas Vachuska43de6ee2017-03-15 15:45:23 -070040 super(path);
alshabib77b88482015-04-07 15:47:50 -070041 }
42
alshabib77b88482015-04-07 15:47:50 -070043}