Add new app attribute to identify android enterprise app

4.x.x
lasanthaDLPDS 5 years ago
parent 1e3ac362b8
commit 6f42f1fdf8

@ -48,6 +48,12 @@ public class Application {
example = "ENTERPRISE, PUBLIC, WEB, WEB_CLIP etc")
private String type;
@ApiModelProperty(name = "isAndroidEnterpriseApp",
value = "Android enterprise app or not",
required = true,
example = "true or false")
private boolean isAndroidEnterpriseApp;
@ApiModelProperty(name = "subMethod",
value = "Subscription type of the application",
required = true,
@ -149,4 +155,8 @@ public class Application {
public double getRating() { return rating; }
public void setRating(double rating) { this.rating = rating; }
public boolean isAndroidEnterpriseApp() { return isAndroidEnterpriseApp; }
public void setAndroidEnterpriseApp(boolean androidEnterpriseApp) { isAndroidEnterpriseApp = androidEnterpriseApp; }
}

@ -352,6 +352,10 @@ public class APIUtil {
application.setUnrestrictedRoles(applicationDTO.getUnrestrictedRoles());
application.setRating(applicationDTO.getAppRating());
List<ApplicationRelease> applicationReleases = new ArrayList<>();
if (ApplicationType.PUBLIC.toString().equals(applicationDTO.getType()) && application.getCategories()
.contains("GooglePlaySyncedApp")) {
application.setAndroidEnterpriseApp(true);
}
for (ApplicationReleaseDTO applicationReleaseDTO : applicationDTO.getApplicationReleaseDTOs()) {
applicationReleases.add(releaseDtoToRelease(applicationReleaseDTO));
}

Loading…
Cancel
Save