mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
code formatting and updating comments, descriptions
This commit is contained in:
parent
2ddfbed6db
commit
cff69459be
@ -47,7 +47,6 @@ public class FileTransfer extends AndroidOperation implements Serializable {
|
||||
this.fileURL = fileURL;
|
||||
}
|
||||
|
||||
|
||||
public String getFtpPassword() {
|
||||
return ftpPassword;
|
||||
}
|
||||
|
||||
@ -233,7 +233,8 @@ public interface DeviceManagementAdminService {
|
||||
consumes = MediaType.APPLICATION_JSON,
|
||||
httpMethod = "POST",
|
||||
value = "Transferring file to the device.",
|
||||
notes = "Using this API you have the option to transfer a file from FTP server to an Android device.",
|
||||
notes = "Using this API you have the option to transfer a file from SFTP/FTP server or using an " +
|
||||
"HTTP link to the device or retrieve file from the device to FTP/SFTP server .",
|
||||
response = Activity.class,
|
||||
tags = "Android Device Management Administrative Service",
|
||||
extensions = {
|
||||
@ -245,7 +246,6 @@ public interface DeviceManagementAdminService {
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(
|
||||
code = 201,
|
||||
//todo
|
||||
message = "File transferred.",
|
||||
response = Activity.class,
|
||||
responseHeaders = {
|
||||
@ -284,7 +284,8 @@ public interface DeviceManagementAdminService {
|
||||
Response fileTransfer(
|
||||
@ApiParam(
|
||||
name = "fileTransfer",
|
||||
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) FileTransferBeanWrapper fileTransferBeanWrapper);
|
||||
|
||||
@POST
|
||||
|
||||
@ -94,17 +94,16 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
||||
@Path("/file-transfer")
|
||||
@Override
|
||||
public Response fileTransfer(FileTransferBeanWrapper fileTransferBeanWrapper) {
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Invoking Android file transfer operation for " + fileTransferBeanWrapper.getDeviceIDs());
|
||||
}
|
||||
|
||||
try {
|
||||
if (fileTransferBeanWrapper == null || fileTransferBeanWrapper.getOperation() == null) {
|
||||
String errorMessage = "The payload of the file transfer operation is incorrect.";
|
||||
log.error(errorMessage);
|
||||
throw new BadRequestException(
|
||||
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||
}
|
||||
try {
|
||||
if (fileTransferBeanWrapper == null || fileTransferBeanWrapper.getOperation() == null) {
|
||||
String errorMessage = "The payload of the file transfer operation is incorrect.";
|
||||
log.error(errorMessage);
|
||||
throw new BadRequestException(
|
||||
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||
}
|
||||
if (fileTransferBeanWrapper.getDeviceIDs() != null && log.isDebugEnabled()) {
|
||||
log.debug("Invoking Android file transfer operation for " + fileTransferBeanWrapper.getDeviceIDs());
|
||||
}
|
||||
FileTransfer file = fileTransferBeanWrapper.getOperation();
|
||||
ProfileOperation operation = new ProfileOperation();
|
||||
if (fileTransferBeanWrapper.isUpload()) {
|
||||
|
||||
@ -32,6 +32,11 @@ var resetLoader = function () {
|
||||
$('#lbl-execution').addClass("hidden");
|
||||
};
|
||||
|
||||
/**
|
||||
* This changes the text box label when the operation is toggled between FILE UPLOAD and FILE DOWNLOAD
|
||||
* and shows an info label for FILE UPLOAD regarding saving location.
|
||||
* @param type
|
||||
*/
|
||||
function changeLabel(type) {
|
||||
$(".modal #operation-error-msg").addClass("hidden");
|
||||
if (type == "no") {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user