mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Add filter to display web apps in Enrollment Application Install
This commit is contained in:
commit
c03e317e4b
@ -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…
Reference in New Issue
Block a user