0bfb975dec0750de332deaa17d0eb14de1baafc5
[controller.git] / opendaylight / config / config-persister-api / src / main / java / org / opendaylight / controller / config / persist / api / ConfigSnapshotHolderImpl.java
1 /*
2  * Copyright (c) 2014 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 package org.opendaylight.controller.config.persist.api;
9
10 import java.util.SortedSet;
11
12 public class ConfigSnapshotHolderImpl implements ConfigSnapshotHolder {
13
14     private final String snapshot;
15     private final SortedSet<String> caps;
16     private final String fileName;
17
18     public ConfigSnapshotHolderImpl(final String configSnapshot, final SortedSet<String> capabilities, final String fileName) {
19         this.snapshot = configSnapshot;
20         this.caps = capabilities;
21         this.fileName = fileName;
22     }
23
24     @Override
25     public String getConfigSnapshot() {
26         return snapshot;
27     }
28
29     @Override
30     public SortedSet<String> getCapabilities() {
31         return caps;
32     }
33
34     public String getFileName() {
35         return fileName;
36     }
37
38     @Override
39     public String toString() {
40         return "ConfigSnapshotHolderImpl{" +
41                 "snapshot='" + snapshot + '\'' +
42                 ", caps=" + caps +
43                 ", fileName='" + fileName + '\'' +
44                 '}';
45     }
46 }