Upload files to "src/cucky/jGuard/lib/object"
parent
7ada4c17b6
commit
3ff78b1db4
|
|
@ -0,0 +1,65 @@
|
|||
package cucky.jGuard.lib.object;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
public class OnlineClients implements Serializable{
|
||||
|
||||
public static final int PLATFORM_PC = 1;
|
||||
public static final int PLATFORM_MOBILE = 2;
|
||||
|
||||
private String id;
|
||||
private String username;
|
||||
private String ip;
|
||||
private String port;
|
||||
private int platform;
|
||||
|
||||
public OnlineClients(String id, String username, String ip, String port, int platform) {
|
||||
this.id = id;
|
||||
this.username = username;
|
||||
this.ip = ip;
|
||||
this.port = port;
|
||||
this.platform = platform;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getIp() {
|
||||
return ip;
|
||||
}
|
||||
|
||||
public void setIp(String ip) {
|
||||
this.ip = ip;
|
||||
}
|
||||
|
||||
public int getPlatform() {
|
||||
return platform;
|
||||
}
|
||||
|
||||
public void setPlatform(int platform) {
|
||||
this.platform = platform;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getPort() {
|
||||
return port;
|
||||
}
|
||||
|
||||
public void setPort(String port) {
|
||||
this.port = port;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
package cucky.jGuard.lib.object;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
||||
public class ServerSettings implements Serializable {
|
||||
|
||||
private ArrayList<SnmpProfile> snmp;
|
||||
private ArrayList<User> users;
|
||||
|
||||
|
||||
public ServerSettings(ArrayList<SnmpProfile> snmp, ArrayList<User> users) {
|
||||
this.snmp = snmp;
|
||||
this.users = users;
|
||||
}
|
||||
|
||||
public ArrayList<SnmpProfile> getSnmp() {
|
||||
return snmp;
|
||||
}
|
||||
|
||||
public void setSnmp(ArrayList<SnmpProfile> snmp) {
|
||||
this.snmp = snmp;
|
||||
}
|
||||
|
||||
public ArrayList<User> getUsers() {
|
||||
return users;
|
||||
}
|
||||
|
||||
public void setUsers(ArrayList<User> users) {
|
||||
this.users = users;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public User getCurrentUser(int id){
|
||||
for (User user : users) {
|
||||
if (id == user.getId()) {
|
||||
return user;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package cucky.jGuard.lib.object;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
public class SnmpProbe implements Serializable {
|
||||
|
||||
private int id;
|
||||
private String name;
|
||||
private String value;
|
||||
private String oid;
|
||||
private boolean view;
|
||||
|
||||
public SnmpProbe(int id, String name, String oid, boolean view) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.oid = oid;
|
||||
this.view = view;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getOid() {
|
||||
return oid;
|
||||
}
|
||||
|
||||
public void setOid(String oid) {
|
||||
this.oid = oid;
|
||||
}
|
||||
|
||||
public boolean isView() {
|
||||
return view;
|
||||
}
|
||||
|
||||
public void setView(boolean view) {
|
||||
this.view = view;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
package cucky.jGuard.lib.object;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
public class SnmpProfile implements Serializable {
|
||||
|
||||
private int id;
|
||||
private String name;
|
||||
private int version;
|
||||
private String port;
|
||||
private String community;
|
||||
|
||||
public SnmpProfile(int id, String name, int version, String port, String community) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.version = version;
|
||||
this.port = port;
|
||||
this.community = community;
|
||||
}
|
||||
|
||||
public SnmpProfile() {
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(int version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public String getPort() {
|
||||
return port;
|
||||
}
|
||||
|
||||
public void setPort(String port) {
|
||||
this.port = port;
|
||||
}
|
||||
|
||||
public String getCommunity() {
|
||||
return community;
|
||||
}
|
||||
|
||||
public void setCommunity(String community) {
|
||||
this.community = community;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
package cucky.jGuard.lib.object;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
public class User implements Serializable {
|
||||
|
||||
private int id;
|
||||
private String username;
|
||||
private boolean setServer;
|
||||
private boolean addMap;
|
||||
private boolean removeMap;
|
||||
private boolean addObject;
|
||||
private boolean removeObject;
|
||||
private boolean disableObject;
|
||||
|
||||
public User(int id, String username, boolean setServer, boolean addMap, boolean removeMap, boolean addObject, boolean removeObject, boolean disableObject) {
|
||||
this.id = id;
|
||||
this.username = username;
|
||||
this.setServer = setServer;
|
||||
this.addMap = addMap;
|
||||
this.removeMap = removeMap;
|
||||
this.addObject = addObject;
|
||||
this.removeObject = removeObject;
|
||||
this.disableObject = disableObject;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public boolean isSetServer() {
|
||||
return setServer;
|
||||
}
|
||||
|
||||
public void setSetServer(boolean setServer) {
|
||||
this.setServer = setServer;
|
||||
}
|
||||
|
||||
public boolean isAddMap() {
|
||||
return addMap;
|
||||
}
|
||||
|
||||
public void setAddMap(boolean addMap) {
|
||||
this.addMap = addMap;
|
||||
}
|
||||
|
||||
public boolean isRemoveMap() {
|
||||
return removeMap;
|
||||
}
|
||||
|
||||
public void setRemoveMap(boolean removeMap) {
|
||||
this.removeMap = removeMap;
|
||||
}
|
||||
|
||||
public boolean isAddObject() {
|
||||
return addObject;
|
||||
}
|
||||
|
||||
public void setAddObject(boolean addObject) {
|
||||
this.addObject = addObject;
|
||||
}
|
||||
|
||||
public boolean isRemoveObject() {
|
||||
return removeObject;
|
||||
}
|
||||
|
||||
public void setRemoveObject(boolean removeObject) {
|
||||
this.removeObject = removeObject;
|
||||
}
|
||||
|
||||
public boolean isDisableObject() {
|
||||
return disableObject;
|
||||
}
|
||||
|
||||
public void setDisableObject(boolean disableObject) {
|
||||
this.disableObject = disableObject;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue