2016-11-25 15:42:29 +01:00
|
|
|
package org.gcube.smartgears.configuration.application;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
|
|
|
2023-02-06 17:34:18 +01:00
|
|
|
import org.gcube.common.validator.annotations.NotEmpty;
|
2016-11-25 15:42:29 +01:00
|
|
|
|
2023-02-06 17:34:18 +01:00
|
|
|
public class GCubeExclude {
|
2016-11-25 15:42:29 +01:00
|
|
|
|
2023-02-06 17:34:18 +01:00
|
|
|
@NotEmpty
|
2016-11-25 15:42:29 +01:00
|
|
|
private List<String> handlers = new ArrayList<String>();
|
|
|
|
|
2023-02-06 17:34:18 +01:00
|
|
|
@NotEmpty
|
2016-11-25 15:42:29 +01:00
|
|
|
private String path;
|
|
|
|
|
|
|
|
public List<String> getHandlers() {
|
|
|
|
return handlers;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getPath() {
|
|
|
|
return path;
|
|
|
|
}
|
|
|
|
|
2023-02-06 17:34:18 +01:00
|
|
|
protected GCubeExclude() {}
|
2016-11-25 15:42:29 +01:00
|
|
|
|
2023-02-06 17:34:18 +01:00
|
|
|
public GCubeExclude(String path) {
|
2016-11-25 15:42:29 +01:00
|
|
|
super();
|
|
|
|
this.path = path;
|
|
|
|
}
|
|
|
|
|
2023-02-06 17:34:18 +01:00
|
|
|
public GCubeExclude(List<String> handlers, String path) {
|
2016-11-25 15:42:29 +01:00
|
|
|
super();
|
|
|
|
this.handlers = handlers;
|
|
|
|
this.path = path;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int hashCode() {
|
|
|
|
final int prime = 31;
|
|
|
|
int result = 1;
|
|
|
|
result = prime * result + ((path == null) ? 0 : path.hashCode());
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean equals(Object obj) {
|
|
|
|
if (this == obj)
|
|
|
|
return true;
|
|
|
|
if (obj == null)
|
|
|
|
return false;
|
|
|
|
if (getClass() != obj.getClass())
|
|
|
|
return false;
|
2023-02-06 17:34:18 +01:00
|
|
|
GCubeExclude other = (GCubeExclude) obj;
|
2016-11-25 15:42:29 +01:00
|
|
|
if (handlers == null) {
|
|
|
|
if (other.handlers != null)
|
|
|
|
return false;
|
|
|
|
} else if (!handlers.equals(other.handlers))
|
|
|
|
return false;
|
|
|
|
if (path == null) {
|
|
|
|
if (other.path != null)
|
|
|
|
return false;
|
|
|
|
} else if (!path.equals(other.path))
|
|
|
|
return false;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String toString() {
|
|
|
|
return "Exclude [handlers=" + handlers + ", path=" + path + "]";
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|