adding form parameters

revert-dabc3590
Nirothipan 7 years ago
parent 704f511964
commit 7ed6552a57

@ -25,19 +25,41 @@ import java.io.Serializable;
@ApiModel(value = "FileTransfer", @ApiModel(value = "FileTransfer",
description = "This class carries all information related to device lock operation.") //todo
description = "This class carries all information related to file transfer operation.")
public class FileTransfer extends AndroidOperation implements Serializable { public class FileTransfer extends AndroidOperation implements Serializable {
//todo //todo
@ApiModelProperty(name = "message", value = "Pop up message of the lock operation.", required = false) @ApiModelProperty(name = "file-location", value = "FTP URL of file", required = true)
private String message; private String location;
@ApiModelProperty(name = "isHardLockEnabled", value = "Hard lock enable status of the Device", required = true)
@ApiModelProperty(name = "ftp-username", value = "FTP User name", required = true)
private String userName;
@ApiModelProperty(name = "ftp-password", value = "FTP password", required = true)
private String password;
public String getFielLocation() { public String getFielLocation() {
return message; return location;
}
public void setFileLocation(String location) {
this.location = location;
}
public String getFtpUserName() {
return userName;
}
public void setFtpUserName(String userName) {
this.userName = userName;
}
public String getFtpPassword() {
return password;
} }
public void setFileLocation(String message) { public void setFtpPassword(String password) {
this.message = message; this.password = password;
} }

@ -294,7 +294,8 @@ public interface DeviceManagementAdminService {
"screen lock the device." + "screen lock the device." +
"Multiple device IDs can be added by using comma separated values. ", "Multiple device IDs can be added by using comma separated values. ",
required = true) FileTransferBeanWrapper fileTransferBeanWrapper); required = true) FileTransferBeanWrapper fileTransferBeanWrapper);
////////////////////////////////////
////////////////////////////////////
@POST @POST
@Path("/lock-devices") @Path("/lock-devices")
@ApiOperation( @ApiOperation(
@ -417,7 +418,7 @@ public interface DeviceManagementAdminService {
name = "deviceIDs", name = "deviceIDs",
value = "Provide the ID of the Android device. Multiple device IDs can be added by using comma separated values. ", value = "Provide the ID of the Android device. Multiple device IDs can be added by using comma separated values. ",
required = true) required = true)
List<String> deviceIDs); List<String> deviceIDs);
@POST @POST
@ -479,7 +480,7 @@ public interface DeviceManagementAdminService {
name = "deviceIDs", name = "deviceIDs",
value = "Provide the ID of the Android device. Multiple device IDs can be added by using comma separated values. ", value = "Provide the ID of the Android device. Multiple device IDs can be added by using comma separated values. ",
required = true) required = true)
List<String> deviceIDs); List<String> deviceIDs);
@POST @POST
@Path("/clear-password") @Path("/clear-password")
@ -537,7 +538,7 @@ public interface DeviceManagementAdminService {
Response removePassword( Response removePassword(
@ApiParam(name = "deviceIDs", @ApiParam(name = "deviceIDs",
value = "Provide the ID of the Android device. Multiple device IDs can be added by using comma separated values. ", value = "Provide the ID of the Android device. Multiple device IDs can be added by using comma separated values. ",
required = true) List<String> deviceIDs); required = true) List<String> deviceIDs);
@POST @POST
@Path("/control-camera") @Path("/control-camera")
@ -552,7 +553,7 @@ public interface DeviceManagementAdminService {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:control-camera") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:control-camera")
}) })
} ) })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse( @ApiResponse(
code = 201, code = 201,
@ -599,7 +600,7 @@ public interface DeviceManagementAdminService {
"camera on the device to function by defining false as the value and the ID of the Android device. " + "camera on the device to function by defining false as the value and the ID of the Android device. " +
"Multiple device IDs can be added by using comma separated values. ", "Multiple device IDs can be added by using comma separated values. ",
required = true) required = true)
CameraBeanWrapper cameraBeanWrapper); CameraBeanWrapper cameraBeanWrapper);
@POST @POST
@Path("/info") @Path("/info")
@ -662,7 +663,7 @@ public interface DeviceManagementAdminService {
name = "deviceIds", name = "deviceIds",
value = "Provide the device ID of the Android device. Multiple device IDs can be added by using comma separated values.", value = "Provide the device ID of the Android device. Multiple device IDs can be added by using comma separated values.",
required = true) required = true)
List<String> deviceIDs); List<String> deviceIDs);
@POST @POST
@Path("/logcat") @Path("/logcat")
@ -697,11 +698,11 @@ public interface DeviceManagementAdminService {
@ResponseHeader( @ResponseHeader(
name = "ETag", name = "ETag",
description = "Entity Tag of the response resource.\n" + description = "Entity Tag of the response resource.\n" +
"Used by caches, or in conditional requests."), "Used by caches, or in conditional requests."),
@ResponseHeader( @ResponseHeader(
name = "Last-Modified", name = "Last-Modified",
description = "Date and time the resource was last modified.\n" + description = "Date and time the resource was last modified.\n" +
"Used by caches, or in conditional requests.")}), "Used by caches, or in conditional requests.")}),
@ApiResponse( @ApiResponse(
code = 303, code = 303,
message = "See Other. \n The source can be retrieved from the URL specified in the location header.", message = "See Other. \n The source can be retrieved from the URL specified in the location header.",
@ -718,7 +719,7 @@ public interface DeviceManagementAdminService {
@ApiResponse( @ApiResponse(
code = 500, code = 500,
message = "Internal Server Error. \n " + message = "Internal Server Error. \n " +
"Server error occurred while adding a new device logcat operation.") "Server error occurred while adding a new device logcat operation.")
}) })
Response getDeviceLogcat( Response getDeviceLogcat(
@ApiParam( @ApiParam(
@ -786,7 +787,7 @@ public interface DeviceManagementAdminService {
name = "deviceIDs", name = "deviceIDs",
value = "Provide the ID of the Android device. Multiple device IDs can be added by using comma separated values. ", value = "Provide the ID of the Android device. Multiple device IDs can be added by using comma separated values. ",
required = true) required = true)
List<String> deviceIDs); List<String> deviceIDs);
@POST @POST
@Path("/wipe") @Path("/wipe")
@ -847,7 +848,7 @@ public interface DeviceManagementAdminService {
value = "Provide the the passcode, which is the passcode that the Android agent prompts the device owner to set at the time of device enrollment, " + value = "Provide the the passcode, which is the passcode that the Android agent prompts the device owner to set at the time of device enrollment, " +
"to enable the factory reset operation, and the ID of the Android device. Multiple device IDs can be added by using comma separated values. ", "to enable the factory reset operation, and the ID of the Android device. Multiple device IDs can be added by using comma separated values. ",
required = true) required = true)
WipeDataBeanWrapper wipeDataBeanWrapper); WipeDataBeanWrapper wipeDataBeanWrapper);
@POST @POST
@Path("/applications") @Path("/applications")
@ -909,9 +910,9 @@ public interface DeviceManagementAdminService {
Response getApplications( Response getApplications(
@ApiParam( @ApiParam(
name = "deviceIDs", name = "deviceIDs",
value = "Provide the ID of the Android device. Multiple device IDs can be added using comma separated values." , value = "Provide the ID of the Android device. Multiple device IDs can be added using comma separated values.",
required = true) required = true)
List<String> deviceIDs); List<String> deviceIDs);
@POST @POST
@Path("/ring") @Path("/ring")
@ -971,7 +972,7 @@ public interface DeviceManagementAdminService {
name = "deviceIDs", name = "deviceIDs",
value = "Provide the ID of the Android device. Multiple device IDs can be added using comma separated values.", value = "Provide the ID of the Android device. Multiple device IDs can be added using comma separated values.",
required = true) required = true)
List<String> deviceIDs); List<String> deviceIDs);
@POST @POST
@Path("/reboot") @Path("/reboot")
@ -1031,7 +1032,7 @@ public interface DeviceManagementAdminService {
name = "deviceIDs", name = "deviceIDs",
value = "Provide the ID of the Android device. Multiple device IDs can be added using comma separated values. ", value = "Provide the ID of the Android device. Multiple device IDs can be added using comma separated values. ",
required = true) required = true)
List<String> deviceIDs); List<String> deviceIDs);
@POST @POST
@Path("/mute") @Path("/mute")
@ -1091,7 +1092,7 @@ public interface DeviceManagementAdminService {
name = "deviceIDs", name = "deviceIDs",
value = "Provide the ID of the Android device. Multiple device IDs can be added using comma separated values. ", value = "Provide the ID of the Android device. Multiple device IDs can be added using comma separated values. ",
required = true) required = true)
List<String> deviceIDs); List<String> deviceIDs);
@POST @POST
@Path("/install-application") @Path("/install-application")
@ -1155,7 +1156,7 @@ public interface DeviceManagementAdminService {
" URL and name of the application, the date and time for the scheduled installation, and the ID of the " + " URL and name of the application, the date and time for the scheduled installation, and the ID of the " +
"Android device. Multiple device IDs can be added by using comma separated values.", "Android device. Multiple device IDs can be added by using comma separated values.",
required = true) required = true)
ApplicationInstallationBeanWrapper applicationInstallationBeanWrapper); ApplicationInstallationBeanWrapper applicationInstallationBeanWrapper);
@POST @POST
@Path("/update-application") @Path("/update-application")
@ -1220,7 +1221,7 @@ public interface DeviceManagementAdminService {
"URL and name of the application, the date and time for the scheduled installation, and the ID of the" + "URL and name of the application, the date and time for the scheduled installation, and the ID of the" +
"Android device. Multiple device IDs can be added by using comma separated values.", "Android device. Multiple device IDs can be added by using comma separated values.",
required = true) required = true)
ApplicationUpdateBeanWrapper applicationUpdateBeanWrapper); ApplicationUpdateBeanWrapper applicationUpdateBeanWrapper);
@POST @POST
@Path("/uninstall-application") @Path("/uninstall-application")
@ -1282,7 +1283,7 @@ public interface DeviceManagementAdminService {
"URL and name of the application, the date and time for the scheduled installation, and the ID of the" + "URL and name of the application, the date and time for the scheduled installation, and the ID of the" +
"Android device. Multiple device IDs can be added by using comma separated values.", "Android device. Multiple device IDs can be added by using comma separated values.",
required = true) required = true)
ApplicationUninstallationBeanWrapper applicationUninstallationBeanWrapper); ApplicationUninstallationBeanWrapper applicationUninstallationBeanWrapper);
@POST @POST
@Path("/blacklist-applications") @Path("/blacklist-applications")
@ -1411,7 +1412,7 @@ public interface DeviceManagementAdminService {
"(example: http//abc.com, http://abc.com/ota), " + "(example: http//abc.com, http://abc.com/ota), " +
"and the ID of the Android device. Multiple device IDs can be added by using comma separated values.", "and the ID of the Android device. Multiple device IDs can be added by using comma separated values.",
required = true) required = true)
UpgradeFirmwareBeanWrapper upgradeFirmwareBeanWrapper); UpgradeFirmwareBeanWrapper upgradeFirmwareBeanWrapper);
@POST @POST
@Path("/configure-vpn") @Path("/configure-vpn")
@ -1472,7 +1473,7 @@ public interface DeviceManagementAdminService {
name = "vpnBean", name = "vpnBean",
value = "VPN configuration and DeviceIds", value = "VPN configuration and DeviceIds",
required = true) required = true)
VpnBeanWrapper vpnBeanWrapper); VpnBeanWrapper vpnBeanWrapper);
@POST @POST
@Path("/send-notification") @Path("/send-notification")
@ -1533,7 +1534,7 @@ public interface DeviceManagementAdminService {
value = "The properties required to send a notification. Provide the message you wish to send and the ID of the " + value = "The properties required to send a notification. Provide the message you wish to send and the ID of the " +
"Android device. Multiple device IDs can be added by using comma separated values.", "Android device. Multiple device IDs can be added by using comma separated values.",
required = true) required = true)
NotificationBeanWrapper notificationBeanWrapper); NotificationBeanWrapper notificationBeanWrapper);
@POST @POST
@Path("/configure-wifi") @Path("/configure-wifi")
@ -1595,7 +1596,7 @@ public interface DeviceManagementAdminService {
"the ssid or the name of the Wi-Fi network that you wish to configure and the ID of the Android device." + "the ssid or the name of the Wi-Fi network that you wish to configure and the ID of the Android device." +
" Multiple device IDs can be added by using comma separated values.", " Multiple device IDs can be added by using comma separated values.",
required = true) required = true)
WifiBeanWrapper wifiBeanWrapper); WifiBeanWrapper wifiBeanWrapper);
@POST @POST
@Path("/encrypt-storage") @Path("/encrypt-storage")
@ -1657,7 +1658,7 @@ public interface DeviceManagementAdminService {
"true as the value or do not encrypt the storage on the device by assigning false as the value and " + "true as the value or do not encrypt the storage on the device by assigning false as the value and " +
"provide the ID of the Android device. Multiple device IDs can be added by using comma separated values.", "provide the ID of the Android device. Multiple device IDs can be added by using comma separated values.",
required = true) required = true)
EncryptionBeanWrapper encryptionBeanWrapper); EncryptionBeanWrapper encryptionBeanWrapper);
@POST @POST
@Path("/change-lock-code") @Path("/change-lock-code")
@ -1719,7 +1720,7 @@ public interface DeviceManagementAdminService {
"the ID of the Android device. Multiple device IDs can be added by using comma separated values. " + "the ID of the Android device. Multiple device IDs can be added by using comma separated values. " +
"If a passcode policy has been set in EMM, the lock code should comply to the passcode policy.\t", "If a passcode policy has been set in EMM, the lock code should comply to the passcode policy.\t",
required = true) required = true)
LockCodeBeanWrapper lockCodeBeanWrapper); LockCodeBeanWrapper lockCodeBeanWrapper);
@POST @POST
@Path("/set-password-policy") @Path("/set-password-policy")
@ -1779,7 +1780,7 @@ public interface DeviceManagementAdminService {
name = "passwordPolicy", name = "passwordPolicy",
value = "The properties required to set a password policy.", value = "The properties required to set a password policy.",
required = true) required = true)
PasswordPolicyBeanWrapper passwordPolicyBeanWrapper); PasswordPolicyBeanWrapper passwordPolicyBeanWrapper);
@POST @POST
@Path("/set-webclip") @Path("/set-webclip")
@ -1839,7 +1840,7 @@ public interface DeviceManagementAdminService {
name = "webClip", name = "webClip",
value = "The properties to set the web clip.", value = "The properties to set the web clip.",
required = true) required = true)
WebClipBeanWrapper webClipBeanWrapper); WebClipBeanWrapper webClipBeanWrapper);
} }

@ -91,7 +91,7 @@ public Response fileTransfer(FileTransferBeanWrapper fileTransferBeanWrapper) {
} }
FileTransfer file = fileTransferBeanWrapper.getOperation(); FileTransfer file = fileTransferBeanWrapper.getOperation();
ProfileOperation operation = new ProfileOperation(); ProfileOperation operation = new ProfileOperation();
operation.setCode(AndroidConstants.OperationCodes.DEVICE_LOCK); operation.setCode("FILE_TRANSFER");
operation.setType(Operation.Type.PROFILE); operation.setType(Operation.Type.PROFILE);
operation.setEnabled(true); operation.setEnabled(true);
operation.setPayLoad(file.toJSON()); operation.setPayLoad(file.toJSON());

Loading…
Cancel
Save