Refactor persister.
[controller.git] / opendaylight / config / config-persister-api / src / main / java / org / opendaylight / controller / config / persist / api / storage / StorageAdapter.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.controller.config.persist.api.storage;
10
11 import org.opendaylight.controller.config.persist.api.Persister;
12
13 /**
14  * Plugins for {@link org.opendaylight.controller.config.persist.api.Persister}
15  * must implement this interface.
16  */
17 public interface StorageAdapter extends Persister {
18
19     void setProperties(PropertiesProvider propertiesProvider);
20
21
22     public interface PropertiesProvider {
23         /**
24          * Get property value for given key. Implementation of this interface is allowed to prefix
25          * the key with a namespace.
26          */
27         String getProperty(String key);
28
29         /**
30          * @return prefix + key as used in getProperty method.
31          */
32         String getFullKeyForReporting(String key);
33     }
34
35 }