initial import

This commit is contained in:
2026-05-28 21:17:51 +07:00
commit c347ceaf3a
97 changed files with 10497 additions and 0 deletions

View File

@ -0,0 +1,210 @@
package id.iptek.utms.agent.model;
import java.util.Date;
public class Application {
protected String id;
protected String appName;
protected String packageName;
protected String version;
protected String companyName;
protected boolean uninstallable;
protected String description;
protected String apkId;
protected String fileId;
protected String fileExt;
protected Date fileCreateDate;
protected String checksum;
public Application() {
}
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(String id) {
this.id = id;
}
/**
* @return the appName
*/
public String getAppName() {
return appName;
}
/**
* @param appName the appName to set
*/
public void setAppName(String appName) {
this.appName = appName;
}
/**
* @return the packageName
*/
public String getPackageName() {
return packageName;
}
/**
* @param packageName the packageName to set
*/
public void setPackageName(String packageName) {
this.packageName = packageName;
}
/**
* @return the version
*/
public String getVersion() {
return version;
}
/**
* @param version the version to set
*/
public void setVersion(String version) {
this.version = version;
}
/**
* @return the companyName
*/
public String getCompanyName() {
return companyName;
}
/**
* @param companyName the companyName to set
*/
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
/**
* @return the uninstallable
*/
public boolean isUninstallable() {
return uninstallable;
}
/**
* @param uninstallable the uninstallable to set
*/
public void setUninstallable(boolean uninstallable) {
this.uninstallable = uninstallable;
}
/**
* @return the description
*/
public String getDescription() {
return description;
}
/**
* @param description the description to set
*/
public void setDescription(String description) {
this.description = description;
}
/**
* @return the apkId
*/
public String getApkId() {
return apkId;
}
/**
* @param apkId the apkId to set
*/
public void setApkId(String apkId) {
this.apkId = apkId;
}
/**
* @return the fileId
*/
public String getFileId() {
return fileId;
}
/**
* @param fileId the fileId to set
*/
public void setFileId(String fileId) {
this.fileId = fileId;
}
/**
* @return the fileExt
*/
public String getFileExt() {
return fileExt;
}
/**
* @param fileExt the fileExt to set
*/
public void setFileExt(String fileExt) {
this.fileExt = fileExt;
}
/**
* @return the fileCreateDate
*/
public Date getFileCreateDate() {
return fileCreateDate;
}
/**
* @param fileCreateDate the fileCreateDate to set
*/
public void setFileCreateDate(Date fileCreateDate) {
this.fileCreateDate = fileCreateDate;
}
/**
* @return the checksum
*/
public String getChecksum() {
return checksum;
}
/**
* @param checksum the checksum to set
*/
public void setChecksum(String checksum) {
this.checksum = checksum;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("Application{");
sb.append("id=").append(id);
sb.append(", appName=").append(appName);
sb.append(", packageName=").append(packageName);
sb.append(", version=").append(version);
sb.append(", companyName=").append(companyName);
sb.append(", uninstallable=").append(uninstallable);
sb.append(", description=").append(description);
sb.append(", apkId=").append(apkId);
sb.append(", fileId=").append(fileId);
sb.append(", fileExt=").append(fileExt);
sb.append(", fileCreateDate=").append(fileCreateDate);
sb.append(", checksum=").append(checksum);
sb.append('}');
return sb.toString();
}
}

View File

@ -0,0 +1,146 @@
package id.iptek.utms.agent.model;
import java.util.Date;
/**
*
* @author jakar
*/
public class ApplicationExt extends Application {
private String uniqueName;
private String downloadUrl;
private Date downloadUrlExp;
private long fileSize;
private String uniqueIconName;
private String iconUrl;
private Date iconUrlExp;
/**
* @return the uniqueName
*/
public String getUniqueName() {
return uniqueName;
}
/**
* @param uniqueName the uniqueName to set
*/
public void setUniqueName(String uniqueName) {
this.uniqueName = uniqueName;
}
/**
* @return the downloadUrl
*/
public String getDownloadUrl() {
return downloadUrl;
}
/**
* @param downloadUrl the downloadUrl to set
*/
public void setDownloadUrl(String downloadUrl) {
this.downloadUrl = downloadUrl;
}
/**
* @return the downloadUrlExp
*/
public Date getDownloadUrlExp() {
return downloadUrlExp;
}
/**
* @param downloadUrlExp the downloadUrlExp to set
*/
public void setDownloadUrlExp(Date downloadUrlExp) {
this.downloadUrlExp = downloadUrlExp;
}
/**
* @return the fileSize
*/
public long getFileSize() {
return fileSize;
}
/**
* @param fileSize the fileSize to set
*/
public void setFileSize(long fileSize) {
this.fileSize = fileSize;
}
/**
* @return the uniqueIconName
*/
public String getUniqueIconName() {
return uniqueIconName;
}
/**
* @param uniqueIconName the uniqueIconName to set
*/
public void setUniqueIconName(String uniqueIconName) {
this.uniqueIconName = uniqueIconName;
}
/**
* @return the iconUrl
*/
public String getIconUrl() {
return iconUrl;
}
/**
* @param iconUrl the iconUrl to set
*/
public void setIconUrl(String iconUrl) {
this.iconUrl = iconUrl;
}
/**
* @return the iconUrlExp
*/
public Date getIconUrlExp() {
return iconUrlExp;
}
/**
* @param iconUrlExp the iconUrlExp to set
*/
public void setIconUrlExp(Date iconUrlExp) {
this.iconUrlExp = iconUrlExp;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("ApplicationExt{");
sb.append("id=").append(id);
sb.append(", appName=").append(appName);
sb.append(", packageName=").append(packageName);
sb.append(", version=").append(version);
sb.append(", companyName=").append(companyName);
sb.append(", uninstallable=").append(uninstallable);
sb.append(", description=").append(description);
sb.append(", apkId=").append(apkId);
sb.append(", fileId=").append(fileId);
sb.append(", fileExt=").append(fileExt);
sb.append(", fileCreateDate=").append(fileCreateDate);
sb.append(", checksum=").append(checksum);
sb.append(", uniqueName=").append(uniqueName);
sb.append(", downloadUrl=").append(downloadUrl);
sb.append(", downloadUrlExp=").append(downloadUrlExp);
sb.append(", fileSize=").append(fileSize);
sb.append(", uniqueIconName=").append(uniqueIconName);
sb.append(", iconUrl=").append(iconUrl);
sb.append(", iconUrlExp=").append(iconUrlExp);
sb.append('}');
return sb.toString();
}
}

