77333e2dc281c8c9c940fb6ea1ae185a5f747e88
[controller.git] / opendaylight / configuration / api / src / main / java / org / opendaylight / controller / configuration / ConfigurationEvent.java
1 package org.opendaylight.controller.configuration;
2
3 public enum ConfigurationEvent {
4     SAVE("Save"),
5     BACKUP("Backup"),
6     RESTORE("Restore"),
7     DELETE("Delete");
8
9     private ConfigurationEvent(String name) {
10         this.name = name;
11     }
12
13     private String name;
14
15     public String toString() {
16         return name;
17     }
18
19     public static ConfigurationEvent fromString(String pName) {
20         for(ConfigurationEvent p:ConfigurationEvent.values()) {
21             if (p.toString().equals(pName)) {
22                 return p;
23             }
24         }
25         return null;
26     }
27 }