initial import

This commit is contained in:
2026-05-11 19:59:10 +07:00
commit 582353e277
479 changed files with 32418 additions and 0 deletions

View File

@ -0,0 +1,55 @@
package com.cmobile.unifiedtms.entity.misc;
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,26 @@
package com.cmobile.unifiedtms.entity.misc;
public class ExpirableObject<T> {
private long storageTime = -1L;
private long expiryTime = -1L;
private T object;
public ExpirableObject(T object, long expiryTime) {
this.object = object;
this.expiryTime = expiryTime;
this.storageTime = System.currentTimeMillis();
}
public T getObject() {
if(!isExpired()) {
return object;
}
return null;
}
public boolean isExpired() {
long current = System.currentTimeMillis();
return (current > (this.storageTime + this.expiryTime));
}
}

View File

@ -0,0 +1,36 @@
package com.cmobile.unifiedtms.entity.misc;
import java.io.Serializable;
public class FileDownloadWrapper implements Serializable {
private String downloadUrl;
private String checksum;
private boolean uploaded;
public FileDownloadWrapper() {}
public boolean isUploaded() {
return uploaded;
}
public void setUploaded(boolean uploaded) {
this.uploaded = uploaded;
}
public String getDownloadUrl() {
return downloadUrl;
}
public void setDownloadUrl(String downloadUrl) {
this.downloadUrl = downloadUrl;
}
public String getChecksum() {
return checksum;
}
public void setChecksum(String checksum) {
this.checksum = checksum;
}
}

View File

@ -0,0 +1,60 @@
package com.cmobile.unifiedtms.entity.misc;
import com.cmobile.unifiedtms.entity.Terminal;
import com.cmobile.unifiedtms.entity.TerminalLink;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
public class TerminalGroupImportObjectWrapper implements Serializable {
private String tid;
private String sn;
private Terminal terminal;
private boolean snFound;
private boolean tidFound;
public TerminalGroupImportObjectWrapper() {
}
public String getTid() {
return tid;
}
public void setTid(String tid) {
this.tid = tid;
}
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public Terminal getTerminal() {
return terminal;
}
public void setTerminal(Terminal terminal) {
this.terminal = terminal;
}
public boolean isSnFound() {
return snFound;
}
public void setSnFound(boolean snFound) {
this.snFound = snFound;
}
public boolean isTidFound() {
return tidFound;
}
public void setTidFound(boolean tidFound) {
this.tidFound = tidFound;
}
}

View File

@ -0,0 +1,30 @@
package com.cmobile.unifiedtms.entity.misc;
import com.cmobile.unifiedtms.entity.TerminalLink;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
public class TerminalImporterObjectWrapper implements Serializable {
private List<TerminalLink> terminalLinks;
public TerminalImporterObjectWrapper() {
}
public TerminalImporterObjectWrapper(List<TerminalLink> terminalLinks) {
this.terminalLinks = terminalLinks;
}
public List<TerminalLink> getTerminalLinks() {
if(terminalLinks == null) {
terminalLinks = new ArrayList<>();
}
return terminalLinks;
}
public void setTerminalLinks(List<TerminalLink> terminalLinks) {
this.terminalLinks = terminalLinks;
}
}

View File

@ -0,0 +1,61 @@
package com.cmobile.unifiedtms.entity.misc;
import java.io.Serializable;
import java.util.Date;
import java.util.concurrent.CountDownLatch;
public class TerminalUpdateCacheObj implements Serializable {
private String sn;
private CountDownLatch countDownLatch;
private String status; // started, ongoing, finished
private String lastStepName;
private Date createdTime;
private Date lastStepUpdateTime;
public TerminalUpdateCacheObj(String sn) {
this.sn = sn;
this.countDownLatch = new CountDownLatch(5);
this.status = "Started";
this.createdTime = new Date();
}
public String getSn() {
return sn;
}
public CountDownLatch getCountDownLatch() {
return countDownLatch;
}
public String getStatus() {
return status;
}
public void continueStep(String stepName) {
if(stepName != null && !stepName.equals(this.lastStepName)) {
this.lastStepName = stepName;
this.lastStepUpdateTime = new Date();
this.countDownLatch.countDown();
if(this.countDownLatch.getCount() == 0) {
this.considerDone();
}
}
}
public void considerDone() {
this.status = "Finished";
}
public String getLastStepName() {
return lastStepName;
}
public Date getCreatedTime() {
return createdTime;
}
public Date getLastStepUpdateTime() {
return lastStepUpdateTime;
}
}