View File

@ -0,0 +1,53 @@
package id.iptek.utms.agent.model;
import javax.annotation.Generated;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
@Generated("jsonschema2pojo")
public class ApplicationSimple {
private String id;
@SerializedName("app_name")
@Expose
private String appName;
@SerializedName("package_name")
@Expose
private String packageName;
@SerializedName("version")
@Expose
private String version;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getAppName() {
return appName;
}
public void setAppName(String appName) {
this.appName = appName;
}
public String getPackageName() {
return packageName;
}
public void setPackageName(String packageName) {
this.packageName = packageName;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
}

View File

@ -0,0 +1,55 @@
package id.iptek.utms.agent.model;
import javax.annotation.Generated;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
@Generated("jsonschema2pojo")
public class CellInfo {
@SerializedName("name")
@Expose
private String name;
@SerializedName("cid")
@Expose
private String cid;
@SerializedName("type")
@Expose
private String type;
@SerializedName("strength")
@Expose
private Integer strength;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCid() {
return cid;
}
public void setCid(String cid) {
this.cid = cid;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Integer getStrength() {
return strength;
}
public void setStrength(Integer strength) {
this.strength = strength;
}
}

View File

@ -0,0 +1,140 @@
package id.iptek.utms.agent.model;
import java.util.List;
import javax.annotation.Generated;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import java.util.Date;
@Generated("jsonschema2pojo")
public class Diagnostic {
private String id;
@SerializedName("req_id")
@Expose
private String reqId;
@SerializedName("req_type")
@Expose
private String reqType;
@SerializedName("req_time")
@Expose
private String reqTime;
@SerializedName("device_sn")
@Expose
private String deviceSn;
@SerializedName("diagnostic_info")
@Expose
private DiagnosticInfo diagnosticInfo;
@SerializedName("location_info")
@Expose
private LocationInfo locationInfo;
@SerializedName("cell_info")
@Expose
private List<CellInfo> cellInfo;
@SerializedName("installed_apps")
@Expose
private List<ApplicationSimple> installedApps = null;
private Date createTime;
private String terminalId;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getReqId() {
return reqId;
}
public void setReqId(String reqId) {
this.reqId = reqId;
}
public String getReqType() {
return reqType;
}
public void setReqType(String reqType) {
this.reqType = reqType;
}
public String getReqTime() {
return reqTime;
}
public void setReqTime(String reqTime) {
this.reqTime = reqTime;
}
public String getDeviceSn() {
return deviceSn;
}
public void setDeviceSn(String deviceSn) {
this.deviceSn = deviceSn;
}
public DiagnosticInfo getDiagnosticInfo() {
return diagnosticInfo;
}
public void setDiagnosticInfo(DiagnosticInfo diagnosticInfo) {
this.diagnosticInfo = diagnosticInfo;
}
public LocationInfo getLocationInfo() {
return locationInfo;
}
public void setLocationInfo(LocationInfo locationInfo) {
this.locationInfo = locationInfo;
}
public List<CellInfo> getCellInfo() {
return cellInfo;
}
public void setCellInfo(List<CellInfo> cellInfo) {
this.cellInfo = cellInfo;
}
public List<ApplicationSimple> getInstalledApps() {
return installedApps;
}
public void setInstalledApps(List<ApplicationSimple> installedApps) {
this.installedApps = installedApps;
}
/**
* @return the createTime
*/
public Date getCreateTime() {
return createTime;
}
/**
* @param createTime the createTime to set
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* @return the terminalId
*/
public String getTerminalId() {
return terminalId;
}
/**
* @param terminalId the terminalId to set
*/
public void setTerminalId(String terminalId) {
this.terminalId = terminalId;
}
}

View File

@ -0,0 +1,246 @@
package id.iptek.utms.agent.model;
import javax.annotation.Generated;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
@Generated("jsonschema2pojo")
public class DiagnosticInfo {
@SerializedName("imei")
@Expose
private String imei;
@SerializedName("meid")
@Expose
private String meid;
@SerializedName("battery_temp")
@Expose
private double batteryTemp;
@SerializedName("battery_percentage")
@Expose
private double batteryPercentage;
@SerializedName("total_memory")
@Expose
private String totalMemory;
@SerializedName("available_memory")
@Expose
private String availableMemory;
@SerializedName("total_flash_memory")
@Expose
private String totalFlashMemory;
@SerializedName("available_flash_memory")
@Expose
private String availableFlashMemory;
@SerializedName("total_mobile_data")
@Expose
private String totalMobileData;
@SerializedName("switching_times")
@Expose
private int switchingTimes;
@SerializedName("current_boot_time")
@Expose
private int currentBootTime;
@SerializedName("total_boot_time")
@Expose
private int totalBootTime;
@SerializedName("total_length_printed")
@Expose
private double totalLengthPrinted;
@SerializedName("swiping_card_times")
@Expose
private int swipingCardTimes;
@SerializedName("dip_inserting_times")
@Expose
private int dipInsertingTimes;
@SerializedName("nfc_card_reading_times")
@Expose
private int nfcCardReadingTimes;
@SerializedName("front_camera_open_times")
@Expose
private int frontCameraOpenTimes;
@SerializedName("rear_camera_open_times")
@Expose
private int rearCameraOpenTimes;
@SerializedName("charge_times")
@Expose
private int chargeTimes;
@SerializedName("new_diagnostic")
@Expose
private Boolean newDiagnostic;
private String installedAppString;
public String getImei() {
return imei;
}
public void setImei(String imei) {
this.imei = imei;
}
public String getMeid() {
return meid;
}
public void setMeid(String meid) {
this.meid = meid;
}
public double getBatteryTemp() {
return batteryTemp;
}
public void setBatteryTemp(double batteryTemp) {
this.batteryTemp = batteryTemp;
}
public double getBatteryPercentage() {
return batteryPercentage;
}
public void setBatteryPercentage(double batteryPercentage) {
this.batteryPercentage = batteryPercentage;
}
public String getTotalMemory() {
return totalMemory;
}
public void setTotalMemory(String totalMemory) {
this.totalMemory = totalMemory;
}
public String getAvailableMemory() {
return availableMemory;
}
public void setAvailableMemory(String availableMemory) {
this.availableMemory = availableMemory;
}
public String getTotalFlashMemory() {
return totalFlashMemory;
}
public void setTotalFlashMemory(String totalFlashMemory) {
this.totalFlashMemory = totalFlashMemory;
}
public String getAvailableFlashMemory() {
return availableFlashMemory;
}
public void setAvailableFlashMemory(String availableFlashMemory) {
this.availableFlashMemory = availableFlashMemory;
}
public String getTotalMobileData() {
return totalMobileData;
}
public void setTotalMobileData(String totalMobileData) {
this.totalMobileData = totalMobileData;
}
public int getSwitchingTimes() {
return switchingTimes;
}
public void setSwitchingTimes(int switchingTimes) {
this.switchingTimes = switchingTimes;
}
public int getCurrentBootTime() {
return currentBootTime;
}
public void setCurrentBootTime(int currentBootTime) {
this.currentBootTime = currentBootTime;
}
public int getTotalBootTime() {
return totalBootTime;
}
public void setTotalBootTime(int totalBootTime) {
this.totalBootTime = totalBootTime;
}
public double getTotalLengthPrinted() {
return totalLengthPrinted;
}
public void setTotalLengthPrinted(double totalLengthPrinted) {
this.totalLengthPrinted = totalLengthPrinted;
}
public int getSwipingCardTimes() {
return swipingCardTimes;
}
public void setSwipingCardTimes(int swipingCardTimes) {
this.swipingCardTimes = swipingCardTimes;
}
public int getDipInsertingTimes() {
return dipInsertingTimes;
}
public void setDipInsertingTimes(int dipInsertingTimes) {
this.dipInsertingTimes = dipInsertingTimes;
}
public int getNfcCardReadingTimes() {
return nfcCardReadingTimes;
}
public void setNfcCardReadingTimes(int nfcCardReadingTimes) {
this.nfcCardReadingTimes = nfcCardReadingTimes;
}
public int getFrontCameraOpenTimes() {
return frontCameraOpenTimes;
}
public void setFrontCameraOpenTimes(int frontCameraOpenTimes) {
this.frontCameraOpenTimes = frontCameraOpenTimes;
}
public int getRearCameraOpenTimes() {
return rearCameraOpenTimes;
}
public void setRearCameraOpenTimes(int rearCameraOpenTimes) {
this.rearCameraOpenTimes = rearCameraOpenTimes;
}
public int getChargeTimes() {
return chargeTimes;
}
public void setChargeTimes(int chargeTimes) {
this.chargeTimes = chargeTimes;
}
public Boolean getNewDiagnostic() {
return newDiagnostic;
}
public void setNewDiagnostic(Boolean newDiagnostic) {
this.newDiagnostic = newDiagnostic;
}
/**
* @return the installedAppString
*/
public String getInstalledAppString() {
return installedAppString;
}
/**
* @param installedAppString the installedAppString to set
*/
public void setInstalledAppString(String installedAppString) {
this.installedAppString = installedAppString;
}
}

View File

@ -0,0 +1,176 @@
package id.iptek.utms.agent.model;
import id.iptek.utms.agent.model.enumeration.DownloadTimeType;
import id.iptek.utms.agent.model.enumeration.InstallationNotificationType;
import id.iptek.utms.agent.model.enumeration.InstallationTimeType;
import id.iptek.utms.agent.model.enumeration.PublishTimeType;
import id.iptek.utms.agent.model.enumeration.TaskStatus;
import java.io.Serializable;
import java.util.Date;
/**
*
* @author Jaka
*/
public class DownloadTask implements Serializable {
private String id;
private String name;
private PublishTimeType publishTimeType;
private Date publishTime;
private DownloadTimeType downloadTimeType;
private Date downloadTime;
private InstallationTimeType installationTimeType;
private Date installationTime;
private InstallationNotificationType installationNotification;
private TaskStatus status;
public DownloadTask() {
}
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(String id) {
this.id = id;
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the publishTimeType
*/
public PublishTimeType getPublishTimeType() {
return publishTimeType;
}
/**
* @param publishTimeType the publishTimeType to set
*/
public void setPublishTimeType(int publishTimeType) {
this.publishTimeType = PublishTimeType.fromValue(publishTimeType);
}
/**
* @return the publishTime
*/
public Date getPublishTime() {
return publishTime;
}
/**
* @param publishTime the publishTime to set
*/
public void setPublishTime(Date publishTime) {
this.publishTime = publishTime;
}
/**
* @return the downloadTimeType
*/
public DownloadTimeType getDownloadTimeType() {
return downloadTimeType;
}
/**
* @param downloadTimeType the downloadTimeType to set
*/
public void setDownloadTimeType(int downloadTimeType) {
this.downloadTimeType = DownloadTimeType.fromValue(downloadTimeType);
}
/**
* @return the downloadTime
*/
public Date getDownloadTime() {
return downloadTime;
}
/**
* @param downloadTime the downloadTime to set
*/
public void setDownloadTime(Date downloadTime) {
this.downloadTime = downloadTime;
}
/**
* @return the installationTimeType
*/
public InstallationTimeType getInstallationTimeType() {
return installationTimeType;
}
/**
* @param installationTimeType the installationTimeType to set
*/
public void setInstallationTimeType(int installationTimeType) {
this.installationTimeType = InstallationTimeType.fromValue(installationTimeType);
}
/**
* @return the installationTime
*/
public Date getInstallationTime() {
return installationTime;
}
/**
* @param installationTime the installationTime to set
*/
public void setInstallationTime(Date installationTime) {
this.installationTime = installationTime;
}
/**
* @return the installationNotification
*/
public InstallationNotificationType getInstallationNotification() {
return installationNotification;
}
/**
* @param installationNotification the installationNotification to set
*/
public void setInstallationNotification(int installationNotification) {
this.installationNotification = InstallationNotificationType.fromValue(installationNotification);
}
/**
* @return the status
*/
public TaskStatus getStatus() {
return status;
}
/**
* @param status the status to set
*/
public void setStatus(int status) {
this.status = TaskStatus.fromValue(status);
}
@Override
public String toString() {
return "DownloadTask{" + "id=" + id + ", name=" + name + ", publishTimeType=" + publishTimeType + ", publishTime=" + publishTime + ", downloadTimeType=" + downloadTimeType + ", downloadTime=" + downloadTime + ", installationTimeType=" + installationTimeType + ", installationTime=" + installationTime + ", installationNotification=" + installationNotification + ", status=" + status + '}';
}
}

View File

@ -0,0 +1,75 @@
package id.iptek.utms.agent.model;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.Serializable;
import java.util.concurrent.atomic.AtomicInteger;
/**
*
* @author jakar
*/
public class FileReaderCacheObj implements Serializable {
private File file;
private BufferedReader reader;
private final AtomicInteger currentReadRowNum = new AtomicInteger(0);
public FileReaderCacheObj() {
}
/**
* @return the file
*/
public File getFile() {
return file;
}
/**
* @param file the file to set
*/
public void setFile(File file) {
this.file = file;
}
/**
* @return the reader
*/
public BufferedReader getReader() {
return reader;
}
/**
* @return the currentReadRowNum
*/
public AtomicInteger getCurrentReadRowNum() {
return currentReadRowNum;
}
public void pointToFile(File file) throws IOException {
if(file == null) {
throw new IllegalArgumentException("File cannot be null!");
}
if(!file.exists()) {
throw new IOException("File not exists!");
}
if(!file.canRead()) {
throw new IOException("File not readable!");
}
this.file = file;
this.reader = new BufferedReader(new FileReader(this.file));
this.currentReadRowNum.set(0);
}
public void closeReader() throws IOException {
if(this.reader != null) {
this.reader.close();
this.file = null;
this.currentReadRowNum.set(0);
} else {
// ignore null reader
}
}
}

View File

@ -0,0 +1,118 @@
package id.iptek.utms.agent.model;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Serializable;
import java.util.concurrent.atomic.AtomicInteger;
/**
*
* @author jakar
*/
public class FileWriterCacheObj implements Serializable {
private File file;
private BufferedWriter writer;
private final AtomicInteger currentWriteRowNum = new AtomicInteger(0);
private final Object lock = new Object();
public FileWriterCacheObj() {
}
/**
* @return the file
*/
public File getFile() {
return file;
}
/**
* @param file the file to set
*/
public void setFile(File file) {
this.file = file;
}
/**
* @return the reader
*/
public BufferedWriter getWriter() {
return writer;
}
/**
* @return the currentReadRowNum
*/
public AtomicInteger getCurrentWriteRowNum() {
return currentWriteRowNum;
}
public void pointToFile(File file) throws IOException {
if(file == null) {
throw new IllegalArgumentException("File cannot be null!");
}
/*
if(file.exists()) {
throw new IOException("File exists!");
}
if(!file.canWrite()) {
throw new IOException("File not writable!");
}*/
// close old writer
synchronized (lock) {
if(this.writer != null) {
this.writer.flush();
try {
this.writer.close();
} catch(IOException ignore) {}
this.writer = null;
}
this.file = file;
this.writer = new BufferedWriter(new FileWriter(this.file));
this.currentWriteRowNum.set(0);
}
}
public void closeWriter() throws IOException {
if(this.writer != null) {
synchronized (lock) {
this.writer.close();
this.file = null;
this.currentWriteRowNum.set(0);
}
} else {
// ignore null reader
}
}
public BufferedWriter writeLine(String line) throws IOException {
if(this.writer == null) {
throw new IOException("Writer cannot be null!");
}
synchronized (lock) {
this.writer.write(line);
this.writer.newLine();
this.writer.flush();
}
this.currentWriteRowNum.incrementAndGet();
return this.writer;
}
public boolean writeLineWithMaxLineNo(int maxLineNo, String line) throws IOException {
if(this.writer == null) {
throw new IOException("Writer cannot be null!");
}
if(this.currentWriteRowNum.get() < maxLineNo) {
synchronized (lock) {
this.writer.write(line);
this.writer.newLine();
this.writer.flush();
}
this.currentWriteRowNum.incrementAndGet();
return true;
}
return false;
}
}

View File

@ -0,0 +1,200 @@
package id.iptek.utms.agent.model;
import javax.annotation.Generated;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import java.io.File;
import java.util.Date;
import java.util.List;
@Generated("jsonschema2pojo")
public class HeartBeat {
private String id;
@SerializedName("req_id")
@Expose
private String reqId;
@SerializedName("req_type")
@Expose
private String reqType;
@SerializedName("req_time")
@Expose
private String reqTime;
@SerializedName("device_sn")
@Expose
private String deviceSn;
@SerializedName("diagnostic_info")
@Expose
private DiagnosticInfo diagnosticInfo;
@SerializedName("location_info")
@Expose
private LocationInfo locationInfo;
@SerializedName("cell_info")
@Expose
private List<CellInfo> cellInfo;
private File fileLocation;
private Date createTime;
private String terminalId;
private String cellInfoString;
@Expose
@SerializedName("cell_type")
private String cellType;
@Expose
@SerializedName("cell_name")
private String cellName;
@Expose
@SerializedName("cell_strength")
private Integer cellStrength;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getReqId() {
return reqId;
}
public void setReqId(String reqId) {
this.reqId = reqId;
}
public String getReqType() {
return reqType;
}
public void setReqType(String reqType) {
this.reqType = reqType;
}
public String getReqTime() {
return reqTime;
}
public void setReqTime(String reqTime) {
this.reqTime = reqTime;
}
public String getDeviceSn() {
return deviceSn;
}
public void setDeviceSn(String deviceSn) {
this.deviceSn = deviceSn;
}
public DiagnosticInfo getDiagnosticInfo() {
return diagnosticInfo;
}
public void setDiagnosticInfo(DiagnosticInfo diagnosticInfo) {
this.diagnosticInfo = diagnosticInfo;
}
public LocationInfo getLocationInfo() {
return locationInfo;
}
public void setLocationInfo(LocationInfo locationInfo) {
this.locationInfo = locationInfo;
}
public List<CellInfo> getCellInfo() {
return cellInfo;
}
public void setCellInfo(List<CellInfo> cellInfo) {
this.cellInfo = cellInfo;
}
public File getFileLocation() {
return fileLocation;
}
public void setFileLocation(File fileLocation) {
this.fileLocation = fileLocation;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* @return the terminalId
*/
public String getTerminalId() {
return terminalId;
}
/**
* @param terminalId the terminalId to set
*/
public void setTerminalId(String terminalId) {
this.terminalId = terminalId;
}
/**
* @return the cellInfoString
*/
public String getCellInfoString() {
return cellInfoString;
}
/**
* @param cellInfoString the cellInfoString to set
*/
public void setCellInfoString(String cellInfoString) {
this.cellInfoString = cellInfoString;
}
/**
* @return the cellType
*/
public String getCellType() {
return cellType;
}
/**
* @param cellType the cellType to set
*/
public void setCellType(String cellType) {
this.cellType = cellType;
}
/**
* @return the cellName
*/
public String getCellName() {
return cellName;
}
/**
* @param cellName the cellName to set
*/
public void setCellName(String cellName) {
this.cellName = cellName;
}
/**
* @return the cellStrength
*/
public Integer getCellStrength() {
return cellStrength;
}
/**
* @param cellStrength the cellStrength to set
*/
public void setCellStrength(Integer cellStrength) {
this.cellStrength = cellStrength;
}
}

View File

@ -0,0 +1,34 @@
package id.iptek.utms.agent.model;
import javax.annotation.Generated;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
@Generated("jsonschema2pojo")
public class LocationInfo {
@SerializedName("lat")
@Expose
private Double lat;
@SerializedName("lng")
@Expose
private Double lng;
public Double getLat() {
return lat;
}
public void setLat(Double lat) {
this.lat = lat;
}
public Double getLng() {
return lng;
}
public void setLng(Double lng) {
this.lng = lng;
}
}

View File

@ -0,0 +1,130 @@
package id.iptek.utms.agent.model;
import java.io.Serializable;
import java.util.Date;
/**
*
* @author Jaka
*/
public class PendingDeleteTask implements Serializable {
private String terminalSN;
private String id;
private String name;
private Date deleteTime;
private Date lastBroadcastTs;
private ApplicationSimple app;
private int activity;
private String logId;
public PendingDeleteTask() {
}
/**
* @return the terminalSN
*/
public String getTerminalSN() {
return terminalSN;
}
/**
* @param terminalSN the terminalSN to set
*/
public void setTerminalSN(String terminalSN) {
this.terminalSN = terminalSN;
}
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(String id) {
this.id = id;
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the deleteTime
*/
public Date getDeleteTime() {
return deleteTime;
}
/**
* @param deleteTime the deleteTime to set
*/
public void setDeleteTime(Date deleteTime) {
this.deleteTime = deleteTime;
}
/**
* @return the lastBroadcastTs
*/
public Date getLastBroadcastTs() {
return lastBroadcastTs;
}
/**
* @param lastBroadcastTs the lastBroadcastTs to set
*/
public void setLastBroadcastTs(Date lastBroadcastTs) {
this.lastBroadcastTs = lastBroadcastTs;
}
/**
* @return the app
*/
public ApplicationSimple getApp() {
return app;
}
/**
* @param app the app to set
*/
public void setApp(ApplicationSimple app) {
this.app = app;
}
/**
* @return the activity
*/
public int getActivity() {
return activity;
}
/**
* @param activity the activity to set
*/
public void setActivity(int activity) {
this.activity = activity;
}
public String getLogId() {
return logId;
}
public void setLogId(String logId) {
this.logId = logId;
}
}

View File

@ -0,0 +1,234 @@
package id.iptek.utms.agent.model;
import java.io.Serializable;
import java.util.Date;
/**
*
* @author Jaka
*/
public class PendingDownloadTask implements Serializable {
private String terminalSN;
private String terminalGroupId;
private String id;
private String name;
private int downloadTimeType;
private Date downloadTime;
private int installationTimeType;
private Date installationTime;
private int installationNotification;
private Date lastBroadcastTs;
private int activity;
private String logId;
private Application app;
public PendingDownloadTask() {
}
/**
* @return the terminalSN
*/
public String getTerminalSN() {
return terminalSN;
}
/**
* @param terminalSN the terminalSN to set
*/
public void setTerminalSN(String terminalSN) {
this.terminalSN = terminalSN;
}
/**
* @return the terminalGroupId
*/
public String getTerminalGroupId() {
return terminalGroupId;
}
/**
* @param terminalGroupId the terminalGroupId to set
*/
public void setTerminalGroupId(String terminalGroupId) {
this.terminalGroupId = terminalGroupId;
}
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(String id) {
this.id = id;
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the downloadTimeType
*/
public int getDownloadTimeType() {
return downloadTimeType;
}
/**
* @param downloadTimeType the downloadTimeType to set
*/
public void setDownloadTimeType(int downloadTimeType) {
this.downloadTimeType = downloadTimeType;
}
/**
* @return the downloadTime
*/
public Date getDownloadTime() {
return downloadTime;
}
/**
* @param downloadTime the downloadTime to set
*/
public void setDownloadTime(Date downloadTime) {
this.downloadTime = downloadTime;
}
/**
* @return the installationTimeType
*/
public int getInstallationTimeType() {
return installationTimeType;
}
/**
* @param installationTimeType the installationTimeType to set
*/
public void setInstallationTimeType(int installationTimeType) {
this.installationTimeType = installationTimeType;
}
/**
* @return the installationTime
*/
public Date getInstallationTime() {
return installationTime;
}
/**
* @param installationTime the installationTime to set
*/
public void setInstallationTime(Date installationTime) {
this.installationTime = installationTime;
}
/**
* @return the installationNotification
*/
public int getInstallationNotification() {
return installationNotification;
}
/**
* @param installationNotification the installationNotification to set
*/
public void setInstallationNotification(int installationNotification) {
this.installationNotification = installationNotification;
}
/**
* @return the lastBroadcastTs
*/
public Date getLastBroadcastTs() {
return lastBroadcastTs;
}
/**
* @param lastBroadcastTs the lastBroadcastTs to set
*/
public void setLastBroadcastTs(Date lastBroadcastTs) {
this.lastBroadcastTs = lastBroadcastTs;
}
/**
* @return the activity
*/
public int getActivity() {
return activity;
}
/**
* @param activity the activity to set
*/
public void setActivity(int activity) {
this.activity = activity;
}
/**
* @return the logId
*/
public String getLogId() {
return logId;
}
/**
* @param logId the logId to set
*/
public void setLogId(String logId) {
this.logId = logId;
}
/**
* @return the app
*/
public Application getApp() {
return app;
}
/**
* @param app the app to set
*/
public void setApp(Application app) {
this.app = app;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("PendingDownloadTask{");
sb.append("terminalSN=").append(terminalSN);
sb.append(", terminalGroupId=").append(terminalGroupId);
sb.append(", id=").append(id);
sb.append(", name=").append(name);
sb.append(", downloadTimeType=").append(downloadTimeType);
sb.append(", downloadTime=").append(downloadTime);
sb.append(", installationTimeType=").append(installationTimeType);
sb.append(", installationTime=").append(installationTime);
sb.append(", installationNotification=").append(installationNotification);
sb.append(", lastBroadcastTs=").append(lastBroadcastTs);
sb.append(", activity=").append(activity);
sb.append(", logId=").append(logId);
sb.append(", app=").append(app);
sb.append('}');
return sb.toString();
}
}

View File

@ -0,0 +1,257 @@
package id.iptek.utms.agent.model;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
*
* @author Jaka
*/
public class Profile implements Serializable {
private String terminalSN;
private String id;
private String name;
private int heartbeatInterval;
private int diagnosticInterval;
private boolean maskHomeButton;
private boolean maskStatusButton;
private boolean scheduleReboot;
private Date scheduleRebootTime;
private boolean isDefault;
private boolean relocationAlert;
private int movingThreshold;
private String adminPassword;
private String frontApp;
private List<String> groupIds;
private List<String> apps;
/**
* @return the terminalSN
*/
public String getTerminalSN() {
return terminalSN;
}
/**
* @param terminalSN the terminalSN to set
*/
public void setTerminalSN(String terminalSN) {
this.terminalSN = terminalSN;
}
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(String id) {
this.id = id;
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the heartbeatInterval
*/
public int getHeartbeatInterval() {
return heartbeatInterval;
}
/**
* @param heartbeatInterval the heartbeatInterval to set
*/
public void setHeartbeatInterval(int heartbeatInterval) {
this.heartbeatInterval = heartbeatInterval;
}
/**
* @return the diagnosticInterval
*/
public int getDiagnosticInterval() {
return diagnosticInterval;
}
/**
* @param diagnosticInterval the diagnosticInterval to set
*/
public void setDiagnosticInterval(int diagnosticInterval) {
this.diagnosticInterval = diagnosticInterval;
}
/**
* @return the maskHomeButton
*/
public boolean isMaskHomeButton() {
return maskHomeButton;
}
/**
* @param maskHomeButton the maskHomeButton to set
*/
public void setMaskHomeButton(boolean maskHomeButton) {
this.maskHomeButton = maskHomeButton;
}
/**
* @return the maskStatusButton
*/
public boolean isMaskStatusButton() {
return maskStatusButton;
}
/**
* @param maskStatusButton the maskStatusButton to set
*/
public void setMaskStatusButton(boolean maskStatusButton) {
this.maskStatusButton = maskStatusButton;
}
/**
* @return the scheduleReboot
*/
public boolean isScheduleReboot() {
return scheduleReboot;
}
/**
* @param scheduleReboot the scheduleReboot to set
*/
public void setScheduleReboot(boolean scheduleReboot) {
this.scheduleReboot = scheduleReboot;
}
/**
* @return the scheduleRebootTime
*/
public Date getScheduleRebootTime() {
return scheduleRebootTime;
}
/**
* @param scheduleRebootTime the scheduleRebootTime to set
*/
public void setScheduleRebootTime(Date scheduleRebootTime) {
this.scheduleRebootTime = scheduleRebootTime;
}
/**
* @return the isDefault
*/
public boolean isDefault() {
return isDefault;
}
/**
* @param isDefault the isDefault to set
*/
public void setDefault(boolean isDefault) {
this.isDefault = isDefault;
}
/**
* @return the relocationAlert
*/
public boolean isRelocationAlert() {
return relocationAlert;
}
/**
* @param relocationAlert the relocationAlert to set
*/
public void setRelocationAlert(boolean relocationAlert) {
this.relocationAlert = relocationAlert;
}
/**
* @return the movingThreshold
*/
public int getMovingThreshold() {
return movingThreshold;
}
/**
* @param movingThreshold the movingThreshold to set
*/
public void setMovingThreshold(int movingThreshold) {
this.movingThreshold = movingThreshold;
}
/**
* @return the adminPassword
*/
public String getAdminPassword() {
return adminPassword;
}
/**
* @param adminPassword the adminPassword to set
*/
public void setAdminPassword(String adminPassword) {
this.adminPassword = adminPassword;
}
/**
* @return the frontApp
*/
public String getFrontApp() {
return frontApp;
}
/**
* @param frontApp the frontApp to set
*/
public void setFrontApp(String frontApp) {
this.frontApp = frontApp;
}
/**
* @return the apps
*/
public List<String> getApps() {
if(apps == null) {
apps = new ArrayList<>();
}
return apps;
}
/**
* @param apps the apps to set
*/
public void setApps(List<String> apps) {
this.apps = apps;
}
/**
* @return the groupIds
*/
public List<String> getGroupIds() {
return groupIds;
}
/**
* @param groupIds the groupIds to set
*/
public void setGroupIds(List<String> groupIds) {
this.groupIds = groupIds;
}
}

View File

@ -0,0 +1,61 @@
package id.iptek.utms.agent.model;
import java.io.Serializable;
import java.util.List;
/**
*
* @author Jaka
*/
public class SimplePendingDownloadTask implements Serializable {
private String id;
private String name;
private List<String> groupIds;
public SimplePendingDownloadTask() {
}
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(String id) {
this.id = id;
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the groupIds
*/
public List<String> getGroupIds() {
return groupIds;
}
/**
* @param groupIds the groupIds to set
*/
public void setGroupIds(List<String> groupIds) {
this.groupIds = groupIds;
}
}

View File

@ -0,0 +1,120 @@
package id.iptek.utms.agent.model;
import java.io.Serializable;
/**
*
* @author Jaka
*/
public class TaskAckReq implements Serializable {
private String reqId;
private String terminalSN;
private String ackId;
private String terminalId;
private int activity;
private String message;
private String taskId;
private String terminalGroupId;
private boolean broadcasted;
public TaskAckReq() {
}
/**
* @return the reqId
*/
public String getReqId() {
return reqId;
}
/**
* @param reqId the reqId to set
*/
public void setReqId(String reqId) {
this.reqId = reqId;
}
/**
* @return the terminalSN
*/
public String getTerminalSN() {
return terminalSN;
}
/**
* @param terminalSN the terminalSN to set
*/
public void setTerminalSN(String terminalSN) {
this.terminalSN = terminalSN;
}
/**
* @return the ackId
*/
public String getAckId() {
return ackId;
}
/**
* @param ackId the ackId to set
*/
public void setAckId(String ackId) {
this.ackId = ackId;
}
public String getTerminalId() {
return terminalId;
}
public void setTerminalId(String terminalId) {
this.terminalId = terminalId;
}
public String getTerminalGroupId() {
return terminalGroupId;
}
public void setTerminalGroupId(String terminalGroupId) {
this.terminalGroupId = terminalGroupId;
}
public int getActivity() {
return activity;
}
public void setActivity(int activity) {
this.activity = activity;
}
/**
* @return the message
*/
public String getMessage() {
return message;
}
/**
* @param message the message to set
*/
public void setMessage(String message) {
this.message = message;
}
public String getTaskId() {
return taskId;
}
public void setTaskId(String taskId) {
this.taskId = taskId;
}
public boolean isBroadcasted() {
return broadcasted;
}
public void setBroadcasted(boolean broadcasted) {
this.broadcasted = broadcasted;
}
}

View File

@ -0,0 +1,80 @@
package id.iptek.utms.agent.model;
import java.io.Serializable;
import java.util.Objects;
/**
*
* @author jakar
*/
public class TerminalIdObj implements Serializable {
private String sn;
private String terminalId;
public TerminalIdObj() {
}
public TerminalIdObj(String sn, String terminalId) {
this.sn = sn;
this.terminalId = terminalId;
}
/**
* @return the sn
*/
public String getSn() {
return sn;
}
/**
* @param sn the sn to set
*/
public void setSn(String sn) {
this.sn = sn;
}
/**
* @return the terminalId
*/
public String getTerminalId() {
return terminalId;
}
/**
* @param terminalId the terminalId to set
*/
public void setTerminalId(String terminalId) {
this.terminalId = terminalId;
}
@Override
public int hashCode() {
int hash = 3;
return hash;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final TerminalIdObj other = (TerminalIdObj) obj;
if (!Objects.equals(this.sn, other.sn)) {
return false;
}
return Objects.equals(this.terminalId, other.terminalId);
}
@Override
public String toString() {
return "TerminalIdObj{" + "sn=" + sn + ", terminalId=" + terminalId + '}';
}
}

View File

@ -0,0 +1,32 @@
package id.iptek.utms.agent.model.enumeration;
/**
*
* @author jakar
*/
public enum DownloadTimeType {
NEXT_CONTACT(1),
DATE_TIME(2);
private final int value;
private DownloadTimeType(int value) {
this.value = value;
}
public int getValue() {
return value;
}
public static DownloadTimeType fromValue(int value) {
DownloadTimeType val = null;
for(DownloadTimeType _val : DownloadTimeType.values()) {
if(_val.getValue() == value) {
val = _val;
break;
}
}
return val;
}
}

View File

@ -0,0 +1,32 @@
package id.iptek.utms.agent.model.enumeration;
/**
*
* @author jakar
*/
public enum InstallationNotificationType {
SILENT(1),
NEED_CONFIRMATION(2);
private final int value;
private InstallationNotificationType(int value) {
this.value = value;
}
public int getValue() {
return value;
}
public static InstallationNotificationType fromValue(int value) {
InstallationNotificationType val = null;
for(InstallationNotificationType _val : InstallationNotificationType.values()) {
if(_val.getValue() == value) {
val = _val;
break;
}
}
return val;
}
}

View File

@ -0,0 +1,32 @@
package id.iptek.utms.agent.model.enumeration;
/**
*
* @author jakar
*/
public enum InstallationTimeType {
IMMEDIATE_AFTER_DOWNLOAD(1),
DATE_TIME(2);
private final int value;
private InstallationTimeType(int value) {
this.value = value;
}
public int getValue() {
return value;
}
public static InstallationTimeType fromValue(int value) {
InstallationTimeType val = null;
for(InstallationTimeType _val : InstallationTimeType.values()) {
if(_val.getValue() == value) {
val = _val;
break;
}
}
return val;
}
}

View File

@ -0,0 +1,32 @@
package id.iptek.utms.agent.model.enumeration;
/**
*
* @author jakar
*/
public enum PublishTimeType {
IMMEDIATE(1),
DATE_TIME(2);
private final int value;
private PublishTimeType(int value) {
this.value = value;
}
public int getValue() {
return value;
}
public static PublishTimeType fromValue(int value) {
PublishTimeType val = null;
for(PublishTimeType _val : PublishTimeType.values()) {
if(_val.getValue() == value) {
val = _val;
break;
}
}
return val;
}
}

View File

@ -0,0 +1,40 @@
package id.iptek.utms.agent.model.enumeration;
/**
*
* @author jakar
*/
public enum TaskActivity {
INITIAL(0),
PUBLISHED(1),
ACCEPTED(2),
DOWNLOAD_STARTED(3),
DOWNLOAD_SUCCESS(4),
DOWNLOAD_FAIL(5),
INSTALL_STARTED(6),
INSTALL_SUCCESS(7),
INSTALL_FAIL(8),
EXPIRED(99);
private final int value;
private TaskActivity(int value) {
this.value = value;
}
public int getValue() {
return value;
}
public static TaskActivity fromValue(int value) {
TaskActivity val = null;
for(TaskActivity _val : TaskActivity.values()) {
if(_val.getValue() == value) {
val = _val;
break;
}
}
return val;
}
}

View File

@ -0,0 +1,36 @@
package id.iptek.utms.agent.model.enumeration;
/**
*
* @author jakar
*/
public enum TaskStatus {
INITIAL(0),
NOT_STARTED(1),
IN_PROGRESS(2),
CANCELLED(3),
DONE(4),
EXPIRED(99);
private final int value;
private TaskStatus(int value) {
this.value = value;
}
public int getValue() {
return value;
}
public static TaskStatus fromValue(int value) {
TaskStatus val = null;
for(TaskStatus _val : TaskStatus.values()) {
if(_val.getValue() == value) {
val = _val;
break;
}
}
return val;
}
}