Sync with upstream master

feature/appm-store/pbac
lasanthaDLPDS 5 years ago
parent a4f99c9c77
commit 8c40a81c4a

@ -34,7 +34,7 @@ import org.wso2.carbon.device.application.mgt.common.BasicUserInfoList;
import org.wso2.carbon.device.application.mgt.common.RoleList; import org.wso2.carbon.device.application.mgt.common.RoleList;
import org.wso2.carbon.device.application.mgt.common.DeviceGroupList; import org.wso2.carbon.device.application.mgt.common.DeviceGroupList;
import org.wso2.carbon.device.mgt.common.PaginationResult; import org.wso2.carbon.device.mgt.common.PaginationResult;
import org.wso2.carbon.device.application.mgt.common.SubsciptionType; import org.wso2.carbon.device.application.mgt.common.SubscriptionType;
import org.wso2.carbon.device.application.mgt.core.exception.BadRequestException; import org.wso2.carbon.device.application.mgt.core.exception.BadRequestException;
import org.wso2.carbon.device.application.mgt.core.exception.ForbiddenException; import org.wso2.carbon.device.application.mgt.core.exception.ForbiddenException;
import org.wso2.carbon.device.application.mgt.core.exception.NotFoundException; import org.wso2.carbon.device.application.mgt.core.exception.NotFoundException;
@ -242,21 +242,21 @@ public class SubscriptionManagementAPIImpl implements SubscriptionManagementAPI{
PaginationResult subscribedCategoryDetails = subscriptionManager PaginationResult subscribedCategoryDetails = subscriptionManager
.getAppInstalledCategories(offset, limit, uuid, subType); .getAppInstalledCategories(offset, limit, uuid, subType);
if (SubsciptionType.USER.toString().equalsIgnoreCase(subType)) { if (SubscriptionType.USER.toString().equalsIgnoreCase(subType)) {
BasicUserInfoList users = new BasicUserInfoList(); BasicUserInfoList users = new BasicUserInfoList();
users.setList((List<BasicUserInfo>) subscribedCategoryDetails.getData()); users.setList((List<BasicUserInfo>) subscribedCategoryDetails.getData());
users.setCount(subscribedCategoryDetails.getRecordsTotal()); users.setCount(subscribedCategoryDetails.getRecordsTotal());
return Response.status(Response.Status.OK).entity(users).build(); return Response.status(Response.Status.OK).entity(users).build();
} else if (SubsciptionType.ROLE.toString().equalsIgnoreCase(subType)) { } else if (SubscriptionType.ROLE.toString().equalsIgnoreCase(subType)) {
RoleList roles = new RoleList(); RoleList roles = new RoleList();
roles.setList(subscribedCategoryDetails.getData()); roles.setList(subscribedCategoryDetails.getData());
roles.setCount(subscribedCategoryDetails.getRecordsTotal()); roles.setCount(subscribedCategoryDetails.getRecordsTotal());
return Response.status(Response.Status.OK).entity(roles).build(); return Response.status(Response.Status.OK).entity(roles).build();
} else if (SubsciptionType.GROUP.toString().equalsIgnoreCase(subType)) { } else if (SubscriptionType.GROUP.toString().equalsIgnoreCase(subType)) {
DeviceGroupList groups = new DeviceGroupList(); DeviceGroupList groups = new DeviceGroupList();
groups.setList(subscribedCategoryDetails.getData()); groups.setList(subscribedCategoryDetails.getData());

Loading…
Cancel
Save