Both source name and urlPath are now supported in deserialization
This commit is contained in:
parent
c4f314e383
commit
bd0cde7838
|
@ -43,8 +43,12 @@ public enum Sources {
|
||||||
public static Sources onDeserialize(String sourceString) {
|
public static Sources onDeserialize(String sourceString) {
|
||||||
if(sourceString != null) {
|
if(sourceString != null) {
|
||||||
for(Sources source : Sources.values()) {
|
for(Sources source : Sources.values()) {
|
||||||
if (source.urlPath.equalsIgnoreCase(sourceString.trim()))
|
if (source.urlPath.equalsIgnoreCase(sourceString.trim())) {
|
||||||
return source;
|
return source;
|
||||||
|
}
|
||||||
|
if (source.sourceName.equalsIgnoreCase(sourceString.trim())) {
|
||||||
|
return source;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue