Fixed line endings
Signed-off-by: Dominic Schabel <dominic.schabel@bosch-si.com>
This commit is contained in:
@@ -1,70 +1,70 @@
|
||||
/**
|
||||
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
|
||||
*
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.artifacts.event;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.eclipse.hawkbit.repository.model.SoftwareModule;
|
||||
|
||||
/**
|
||||
*
|
||||
* Holds file and upload status details.Meta data sent with upload events.
|
||||
*
|
||||
*/
|
||||
public class UploadFileStatus implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -3599629192216760811L;
|
||||
|
||||
private String fileName;
|
||||
|
||||
private long contentLength;
|
||||
|
||||
private long bytesRead;
|
||||
|
||||
private String failureReason;
|
||||
|
||||
private SoftwareModule softwareModule;
|
||||
|
||||
public UploadFileStatus(String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public UploadFileStatus(String fileName, long bytesRead, long contentLength,SoftwareModule softwareModule) {
|
||||
this.fileName = fileName;
|
||||
this.contentLength = contentLength;
|
||||
this.bytesRead = bytesRead;
|
||||
this.softwareModule = softwareModule;
|
||||
}
|
||||
|
||||
public UploadFileStatus(String fileName, String failureReason,SoftwareModule selectedSw) {
|
||||
this.failureReason = failureReason;
|
||||
this.fileName = fileName;
|
||||
this.softwareModule = selectedSw;
|
||||
}
|
||||
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
|
||||
public long getContentLength() {
|
||||
return contentLength;
|
||||
}
|
||||
|
||||
public long getBytesRead() {
|
||||
return bytesRead;
|
||||
}
|
||||
|
||||
public String getFailureReason() {
|
||||
return failureReason;
|
||||
}
|
||||
|
||||
public SoftwareModule getSoftwareModule() {
|
||||
return softwareModule;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
|
||||
*
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.artifacts.event;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.eclipse.hawkbit.repository.model.SoftwareModule;
|
||||
|
||||
/**
|
||||
*
|
||||
* Holds file and upload status details.Meta data sent with upload events.
|
||||
*
|
||||
*/
|
||||
public class UploadFileStatus implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -3599629192216760811L;
|
||||
|
||||
private String fileName;
|
||||
|
||||
private long contentLength;
|
||||
|
||||
private long bytesRead;
|
||||
|
||||
private String failureReason;
|
||||
|
||||
private SoftwareModule softwareModule;
|
||||
|
||||
public UploadFileStatus(String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public UploadFileStatus(String fileName, long bytesRead, long contentLength,SoftwareModule softwareModule) {
|
||||
this.fileName = fileName;
|
||||
this.contentLength = contentLength;
|
||||
this.bytesRead = bytesRead;
|
||||
this.softwareModule = softwareModule;
|
||||
}
|
||||
|
||||
public UploadFileStatus(String fileName, String failureReason,SoftwareModule selectedSw) {
|
||||
this.failureReason = failureReason;
|
||||
this.fileName = fileName;
|
||||
this.softwareModule = selectedSw;
|
||||
}
|
||||
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
|
||||
public long getContentLength() {
|
||||
return contentLength;
|
||||
}
|
||||
|
||||
public long getBytesRead() {
|
||||
return bytesRead;
|
||||
}
|
||||
|
||||
public String getFailureReason() {
|
||||
return failureReason;
|
||||
}
|
||||
|
||||
public SoftwareModule getSoftwareModule() {
|
||||
return softwareModule;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,42 +1,42 @@
|
||||
/**
|
||||
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
|
||||
*
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.artifacts.event;
|
||||
/**
|
||||
*
|
||||
* Holds the upload file status.
|
||||
*
|
||||
*/
|
||||
public class UploadStatusEvent {
|
||||
|
||||
public enum UploadStatusEventType {
|
||||
UPLOAD_FAILED, UPLOAD_IN_PROGRESS, UPLOAD_STARTED, UPLOAD_FINISHED, UPLOAD_SUCCESSFUL, UPLOAD_STREAMING_FAILED, UPLOAD_STREAMING_FINISHED, ABORT_UPLOAD
|
||||
}
|
||||
|
||||
private UploadStatusEventType uploadProgressEventType;
|
||||
|
||||
private UploadFileStatus uploadStatus;
|
||||
|
||||
public UploadStatusEvent(UploadStatusEventType eventType, UploadFileStatus entity) {
|
||||
this.uploadProgressEventType = eventType;
|
||||
this.uploadStatus = entity;
|
||||
}
|
||||
|
||||
public UploadFileStatus getUploadStatus() {
|
||||
return uploadStatus;
|
||||
}
|
||||
|
||||
public void setUploadStatus(UploadFileStatus uploadStatus) {
|
||||
this.uploadStatus = uploadStatus;
|
||||
}
|
||||
|
||||
public UploadStatusEventType getUploadProgressEventType() {
|
||||
return uploadProgressEventType;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
|
||||
*
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.artifacts.event;
|
||||
/**
|
||||
*
|
||||
* Holds the upload file status.
|
||||
*
|
||||
*/
|
||||
public class UploadStatusEvent {
|
||||
|
||||
public enum UploadStatusEventType {
|
||||
UPLOAD_FAILED, UPLOAD_IN_PROGRESS, UPLOAD_STARTED, UPLOAD_FINISHED, UPLOAD_SUCCESSFUL, UPLOAD_STREAMING_FAILED, UPLOAD_STREAMING_FINISHED, ABORT_UPLOAD
|
||||
}
|
||||
|
||||
private UploadStatusEventType uploadProgressEventType;
|
||||
|
||||
private UploadFileStatus uploadStatus;
|
||||
|
||||
public UploadStatusEvent(UploadStatusEventType eventType, UploadFileStatus entity) {
|
||||
this.uploadProgressEventType = eventType;
|
||||
this.uploadStatus = entity;
|
||||
}
|
||||
|
||||
public UploadFileStatus getUploadStatus() {
|
||||
return uploadStatus;
|
||||
}
|
||||
|
||||
public void setUploadStatus(UploadFileStatus uploadStatus) {
|
||||
this.uploadStatus = uploadStatus;
|
||||
}
|
||||
|
||||
public UploadStatusEventType getUploadProgressEventType() {
|
||||
return uploadProgressEventType;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,86 +1,86 @@
|
||||
/**
|
||||
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
|
||||
*
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.artifacts.upload;
|
||||
|
||||
import org.eclipse.hawkbit.repository.model.SoftwareModule;
|
||||
|
||||
/**
|
||||
*
|
||||
* Holds uploaded file status.Used to display the details in upload status
|
||||
* popup.
|
||||
*
|
||||
*/
|
||||
public class UploadStatusObject {
|
||||
private String status;
|
||||
private Double progress;
|
||||
private String filename;
|
||||
private String reason;
|
||||
private SoftwareModule selectedSoftwareModule;
|
||||
|
||||
public UploadStatusObject(final String status, final Double progress, final String fileName, final String reason,
|
||||
final SoftwareModule selectedSoftwareModule) {
|
||||
this(fileName,selectedSoftwareModule);
|
||||
this.status = status;
|
||||
this.progress = progress;
|
||||
this.reason = reason;
|
||||
}
|
||||
|
||||
public UploadStatusObject(String fileName, SoftwareModule selectedSoftwareModule) {
|
||||
this.filename = fileName;
|
||||
this.selectedSoftwareModule = selectedSoftwareModule;
|
||||
}
|
||||
|
||||
public SoftwareModule getSelectedSoftwareModule() {
|
||||
return selectedSoftwareModule;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Double getProgress() {
|
||||
return progress;
|
||||
}
|
||||
|
||||
public void setProgress(Double progress) {
|
||||
this.progress = progress;
|
||||
}
|
||||
|
||||
public String getFilename() {
|
||||
return filename;
|
||||
}
|
||||
|
||||
public void setFilename(String filename) {
|
||||
this.filename = filename;
|
||||
}
|
||||
|
||||
public String getReason() {
|
||||
return reason;
|
||||
}
|
||||
|
||||
public void setReason(String reason) {
|
||||
this.reason = reason;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == null || obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (obj instanceof UploadStatusObject && this.getFilename() == ((UploadStatusObject) obj).getFilename()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
|
||||
*
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.artifacts.upload;
|
||||
|
||||
import org.eclipse.hawkbit.repository.model.SoftwareModule;
|
||||
|
||||
/**
|
||||
*
|
||||
* Holds uploaded file status.Used to display the details in upload status
|
||||
* popup.
|
||||
*
|
||||
*/
|
||||
public class UploadStatusObject {
|
||||
private String status;
|
||||
private Double progress;
|
||||
private String filename;
|
||||
private String reason;
|
||||
private SoftwareModule selectedSoftwareModule;
|
||||
|
||||
public UploadStatusObject(final String status, final Double progress, final String fileName, final String reason,
|
||||
final SoftwareModule selectedSoftwareModule) {
|
||||
this(fileName,selectedSoftwareModule);
|
||||
this.status = status;
|
||||
this.progress = progress;
|
||||
this.reason = reason;
|
||||
}
|
||||
|
||||
public UploadStatusObject(String fileName, SoftwareModule selectedSoftwareModule) {
|
||||
this.filename = fileName;
|
||||
this.selectedSoftwareModule = selectedSoftwareModule;
|
||||
}
|
||||
|
||||
public SoftwareModule getSelectedSoftwareModule() {
|
||||
return selectedSoftwareModule;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Double getProgress() {
|
||||
return progress;
|
||||
}
|
||||
|
||||
public void setProgress(Double progress) {
|
||||
this.progress = progress;
|
||||
}
|
||||
|
||||
public String getFilename() {
|
||||
return filename;
|
||||
}
|
||||
|
||||
public void setFilename(String filename) {
|
||||
this.filename = filename;
|
||||
}
|
||||
|
||||
public String getReason() {
|
||||
return reason;
|
||||
}
|
||||
|
||||
public void setReason(String reason) {
|
||||
this.reason = reason;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == null || obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (obj instanceof UploadStatusObject && this.getFilename() == ((UploadStatusObject) obj).getFilename()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user