removing notnull constraint from android device type

revert-dabc3590
hasuniea 8 years ago
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

@ -64,10 +64,10 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
@Path("/{id}/applications")
@Override
public Response updateApplicationList(@PathParam("id")
@NotNull
@Size(min = 2 , max = 45)
@Pattern(regexp = "^[A-Za-z0-9]*$")
String id,@Valid List<AndroidApplication> androidApplications) {
@NotNull
@Size(min = 2, max = 45)
@Pattern(regexp = "^[A-Za-z0-9]*$")
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…
Cancel
Save