ing
This commit is contained in:
commit
952957d044
88
.gitignore
vendored
Normal file
88
.gitignore
vendored
Normal file
|
@ -0,0 +1,88 @@
|
|||
# Created by .ignore support plugin (hsz.mobi)
|
||||
### JetBrains template
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
# User-specific stuff:
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/dictionaries
|
||||
|
||||
# Sensitive or high-churn files:
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
.idea/**/dataSources.xml
|
||||
.idea/**/dataSources.local.xml
|
||||
.idea/**/sqlDataSources.xml
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
|
||||
# Gradle:
|
||||
.idea/**/gradle.xml
|
||||
.idea/**/libraries
|
||||
|
||||
# Mongo Explorer plugin:
|
||||
.idea/**/mongoSettings.xml
|
||||
|
||||
## File-based project format:
|
||||
*.iws
|
||||
|
||||
## Plugin-specific files:
|
||||
|
||||
# IntelliJ
|
||||
/out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
### Maven template
|
||||
|
||||
pom.xml.tag
|
||||
pom.xml.releaseBackup
|
||||
pom.xml.versionsBackup
|
||||
pom.xml.next
|
||||
release.properties
|
||||
dependency-reduced-pom.xml
|
||||
buildNumber.properties
|
||||
.mvn/timing.properties
|
||||
|
||||
# Avoid ignoring Maven wrapper jar file (.jar files are usually ignored)
|
||||
!/.mvn/wrapper/maven-wrapper.jar
|
||||
### Java template
|
||||
# Compiled class file
|
||||
*.class
|
||||
|
||||
# Log file
|
||||
*.log
|
||||
|
||||
# BlueJ files
|
||||
*.ctxt
|
||||
14
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.ear
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.rar
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
|
||||
.idea/
|
||||
*.iml
|
||||
/target/
|
||||
.settings/
|
||||
.classpath
|
||||
.project
|
27
.vscode/launch.json
vendored
Normal file
27
.vscode/launch.json
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
|
||||
{
|
||||
"type": "java",
|
||||
"name": "Debug",
|
||||
"request": "launch",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"console": "internalConsole",
|
||||
"stopOnEntry": false,
|
||||
"mainClass": "com.loafle.overflow.central.Central",
|
||||
"projectName": "central",
|
||||
"args": "50006"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "Debug (Attach)",
|
||||
"request": "attach",
|
||||
"hostName": "localhost",
|
||||
"port": 0
|
||||
}
|
||||
]
|
||||
}
|
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"java.configuration.updateBuildConfiguration": "automatic"
|
||||
}
|
57
pom.xml
Normal file
57
pom.xml
Normal file
|
@ -0,0 +1,57 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>com.loafle</groupId>
|
||||
<artifactId>maven_parent_jar</artifactId>
|
||||
<version>1.0.0-RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.loafle.overflow</groupId>
|
||||
<artifactId>commons-java</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<name>com.loafle.overflow.commons-java</name>
|
||||
|
||||
<properties>
|
||||
<gson.version>2.8.2</gson.version>
|
||||
<spring.version>4.3.9.RELEASE</spring.version>
|
||||
<spring-data-commons-core.version>1.4.1.RELEASE</spring-data-commons-core.version>
|
||||
<hibernate.version>5.2.10.Final</hibernate.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>${gson.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.springframework.data/spring-data-commons-core -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-commons-core</artifactId>
|
||||
<version>${spring-data-commons-core.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-entitymanager -->
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-entitymanager</artifactId>
|
||||
<version>${hibernate.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-core</artifactId>
|
||||
<version>${hibernate.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,78 @@
|
|||
package com.loafle.overflow.module.apikey.model;
|
||||
|
||||
import com.loafle.overflow.module.domain.model.Domain;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
@Entity
|
||||
@Table(name = "API_KEY", schema = "public")
|
||||
public class ApiKey {
|
||||
private long id;
|
||||
private String apiKey;
|
||||
private Date createDate;
|
||||
private Domain domain;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Column(name = "API_KEY", nullable = false, unique = true,length = 50)
|
||||
public String getApiKey() {
|
||||
return apiKey;
|
||||
}
|
||||
|
||||
public void setApiKey(String apiKey) {
|
||||
this.apiKey = apiKey;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name="CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "DOMAIN_ID", nullable=false)
|
||||
public Domain getDomain() {
|
||||
return domain;
|
||||
}
|
||||
|
||||
public void setDomain(Domain domain) {
|
||||
this.domain = domain;
|
||||
}
|
||||
//
|
||||
// @Override
|
||||
// public boolean equals(Object o) {
|
||||
// if (this == o) return true;
|
||||
// if (o == null || getClass() != o.getClass()) return false;
|
||||
//
|
||||
// TblApiKey tblApiKey = (TblApiKey) o;
|
||||
//
|
||||
// if (id != tblApiKey.id) return false;
|
||||
// if (domainId != tblApiKey.domainId) return false;
|
||||
// if (apiKey != null ? !apiKey.equals(tblApiKey.apiKey) : tblApiKey.apiKey != null) return false;
|
||||
// if (createDate != null ? !createDate.equals(tblApiKey.createDate) : tblApiKey.createDate != null) return false;
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public int hashCode() {
|
||||
// int result = (int) (id ^ (id >>> 32));
|
||||
// result = 31 * result + (apiKey != null ? apiKey.hashCode() : 0);
|
||||
// result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
|
||||
// result = 31 * result + (int) (domainId ^ (domainId >>> 32));
|
||||
// return result;
|
||||
// }
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.loafle.overflow.module.apikey.service;
|
||||
|
||||
/**
|
||||
* Created by geek on 17. 11. 7.
|
||||
*/
|
||||
public interface ApiKeyService {
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
package com.loafle.overflow.module.auth.model;
|
||||
|
||||
import com.loafle.overflow.module.meta.model.MetaCrawler;
|
||||
import com.loafle.overflow.module.target.model.Target;
|
||||
import org.hibernate.annotations.OnDelete;
|
||||
import org.hibernate.annotations.OnDeleteAction;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by geek on 17. 11. 7.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "AUTH_CRAWLER", schema = "public")
|
||||
public class AuthCrawler {
|
||||
private long id;
|
||||
private MetaCrawler crawler;
|
||||
private Target target;
|
||||
private String authJson;
|
||||
private Date createDate;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "CRAWLER_ID", nullable = false)
|
||||
public MetaCrawler getCrawler() {
|
||||
return crawler;
|
||||
}
|
||||
|
||||
public void setCrawler(MetaCrawler crawler) {
|
||||
this.crawler = crawler;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@OnDelete(action = OnDeleteAction.CASCADE)
|
||||
@JoinColumn(name = "TARGET_ID", nullable = false)
|
||||
public Target getTarget() {
|
||||
return target;
|
||||
}
|
||||
|
||||
public void setTarget(Target target) {
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
@Column(name = "AUTH_JSON", nullable = false)
|
||||
public String getAuthJson() {
|
||||
return authJson;
|
||||
}
|
||||
|
||||
public void setAuthJson(String authJson) {
|
||||
this.authJson = authJson;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.loafle.overflow.module.auth.service;
|
||||
|
||||
/**
|
||||
* Created by geek on 17. 11. 7.
|
||||
*/
|
||||
public interface AuthCrawlerService {
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package com.loafle.overflow.module.core.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Target({ElementType.METHOD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface ProbeAPI {
|
||||
}
|
108
src/main/java/com/loafle/overflow/module/core/model/Mail.java
Normal file
108
src/main/java/com/loafle/overflow/module/core/model/Mail.java
Normal file
|
@ -0,0 +1,108 @@
|
|||
package com.loafle.overflow.module.core.model;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by geek on 18. 1. 3.
|
||||
*/
|
||||
public class Mail {
|
||||
private String mailFrom;
|
||||
|
||||
private String mailTo;
|
||||
|
||||
private String mailCc;
|
||||
|
||||
private String mailBcc;
|
||||
|
||||
private String mailSubject;
|
||||
|
||||
private String mailContent;
|
||||
|
||||
private String contentType;
|
||||
|
||||
private List< Object > attachments;
|
||||
|
||||
private Map< String, Object > model;
|
||||
|
||||
public Mail() {
|
||||
contentType = "text/plain";
|
||||
}
|
||||
|
||||
public String getContentType() {
|
||||
return contentType;
|
||||
}
|
||||
|
||||
public void setContentType(String contentType) {
|
||||
this.contentType = contentType;
|
||||
}
|
||||
|
||||
public String getMailBcc() {
|
||||
return mailBcc;
|
||||
}
|
||||
|
||||
public void setMailBcc(String mailBcc) {
|
||||
this.mailBcc = mailBcc;
|
||||
}
|
||||
|
||||
public String getMailCc() {
|
||||
return mailCc;
|
||||
}
|
||||
|
||||
public void setMailCc(String mailCc) {
|
||||
this.mailCc = mailCc;
|
||||
}
|
||||
|
||||
public String getMailFrom() {
|
||||
return mailFrom;
|
||||
}
|
||||
|
||||
public void setMailFrom(String mailFrom) {
|
||||
this.mailFrom = mailFrom;
|
||||
}
|
||||
|
||||
public String getMailSubject() {
|
||||
return mailSubject;
|
||||
}
|
||||
|
||||
public void setMailSubject(String mailSubject) {
|
||||
this.mailSubject = mailSubject;
|
||||
}
|
||||
|
||||
public String getMailTo() {
|
||||
return mailTo;
|
||||
}
|
||||
|
||||
public void setMailTo(String mailTo) {
|
||||
this.mailTo = mailTo;
|
||||
}
|
||||
|
||||
public Date getMailSendDate() {
|
||||
return new Date();
|
||||
}
|
||||
|
||||
public String getMailContent() {
|
||||
return mailContent;
|
||||
}
|
||||
|
||||
public void setMailContent(String mailContent) {
|
||||
this.mailContent = mailContent;
|
||||
}
|
||||
|
||||
public List< Object > getAttachments() {
|
||||
return attachments;
|
||||
}
|
||||
|
||||
public void setAttachments(List < Object > attachments) {
|
||||
this.attachments = attachments;
|
||||
}
|
||||
|
||||
public Map< String, Object > getModel() {
|
||||
return model;
|
||||
}
|
||||
|
||||
public void setModel(Map < String, Object > model) {
|
||||
this.model = model;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package com.loafle.overflow.module.core.model;
|
||||
|
||||
/**
|
||||
* Created by insanity on 17. 8. 25.
|
||||
*/
|
||||
public class PageParams {
|
||||
|
||||
private int pageNo;
|
||||
private int countPerPage;
|
||||
private String sortCol;
|
||||
private String sortDirection;
|
||||
|
||||
public int getPageNo() {
|
||||
return pageNo;
|
||||
}
|
||||
|
||||
public void setPageNo(int pageNo) {
|
||||
this.pageNo = pageNo;
|
||||
}
|
||||
|
||||
public int getCountPerPage() {
|
||||
return countPerPage;
|
||||
}
|
||||
|
||||
public void setCountPerPage(int countPerPage) {
|
||||
this.countPerPage = countPerPage;
|
||||
}
|
||||
|
||||
public String getSortCol() {
|
||||
return sortCol;
|
||||
}
|
||||
|
||||
public void setSortCol(String sortCol) {
|
||||
this.sortCol = sortCol;
|
||||
}
|
||||
|
||||
public String getSortDirection() {
|
||||
return sortDirection;
|
||||
}
|
||||
|
||||
public void setSortDirection(String sortDirection) {
|
||||
this.sortDirection = sortDirection;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,122 @@
|
|||
package com.loafle.overflow.module.core.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class PublishMessage {
|
||||
private TargetType targetType;
|
||||
private List<String> targets;
|
||||
private PublishMessageBody message;
|
||||
|
||||
public void setTargetType(TargetType targetType) {
|
||||
this.targetType = targetType;
|
||||
}
|
||||
|
||||
public TargetType getTargetType() {
|
||||
return this.targetType;
|
||||
}
|
||||
|
||||
public void setTargets(List<String> targets) {
|
||||
this.targets = targets;
|
||||
}
|
||||
|
||||
public void addTarget(String target) {
|
||||
if (null == targets) {
|
||||
targets = new ArrayList<>();
|
||||
}
|
||||
targets.add(target);
|
||||
}
|
||||
|
||||
public List<String> getTargets() {
|
||||
return targets;
|
||||
}
|
||||
|
||||
public void setMessage(PublishMessageBody message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public PublishMessageBody getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public static enum TargetType {
|
||||
MEMBER_SESSION("MEMBER_SESSION"),
|
||||
MEMBER("MEMBER"),
|
||||
PROBE("PROBE");
|
||||
|
||||
final private String name;
|
||||
|
||||
private TargetType(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
public static class PublishMessageBody {
|
||||
private String jsonrpc = "2.0";
|
||||
private PublishMessageBodyNotification result;
|
||||
|
||||
public PublishMessageBody() {
|
||||
this.result = new PublishMessageBodyNotification();
|
||||
|
||||
}
|
||||
|
||||
public PublishMessageBody(String method) {
|
||||
this();
|
||||
this.result.setMethod(method);
|
||||
}
|
||||
|
||||
public PublishMessageBody(String method, List<String> params) {
|
||||
this(method);
|
||||
this.result.setParams(params);
|
||||
}
|
||||
|
||||
public String getJsonrpc() {
|
||||
return jsonrpc;
|
||||
}
|
||||
|
||||
public void setJsonrpc(String jsonrpc) {
|
||||
this.jsonrpc = jsonrpc;
|
||||
}
|
||||
|
||||
public PublishMessageBodyNotification getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(PublishMessageBodyNotification result) {
|
||||
this.result = result;
|
||||
}
|
||||
}
|
||||
|
||||
public static class PublishMessageBodyNotification {
|
||||
private String method;
|
||||
private List<String> params;
|
||||
|
||||
public String getMethod() {
|
||||
return method;
|
||||
}
|
||||
|
||||
public void setMethod(String method) {
|
||||
this.method = method;
|
||||
}
|
||||
|
||||
public List<String> getParams() {
|
||||
return params;
|
||||
}
|
||||
|
||||
public void setParams(List<String> params) {
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
public void addParams(String param) {
|
||||
if (null == this.params) {
|
||||
this.params = new ArrayList<>();
|
||||
}
|
||||
this.params.add(param);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.loafle.overflow.module.core.type;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 6. 27.
|
||||
*/
|
||||
public enum CryptoType {
|
||||
TLS("TLS");
|
||||
|
||||
private String stringValue;
|
||||
CryptoType(String string) {stringValue = string;}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return stringValue;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.loafle.overflow.module.core.type;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 6. 27.
|
||||
*/
|
||||
public enum PortType {
|
||||
TCP("TCP"),
|
||||
UDP("UDP"),
|
||||
TLS("TLS");
|
||||
|
||||
private String stringValue;
|
||||
PortType(String string) {stringValue = string;}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return stringValue;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.loafle.overflow.module.discovery.model;
|
||||
|
||||
/**
|
||||
* DiscoveryHost
|
||||
*/
|
||||
public class DiscoverHost {
|
||||
public String firstScanRange;
|
||||
public String lastScanRange;
|
||||
public String[] excludeHosts;
|
||||
public String[] includeHosts;
|
||||
|
||||
public DiscoverPort discoverPort;
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.loafle.overflow.module.discovery.model;
|
||||
|
||||
/**
|
||||
* DiscoveryPort
|
||||
*/
|
||||
public class DiscoverPort {
|
||||
public int firstScanRange;
|
||||
public int lastScanRange;
|
||||
public int[] excludePorts;
|
||||
|
||||
public boolean includeTCP;
|
||||
public boolean includeUDP;
|
||||
|
||||
public DiscoverService discoverService;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package com.loafle.overflow.module.discovery.model;
|
||||
|
||||
/**
|
||||
* DiscoveryService
|
||||
*/
|
||||
public class DiscoverService {
|
||||
public String[] includeServices;
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package com.loafle.overflow.module.discovery.model;
|
||||
|
||||
/**
|
||||
* DiscoveryZone
|
||||
*/
|
||||
public class DiscoverZone {
|
||||
public String[] excludePatterns;
|
||||
public DiscoverHost discoverHost;
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package com.loafle.overflow.module.discovery.model;
|
||||
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 4.
|
||||
*/
|
||||
|
||||
public class Host {
|
||||
public long id;
|
||||
public String ip;
|
||||
public String mac;
|
||||
public String os;
|
||||
|
||||
public Date discoveredDate;
|
||||
|
||||
public Zone zone;
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.loafle.overflow.module.discovery.model;
|
||||
|
||||
import com.loafle.overflow.module.core.type.PortType;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 4.
|
||||
*/
|
||||
|
||||
public class Port {
|
||||
public long id;
|
||||
public PortType portType;
|
||||
public int portNumber;
|
||||
|
||||
public Date discoveredDate;
|
||||
|
||||
public Host host;
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package com.loafle.overflow.module.discovery.model;
|
||||
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.loafle.overflow.module.core.type.CryptoType;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 4.
|
||||
*/
|
||||
|
||||
public class Service {
|
||||
public long id;
|
||||
public CryptoType cryptoType;
|
||||
public String serviceName;
|
||||
|
||||
public Date discoveredDate;
|
||||
|
||||
public Port port;
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.loafle.overflow.module.discovery.model;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 10. 31.
|
||||
*/
|
||||
public class Zone {
|
||||
public long id;
|
||||
public String network;
|
||||
public String ip;
|
||||
public String iface;
|
||||
public String mac;
|
||||
|
||||
public Date discoveredDate;
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package com.loafle.overflow.module.discovery.service;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.loafle.overflow.module.core.annotation.ProbeAPI;
|
||||
import com.loafle.overflow.module.discovery.model.DiscoverHost;
|
||||
import com.loafle.overflow.module.discovery.model.DiscoverPort;
|
||||
import com.loafle.overflow.module.discovery.model.DiscoverService;
|
||||
import com.loafle.overflow.module.discovery.model.DiscoverZone;
|
||||
import com.loafle.overflow.module.discovery.model.Host;
|
||||
import com.loafle.overflow.module.discovery.model.Port;
|
||||
import com.loafle.overflow.module.discovery.model.Service;
|
||||
import com.loafle.overflow.module.discovery.model.Zone;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 9. 28.
|
||||
*/
|
||||
public interface DiscoveryService {
|
||||
void discoverZone(String probeID, DiscoverZone discoverZone);
|
||||
void discoverHost(String probeID, Zone zone, DiscoverHost discoverHost);
|
||||
void discoverPort(String probeID, Host host, DiscoverPort discoverPort);
|
||||
void discoverService(String probeID, Port port, DiscoverService discoverService);
|
||||
|
||||
@ProbeAPI
|
||||
void discoverStart(String requesterSessionID, Date startDate);
|
||||
@ProbeAPI
|
||||
void discoverStop(String requesterSessionID, Date stopDate);
|
||||
@ProbeAPI
|
||||
void discoveredZone(String requesterSessionID, Zone zone);
|
||||
@ProbeAPI
|
||||
void discoveredHost(String requesterSessionID, Host host);
|
||||
@ProbeAPI
|
||||
void discoveredPort(String requesterSessionID, Port port);
|
||||
@ProbeAPI
|
||||
void discoveredService(String requesterSessionID, Service service);
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
package com.loafle.overflow.module.domain.model;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "DOMAIN", schema = "public")
|
||||
public class Domain {
|
||||
private long id;
|
||||
private String name;
|
||||
private Date createDate;
|
||||
|
||||
public Domain() {
|
||||
}
|
||||
public Domain(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "NAME", nullable = true, length = 50)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
package com.loafle.overflow.module.domain.model;
|
||||
|
||||
import com.loafle.overflow.module.member.model.Member;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.sql.Timestamp;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "DOMAIN_MEMBER", schema = "public")
|
||||
public class DomainMember {
|
||||
private long id;
|
||||
private Timestamp createDate;
|
||||
private Member member;
|
||||
private Domain domain;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Timestamp getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Timestamp createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "MEMBER_ID", nullable = false)
|
||||
public Member getMember() {
|
||||
return member;
|
||||
}
|
||||
|
||||
public void setMember(Member member) {
|
||||
this.member = member;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "DOMAIN_ID", nullable = false)
|
||||
public Domain getDomain() {
|
||||
return domain;
|
||||
}
|
||||
|
||||
public void setDomain(Domain domain) {
|
||||
this.domain = domain;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.loafle.overflow.module.domain.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.loafle.overflow.module.domain.model.Domain;
|
||||
import com.loafle.overflow.module.domain.model.DomainMember;
|
||||
import com.loafle.overflow.module.member.model.Member;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 6. 28.
|
||||
*/
|
||||
public interface DomainMemberService {
|
||||
void regist(DomainMember domainMember);
|
||||
Domain readDomainByMemberID(long id);
|
||||
DomainMember readByMemberEmail(String email);
|
||||
List<Member> readAllMemberByDomain(Domain domain);
|
||||
List<Member> readAllMemberByDomainID(final long domainID);
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
package com.loafle.overflow.module.domain.service;
|
||||
|
||||
import com.loafle.overflow.module.domain.model.Domain;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 6. 28.
|
||||
*/
|
||||
public interface DomainService {
|
||||
void regist(Domain domain);
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
package com.loafle.overflow.module.email.model;
|
||||
|
||||
import com.loafle.overflow.module.member.model.Member;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "EMAIL_AUTH", schema = "public")
|
||||
public class EmailAuth {
|
||||
private long id;
|
||||
private String emailAuthKey;
|
||||
private Date createDate;
|
||||
private Date authConfirmDate;
|
||||
private Member member;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "EMAIL_AUTH_KEY", nullable = true, length = 50)
|
||||
public String getEmailAuthKey() {
|
||||
return emailAuthKey;
|
||||
}
|
||||
|
||||
public void setEmailAuthKey(String emailAuthKey) {
|
||||
this.emailAuthKey = emailAuthKey;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "AUTH_CONFIRM_DATE", nullable = true, insertable = true, updatable = true)
|
||||
public Date getAuthConfirmDate() {
|
||||
return authConfirmDate;
|
||||
}
|
||||
|
||||
public void setAuthConfirmDate(Date authConfirmDate) {
|
||||
this.authConfirmDate = authConfirmDate;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "MEMBER_ID", nullable = false)
|
||||
public Member getMember() {
|
||||
return member;
|
||||
}
|
||||
|
||||
public void setMember(Member member) {
|
||||
this.member = member;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.loafle.overflow.module.email.service;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.List;
|
||||
|
||||
import com.loafle.overflow.module.email.model.EmailAuth;
|
||||
import com.loafle.overflow.module.member.model.Member;
|
||||
|
||||
/**
|
||||
* Created by geek on 17. 6. 28.
|
||||
*/
|
||||
public interface EmailAuthService {
|
||||
EmailAuth sendEmailByMember(long memberId, String memberEmail) throws UnsupportedEncodingException;
|
||||
EmailAuth read(long id);
|
||||
EmailAuth readByAuthKey(String authKey) throws UnsupportedEncodingException;
|
||||
List<EmailAuth> readByMember(long memberId);
|
||||
EmailAuth modify(EmailAuth emailAuth);
|
||||
EmailAuth sendEmailResetPassword(Member member) throws UnsupportedEncodingException;
|
||||
}
|
|
@ -0,0 +1,116 @@
|
|||
package com.loafle.overflow.module.history.model;
|
||||
|
||||
import com.loafle.overflow.module.domain.model.Domain;
|
||||
import com.loafle.overflow.module.member.model.Member;
|
||||
import com.loafle.overflow.module.meta.model.MetaHistoryType;
|
||||
import com.loafle.overflow.module.probe.model.Probe;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "HISTORY", schema = "public")
|
||||
public class History {
|
||||
private long id;
|
||||
private Date createDate;
|
||||
private MetaHistoryType type;
|
||||
private String message;
|
||||
private Probe probe;
|
||||
private Member member;
|
||||
private Domain domain;
|
||||
|
||||
//private MetaResultType resultType; // i'm not sure this is necessary
|
||||
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "TYPE_ID", nullable = false)
|
||||
public MetaHistoryType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(MetaHistoryType type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Column(name = "MESSAGE", nullable = false, length = 255)
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "PROBE_ID", nullable = false)
|
||||
public Probe getProbe() {
|
||||
return probe;
|
||||
}
|
||||
|
||||
public void setProbe(Probe probe) {
|
||||
this.probe = probe;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "MEMBER_ID", nullable = false)
|
||||
public Member getMember() {
|
||||
return member;
|
||||
}
|
||||
|
||||
public void setMember(Member member) {
|
||||
this.member = member;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "DOMAIN_ID", nullable = false)
|
||||
public Domain getDomain() {
|
||||
return domain;
|
||||
}
|
||||
|
||||
public void setDomain(Domain domain) {
|
||||
this.domain = domain;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
History that = (History) o;
|
||||
|
||||
if (id != that.id) return false;
|
||||
if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = (int) (id ^ (id >>> 32));
|
||||
result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.loafle.overflow.module.history.service;
|
||||
|
||||
import com.loafle.overflow.module.core.model.PageParams;
|
||||
import com.loafle.overflow.module.domain.model.Domain;
|
||||
import com.loafle.overflow.module.history.model.History;
|
||||
|
||||
import org.springframework.data.domain.Page;
|
||||
|
||||
public interface HistoryService {
|
||||
// History regist(History history);
|
||||
|
||||
// Page<History> readAllByProbeAndType(Probe probe, MetaHistoryType type, PageParams pageParams);
|
||||
|
||||
// Page<History> readAllByProbe(Probe probe, PageParams pageParams);
|
||||
|
||||
// Page<History> readAllByDomain(Domain domain, PageParams pageParams);
|
||||
|
||||
// Page<History> readAllByDomainAndType(Domain domain, MetaHistoryType type, PageParams pageParams);
|
||||
}
|
183
src/main/java/com/loafle/overflow/module/infra/model/Infra.java
Normal file
183
src/main/java/com/loafle/overflow/module/infra/model/Infra.java
Normal file
|
@ -0,0 +1,183 @@
|
|||
package com.loafle.overflow.module.infra.model;
|
||||
|
||||
|
||||
import com.loafle.overflow.module.meta.model.MetaInfraType;
|
||||
import com.loafle.overflow.module.probe.model.Probe;
|
||||
import com.loafle.overflow.module.target.model.Target;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity(name = "INFRA")
|
||||
@Table(name = "INFRA", schema = "public")
|
||||
@Inheritance(strategy = InheritanceType.JOINED)
|
||||
@DiscriminatorColumn(name = "INFRA_TYPE", discriminatorType = DiscriminatorType.INTEGER)
|
||||
public abstract class Infra {
|
||||
private long id;
|
||||
private MetaInfraType infraType;
|
||||
// private long childId;
|
||||
private Date createDate;
|
||||
private Probe probe;
|
||||
private Target target;
|
||||
|
||||
// private InfraChild infraChild;
|
||||
|
||||
// private InfraHost infraHost;
|
||||
// private InfraMachine infraMachine;
|
||||
// private InfraOS infraOS;
|
||||
|
||||
/*
|
||||
private long id;
|
||||
private MetaInfraType infraType;
|
||||
private long childId;
|
||||
private Date createDate;
|
||||
private Probe probeId;
|
||||
private Target targetId;
|
||||
*/
|
||||
// @ManyToOne
|
||||
// @JoinColumn(name = "CHILD_ID", nullable = false, insertable = false, updatable = false)
|
||||
// public InfraHost getInfraChild() {
|
||||
// return infraChild;
|
||||
// }
|
||||
//
|
||||
// public void setInfraChild(InfraChild infraChild) {
|
||||
// this.infraChild = infraChild;
|
||||
// }
|
||||
|
||||
// @OneToOne
|
||||
// @JoinColumn(name = "CHILD_ID")
|
||||
// public InfraChild getInfraChild() {
|
||||
// return infraChild;
|
||||
// }
|
||||
//
|
||||
// public void setInfraChild(InfraChild infraChild) {
|
||||
// this.infraChild = infraChild;
|
||||
// }
|
||||
|
||||
// @ManyToOne
|
||||
// @JoinColumn(name = "HOST_ID")
|
||||
// public InfraHost getInfraHost() {
|
||||
// return infraHost;
|
||||
// }
|
||||
//
|
||||
// public void setInfraHost(InfraHost infraHost) {
|
||||
// this.infraHost = infraHost;
|
||||
// }
|
||||
|
||||
// @ManyToOne
|
||||
// @JoinColumn(name = "MACHINE_ID")
|
||||
// public InfraMachine getInfraMachine() {
|
||||
// return infraMachine;
|
||||
// }
|
||||
//
|
||||
// public void setInfraMachine(InfraMachine infraMachine) {
|
||||
// this.infraMachine = infraMachine;
|
||||
// }
|
||||
//
|
||||
// @ManyToOne
|
||||
// @JoinColumn(name = "OS_ID")
|
||||
// public InfraOS getInfraOS() {
|
||||
// return infraOS;
|
||||
// }
|
||||
//
|
||||
// public void setInfraOS(InfraOS infraOS) {
|
||||
// this.infraOS = infraOS;
|
||||
// }
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "TYPE_ID", nullable = false)
|
||||
public MetaInfraType getInfraType() {
|
||||
return infraType;
|
||||
}
|
||||
|
||||
public void setInfraType(MetaInfraType infraType) {
|
||||
this.infraType = infraType;
|
||||
}
|
||||
|
||||
// @Basic
|
||||
// @Column(name = "CHILD_ID", nullable = false)
|
||||
// public long getChildId() {
|
||||
// return childId;
|
||||
// }
|
||||
//
|
||||
// public void setChildId(long childId) {
|
||||
// this.childId = childId;
|
||||
// }
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "PROBE_ID", nullable = true)
|
||||
public Probe getProbe() {
|
||||
return probe;
|
||||
}
|
||||
|
||||
public void setProbe(Probe probe) {
|
||||
this.probe = probe;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "TARGET_ID", nullable = true)
|
||||
public Target getTarget() {
|
||||
return target;
|
||||
}
|
||||
|
||||
public void setTarget(Target target) {
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
// public static Infra CreateInfraByType(long id, Class c) {
|
||||
//
|
||||
// Infra infra = new Infra();
|
||||
//// infra.setChildId(id);
|
||||
//
|
||||
// MetaInfraType infraType = new MetaInfraType();
|
||||
// if(c == InfraMachine.class) {
|
||||
// infraType.setId(1);
|
||||
// }
|
||||
// else if(c == InfraHost.class) {
|
||||
// infraType.setId(2);
|
||||
// }
|
||||
// else if(c == InfraOS.class) {
|
||||
// infraType.setId(3);
|
||||
// }
|
||||
// else if(c == InfraOSApplication.class) {
|
||||
// infraType.setId(4);
|
||||
// }
|
||||
// else if(c == InfraOSDaemon.class) {
|
||||
// infraType.setId(5);
|
||||
// }
|
||||
// else if(c == InfraOSPort.class) {
|
||||
// infraType.setId(6);
|
||||
// }
|
||||
// else if(c == InfraService.class) {
|
||||
// infraType.setId(7);
|
||||
// }
|
||||
//
|
||||
// infra.setInfraType(infraType);
|
||||
//
|
||||
// return infra;
|
||||
// }
|
||||
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
package com.loafle.overflow.module.infra.model;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity(name = "INFRA_HOST")
|
||||
@Table(name = "INFRA_HOST", schema = "public")
|
||||
@DiscriminatorValue("2")
|
||||
public class InfraHost extends Infra {
|
||||
// private long id;
|
||||
private InfraOS os;
|
||||
private long ip;
|
||||
private long mac;
|
||||
private Date createDate;
|
||||
|
||||
// @Id
|
||||
// @GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
// public long getId() {
|
||||
// return id;
|
||||
// }
|
||||
//
|
||||
// public void setId(long id) {
|
||||
// this.id = id;
|
||||
// }
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "OS_ID", nullable = true)
|
||||
public InfraOS getOs() {
|
||||
return os;
|
||||
}
|
||||
|
||||
public void setOs(InfraOS os) {
|
||||
this.os = os;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "IP", nullable = true)
|
||||
public long getIp() {
|
||||
return ip;
|
||||
}
|
||||
|
||||
public void setIp(long ip) {
|
||||
this.ip = ip;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "MAC", nullable = true)
|
||||
public long getMac() {
|
||||
return mac;
|
||||
}
|
||||
|
||||
public void setMac(long mac) {
|
||||
this.mac = mac;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = true, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
package com.loafle.overflow.module.infra.model;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity(name = "INFRA_MACHINE")
|
||||
@Table(name = "INFRA_MACHINE", schema = "public")
|
||||
@DiscriminatorValue("1")
|
||||
public class InfraMachine extends Infra {
|
||||
// private long id;
|
||||
|
||||
private String meta;
|
||||
private Date createDate;
|
||||
|
||||
/*
|
||||
private long id;
|
||||
private String meta;
|
||||
private Date createDate;
|
||||
*/
|
||||
|
||||
// @Id
|
||||
// @GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
// public long getId() {
|
||||
// return id;
|
||||
// }
|
||||
//
|
||||
// public void setId(long id) {
|
||||
// this.id = id;
|
||||
// }
|
||||
|
||||
@Basic
|
||||
@Column(name = "META", nullable = true, length = 255)
|
||||
public String getMeta() {
|
||||
return meta;
|
||||
}
|
||||
|
||||
public void setMeta(String meta) {
|
||||
this.meta = meta;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
package com.loafle.overflow.module.infra.model;
|
||||
|
||||
|
||||
import com.loafle.overflow.module.meta.model.MetaInfraVendor;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity(name = "INFRA_OS")
|
||||
@Table(name = "INFRA_OS", schema = "public")
|
||||
@DiscriminatorValue("3")
|
||||
public class InfraOS extends Infra {
|
||||
// private long id;
|
||||
private InfraMachine machine;
|
||||
private String meta;
|
||||
private Date createDate;
|
||||
private MetaInfraVendor vendor;
|
||||
|
||||
// @Id
|
||||
// @GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
// public long getId() {
|
||||
// return id;
|
||||
// }
|
||||
//
|
||||
// public void setId(long id) {
|
||||
// this.id = id;
|
||||
// }
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "MACHINE_ID", nullable = true)
|
||||
public InfraMachine getMachine() {
|
||||
return machine;
|
||||
}
|
||||
|
||||
public void setMachine(InfraMachine machine) {
|
||||
this.machine = machine;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "META", nullable = true, length = 255)
|
||||
public String getMeta() {
|
||||
return meta;
|
||||
}
|
||||
|
||||
public void setMeta(String meta) {
|
||||
this.meta = meta;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = true, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "VENDOR_ID", nullable = true)
|
||||
public MetaInfraVendor getVendor() {
|
||||
return vendor;
|
||||
}
|
||||
|
||||
public void setVendor(MetaInfraVendor vendor) {
|
||||
this.vendor = vendor;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
package com.loafle.overflow.module.infra.model;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity(name = "INFRA_OS_APPLICATION")
|
||||
@Table(name = "INFRA_OS_APPLICATION", schema = "public")
|
||||
@DiscriminatorValue("4")
|
||||
public class InfraOSApplication extends Infra {
|
||||
// private long id;
|
||||
private InfraOS os;
|
||||
private String name;
|
||||
private Date createDate;
|
||||
|
||||
// @Id
|
||||
// @GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
// public long getId() {
|
||||
// return id;
|
||||
// }
|
||||
//
|
||||
// public void setId(long id) {
|
||||
// this.id = id;
|
||||
// }
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "OS_ID", nullable = true)
|
||||
public InfraOS getOs() {
|
||||
return os;
|
||||
}
|
||||
|
||||
public void setOs(InfraOS os) {
|
||||
this.os = os;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "NAME", nullable = true, length = 50)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = true, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
package com.loafle.overflow.module.infra.model;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity(name = "INFRA_OS_DAEMON")
|
||||
@Table(name = "INFRA_OS_DAEMON", schema = "public")
|
||||
@DiscriminatorValue("5")
|
||||
public class InfraOSDaemon extends Infra {
|
||||
// private long id;
|
||||
private InfraOS os;
|
||||
private String name;
|
||||
private Date createDate;
|
||||
|
||||
// @Id
|
||||
// @GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
// public long getId() {
|
||||
// return id;
|
||||
// }
|
||||
//
|
||||
// public void setId(long id) {
|
||||
// this.id = id;
|
||||
// }
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "OS_ID", nullable = true)
|
||||
public InfraOS getOs() {
|
||||
return os;
|
||||
}
|
||||
|
||||
public void setOs(InfraOS os) {
|
||||
this.os = os;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "NAME", nullable = true, length = 50)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = true, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,94 @@
|
|||
package com.loafle.overflow.module.infra.model;
|
||||
|
||||
|
||||
import com.loafle.overflow.module.meta.model.MetaInfraVendor;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity(name = "INFRA_OS_PORT")
|
||||
@Table(name = "INFRA_OS_PORT", schema = "public")
|
||||
@DiscriminatorValue("6")
|
||||
public class InfraOSPort extends Infra {
|
||||
// private long id;
|
||||
private InfraOS os;
|
||||
private Date createDate;
|
||||
private Integer port;
|
||||
private String portType;
|
||||
private MetaInfraVendor vendor;
|
||||
private boolean tlsType;
|
||||
//
|
||||
// @Id
|
||||
// @GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
// public long getId() {
|
||||
// return id;
|
||||
// }
|
||||
//
|
||||
// public void setId(long id) {
|
||||
// this.id = id;
|
||||
// }
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "OS_ID", nullable = true)
|
||||
public InfraOS getOs() {
|
||||
return this.os;
|
||||
}
|
||||
|
||||
public void setOs(InfraOS os) {
|
||||
this.os = os;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = true, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "PORT", nullable = true)
|
||||
public Integer getPort() {
|
||||
return port;
|
||||
}
|
||||
|
||||
public void setPort(Integer port) {
|
||||
this.port = port;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "PORT_TYPE", nullable = true)
|
||||
public String getPortType() {
|
||||
return portType;
|
||||
}
|
||||
|
||||
public void setPortType(String portType) {
|
||||
this.portType = portType;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "VENDOR_ID", nullable = true)
|
||||
public MetaInfraVendor getVendor() {
|
||||
return vendor;
|
||||
}
|
||||
|
||||
public void setVendor(MetaInfraVendor vendor) {
|
||||
this.vendor = vendor;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "TLS_TYPE", nullable = true)
|
||||
public boolean isTlsType() {
|
||||
return tlsType;
|
||||
}
|
||||
|
||||
public void setTlsType(boolean tlsType) {
|
||||
this.tlsType = tlsType;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,93 @@
|
|||
package com.loafle.overflow.module.infra.model;
|
||||
|
||||
|
||||
import com.loafle.overflow.module.meta.model.MetaInfraVendor;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity(name = "INFRA_SERVICE")
|
||||
@Table(name = "INFRA_SERVICE", schema = "public")
|
||||
@DiscriminatorValue("7")
|
||||
public class InfraService extends Infra{
|
||||
// private long id;
|
||||
private InfraHost host;
|
||||
private String portType;
|
||||
private Integer port;
|
||||
private MetaInfraVendor vendor;
|
||||
private Date createDate;
|
||||
private boolean tlsType;
|
||||
|
||||
// @Id
|
||||
// @GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
// public long getId() {
|
||||
// return id;
|
||||
// }
|
||||
//
|
||||
// public void setId(long id) {
|
||||
// this.id = id;
|
||||
// }
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "HOST_ID", nullable = true)
|
||||
public InfraHost getHost() {
|
||||
return host;
|
||||
}
|
||||
|
||||
public void setHost(InfraHost host) {
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "PORT_TYPE", nullable = true)
|
||||
public String getPortType() {
|
||||
return portType;
|
||||
}
|
||||
|
||||
public void setPortType(String portType) {
|
||||
this.portType = portType;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "PORT", nullable = true)
|
||||
public Integer getPort() {
|
||||
return port;
|
||||
}
|
||||
|
||||
public void setPort(Integer port) {
|
||||
this.port = port;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "VENDOR_ID", nullable = true)
|
||||
public MetaInfraVendor getVendor() {
|
||||
return vendor;
|
||||
}
|
||||
|
||||
public void setVendor(MetaInfraVendor vendor) {
|
||||
this.vendor = vendor;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = true, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "TLS_TYPE", nullable = true)
|
||||
public boolean isTlsType() {
|
||||
return tlsType;
|
||||
}
|
||||
|
||||
public void setTlsType(boolean tlsType) {
|
||||
this.tlsType = tlsType;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.loafle.overflow.module.infra.service;
|
||||
|
||||
import com.loafle.overflow.module.infra.model.InfraHost;
|
||||
|
||||
/**
|
||||
* Created by insanity on 17. 6. 28.
|
||||
*/
|
||||
|
||||
public interface InfraHostService {
|
||||
InfraHost regist(InfraHost infraHost);
|
||||
InfraHost read(long id);
|
||||
InfraHost readByIp(long ip);
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package com.loafle.overflow.module.infra.service;
|
||||
|
||||
import com.loafle.overflow.module.infra.model.InfraMachine;
|
||||
|
||||
/**
|
||||
* Created by insanity on 17. 6. 28.
|
||||
*/
|
||||
public interface InfraMachineService {
|
||||
InfraMachine regist(InfraMachine infraMachine);
|
||||
InfraMachine read(long id);
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.loafle.overflow.module.infra.service;
|
||||
|
||||
import com.loafle.overflow.module.infra.model.InfraOSApplication;
|
||||
|
||||
/**
|
||||
* Created by insanity on 17. 6. 28.
|
||||
*/
|
||||
|
||||
public interface InfraOSApplicationService {
|
||||
InfraOSApplication regist(InfraOSApplication infraOSApplication);
|
||||
InfraOSApplication read(long id);
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.loafle.overflow.module.infra.service;
|
||||
|
||||
import com.loafle.overflow.module.infra.model.InfraOSDaemon;
|
||||
|
||||
/**
|
||||
* Created by insanity on 17. 6. 28.
|
||||
*/
|
||||
|
||||
public interface InfraOSDaemonService {
|
||||
InfraOSDaemon regist(InfraOSDaemon infraOSDaemon);
|
||||
InfraOSDaemon read(long id);
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.loafle.overflow.module.infra.service;
|
||||
|
||||
import com.loafle.overflow.module.infra.model.InfraOSPort;
|
||||
|
||||
/**
|
||||
* Created by insanity on 17. 6. 28.
|
||||
*/
|
||||
|
||||
public interface InfraOSPortService {
|
||||
InfraOSPort regist(InfraOSPort infraOSPort);
|
||||
InfraOSPort read(long id);
|
||||
InfraOSPort readByPort(long osId, int portNumber, String portType);
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.loafle.overflow.module.infra.service;
|
||||
|
||||
import com.loafle.overflow.module.infra.model.InfraOS;
|
||||
|
||||
/**
|
||||
* Created by insanity on 17. 6. 28.
|
||||
*/
|
||||
|
||||
public interface InfraOSService {
|
||||
InfraOS regist(InfraOS infraOS);
|
||||
InfraOS read(long id);
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
package com.loafle.overflow.module.infra.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.loafle.overflow.module.core.model.PageParams;
|
||||
import com.loafle.overflow.module.domain.model.Domain;
|
||||
import com.loafle.overflow.module.infra.model.Infra;
|
||||
|
||||
import org.springframework.data.domain.Page;
|
||||
|
||||
/**
|
||||
* Created by insanity on 17. 6. 28.
|
||||
*/
|
||||
|
||||
public interface InfraService {
|
||||
// Infra regist(Infra infra);
|
||||
// Infra read(long id);
|
||||
// Page<Infra> readAllByProbe(Probe probe, PageParams pageParams);
|
||||
// Page<Infra> readAllByDomain(Domain domain, PageParams pageParams);
|
||||
// List<Target> readAllTargetByDomain(Domain domain);
|
||||
// List<Target> readAllTargetByProbeList(List<Probe> probeList);
|
||||
// Infra readByTarget(Target target);
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.loafle.overflow.module.infra.service;
|
||||
|
||||
/**
|
||||
* Created by insanity on 17. 6. 28.
|
||||
*/
|
||||
public interface InfraServiceService {
|
||||
}
|
|
@ -0,0 +1,112 @@
|
|||
package com.loafle.overflow.module.member.model;
|
||||
|
||||
import com.loafle.overflow.module.meta.model.MetaMemberStatus;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by geek on 17. 11. 7.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "MEMBER", schema = "public")
|
||||
public class Member {
|
||||
private long id;
|
||||
private String email;
|
||||
private transient String pw;
|
||||
private String name;
|
||||
private String phone;
|
||||
private String companyName;
|
||||
private Date createDate;
|
||||
private MetaMemberStatus status;
|
||||
|
||||
public Member() {
|
||||
}
|
||||
|
||||
public Member(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "EMAIL", nullable = false, length = 50)
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "PW", nullable = true, length = 64)
|
||||
public String getPw() {
|
||||
return pw;
|
||||
}
|
||||
|
||||
public void setPw(String pw) {
|
||||
this.pw = pw;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "NAME", nullable = true, length = 50)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "PHONE", nullable = true, length = 50)
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "COMPANY_NAME", nullable = true, length = 50)
|
||||
public String getCompanyName() {
|
||||
return companyName;
|
||||
}
|
||||
|
||||
public void setCompanyName(String companyName) {
|
||||
this.companyName = companyName;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "STATUS_ID", nullable = false)
|
||||
public MetaMemberStatus getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(MetaMemberStatus status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package com.loafle.overflow.module.member.service;
|
||||
|
||||
/**
|
||||
* Created by geek on 17. 11. 7.
|
||||
*/
|
||||
public interface MemberService {
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
package com.loafle.overflow.module.meta.model;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "META_CRAWLER", schema = "public")
|
||||
public class MetaCrawler {
|
||||
private short id;
|
||||
private Date createDate;
|
||||
private String name;
|
||||
private String description;
|
||||
|
||||
@Id
|
||||
public short getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(short id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name="CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
@Column(name = "NAME", nullable = true, length = 50)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Column(name = "DESCRIPTION", nullable = true, length = 100)
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,167 @@
|
|||
package com.loafle.overflow.module.meta.model;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "META_CRAWLER_INPUT_ITEM", schema = "public")
|
||||
public class MetaCrawlerInputItem {
|
||||
private int id;
|
||||
private MetaInputType inputType;
|
||||
private MetaCrawler crawler;
|
||||
private String description;
|
||||
private String name;
|
||||
private Date createDate;
|
||||
private boolean required;
|
||||
private String defaultValue;
|
||||
private String pattern;
|
||||
private String keyName;
|
||||
private String keyValue;
|
||||
|
||||
@Id
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "TYPE_ID", nullable = false)
|
||||
public MetaInputType getInputType() {
|
||||
return inputType;
|
||||
}
|
||||
|
||||
public void setInputType(MetaInputType inputType) {
|
||||
this.inputType = inputType;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "CRAWLER_ID", nullable = false)
|
||||
public MetaCrawler getCrawler() {
|
||||
return crawler;
|
||||
}
|
||||
|
||||
public void setCrawler(MetaCrawler crawler) {
|
||||
this.crawler = crawler;
|
||||
}
|
||||
|
||||
@Column(name = "DESCRIPTION", nullable = true, length = 50)
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@Column(name = "NAME", nullable = true, length = 50)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
@Column(name = "REQUIRED", nullable = false)
|
||||
public boolean isRequired() {
|
||||
return required;
|
||||
}
|
||||
|
||||
public void setRequired(boolean required) {
|
||||
this.required = required;
|
||||
}
|
||||
|
||||
@Column(name = "DEFAULT_VALUE", nullable = true, length = 50)
|
||||
public String getDefaultValue() {
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
public void setDefaultValue(String defaultValue) {
|
||||
this.defaultValue = defaultValue;
|
||||
}
|
||||
|
||||
|
||||
@Column(name = "PATTERN", nullable = true, length = 50)
|
||||
public String getPattern() {
|
||||
return pattern;
|
||||
}
|
||||
|
||||
public void setPattern(String pattern) {
|
||||
this.pattern = pattern;
|
||||
}
|
||||
|
||||
|
||||
@Column(name = "KEY_NAME", nullable = true, length = 50)
|
||||
public String getKeyName() {
|
||||
return keyName;
|
||||
}
|
||||
|
||||
public void setKeyName(String keyName) {
|
||||
this.keyName = keyName;
|
||||
}
|
||||
|
||||
|
||||
@Column(name = "KEY_VALUE", nullable = true, length = 50)
|
||||
public String getKeyValue() {
|
||||
return keyValue;
|
||||
}
|
||||
|
||||
public void setKeyValue(String keyValue) {
|
||||
this.keyValue = keyValue;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public boolean equals(Object o) {
|
||||
// if (this == o) return true;
|
||||
// if (o == null || getClass() != o.getClass()) return false;
|
||||
//
|
||||
// MetaCrawlerInputItem that = (MetaCrawlerInputItem) o;
|
||||
//
|
||||
// if (id != that.id) return false;
|
||||
// if (typeId != that.typeId) return false;
|
||||
// if (crawlerId != that.crawlerId) return false;
|
||||
// if (required != that.required) return false;
|
||||
// if (desc != null ? !desc.equals(that.desc) : that.desc != null) return false;
|
||||
// if (name != null ? !name.equals(that.name) : that.name != null) return false;
|
||||
// if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
|
||||
// if (defaultValue != null ? !defaultValue.equals(that.defaultValue) : that.defaultValue != null) return false;
|
||||
// if (pattern != null ? !pattern.equals(that.pattern) : that.pattern != null) return false;
|
||||
// if (keyName != null ? !keyName.equals(that.keyName) : that.keyName != null) return false;
|
||||
// if (keyValue != null ? !keyValue.equals(that.keyValue) : that.keyValue != null) return false;
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public int hashCode() {
|
||||
// int result = id;
|
||||
// result = 31 * result + (int) typeId;
|
||||
// result = 31 * result + (int) crawlerId;
|
||||
// result = 31 * result + (desc != null ? desc.hashCode() : 0);
|
||||
// result = 31 * result + (name != null ? name.hashCode() : 0);
|
||||
// result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
|
||||
// result = 31 * result + (required ? 1 : 0);
|
||||
// result = 31 * result + (defaultValue != null ? defaultValue.hashCode() : 0);
|
||||
// result = 31 * result + (pattern != null ? pattern.hashCode() : 0);
|
||||
// result = 31 * result + (keyName != null ? keyName.hashCode() : 0);
|
||||
// result = 31 * result + (keyValue != null ? keyValue.hashCode() : 0);
|
||||
// return result;
|
||||
// }
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
package com.loafle.overflow.module.meta.model;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "META_HISTORY_TYPE", schema = "public")
|
||||
public class MetaHistoryType {
|
||||
private int id;
|
||||
private String name;
|
||||
private Date createDate;
|
||||
|
||||
public MetaHistoryType() {
|
||||
|
||||
}
|
||||
|
||||
public MetaHistoryType(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Id
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
@Column(name = "NAME", nullable = true, length = 50)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name="CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.loafle.overflow.module.meta.model;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "META_INFRA_TYPE", schema = "public")
|
||||
public class MetaInfraType {
|
||||
private int id;
|
||||
private String name;
|
||||
private Date createDate;
|
||||
|
||||
@Id
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
@Column(name = "NAME", nullable = true, length = 50)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,106 @@
|
|||
package com.loafle.overflow.module.meta.model;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "META_INFRA_VENDOR", schema = "public")
|
||||
public class MetaInfraVendor {
|
||||
private int id;
|
||||
private String name;
|
||||
private Date createDate;
|
||||
private MetaInfraType infraType;
|
||||
|
||||
@Id
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
@Column(name = "NAME", nullable = true, length = 50)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "TYPE_ID", nullable=false)
|
||||
public MetaInfraType getInfraType() {
|
||||
return infraType;
|
||||
}
|
||||
|
||||
public void setInfraType(MetaInfraType infraType) {
|
||||
this.infraType = infraType;
|
||||
}
|
||||
|
||||
|
||||
public static MetaInfraVendor CreateInfraVendorByOS(String osName) {
|
||||
|
||||
MetaInfraVendor vendor = new MetaInfraVendor();
|
||||
|
||||
if(osName == null || osName.length() <= 0) {
|
||||
vendor.setId(28); // FIXME: Unknown
|
||||
return vendor;
|
||||
}
|
||||
|
||||
if(osName.equals("Windows")) {
|
||||
vendor.setId(26);
|
||||
}
|
||||
else if(osName.equals("Linux")) {
|
||||
vendor.setId(28); // ubuntu
|
||||
} else {
|
||||
vendor.setId(28); // FIXME: Unknown
|
||||
}
|
||||
|
||||
return vendor;
|
||||
}
|
||||
|
||||
public static MetaInfraVendor CreateInfraVendorByPort(int portNumber) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static MetaInfraVendor CreateInfraVendorByService(String serviceName) {
|
||||
|
||||
MetaInfraVendor vendor = new MetaInfraVendor();
|
||||
|
||||
if(serviceName.equals("mysql")) {
|
||||
vendor.setId(39);
|
||||
}
|
||||
else if(serviceName.equals("portgresql")) {
|
||||
vendor.setId(39);
|
||||
}
|
||||
else if(serviceName.equals("wmi")) {
|
||||
vendor.setId(39);
|
||||
}
|
||||
else if(serviceName.equals("snmpv2")) {
|
||||
vendor.setId(39);
|
||||
}
|
||||
else {
|
||||
vendor.setId(43); // unknown
|
||||
}
|
||||
|
||||
|
||||
return vendor;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
package com.loafle.overflow.module.meta.model;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "META_INPUT_TYPE", schema = "public")
|
||||
public class MetaInputType {
|
||||
private short id;
|
||||
private String name;
|
||||
private String description;
|
||||
private Date createDate;
|
||||
|
||||
@Id
|
||||
public short getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(short id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
@Column(name = "NAME", nullable = true, length = 50)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@Column(name = "DESCRIPTION", nullable = true, length = 50)
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package com.loafle.overflow.module.meta.model;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "META_MEMBER_STATUS", schema = "public")
|
||||
public class MetaMemberStatus {
|
||||
private short id;
|
||||
private String name;
|
||||
|
||||
public MetaMemberStatus() {
|
||||
|
||||
}
|
||||
|
||||
public MetaMemberStatus(short id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Id
|
||||
public short getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(short id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
@Column(name = "Name", nullable = false, length = 10)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package com.loafle.overflow.module.meta.model;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 6. 26.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "META_NOAUTH_PROBE_STATUS", schema = "public")
|
||||
public class MetaNoAuthProbeStatus {
|
||||
private short id;
|
||||
private String name;
|
||||
|
||||
public MetaNoAuthProbeStatus() {
|
||||
|
||||
}
|
||||
|
||||
public MetaNoAuthProbeStatus(short id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Id
|
||||
public short getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(short id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
@Column(name = "Name", nullable = false, length = 10)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
package com.loafle.overflow.module.meta.model;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "META_NOTIFICATION", schema = "public")
|
||||
public class MetaNotification {
|
||||
private long id;
|
||||
private Date createDate;
|
||||
private String name;
|
||||
private String description;
|
||||
|
||||
@Id
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
|
||||
@Column(name = "NAME", nullable = true, length = 50)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Column(name = "DESCRIPTION", nullable = true, length = 50)
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.loafle.overflow.module.meta.model;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "META_PROBE_ARCHITECTURE", schema = "public")
|
||||
public class MetaProbeArchitecture {
|
||||
private short id;
|
||||
private String architecture;
|
||||
private Date createDate;
|
||||
|
||||
@Id
|
||||
public short getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(short id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
@Column(name = "ARCHITECTURE", nullable = true, length = 10)
|
||||
public String getArchitecture() {
|
||||
return architecture;
|
||||
}
|
||||
|
||||
public void setArchitecture(String architecture) {
|
||||
this.architecture = architecture;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.loafle.overflow.module.meta.model;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "META_PROBE_OS", schema = "public")
|
||||
public class MetaProbeOs {
|
||||
private short id;
|
||||
private String name;
|
||||
private Date createDate;
|
||||
|
||||
@Id
|
||||
public short getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(short id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
@Column(name = "NAME", nullable = true, length = 50)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
package com.loafle.overflow.module.meta.model;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "META_PROBE_PACKAGE", schema = "public")
|
||||
public class MetaProbePackage {
|
||||
private long id;
|
||||
private MetaProbeVersion version;
|
||||
private MetaProbeOs os;
|
||||
private MetaProbeArchitecture architecture;
|
||||
private Date createDate;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "VERSION_ID", nullable = false)
|
||||
public MetaProbeVersion getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(MetaProbeVersion version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "OS_ID", nullable = false)
|
||||
public MetaProbeOs getOs() {
|
||||
return os;
|
||||
}
|
||||
|
||||
public void setOs(MetaProbeOs os) {
|
||||
this.os = os;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "ARCHITECTURE_ID", nullable = false)
|
||||
public MetaProbeArchitecture getArchitecture() {
|
||||
return architecture;
|
||||
}
|
||||
|
||||
public void setArchitecture(MetaProbeArchitecture architecture) {
|
||||
this.architecture = architecture;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package com.loafle.overflow.module.meta.model;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 6. 26.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "META_PROBE_STATUS", schema = "public")
|
||||
public class MetaProbeStatus {
|
||||
private short id;
|
||||
private String name;
|
||||
|
||||
public MetaProbeStatus() {
|
||||
|
||||
}
|
||||
|
||||
public MetaProbeStatus(short id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Id
|
||||
public short getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(short id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
@Column(name = "Name", nullable = false, length = 10)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
package com.loafle.overflow.module.meta.model;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "META_PROBE_TASK_TYPE", schema = "public")
|
||||
public class MetaProbeTaskType {
|
||||
private short id;
|
||||
private String name;
|
||||
private String description;
|
||||
private Date createDate;
|
||||
|
||||
@Id
|
||||
public short getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(short id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
@Column(name = "NAME", nullable = false, length = 50)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Column(name = "DESCRIPTION", nullable = false, length = 50)
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
package com.loafle.overflow.module.meta.model;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "META_PROBE_VERSION", schema = "public")
|
||||
public class MetaProbeVersion {
|
||||
private short id;
|
||||
private String version;
|
||||
private Date createDate;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
public short getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(short id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
@Column(name = "VERSION", nullable = true, length = 10)
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
package com.loafle.overflow.module.meta.model;
|
||||
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by insanity on 17. 9. 20.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "META_SENSOR_DISPLAY_ITEM", schema = "public")
|
||||
public class MetaSensorDisplayItem {
|
||||
|
||||
private long id;
|
||||
private String name;
|
||||
private MetaCrawler crawler;
|
||||
private MetaSensorItemUnit unit;
|
||||
private Date createDate;
|
||||
private MetaSensorItemType itemType;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Column(name = "NAME", nullable = false, length = 50)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "CRAWLER_ID", nullable = false)
|
||||
public MetaCrawler getCrawler() {
|
||||
return crawler;
|
||||
}
|
||||
|
||||
public void setCrawler(MetaCrawler crawler) {
|
||||
this.crawler = crawler;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "UNIT_ID", nullable = true)
|
||||
public MetaSensorItemUnit getUnit() {
|
||||
return unit;
|
||||
}
|
||||
|
||||
public void setUnit(MetaSensorItemUnit unit) {
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name="CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "TYPE_ID", nullable = false)
|
||||
public MetaSensorItemType getItemType() {
|
||||
return itemType;
|
||||
}
|
||||
|
||||
public void setItemType(MetaSensorItemType itemType) {
|
||||
this.itemType = itemType;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
package com.loafle.overflow.module.meta.model;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "META_SENSOR_ITEM", schema = "public")
|
||||
public class MetaSensorItem {
|
||||
private int id;
|
||||
private MetaSensorItemType itemType;
|
||||
private String key;
|
||||
private String name;
|
||||
private Date createDate;
|
||||
|
||||
@Id
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
// @Column(name = "TYPE_ID", nullable = false)
|
||||
// public short getTypeId() {
|
||||
// return typeId;
|
||||
// }
|
||||
//
|
||||
// public void setTypeId(short typeId) {
|
||||
// this.typeId = typeId;
|
||||
// }
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "TYPE_ID", nullable = false)
|
||||
public MetaSensorItemType getItemType() {
|
||||
return itemType;
|
||||
}
|
||||
|
||||
public void setItemType(MetaSensorItemType itemType) {
|
||||
this.itemType = itemType;
|
||||
}
|
||||
|
||||
@Column(name = "KEY", nullable = true, length = 100)
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
@Column(name = "NAME", nullable = true, length = 100)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
package com.loafle.overflow.module.meta.model;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 8. 29.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "META_SENSOR_ITEM_KEY", schema = "public")
|
||||
public class MetaSensorItemKey {
|
||||
private long id;
|
||||
private MetaSensorItem item;
|
||||
private String key;
|
||||
private String froms;
|
||||
private String option;
|
||||
private MetaCrawler crawler;
|
||||
private Date createDate;
|
||||
private MetaSensorItemUnit unit;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "ITEM_ID", nullable = false)
|
||||
public MetaSensorItem getItem() {
|
||||
return item;
|
||||
}
|
||||
|
||||
public void setItem(MetaSensorItem item) {
|
||||
this.item = item;
|
||||
}
|
||||
|
||||
@Column(name = "KEY", nullable = false, length = 100)
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
@Column(name = "FROMS", nullable = false, length = 100)
|
||||
public String getFroms() {
|
||||
return froms;
|
||||
}
|
||||
|
||||
public void setFroms(String froms) {
|
||||
this.froms = froms;
|
||||
}
|
||||
|
||||
@Column(name = "OPTION_JSON", nullable = true)
|
||||
public String getOption() {
|
||||
return option;
|
||||
}
|
||||
|
||||
public void setOption(String option) {
|
||||
this.option = option;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "CRAWLER_ID", nullable = false)
|
||||
public MetaCrawler getCrawler() {
|
||||
return crawler;
|
||||
}
|
||||
|
||||
public void setCrawler(MetaCrawler crawler) {
|
||||
this.crawler = crawler;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name="CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "UNIT_ID", nullable = true)
|
||||
public MetaSensorItemUnit getUnit() {
|
||||
return unit;
|
||||
}
|
||||
|
||||
public void setUnit(MetaSensorItemUnit unit) {
|
||||
this.unit = unit;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
package com.loafle.overflow.module.meta.model;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "META_SENSOR_ITEM_TYPE", schema = "public")
|
||||
public class MetaSensorItemType {
|
||||
private short id;
|
||||
private String name;
|
||||
private String description;
|
||||
private Date createDate;
|
||||
|
||||
public MetaSensorItemType() {
|
||||
}
|
||||
|
||||
public MetaSensorItemType(short id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Id
|
||||
public short getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(short id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
@Column(name = "NAME", nullable = true, length = 50)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@Column(name = "DESCRIPTION", nullable = true, length = 50)
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
package com.loafle.overflow.module.meta.model;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by insanity on 17. 9. 19.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "META_SENSOR_ITEM_UNIT", schema = "public")
|
||||
public class MetaSensorItemUnit {
|
||||
private short id;
|
||||
private String unit;
|
||||
private Date createDate;
|
||||
private String mark;
|
||||
|
||||
@Id
|
||||
public short getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(short id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Column(name = "UNIT", nullable = false)
|
||||
public String getUnit() {
|
||||
return unit;
|
||||
}
|
||||
|
||||
public void setUnit(String unit) {
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name="CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
@Column(name = "MARK", nullable = false)
|
||||
public String getMark() {
|
||||
return mark;
|
||||
}
|
||||
|
||||
public void setMark(String mark) {
|
||||
this.mark = mark;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package com.loafle.overflow.module.meta.model;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 6. 26.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "META_SENSOR_STATUS", schema = "public")
|
||||
public class MetaSensorStatus {
|
||||
private short id;
|
||||
private String name;
|
||||
|
||||
public MetaSensorStatus() {
|
||||
|
||||
}
|
||||
|
||||
public MetaSensorStatus(short id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Id
|
||||
public short getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(short id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
@Column(name = "Name", nullable = false, length = 10)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
package com.loafle.overflow.module.meta.model;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "META_VENDOR_CRAWLER", schema = "public")
|
||||
public class MetaVendorCrawler {
|
||||
private int id;
|
||||
private MetaCrawler crawler;
|
||||
private MetaInfraVendor infraVendor;
|
||||
private Date createDate;
|
||||
|
||||
@Id
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "CRAWLER_ID", nullable = false)
|
||||
public MetaCrawler getCrawler() {
|
||||
return crawler;
|
||||
}
|
||||
|
||||
public void setCrawler(MetaCrawler crawler) {
|
||||
this.crawler = crawler;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "VENDOR_ID", nullable = false)
|
||||
public MetaInfraVendor getInfraVendor() {
|
||||
return infraVendor;
|
||||
}
|
||||
|
||||
public void setInfraVendor(MetaInfraVendor infraVendor) {
|
||||
this.infraVendor = infraVendor;
|
||||
}
|
||||
|
||||
// @Basic
|
||||
// @Column(name = "CRAWLER_ID", nullable = false)
|
||||
// public short getCrawlerId() {
|
||||
// return crawlerId;
|
||||
// }
|
||||
//
|
||||
// public void setCrawlerId(short crawlerId) {
|
||||
// this.crawlerId = crawlerId;
|
||||
// }
|
||||
//
|
||||
// @Basic
|
||||
// @Column(name = "VENDOR_ID", nullable = false)
|
||||
// public int getVendorId() {
|
||||
// return vendorId;
|
||||
// }
|
||||
//
|
||||
// public void setVendorId(int vendorId) {
|
||||
// this.vendorId = vendorId;
|
||||
// }
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,91 @@
|
|||
package com.loafle.overflow.module.meta.model;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "META_VENDOR_CRAWLER_SENSOR_ITEM", schema = "public")
|
||||
public class MetaVendorCrawlerSensorItem {
|
||||
private long id;
|
||||
private String interval;
|
||||
private String warnCondition;
|
||||
private Date createDate;
|
||||
private MetaSensorItem sensorItem;
|
||||
private MetaInfraVendor vendor;
|
||||
private short crawlerId;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
@Column(name = "INTERVAL", nullable = true, length = 50)
|
||||
public String getInterval() {
|
||||
return interval;
|
||||
}
|
||||
|
||||
public void setInterval(String interval) {
|
||||
this.interval = interval;
|
||||
}
|
||||
|
||||
|
||||
@Column(name = "WARN_CONDITION", nullable = true, length = 50)
|
||||
public String getWarnCondition() {
|
||||
return warnCondition;
|
||||
}
|
||||
|
||||
public void setWarnCondition(String warnCondition) {
|
||||
this.warnCondition = warnCondition;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "ITEM_ID", nullable = false)
|
||||
public MetaSensorItem getSensorItem() {
|
||||
return sensorItem;
|
||||
}
|
||||
|
||||
public void setSensorItem(MetaSensorItem sensorItem) {
|
||||
this.sensorItem = sensorItem;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "VENDOR_ID", nullable = false)
|
||||
public MetaInfraVendor getVendor() {
|
||||
return vendor;
|
||||
}
|
||||
|
||||
public void setVendor(MetaInfraVendor vendor) {
|
||||
this.vendor = vendor;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "CRAWLER_ID", nullable = false)
|
||||
public short getCrawlerId() {
|
||||
return crawlerId;
|
||||
}
|
||||
|
||||
public void setCrawlerId(short crawlerId) {
|
||||
this.crawlerId = crawlerId;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
public interface MetaCrawlerInputItemService {
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
public interface MetaCrawlerService {
|
||||
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
public interface MetaHistoryTypeService {
|
||||
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
public interface MetaInfraTypeService {
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
public interface MetaInfraVendorService {
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
public interface MetaInputTypeService {
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
public interface MetaMemberStatusService {
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
public interface MetaNoAuthProbeStatusService {
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
public interface MetaProbeArchitectureService {
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
public interface MetaProbeOsService {
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
public interface MetaProbePackageService {
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
public interface MetaProbeStatusService {
|
||||
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
public interface MetaProbeTaskTypeService {
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
public interface MetaProbeVersionService {
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
/**
|
||||
* Created by insanity on 17. 9. 20.
|
||||
*/
|
||||
|
||||
public interface MetaSensorDisplayItemService {
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 8. 29.
|
||||
*/
|
||||
public interface MetaSensorItemKeyService {
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
public interface MetaSensorItemService {
|
||||
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
public interface MetaSensorItemTypeService {
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
/**
|
||||
* Created by insanity on 17. 9. 20.
|
||||
*/
|
||||
public interface MetaSensorItemUnitService {
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
public interface MetaSensorStatusService {
|
||||
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
public interface MetaVendorCrawlerSensorItemService {
|
||||
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
public interface MetaVendorCrawlerService {
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package com.loafle.overflow.module.meta.type;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 9. 8.
|
||||
*/
|
||||
public enum MetaCrawlerEnum {
|
||||
|
||||
ACTIVEDIRECTORY_CRAWLER((short)1),
|
||||
CASSANDRA_CRAWLER((short)2),
|
||||
DHCP_CRAWLER((short)3),
|
||||
DNS_CRAWLER((short)4),
|
||||
FTP_CRAWLER((short)5),
|
||||
HTTP_CRAWLER((short)6),
|
||||
IMAP_CRAWLER((short)7),
|
||||
LDAP_CRAWLER((short)8),
|
||||
MONGODB_CRAWLER((short)9),
|
||||
MSSQL_CRAWLER((short)10),
|
||||
MYSQL_CRAWLER((short)11),
|
||||
NETBIOS_CRAWLER((short)12),
|
||||
ORACLE_CRAWLER((short)13),
|
||||
POP_CRAWLER((short)14),
|
||||
POSTGRESQL_CRAWLER((short)15),
|
||||
REDIS_CRAWLER((short)16),
|
||||
JMX_CRAWLER((short)17),
|
||||
SMB_CRAWLER((short)18),
|
||||
SMTP_CRAWLER((short)19),
|
||||
SNMP_CRAWLER((short)20),
|
||||
SSH_CRAWLER((short)21),
|
||||
TELNET_CRAWLER((short)22),
|
||||
WMI_CRAWLER((short)23),
|
||||
UNKNOWN_CRAWLER((short)24);
|
||||
|
||||
|
||||
private short value;
|
||||
|
||||
private MetaCrawlerEnum(short value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public short getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,138 @@
|
|||
package com.loafle.overflow.module.noauthprobe.model;
|
||||
|
||||
|
||||
import com.loafle.overflow.module.domain.model.Domain;
|
||||
import com.loafle.overflow.module.meta.model.MetaNoAuthProbeStatus;
|
||||
import com.loafle.overflow.module.probe.model.Probe;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "NOAUTH_PROBE", schema = "public")
|
||||
public class NoAuthProbe {
|
||||
private long id;
|
||||
private String description;
|
||||
private MetaNoAuthProbeStatus status;
|
||||
private String tempProbeKey;
|
||||
private Date createDate;
|
||||
private String apiKey;
|
||||
private Domain domain;
|
||||
private Probe probe;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Column(name = "DESCRIPTION", nullable = true, length = 1000)
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "STATUS", nullable = false)
|
||||
public MetaNoAuthProbeStatus getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(MetaNoAuthProbeStatus status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
@Column(name = "TEMP_PROBE_KEY", nullable = false, length = 50, unique = true)
|
||||
public String getTempProbeKey() {
|
||||
return tempProbeKey;
|
||||
}
|
||||
|
||||
public void setTempProbeKey(String tempProbeKey) {
|
||||
this.tempProbeKey = tempProbeKey;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
@Column(name = "API_KEY", nullable = true, length = 50)
|
||||
public String getApiKey() {
|
||||
return apiKey;
|
||||
}
|
||||
|
||||
public void setApiKey(String apiKey) {
|
||||
this.apiKey = apiKey;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "DOMAIN_ID", nullable=false)
|
||||
public Domain getDomain() {
|
||||
return domain;
|
||||
}
|
||||
|
||||
public void setDomain(Domain domain) {
|
||||
this.domain = domain;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "PROBE_ID", nullable = true)
|
||||
public Probe getProbe() {
|
||||
return probe;
|
||||
}
|
||||
|
||||
public void setProbe(Probe probe) {
|
||||
this.probe = probe;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public boolean equals(Object o) {
|
||||
// if (this == o) return true;
|
||||
// if (o == null || getClass() != o.getClass()) return false;
|
||||
//
|
||||
// NoAuthProbe that = (NoAuthProbe) o;
|
||||
//
|
||||
// if (id != that.id) return false;
|
||||
// if (domainId != that.domainId) return false;
|
||||
// if (hostName != null ? !hostName.equals(that.hostName) : that.hostName != null) return false;
|
||||
// if (macAddress != null ? !macAddress.equals(that.macAddress) : that.macAddress != null) return false;
|
||||
// if (ipAddress != null ? !ipAddress.equals(that.ipAddress) : that.ipAddress != null) return false;
|
||||
// if (status != null ? !status.equals(that.status) : that.status != null) return false;
|
||||
// if (tempProbeKey != null ? !tempProbeKey.equals(that.tempProbeKey) : that.tempProbeKey != null) return false;
|
||||
// if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
|
||||
// if (apiKey != null ? !apiKey.equals(that.apiKey) : that.apiKey != null) return false;
|
||||
// if (probeId != null ? !probeId.equals(that.probeId) : that.probeId != null) return false;
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public int hashCode() {
|
||||
// int result = (int) (id ^ (id >>> 32));
|
||||
// result = 31 * result + (hostName != null ? hostName.hashCode() : 0);
|
||||
// result = 31 * result + (macAddress != null ? macAddress.hashCode() : 0);
|
||||
// result = 31 * result + (ipAddress != null ? ipAddress.hashCode() : 0);
|
||||
// result = 31 * result + (status != null ? status.hashCode() : 0);
|
||||
// result = 31 * result + (tempProbeKey != null ? tempProbeKey.hashCode() : 0);
|
||||
// result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
|
||||
// result = 31 * result + (apiKey != null ? apiKey.hashCode() : 0);
|
||||
// result = 31 * result + (int) (domainId ^ (domainId >>> 32));
|
||||
// result = 31 * result + (probeId != null ? probeId.hashCode() : 0);
|
||||
// return result;
|
||||
// }
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.loafle.overflow.module.noauthprobe.service;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 6. 28.
|
||||
*/
|
||||
public interface NoAuthProbeService {
|
||||
}
|
|
@ -0,0 +1,89 @@
|
|||
package com.loafle.overflow.module.notification.model;
|
||||
|
||||
import com.loafle.overflow.module.member.model.Member;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by insanity on 17. 8. 25.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "NOTIFICATION", schema = "public")
|
||||
public class Notification {
|
||||
private long id;
|
||||
private Date createDate;
|
||||
private String title;
|
||||
private String message;
|
||||
private Member member;
|
||||
private Date confirmDate;
|
||||
private String url;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
@Column(name = "TITLE", nullable = false, length = 50)
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
@Column(name = "MESSAGE", nullable = false, length = 255)
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "MEMBER_ID", nullable = false)
|
||||
public Member getMember() {
|
||||
return member;
|
||||
}
|
||||
|
||||
public void setMember(Member member) {
|
||||
this.member = member;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CONFIRM_DATE", nullable = true)
|
||||
public Date getConfirmDate() {
|
||||
return confirmDate;
|
||||
}
|
||||
|
||||
public void setConfirmDate(Date confirmDate) {
|
||||
this.confirmDate = confirmDate;
|
||||
}
|
||||
|
||||
|
||||
@Column(name = "URL", nullable = false, length = 255)
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.loafle.overflow.module.notification.service;
|
||||
|
||||
/**
|
||||
* Created by insanity on 17. 8. 25.
|
||||
*/
|
||||
public interface NotificationService {
|
||||
}
|
175
src/main/java/com/loafle/overflow/module/probe/model/Probe.java
Normal file
175
src/main/java/com/loafle/overflow/module/probe/model/Probe.java
Normal file
|
@ -0,0 +1,175 @@
|
|||
package com.loafle.overflow.module.probe.model;
|
||||
|
||||
import com.loafle.overflow.module.domain.model.Domain;
|
||||
import com.loafle.overflow.module.member.model.Member;
|
||||
import com.loafle.overflow.module.meta.model.MetaProbeStatus;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 22.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "PROBE", schema = "public")
|
||||
public class Probe {
|
||||
|
||||
private long id;
|
||||
private MetaProbeStatus status;
|
||||
private String description;
|
||||
private Date createDate;
|
||||
private Domain domain;
|
||||
private String probeKey;
|
||||
private String encryptionKey;
|
||||
private int targetCount;
|
||||
private int sensorCount;
|
||||
private String displayName;
|
||||
private String cidr;
|
||||
private Date authorizeDate;
|
||||
private Member authorizeMember;
|
||||
// private InfraHost host;
|
||||
|
||||
public Probe() {
|
||||
|
||||
}
|
||||
|
||||
public Probe(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "STATUS", nullable = false)
|
||||
public MetaProbeStatus getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(MetaProbeStatus status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
|
||||
@Column(name = "DESCRIPTION", nullable = true, length = 50)
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "DOMAIN_ID", nullable = false)
|
||||
public Domain getDomain() {
|
||||
return domain;
|
||||
}
|
||||
|
||||
public void setDomain(Domain domain) {
|
||||
this.domain = domain;
|
||||
}
|
||||
|
||||
|
||||
@Column(name = "PROBE_KEY", nullable = false, unique = true)
|
||||
public String getProbeKey() {
|
||||
return probeKey;
|
||||
}
|
||||
|
||||
public void setProbeKey(String probeKey) {
|
||||
this.probeKey = probeKey;
|
||||
}
|
||||
|
||||
|
||||
@Column(name = "ENCRYPTION_KEY", nullable = false, length = 100, unique = true)
|
||||
public String getEncryptionKey() {
|
||||
return encryptionKey;
|
||||
}
|
||||
|
||||
public void setEncryptionKey(String encryptionKey) {
|
||||
this.encryptionKey = encryptionKey;
|
||||
}
|
||||
|
||||
@Column(name = "TARGET_COUNT", nullable = false)
|
||||
public int getTargetCount() {
|
||||
return targetCount;
|
||||
}
|
||||
|
||||
public void setTargetCount(int targetCount) {
|
||||
this.targetCount = targetCount;
|
||||
}
|
||||
|
||||
@Column(name = "SENSOR_COUNT", nullable = false)
|
||||
public int getSensorCount() {
|
||||
return sensorCount;
|
||||
}
|
||||
|
||||
public void setSensorCount(int sensorCount) {
|
||||
this.sensorCount = sensorCount;
|
||||
}
|
||||
|
||||
@Column(name = "DISPLAY_NAME")
|
||||
public String getDisplayName() {
|
||||
return displayName;
|
||||
}
|
||||
|
||||
public void setDisplayName(String displayName) {
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
@Column(name = "CIDR")
|
||||
public String getCidr() {
|
||||
return cidr;
|
||||
}
|
||||
|
||||
public void setCidr(String cidr) {
|
||||
this.cidr = cidr;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "AUTHORIZE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getAuthorizeDate() {
|
||||
return authorizeDate;
|
||||
}
|
||||
|
||||
public void setAuthorizeDate(Date authorizeDate) {
|
||||
this.authorizeDate = authorizeDate;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "AUTHORIZE_MEMBER_ID", nullable = false)
|
||||
public Member getAuthorizeMember() {
|
||||
return authorizeMember;
|
||||
}
|
||||
|
||||
public void setAuthorizeMember(Member authorizeMember) {
|
||||
this.authorizeMember = authorizeMember;
|
||||
}
|
||||
//
|
||||
// @ManyToOne
|
||||
// @JoinColumn(name = "HOST_ID", nullable = false)
|
||||
// public InfraHost getHost() {
|
||||
// return host;
|
||||
// }
|
||||
//
|
||||
// public void setHost(InfraHost host) {
|
||||
// this.host = host;
|
||||
// }
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user