2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.netconf.persist.impl;
10 import org.opendaylight.controller.config.persist.api.PropertiesProvider;
11 import org.opendaylight.controller.netconf.persist.impl.osgi.PropertiesProviderBaseImpl;
13 public class PropertiesProviderAdapterImpl implements PropertiesProvider {
14 private final PropertiesProviderBaseImpl inner;
15 private final String index;
17 public PropertiesProviderAdapterImpl(PropertiesProviderBaseImpl inner, String index) {
23 public String getProperty(String key) {
24 String fullKey = getFullKeyForReporting(key);
25 return inner.getPropertyWithoutPrefix(fullKey);
28 public String getPrefix() {
29 return inner.getPrefix() + "." + index + ".properties";
33 public String getFullKeyForReporting(String key) {
34 return getPrefix() + "." + key;