X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fforwardingrulesmanager%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fforwardingrulesmanager%2FPortGroupConfig.java;h=d0878f982cda5d10142375dca91fa2f3380546ef;hp=164f26484e24cd29eedc54e1707b5df8d63c1951;hb=405ea7ce68d22bd3d2501857c5253793b581b086;hpb=69bbdbb02e3f4755b95fa62b9a3610a3a11c9724 diff --git a/opendaylight/forwardingrulesmanager/api/src/main/java/org/opendaylight/controller/forwardingrulesmanager/PortGroupConfig.java b/opendaylight/forwardingrulesmanager/api/src/main/java/org/opendaylight/controller/forwardingrulesmanager/PortGroupConfig.java index 164f26484e..d0878f982c 100644 --- a/opendaylight/forwardingrulesmanager/api/src/main/java/org/opendaylight/controller/forwardingrulesmanager/PortGroupConfig.java +++ b/opendaylight/forwardingrulesmanager/api/src/main/java/org/opendaylight/controller/forwardingrulesmanager/PortGroupConfig.java @@ -13,17 +13,19 @@ import java.lang.reflect.Field; import java.util.ArrayList; import java.util.List; +import org.opendaylight.controller.configuration.ConfigurationObject; + /** * PortGroupConfig class represents the User's Configuration with a Opaque * Regular Expression String that is parsed and handled by PortGroupProvider. - * + * * Typically, the opaque matchString will be a Regular Expression String * supported by a particular PortGroupProvider based on Customer requirements. - * - * - * + * + * + * */ -public class PortGroupConfig implements Serializable { +public class PortGroupConfig extends ConfigurationObject implements Serializable { private static final long serialVersionUID = 1L; private static final String prettyFields[] = { "Name", "Match Criteria" }; @@ -41,7 +43,7 @@ public class PortGroupConfig implements Serializable { /** * Constructor to create a Port Group Configuration using a Group Name and * an Opaque String that is managed by PortGroupProvider. - * + * * @param name * Group Name representing a Port Group configuration * @param matchString @@ -55,7 +57,7 @@ public class PortGroupConfig implements Serializable { /** * Returns the user configured PortGroup Configuration name. - * + * * @return Configuration Name */ public String getName() { @@ -64,7 +66,7 @@ public class PortGroupConfig implements Serializable { /** * Assigns a name to the configuration - * + * * @param name * configuration name */ @@ -74,7 +76,7 @@ public class PortGroupConfig implements Serializable { /** * Returns the Opaque string - * + * * @return */ public String getMatchString() { @@ -83,7 +85,7 @@ public class PortGroupConfig implements Serializable { /** * Assigns an opaque String to the Configuration. - * + * * @param matchString * Opaque string handled by PortGroupProvider */ @@ -94,7 +96,7 @@ public class PortGroupConfig implements Serializable { /** * Returns the names of all the configurable fields in PortGroupConfig. This * method is typically used by NorthBound apis. - * + * * @return List of Field names that can be configured. */ public static List getFieldsNames() { @@ -113,7 +115,7 @@ public class PortGroupConfig implements Serializable { * Returns the names of all the configurable fields in PortGroupConfig in * human readable format for UI purposes. This method is typically used by * Web/UI apis. - * + * * @return List of Human readable Strings that corresponds to the * configurable field names. */ @@ -129,37 +131,42 @@ public class PortGroupConfig implements Serializable { public int hashCode() { final int prime = 31; int result = 1; - result = prime * result - + ((matchString == null) ? 0 : matchString.hashCode()); + result = prime * result + ((matchString == null) ? 0 : matchString.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); return result; } @Override public boolean equals(Object obj) { - if (this == obj) + if (this == obj) { return true; - if (obj == null) + } + if (obj == null) { return false; - if (getClass() != obj.getClass()) + } + if (getClass() != obj.getClass()) { return false; + } PortGroupConfig other = (PortGroupConfig) obj; if (matchString == null) { - if (other.matchString != null) + if (other.matchString != null) { return false; - } else if (!matchString.equals(other.matchString)) + } + } else if (!matchString.equals(other.matchString)) { return false; + } if (name == null) { - if (other.name != null) + if (other.name != null) { return false; - } else if (!name.equals(other.name)) + } + } else if (!name.equals(other.name)) { return false; + } return true; } @Override public String toString() { - return "PortGroupConfig [name=" + name + ", matchString=" + matchString - + "]"; + return "PortGroupConfig [name=" + name + ", matchString=" + matchString + "]"; } }