Fix Sonar complains
[oam/nf-oam-adopter.git] / ves-nf-oam-adopter / ves-nf-oam-adopter-snmp-manager / src / main / java / org / o / ran / oam / nf / oam / adopter / snmp / manager / SnmpMappingConfigurationProvider.java
1 /*
2  *  ============LICENSE_START=======================================================
3  *  O-RAN-SC
4  *  ================================================================================
5  *  Copyright © 2021 AT&T Intellectual Property. All rights reserved.
6  *  ================================================================================
7  *  Licensed under the Apache License, Version 2.0 (the "License");
8  *  you may not use this file except in compliance with the License.
9  *  You may obtain a copy of the License at
10  *        http://www.apache.org/licenses/LICENSE-2.0
11  *
12  *  Unless required by applicable law or agreed to in writing, software
13  *  distributed under the License is distributed on an "AS IS" BASIS,
14  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  *  See the License for the specific language governing permissions and
16  *  limitations under the License.
17  *  ============LICENSE_END=========================================================
18  */
19
20 package org.o.ran.oam.nf.oam.adopter.snmp.manager;
21
22 import org.o.ran.oam.nf.oam.adopter.snmp.manager.pojos.VesMappingConfiguration;
23 import org.o.ran.oam.nf.oam.adopter.spi.MapperConfigProvider;
24 import org.springframework.beans.factory.annotation.Value;
25 import org.springframework.stereotype.Service;
26
27 /**
28  * Reads and listens for changes on snmp mapping configuration.
29  */
30 @Service
31 public class SnmpMappingConfigurationProvider extends MapperConfigProvider<VesMappingConfiguration> {
32
33     @Value("${snmp-manager.mapping-config-path:#{null}}")
34     private String mappingFilePath;
35
36     @Override
37     public String getMappingFilePath() {
38         return mappingFilePath;
39     }
40
41     @Override
42     public Class<VesMappingConfiguration> getClazz() {
43         return VesMappingConfiguration.class;
44     }
45 }