@TypeDefs({ @TypeDef(name = "json", typeClass = StringJsonUserType.class) })
public class MicroServicePolicy implements Serializable, Policy {
/**
- *
+ * The serial version ID.
*/
private static final long serialVersionUID = 6271238288583332616L;
// serialization
}
+ /**
+ * The constructor.
+ * @param name The name of the MicroService
+ * @param policyTosca The policy Tosca of the MicroService
+ * @param shared The flag indicate whether the MicroService is shared
+ * @param usedByLoops The list of loops that uses this MicroService
+ */
public MicroServicePolicy(String name, String policyTosca, Boolean shared, Set<Loop> usedByLoops) {
this.name = name;
this.policyTosca = policyTosca;
this.usedByLoops = usedByLoops;
}
+ /**
+ * The constructor.
+ * @param name The name of the MicroService
+ * @param policyTosca The policy Tosca of the MicroService
+ * @param shared The flag indicate whether the MicroService is shared
+ * @param jsonRepresentation The UI representation in json format
+ * @param usedByLoops The list of loops that uses this MicroService
+ */
public MicroServicePolicy(String name, String policyTosca, Boolean shared, JsonObject jsonRepresentation,
Set<Loop> usedByLoops) {
this.name = name;
@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;
+ }
MicroServicePolicy other = (MicroServicePolicy) obj;
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;
}