Add filter to get Web apps in Enrollment Application Install

Add filter file
APPM_Imp
Ashvini Wegodapola 7 months ago
parent 03d6a145d8
commit 7616c2255c

@ -118,6 +118,11 @@ public class Filter {
*/
private boolean isNotRetired;
/**
* To check whether web applications should be returned
*/
private boolean withWebApps;
public int getLimit() {
return limit;
}
@ -221,4 +226,12 @@ public class Filter {
public void setNotRetired(boolean notRetired) {
isNotRetired = notRetired;
}
public boolean isWithWebApps() {
return withWebApps;
}
public void setWithWebApps(boolean withWebApps) {
this.withWebApps = withWebApps;
}
}

@ -178,7 +178,11 @@ public class GenericApplicationDAOImpl extends AbstractDAOImpl implements Applic
sql += "AND AP_APP_RELEASE.CURRENT_STATE = ? ";
}
if (deviceTypeId != -1) {
sql += "AND AP_APP.DEVICE_TYPE_ID = ? ";
sql += "AND (AP_APP.DEVICE_TYPE_ID = ? ";
if (filter.isWithWebApps()) {
sql += "OR AP_APP.DEVICE_TYPE_ID = 0 ";
}
sql += ") ";
}
if (filter.isNotRetired()) {
sql += "AND AP_APP.STATUS != 'RETIRED' ";
@ -309,7 +313,11 @@ public class GenericApplicationDAOImpl extends AbstractDAOImpl implements Applic
sql += " AND AP_APP_RELEASE.CURRENT_STATE = ?";
}
if (deviceTypeId != -1) {
sql += " AND AP_APP.DEVICE_TYPE_ID = ?";
sql += "AND (AP_APP.DEVICE_TYPE_ID = ? ";
if (filter.isWithWebApps()) {
sql += "OR AP_APP.DEVICE_TYPE_ID = 0 ";
}
sql += ") ";
}
if (filter.isNotRetired()) {
sql += " AND AP_APP.STATUS != 'RETIRED'";

Loading…
Cancel
Save