mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
removing notnull constraint from android device type
This commit is contained in:
parent
e84a868069
commit
ad8bbf8863
@ -46,7 +46,6 @@ public class AndroidDevice implements Serializable {
|
||||
value = "The OS type of the device.",
|
||||
required = true
|
||||
)
|
||||
@NotNull
|
||||
@Size(min = 2, max = 45)
|
||||
@Pattern(regexp = "^[A-Za-z]*$")
|
||||
private String type;
|
||||
|
||||
@ -22,7 +22,6 @@ import io.swagger.annotations.*;
|
||||
import org.wso2.carbon.device.mgt.common.operation.mgt.Activity;
|
||||
import org.wso2.carbon.mdm.services.android.bean.wrapper.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
@ -1153,7 +1152,7 @@ public interface DeviceManagementAdminService {
|
||||
})
|
||||
Response configureWifi(
|
||||
@ApiParam(name = "wifiBeanWrapper",
|
||||
value = "WifiConfigurations and Device Ids") @Valid WifiBeanWrapper wifiBeanWrapper);
|
||||
value = "WifiConfigurations and Device Ids") WifiBeanWrapper wifiBeanWrapper);
|
||||
|
||||
@POST
|
||||
@Path("/encrypt-storage")
|
||||
|
||||
@ -92,7 +92,6 @@ public interface DeviceManagementService {
|
||||
@ApiParam(
|
||||
name = "applications",
|
||||
value = "List of applications that need to be persisted against the device")
|
||||
@Valid
|
||||
List<AndroidApplication> androidApplications);
|
||||
|
||||
@PUT
|
||||
|
||||
@ -67,7 +67,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
|
||||
@NotNull
|
||||
@Size(min = 2, max = 45)
|
||||
@Pattern(regexp = "^[A-Za-z0-9]*$")
|
||||
String id,@Valid List<AndroidApplication> androidApplications) {
|
||||
String id, List<AndroidApplication> androidApplications) {
|
||||
Application application;
|
||||
List<Application> applications = new ArrayList<>();
|
||||
for (AndroidApplication androidApplication : androidApplications) {
|
||||
@ -259,7 +259,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
|
||||
@PUT
|
||||
@Path("/{id}")
|
||||
@Override
|
||||
public Response modifyEnrollment(@PathParam("id") String id, AndroidDevice androidDevice) {
|
||||
public Response modifyEnrollment(@PathParam("id") String id, @Valid AndroidDevice androidDevice) {
|
||||
Device device = new Device();
|
||||
device.setType(DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_ANDROID);
|
||||
device.setEnrolmentInfo(androidDevice.getEnrolmentInfo());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user