From 952957d0441e8ccf1b4cff2578290de82cef89fa Mon Sep 17 00:00:00 2001 From: crusader Date: Sun, 22 Apr 2018 19:42:39 +0900 Subject: [PATCH] ing --- .gitignore | 88 +++++++++ .vscode/launch.json | 27 +++ .vscode/settings.json | 3 + pom.xml | 57 ++++++ .../overflow/module/apikey/model/ApiKey.java | 78 ++++++++ .../module/apikey/service/ApiKeyService.java | 7 + .../module/auth/model/AuthCrawler.java | 72 +++++++ .../auth/service/AuthCrawlerService.java | 7 + .../module/core/annotation/ProbeAPI.java | 11 ++ .../overflow/module/core/model/Mail.java | 108 +++++++++++ .../module/core/model/PageParams.java | 44 +++++ .../module/core/model/PublishMessage.java | 122 ++++++++++++ .../overflow/module/core/type/CryptoType.java | 16 ++ .../overflow/module/core/type/PortType.java | 18 ++ .../module/discovery/model/DiscoverHost.java | 13 ++ .../module/discovery/model/DiscoverPort.java | 15 ++ .../discovery/model/DiscoverService.java | 8 + .../module/discovery/model/DiscoverZone.java | 9 + .../overflow/module/discovery/model/Host.java | 20 ++ .../overflow/module/discovery/model/Port.java | 19 ++ .../module/discovery/model/Service.java | 20 ++ .../overflow/module/discovery/model/Zone.java | 16 ++ .../discovery/service/DiscoveryService.java | 36 ++++ .../overflow/module/domain/model/Domain.java | 52 +++++ .../module/domain/model/DomainMember.java | 59 ++++++ .../domain/service/DomainMemberService.java | 18 ++ .../module/domain/service/DomainService.java | 10 + .../module/email/model/EmailAuth.java | 69 +++++++ .../email/service/EmailAuthService.java | 19 ++ .../module/history/model/History.java | 116 +++++++++++ .../history/service/HistoryService.java | 19 ++ .../overflow/module/infra/model/Infra.java | 183 ++++++++++++++++++ .../module/infra/model/InfraHost.java | 69 +++++++ .../module/infra/model/InfraMachine.java | 55 ++++++ .../overflow/module/infra/model/InfraOS.java | 72 +++++++ .../infra/model/InfraOSApplication.java | 58 ++++++ .../module/infra/model/InfraOSDaemon.java | 57 ++++++ .../module/infra/model/InfraOSPort.java | 94 +++++++++ .../module/infra/model/InfraService.java | 93 +++++++++ .../infra/service/InfraHostService.java | 13 ++ .../infra/service/InfraMachineService.java | 11 ++ .../service/InfraOSApplicationService.java | 12 ++ .../infra/service/InfraOSDaemonService.java | 12 ++ .../infra/service/InfraOSPortService.java | 13 ++ .../module/infra/service/InfraOSService.java | 12 ++ .../module/infra/service/InfraService.java | 23 +++ .../infra/service/InfraServiceService.java | 7 + .../overflow/module/member/model/Member.java | 112 +++++++++++ .../module/member/service/MemberService.java | 7 + .../module/meta/model/MetaCrawler.java | 55 ++++++ .../meta/model/MetaCrawlerInputItem.java | 167 ++++++++++++++++ .../module/meta/model/MetaHistoryType.java | 53 +++++ .../module/meta/model/MetaInfraType.java | 45 +++++ .../module/meta/model/MetaInfraVendor.java | 106 ++++++++++ .../module/meta/model/MetaInputType.java | 55 ++++++ .../module/meta/model/MetaMemberStatus.java | 44 +++++ .../meta/model/MetaNoAuthProbeStatus.java | 43 ++++ .../module/meta/model/MetaNotification.java | 54 ++++++ .../meta/model/MetaProbeArchitecture.java | 45 +++++ .../module/meta/model/MetaProbeOs.java | 45 +++++ .../module/meta/model/MetaProbePackage.java | 68 +++++++ .../module/meta/model/MetaProbeStatus.java | 43 ++++ .../module/meta/model/MetaProbeTaskType.java | 56 ++++++ .../module/meta/model/MetaProbeVersion.java | 46 +++++ .../meta/model/MetaSensorDisplayItem.java | 80 ++++++++ .../module/meta/model/MetaSensorItem.java | 74 +++++++ .../module/meta/model/MetaSensorItemKey.java | 97 ++++++++++ .../module/meta/model/MetaSensorItemType.java | 63 ++++++ .../module/meta/model/MetaSensorItemUnit.java | 53 +++++ .../module/meta/model/MetaSensorStatus.java | 43 ++++ .../module/meta/model/MetaVendorCrawler.java | 76 ++++++++ .../model/MetaVendorCrawlerSensorItem.java | 91 +++++++++ .../service/MetaCrawlerInputItemService.java | 7 + .../meta/service/MetaCrawlerService.java | 8 + .../meta/service/MetaHistoryTypeService.java | 9 + .../meta/service/MetaInfraTypeService.java | 7 + .../meta/service/MetaInfraVendorService.java | 7 + .../meta/service/MetaInputTypeService.java | 7 + .../meta/service/MetaMemberStatusService.java | 7 + .../service/MetaNoAuthProbeStatusService.java | 7 + .../service/MetaProbeArchitectureService.java | 7 + .../meta/service/MetaProbeOsService.java | 7 + .../meta/service/MetaProbePackageService.java | 7 + .../meta/service/MetaProbeStatusService.java | 8 + .../service/MetaProbeTaskTypeService.java | 7 + .../meta/service/MetaProbeVersionService.java | 7 + .../service/MetaSensorDisplayItemService.java | 8 + .../service/MetaSensorItemKeyService.java | 7 + .../meta/service/MetaSensorItemService.java | 8 + .../service/MetaSensorItemTypeService.java | 7 + .../service/MetaSensorItemUnitService.java | 7 + .../meta/service/MetaSensorStatusService.java | 8 + .../MetaVendorCrawlerSensorItemService.java | 8 + .../service/MetaVendorCrawlerService.java | 7 + .../module/meta/type/MetaCrawlerEnum.java | 44 +++++ .../module/noauthprobe/model/NoAuthProbe.java | 138 +++++++++++++ .../service/NoAuthProbeService.java | 7 + .../notification/model/Notification.java | 89 +++++++++ .../service/NotificationService.java | 7 + .../overflow/module/probe/model/Probe.java | 175 +++++++++++++++++ .../module/probe/model/ProbeHost.java | 48 +++++ .../module/probe/model/ProbeTask.java | 143 ++++++++++++++ .../probe/service/ProbeHostService.java | 7 + .../module/probe/service/ProbeService.java | 7 + .../probe/service/ProbeTaskService.java | 7 + .../overflow/module/sensor/model/Sensor.java | 95 +++++++++ .../module/sensor/model/SensorItem.java | 62 ++++++ .../sensor/model/SensorItemDependency.java | 48 +++++ .../service/SensorItemDependencyService.java | 8 + .../sensor/service/SensorItemService.java | 7 + .../module/sensor/service/SensorService.java | 7 + .../overflow/module/target/model/Target.java | 85 ++++++++ .../service/TargetDiscoveryService.java | 7 + .../module/target/service/TargetService.java | 7 + .../module/websocket/model/UiWebsocket.java | 35 ++++ src/main/resources/_ | 0 src/test/resources/logback.xml | 17 ++ 117 files changed, 4793 insertions(+) create mode 100644 .gitignore create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json create mode 100644 pom.xml create mode 100644 src/main/java/com/loafle/overflow/module/apikey/model/ApiKey.java create mode 100644 src/main/java/com/loafle/overflow/module/apikey/service/ApiKeyService.java create mode 100644 src/main/java/com/loafle/overflow/module/auth/model/AuthCrawler.java create mode 100644 src/main/java/com/loafle/overflow/module/auth/service/AuthCrawlerService.java create mode 100644 src/main/java/com/loafle/overflow/module/core/annotation/ProbeAPI.java create mode 100644 src/main/java/com/loafle/overflow/module/core/model/Mail.java create mode 100644 src/main/java/com/loafle/overflow/module/core/model/PageParams.java create mode 100644 src/main/java/com/loafle/overflow/module/core/model/PublishMessage.java create mode 100644 src/main/java/com/loafle/overflow/module/core/type/CryptoType.java create mode 100644 src/main/java/com/loafle/overflow/module/core/type/PortType.java create mode 100644 src/main/java/com/loafle/overflow/module/discovery/model/DiscoverHost.java create mode 100644 src/main/java/com/loafle/overflow/module/discovery/model/DiscoverPort.java create mode 100644 src/main/java/com/loafle/overflow/module/discovery/model/DiscoverService.java create mode 100644 src/main/java/com/loafle/overflow/module/discovery/model/DiscoverZone.java create mode 100644 src/main/java/com/loafle/overflow/module/discovery/model/Host.java create mode 100644 src/main/java/com/loafle/overflow/module/discovery/model/Port.java create mode 100644 src/main/java/com/loafle/overflow/module/discovery/model/Service.java create mode 100644 src/main/java/com/loafle/overflow/module/discovery/model/Zone.java create mode 100644 src/main/java/com/loafle/overflow/module/discovery/service/DiscoveryService.java create mode 100644 src/main/java/com/loafle/overflow/module/domain/model/Domain.java create mode 100644 src/main/java/com/loafle/overflow/module/domain/model/DomainMember.java create mode 100644 src/main/java/com/loafle/overflow/module/domain/service/DomainMemberService.java create mode 100644 src/main/java/com/loafle/overflow/module/domain/service/DomainService.java create mode 100644 src/main/java/com/loafle/overflow/module/email/model/EmailAuth.java create mode 100644 src/main/java/com/loafle/overflow/module/email/service/EmailAuthService.java create mode 100644 src/main/java/com/loafle/overflow/module/history/model/History.java create mode 100644 src/main/java/com/loafle/overflow/module/history/service/HistoryService.java create mode 100644 src/main/java/com/loafle/overflow/module/infra/model/Infra.java create mode 100644 src/main/java/com/loafle/overflow/module/infra/model/InfraHost.java create mode 100644 src/main/java/com/loafle/overflow/module/infra/model/InfraMachine.java create mode 100644 src/main/java/com/loafle/overflow/module/infra/model/InfraOS.java create mode 100644 src/main/java/com/loafle/overflow/module/infra/model/InfraOSApplication.java create mode 100644 src/main/java/com/loafle/overflow/module/infra/model/InfraOSDaemon.java create mode 100644 src/main/java/com/loafle/overflow/module/infra/model/InfraOSPort.java create mode 100644 src/main/java/com/loafle/overflow/module/infra/model/InfraService.java create mode 100644 src/main/java/com/loafle/overflow/module/infra/service/InfraHostService.java create mode 100644 src/main/java/com/loafle/overflow/module/infra/service/InfraMachineService.java create mode 100644 src/main/java/com/loafle/overflow/module/infra/service/InfraOSApplicationService.java create mode 100644 src/main/java/com/loafle/overflow/module/infra/service/InfraOSDaemonService.java create mode 100644 src/main/java/com/loafle/overflow/module/infra/service/InfraOSPortService.java create mode 100644 src/main/java/com/loafle/overflow/module/infra/service/InfraOSService.java create mode 100644 src/main/java/com/loafle/overflow/module/infra/service/InfraService.java create mode 100644 src/main/java/com/loafle/overflow/module/infra/service/InfraServiceService.java create mode 100644 src/main/java/com/loafle/overflow/module/member/model/Member.java create mode 100644 src/main/java/com/loafle/overflow/module/member/service/MemberService.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/model/MetaCrawler.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/model/MetaCrawlerInputItem.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/model/MetaHistoryType.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/model/MetaInfraType.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/model/MetaInfraVendor.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/model/MetaInputType.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/model/MetaMemberStatus.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/model/MetaNoAuthProbeStatus.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/model/MetaNotification.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/model/MetaProbeArchitecture.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/model/MetaProbeOs.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/model/MetaProbePackage.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/model/MetaProbeStatus.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/model/MetaProbeTaskType.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/model/MetaProbeVersion.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/model/MetaSensorDisplayItem.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/model/MetaSensorItem.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/model/MetaSensorItemKey.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/model/MetaSensorItemType.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/model/MetaSensorItemUnit.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/model/MetaSensorStatus.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/model/MetaVendorCrawler.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/model/MetaVendorCrawlerSensorItem.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/service/MetaCrawlerInputItemService.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/service/MetaCrawlerService.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/service/MetaHistoryTypeService.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/service/MetaInfraTypeService.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/service/MetaInfraVendorService.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/service/MetaInputTypeService.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/service/MetaMemberStatusService.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/service/MetaNoAuthProbeStatusService.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/service/MetaProbeArchitectureService.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/service/MetaProbeOsService.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/service/MetaProbePackageService.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/service/MetaProbeStatusService.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/service/MetaProbeTaskTypeService.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/service/MetaProbeVersionService.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/service/MetaSensorDisplayItemService.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/service/MetaSensorItemKeyService.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/service/MetaSensorItemService.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/service/MetaSensorItemTypeService.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/service/MetaSensorItemUnitService.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/service/MetaSensorStatusService.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/service/MetaVendorCrawlerSensorItemService.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/service/MetaVendorCrawlerService.java create mode 100644 src/main/java/com/loafle/overflow/module/meta/type/MetaCrawlerEnum.java create mode 100644 src/main/java/com/loafle/overflow/module/noauthprobe/model/NoAuthProbe.java create mode 100644 src/main/java/com/loafle/overflow/module/noauthprobe/service/NoAuthProbeService.java create mode 100644 src/main/java/com/loafle/overflow/module/notification/model/Notification.java create mode 100644 src/main/java/com/loafle/overflow/module/notification/service/NotificationService.java create mode 100644 src/main/java/com/loafle/overflow/module/probe/model/Probe.java create mode 100644 src/main/java/com/loafle/overflow/module/probe/model/ProbeHost.java create mode 100644 src/main/java/com/loafle/overflow/module/probe/model/ProbeTask.java create mode 100644 src/main/java/com/loafle/overflow/module/probe/service/ProbeHostService.java create mode 100644 src/main/java/com/loafle/overflow/module/probe/service/ProbeService.java create mode 100644 src/main/java/com/loafle/overflow/module/probe/service/ProbeTaskService.java create mode 100644 src/main/java/com/loafle/overflow/module/sensor/model/Sensor.java create mode 100644 src/main/java/com/loafle/overflow/module/sensor/model/SensorItem.java create mode 100644 src/main/java/com/loafle/overflow/module/sensor/model/SensorItemDependency.java create mode 100644 src/main/java/com/loafle/overflow/module/sensor/service/SensorItemDependencyService.java create mode 100644 src/main/java/com/loafle/overflow/module/sensor/service/SensorItemService.java create mode 100644 src/main/java/com/loafle/overflow/module/sensor/service/SensorService.java create mode 100644 src/main/java/com/loafle/overflow/module/target/model/Target.java create mode 100644 src/main/java/com/loafle/overflow/module/target/service/TargetDiscoveryService.java create mode 100644 src/main/java/com/loafle/overflow/module/target/service/TargetService.java create mode 100644 src/main/java/com/loafle/overflow/module/websocket/model/UiWebsocket.java create mode 100644 src/main/resources/_ create mode 100644 src/test/resources/logback.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..60af490 --- /dev/null +++ b/.gitignore @@ -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 diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..81d81a5 --- /dev/null +++ b/.vscode/launch.json @@ -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 + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..1133129 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "java.configuration.updateBuildConfiguration": "automatic" +} \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..741359d --- /dev/null +++ b/pom.xml @@ -0,0 +1,57 @@ + + + 4.0.0 + + + com.loafle + maven_parent_jar + 1.0.0-RELEASE + + + com.loafle.overflow + commons-java + jar + 1.0.0-SNAPSHOT + com.loafle.overflow.commons-java + + + 2.8.2 + 4.3.9.RELEASE + 1.4.1.RELEASE + 5.2.10.Final + + + + + com.google.code.gson + gson + ${gson.version} + + + + + org.springframework.data + spring-data-commons-core + ${spring-data-commons-core.version} + + + + + + org.hibernate + hibernate-entitymanager + ${hibernate.version} + + + + org.hibernate + hibernate-core + ${hibernate.version} + + + + + + \ No newline at end of file diff --git a/src/main/java/com/loafle/overflow/module/apikey/model/ApiKey.java b/src/main/java/com/loafle/overflow/module/apikey/model/ApiKey.java new file mode 100644 index 0000000..96fd58b --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/apikey/model/ApiKey.java @@ -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; +// } +} diff --git a/src/main/java/com/loafle/overflow/module/apikey/service/ApiKeyService.java b/src/main/java/com/loafle/overflow/module/apikey/service/ApiKeyService.java new file mode 100644 index 0000000..152f591 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/apikey/service/ApiKeyService.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.apikey.service; + +/** + * Created by geek on 17. 11. 7. + */ +public interface ApiKeyService { +} diff --git a/src/main/java/com/loafle/overflow/module/auth/model/AuthCrawler.java b/src/main/java/com/loafle/overflow/module/auth/model/AuthCrawler.java new file mode 100644 index 0000000..ef4802d --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/auth/model/AuthCrawler.java @@ -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; + } +} diff --git a/src/main/java/com/loafle/overflow/module/auth/service/AuthCrawlerService.java b/src/main/java/com/loafle/overflow/module/auth/service/AuthCrawlerService.java new file mode 100644 index 0000000..ad1edda --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/auth/service/AuthCrawlerService.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.auth.service; + +/** + * Created by geek on 17. 11. 7. + */ +public interface AuthCrawlerService { +} diff --git a/src/main/java/com/loafle/overflow/module/core/annotation/ProbeAPI.java b/src/main/java/com/loafle/overflow/module/core/annotation/ProbeAPI.java new file mode 100644 index 0000000..7708660 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/core/annotation/ProbeAPI.java @@ -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 { +} \ No newline at end of file diff --git a/src/main/java/com/loafle/overflow/module/core/model/Mail.java b/src/main/java/com/loafle/overflow/module/core/model/Mail.java new file mode 100644 index 0000000..c97b6a3 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/core/model/Mail.java @@ -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; + } +} diff --git a/src/main/java/com/loafle/overflow/module/core/model/PageParams.java b/src/main/java/com/loafle/overflow/module/core/model/PageParams.java new file mode 100644 index 0000000..eb24cc5 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/core/model/PageParams.java @@ -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; + } +} diff --git a/src/main/java/com/loafle/overflow/module/core/model/PublishMessage.java b/src/main/java/com/loafle/overflow/module/core/model/PublishMessage.java new file mode 100644 index 0000000..7070af3 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/core/model/PublishMessage.java @@ -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 targets; + private PublishMessageBody message; + + public void setTargetType(TargetType targetType) { + this.targetType = targetType; + } + + public TargetType getTargetType() { + return this.targetType; + } + + public void setTargets(List targets) { + this.targets = targets; + } + + public void addTarget(String target) { + if (null == targets) { + targets = new ArrayList<>(); + } + targets.add(target); + } + + public List 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 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 params; + + public String getMethod() { + return method; + } + + public void setMethod(String method) { + this.method = method; + } + + public List getParams() { + return params; + } + + public void setParams(List params) { + this.params = params; + } + + public void addParams(String param) { + if (null == this.params) { + this.params = new ArrayList<>(); + } + this.params.add(param); + } + + } +} diff --git a/src/main/java/com/loafle/overflow/module/core/type/CryptoType.java b/src/main/java/com/loafle/overflow/module/core/type/CryptoType.java new file mode 100644 index 0000000..89c9f11 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/core/type/CryptoType.java @@ -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; + } +} \ No newline at end of file diff --git a/src/main/java/com/loafle/overflow/module/core/type/PortType.java b/src/main/java/com/loafle/overflow/module/core/type/PortType.java new file mode 100644 index 0000000..4965ba9 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/core/type/PortType.java @@ -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; + } +} \ No newline at end of file diff --git a/src/main/java/com/loafle/overflow/module/discovery/model/DiscoverHost.java b/src/main/java/com/loafle/overflow/module/discovery/model/DiscoverHost.java new file mode 100644 index 0000000..b7edc32 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/discovery/model/DiscoverHost.java @@ -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; +} diff --git a/src/main/java/com/loafle/overflow/module/discovery/model/DiscoverPort.java b/src/main/java/com/loafle/overflow/module/discovery/model/DiscoverPort.java new file mode 100644 index 0000000..a7776d3 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/discovery/model/DiscoverPort.java @@ -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; +} \ No newline at end of file diff --git a/src/main/java/com/loafle/overflow/module/discovery/model/DiscoverService.java b/src/main/java/com/loafle/overflow/module/discovery/model/DiscoverService.java new file mode 100644 index 0000000..28565a7 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/discovery/model/DiscoverService.java @@ -0,0 +1,8 @@ +package com.loafle.overflow.module.discovery.model; + +/** + * DiscoveryService + */ +public class DiscoverService { + public String[] includeServices; +} \ No newline at end of file diff --git a/src/main/java/com/loafle/overflow/module/discovery/model/DiscoverZone.java b/src/main/java/com/loafle/overflow/module/discovery/model/DiscoverZone.java new file mode 100644 index 0000000..f3b47f0 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/discovery/model/DiscoverZone.java @@ -0,0 +1,9 @@ +package com.loafle.overflow.module.discovery.model; + +/** + * DiscoveryZone + */ +public class DiscoverZone { + public String[] excludePatterns; + public DiscoverHost discoverHost; +} \ No newline at end of file diff --git a/src/main/java/com/loafle/overflow/module/discovery/model/Host.java b/src/main/java/com/loafle/overflow/module/discovery/model/Host.java new file mode 100644 index 0000000..cee1290 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/discovery/model/Host.java @@ -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; + +} diff --git a/src/main/java/com/loafle/overflow/module/discovery/model/Port.java b/src/main/java/com/loafle/overflow/module/discovery/model/Port.java new file mode 100644 index 0000000..db714f8 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/discovery/model/Port.java @@ -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; +} diff --git a/src/main/java/com/loafle/overflow/module/discovery/model/Service.java b/src/main/java/com/loafle/overflow/module/discovery/model/Service.java new file mode 100644 index 0000000..6bb87ae --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/discovery/model/Service.java @@ -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; +} diff --git a/src/main/java/com/loafle/overflow/module/discovery/model/Zone.java b/src/main/java/com/loafle/overflow/module/discovery/model/Zone.java new file mode 100644 index 0000000..9448b62 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/discovery/model/Zone.java @@ -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; +} \ No newline at end of file diff --git a/src/main/java/com/loafle/overflow/module/discovery/service/DiscoveryService.java b/src/main/java/com/loafle/overflow/module/discovery/service/DiscoveryService.java new file mode 100644 index 0000000..32dd44d --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/discovery/service/DiscoveryService.java @@ -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); +} diff --git a/src/main/java/com/loafle/overflow/module/domain/model/Domain.java b/src/main/java/com/loafle/overflow/module/domain/model/Domain.java new file mode 100644 index 0000000..6bac704 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/domain/model/Domain.java @@ -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; + } + +} diff --git a/src/main/java/com/loafle/overflow/module/domain/model/DomainMember.java b/src/main/java/com/loafle/overflow/module/domain/model/DomainMember.java new file mode 100644 index 0000000..0f3d74f --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/domain/model/DomainMember.java @@ -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; + } +} diff --git a/src/main/java/com/loafle/overflow/module/domain/service/DomainMemberService.java b/src/main/java/com/loafle/overflow/module/domain/service/DomainMemberService.java new file mode 100644 index 0000000..0406cfd --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/domain/service/DomainMemberService.java @@ -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 readAllMemberByDomain(Domain domain); + List readAllMemberByDomainID(final long domainID); +} diff --git a/src/main/java/com/loafle/overflow/module/domain/service/DomainService.java b/src/main/java/com/loafle/overflow/module/domain/service/DomainService.java new file mode 100644 index 0000000..8d7d15a --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/domain/service/DomainService.java @@ -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); +} diff --git a/src/main/java/com/loafle/overflow/module/email/model/EmailAuth.java b/src/main/java/com/loafle/overflow/module/email/model/EmailAuth.java new file mode 100644 index 0000000..d782613 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/email/model/EmailAuth.java @@ -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; + } +} diff --git a/src/main/java/com/loafle/overflow/module/email/service/EmailAuthService.java b/src/main/java/com/loafle/overflow/module/email/service/EmailAuthService.java new file mode 100644 index 0000000..a5bb8e5 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/email/service/EmailAuthService.java @@ -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 readByMember(long memberId); + EmailAuth modify(EmailAuth emailAuth); + EmailAuth sendEmailResetPassword(Member member) throws UnsupportedEncodingException; +} diff --git a/src/main/java/com/loafle/overflow/module/history/model/History.java b/src/main/java/com/loafle/overflow/module/history/model/History.java new file mode 100644 index 0000000..3bd3408 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/history/model/History.java @@ -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; + } +} diff --git a/src/main/java/com/loafle/overflow/module/history/service/HistoryService.java b/src/main/java/com/loafle/overflow/module/history/service/HistoryService.java new file mode 100644 index 0000000..397238d --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/history/service/HistoryService.java @@ -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 readAllByProbeAndType(Probe probe, MetaHistoryType type, PageParams pageParams); + + // Page readAllByProbe(Probe probe, PageParams pageParams); + + // Page readAllByDomain(Domain domain, PageParams pageParams); + + // Page readAllByDomainAndType(Domain domain, MetaHistoryType type, PageParams pageParams); +} diff --git a/src/main/java/com/loafle/overflow/module/infra/model/Infra.java b/src/main/java/com/loafle/overflow/module/infra/model/Infra.java new file mode 100644 index 0000000..6ab1032 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/model/Infra.java @@ -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; +// } + +} diff --git a/src/main/java/com/loafle/overflow/module/infra/model/InfraHost.java b/src/main/java/com/loafle/overflow/module/infra/model/InfraHost.java new file mode 100644 index 0000000..3f1ae5b --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/model/InfraHost.java @@ -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; + } + +} diff --git a/src/main/java/com/loafle/overflow/module/infra/model/InfraMachine.java b/src/main/java/com/loafle/overflow/module/infra/model/InfraMachine.java new file mode 100644 index 0000000..3516fb4 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/model/InfraMachine.java @@ -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; + } + +} + diff --git a/src/main/java/com/loafle/overflow/module/infra/model/InfraOS.java b/src/main/java/com/loafle/overflow/module/infra/model/InfraOS.java new file mode 100644 index 0000000..c06086c --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/model/InfraOS.java @@ -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; + } + +} diff --git a/src/main/java/com/loafle/overflow/module/infra/model/InfraOSApplication.java b/src/main/java/com/loafle/overflow/module/infra/model/InfraOSApplication.java new file mode 100644 index 0000000..0790b23 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/model/InfraOSApplication.java @@ -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; + } + +} diff --git a/src/main/java/com/loafle/overflow/module/infra/model/InfraOSDaemon.java b/src/main/java/com/loafle/overflow/module/infra/model/InfraOSDaemon.java new file mode 100644 index 0000000..834c547 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/model/InfraOSDaemon.java @@ -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; + } +} diff --git a/src/main/java/com/loafle/overflow/module/infra/model/InfraOSPort.java b/src/main/java/com/loafle/overflow/module/infra/model/InfraOSPort.java new file mode 100644 index 0000000..c368dba --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/model/InfraOSPort.java @@ -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; + } + +} diff --git a/src/main/java/com/loafle/overflow/module/infra/model/InfraService.java b/src/main/java/com/loafle/overflow/module/infra/model/InfraService.java new file mode 100644 index 0000000..f1fce56 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/model/InfraService.java @@ -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; + } +} diff --git a/src/main/java/com/loafle/overflow/module/infra/service/InfraHostService.java b/src/main/java/com/loafle/overflow/module/infra/service/InfraHostService.java new file mode 100644 index 0000000..9f4299d --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/service/InfraHostService.java @@ -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); +} diff --git a/src/main/java/com/loafle/overflow/module/infra/service/InfraMachineService.java b/src/main/java/com/loafle/overflow/module/infra/service/InfraMachineService.java new file mode 100644 index 0000000..b88a573 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/service/InfraMachineService.java @@ -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); +} diff --git a/src/main/java/com/loafle/overflow/module/infra/service/InfraOSApplicationService.java b/src/main/java/com/loafle/overflow/module/infra/service/InfraOSApplicationService.java new file mode 100644 index 0000000..72dba78 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/service/InfraOSApplicationService.java @@ -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); +} diff --git a/src/main/java/com/loafle/overflow/module/infra/service/InfraOSDaemonService.java b/src/main/java/com/loafle/overflow/module/infra/service/InfraOSDaemonService.java new file mode 100644 index 0000000..678883b --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/service/InfraOSDaemonService.java @@ -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); +} diff --git a/src/main/java/com/loafle/overflow/module/infra/service/InfraOSPortService.java b/src/main/java/com/loafle/overflow/module/infra/service/InfraOSPortService.java new file mode 100644 index 0000000..7f08df0 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/service/InfraOSPortService.java @@ -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); +} diff --git a/src/main/java/com/loafle/overflow/module/infra/service/InfraOSService.java b/src/main/java/com/loafle/overflow/module/infra/service/InfraOSService.java new file mode 100644 index 0000000..35ed8e5 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/service/InfraOSService.java @@ -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); +} diff --git a/src/main/java/com/loafle/overflow/module/infra/service/InfraService.java b/src/main/java/com/loafle/overflow/module/infra/service/InfraService.java new file mode 100644 index 0000000..4ec817a --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/service/InfraService.java @@ -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 readAllByProbe(Probe probe, PageParams pageParams); + // Page readAllByDomain(Domain domain, PageParams pageParams); + // List readAllTargetByDomain(Domain domain); + // List readAllTargetByProbeList(List probeList); + // Infra readByTarget(Target target); +} diff --git a/src/main/java/com/loafle/overflow/module/infra/service/InfraServiceService.java b/src/main/java/com/loafle/overflow/module/infra/service/InfraServiceService.java new file mode 100644 index 0000000..e946a13 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/service/InfraServiceService.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.infra.service; + +/** + * Created by insanity on 17. 6. 28. + */ +public interface InfraServiceService { +} diff --git a/src/main/java/com/loafle/overflow/module/member/model/Member.java b/src/main/java/com/loafle/overflow/module/member/model/Member.java new file mode 100644 index 0000000..0e9dd9d --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/member/model/Member.java @@ -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; + } + + +} + diff --git a/src/main/java/com/loafle/overflow/module/member/service/MemberService.java b/src/main/java/com/loafle/overflow/module/member/service/MemberService.java new file mode 100644 index 0000000..926dd5c --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/member/service/MemberService.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.member.service; + +/** + * Created by geek on 17. 11. 7. + */ +public interface MemberService { +} diff --git a/src/main/java/com/loafle/overflow/module/meta/model/MetaCrawler.java b/src/main/java/com/loafle/overflow/module/meta/model/MetaCrawler.java new file mode 100644 index 0000000..573d9a9 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/model/MetaCrawler.java @@ -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; + } + + +} diff --git a/src/main/java/com/loafle/overflow/module/meta/model/MetaCrawlerInputItem.java b/src/main/java/com/loafle/overflow/module/meta/model/MetaCrawlerInputItem.java new file mode 100644 index 0000000..67a6974 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/model/MetaCrawlerInputItem.java @@ -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; +// } +} diff --git a/src/main/java/com/loafle/overflow/module/meta/model/MetaHistoryType.java b/src/main/java/com/loafle/overflow/module/meta/model/MetaHistoryType.java new file mode 100644 index 0000000..d619f79 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/model/MetaHistoryType.java @@ -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; + } + +} diff --git a/src/main/java/com/loafle/overflow/module/meta/model/MetaInfraType.java b/src/main/java/com/loafle/overflow/module/meta/model/MetaInfraType.java new file mode 100644 index 0000000..f0029a6 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/model/MetaInfraType.java @@ -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; + } + +} diff --git a/src/main/java/com/loafle/overflow/module/meta/model/MetaInfraVendor.java b/src/main/java/com/loafle/overflow/module/meta/model/MetaInfraVendor.java new file mode 100644 index 0000000..b786c78 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/model/MetaInfraVendor.java @@ -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; + } +} diff --git a/src/main/java/com/loafle/overflow/module/meta/model/MetaInputType.java b/src/main/java/com/loafle/overflow/module/meta/model/MetaInputType.java new file mode 100644 index 0000000..8ad2b41 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/model/MetaInputType.java @@ -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; + } +} diff --git a/src/main/java/com/loafle/overflow/module/meta/model/MetaMemberStatus.java b/src/main/java/com/loafle/overflow/module/meta/model/MetaMemberStatus.java new file mode 100644 index 0000000..1074a1d --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/model/MetaMemberStatus.java @@ -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; + } + +} diff --git a/src/main/java/com/loafle/overflow/module/meta/model/MetaNoAuthProbeStatus.java b/src/main/java/com/loafle/overflow/module/meta/model/MetaNoAuthProbeStatus.java new file mode 100644 index 0000000..60f1639 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/model/MetaNoAuthProbeStatus.java @@ -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; + } +} diff --git a/src/main/java/com/loafle/overflow/module/meta/model/MetaNotification.java b/src/main/java/com/loafle/overflow/module/meta/model/MetaNotification.java new file mode 100644 index 0000000..b2276a8 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/model/MetaNotification.java @@ -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; + } +} diff --git a/src/main/java/com/loafle/overflow/module/meta/model/MetaProbeArchitecture.java b/src/main/java/com/loafle/overflow/module/meta/model/MetaProbeArchitecture.java new file mode 100644 index 0000000..e6f8f4f --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/model/MetaProbeArchitecture.java @@ -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; + } + +} diff --git a/src/main/java/com/loafle/overflow/module/meta/model/MetaProbeOs.java b/src/main/java/com/loafle/overflow/module/meta/model/MetaProbeOs.java new file mode 100644 index 0000000..5d3de03 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/model/MetaProbeOs.java @@ -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; + } + +} diff --git a/src/main/java/com/loafle/overflow/module/meta/model/MetaProbePackage.java b/src/main/java/com/loafle/overflow/module/meta/model/MetaProbePackage.java new file mode 100644 index 0000000..0fa7481 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/model/MetaProbePackage.java @@ -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; + } + +} diff --git a/src/main/java/com/loafle/overflow/module/meta/model/MetaProbeStatus.java b/src/main/java/com/loafle/overflow/module/meta/model/MetaProbeStatus.java new file mode 100644 index 0000000..7bb87f6 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/model/MetaProbeStatus.java @@ -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; + } +} diff --git a/src/main/java/com/loafle/overflow/module/meta/model/MetaProbeTaskType.java b/src/main/java/com/loafle/overflow/module/meta/model/MetaProbeTaskType.java new file mode 100644 index 0000000..afdbe47 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/model/MetaProbeTaskType.java @@ -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; + } + + +} diff --git a/src/main/java/com/loafle/overflow/module/meta/model/MetaProbeVersion.java b/src/main/java/com/loafle/overflow/module/meta/model/MetaProbeVersion.java new file mode 100644 index 0000000..0b6bbdc --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/model/MetaProbeVersion.java @@ -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; + } + +} diff --git a/src/main/java/com/loafle/overflow/module/meta/model/MetaSensorDisplayItem.java b/src/main/java/com/loafle/overflow/module/meta/model/MetaSensorDisplayItem.java new file mode 100644 index 0000000..abac127 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/model/MetaSensorDisplayItem.java @@ -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; + } +} diff --git a/src/main/java/com/loafle/overflow/module/meta/model/MetaSensorItem.java b/src/main/java/com/loafle/overflow/module/meta/model/MetaSensorItem.java new file mode 100644 index 0000000..a76208c --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/model/MetaSensorItem.java @@ -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; + } +} diff --git a/src/main/java/com/loafle/overflow/module/meta/model/MetaSensorItemKey.java b/src/main/java/com/loafle/overflow/module/meta/model/MetaSensorItemKey.java new file mode 100644 index 0000000..d3455fb --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/model/MetaSensorItemKey.java @@ -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; + } +} diff --git a/src/main/java/com/loafle/overflow/module/meta/model/MetaSensorItemType.java b/src/main/java/com/loafle/overflow/module/meta/model/MetaSensorItemType.java new file mode 100644 index 0000000..abab0f5 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/model/MetaSensorItemType.java @@ -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; + } + +} diff --git a/src/main/java/com/loafle/overflow/module/meta/model/MetaSensorItemUnit.java b/src/main/java/com/loafle/overflow/module/meta/model/MetaSensorItemUnit.java new file mode 100644 index 0000000..e92ddd4 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/model/MetaSensorItemUnit.java @@ -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; + } +} diff --git a/src/main/java/com/loafle/overflow/module/meta/model/MetaSensorStatus.java b/src/main/java/com/loafle/overflow/module/meta/model/MetaSensorStatus.java new file mode 100644 index 0000000..fd0623a --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/model/MetaSensorStatus.java @@ -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; + } +} diff --git a/src/main/java/com/loafle/overflow/module/meta/model/MetaVendorCrawler.java b/src/main/java/com/loafle/overflow/module/meta/model/MetaVendorCrawler.java new file mode 100644 index 0000000..3c9d8cd --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/model/MetaVendorCrawler.java @@ -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; + } + +} diff --git a/src/main/java/com/loafle/overflow/module/meta/model/MetaVendorCrawlerSensorItem.java b/src/main/java/com/loafle/overflow/module/meta/model/MetaVendorCrawlerSensorItem.java new file mode 100644 index 0000000..f8b3908 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/model/MetaVendorCrawlerSensorItem.java @@ -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; + } + +} diff --git a/src/main/java/com/loafle/overflow/module/meta/service/MetaCrawlerInputItemService.java b/src/main/java/com/loafle/overflow/module/meta/service/MetaCrawlerInputItemService.java new file mode 100644 index 0000000..6704a0a --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/service/MetaCrawlerInputItemService.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.meta.service; + +/** + * Created by snoop on 17. 7. 27. + */ +public interface MetaCrawlerInputItemService { +} diff --git a/src/main/java/com/loafle/overflow/module/meta/service/MetaCrawlerService.java b/src/main/java/com/loafle/overflow/module/meta/service/MetaCrawlerService.java new file mode 100644 index 0000000..c454ca4 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/service/MetaCrawlerService.java @@ -0,0 +1,8 @@ +package com.loafle.overflow.module.meta.service; + +/** + * Created by snoop on 17. 7. 27. + */ +public interface MetaCrawlerService { + +} diff --git a/src/main/java/com/loafle/overflow/module/meta/service/MetaHistoryTypeService.java b/src/main/java/com/loafle/overflow/module/meta/service/MetaHistoryTypeService.java new file mode 100644 index 0000000..ae15c70 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/service/MetaHistoryTypeService.java @@ -0,0 +1,9 @@ +package com.loafle.overflow.module.meta.service; + + +/** + * Created by snoop on 17. 7. 27. + */ +public interface MetaHistoryTypeService { + +} diff --git a/src/main/java/com/loafle/overflow/module/meta/service/MetaInfraTypeService.java b/src/main/java/com/loafle/overflow/module/meta/service/MetaInfraTypeService.java new file mode 100644 index 0000000..a8229f9 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/service/MetaInfraTypeService.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.meta.service; + +/** + * Created by snoop on 17. 7. 27. + */ +public interface MetaInfraTypeService { +} diff --git a/src/main/java/com/loafle/overflow/module/meta/service/MetaInfraVendorService.java b/src/main/java/com/loafle/overflow/module/meta/service/MetaInfraVendorService.java new file mode 100644 index 0000000..f31c6ba --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/service/MetaInfraVendorService.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.meta.service; + +/** + * Created by snoop on 17. 7. 27. + */ +public interface MetaInfraVendorService { +} diff --git a/src/main/java/com/loafle/overflow/module/meta/service/MetaInputTypeService.java b/src/main/java/com/loafle/overflow/module/meta/service/MetaInputTypeService.java new file mode 100644 index 0000000..39e4393 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/service/MetaInputTypeService.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.meta.service; + +/** + * Created by snoop on 17. 7. 27. + */ +public interface MetaInputTypeService { +} diff --git a/src/main/java/com/loafle/overflow/module/meta/service/MetaMemberStatusService.java b/src/main/java/com/loafle/overflow/module/meta/service/MetaMemberStatusService.java new file mode 100644 index 0000000..636e83c --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/service/MetaMemberStatusService.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.meta.service; + +/** + * Created by snoop on 17. 7. 27. + */ +public interface MetaMemberStatusService { +} diff --git a/src/main/java/com/loafle/overflow/module/meta/service/MetaNoAuthProbeStatusService.java b/src/main/java/com/loafle/overflow/module/meta/service/MetaNoAuthProbeStatusService.java new file mode 100644 index 0000000..203cdce --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/service/MetaNoAuthProbeStatusService.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.meta.service; + +/** + * Created by snoop on 17. 7. 27. + */ +public interface MetaNoAuthProbeStatusService { +} diff --git a/src/main/java/com/loafle/overflow/module/meta/service/MetaProbeArchitectureService.java b/src/main/java/com/loafle/overflow/module/meta/service/MetaProbeArchitectureService.java new file mode 100644 index 0000000..18883a2 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/service/MetaProbeArchitectureService.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.meta.service; + +/** + * Created by snoop on 17. 7. 27. + */ +public interface MetaProbeArchitectureService { +} diff --git a/src/main/java/com/loafle/overflow/module/meta/service/MetaProbeOsService.java b/src/main/java/com/loafle/overflow/module/meta/service/MetaProbeOsService.java new file mode 100644 index 0000000..217d39f --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/service/MetaProbeOsService.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.meta.service; + +/** + * Created by snoop on 17. 7. 27. + */ +public interface MetaProbeOsService { +} diff --git a/src/main/java/com/loafle/overflow/module/meta/service/MetaProbePackageService.java b/src/main/java/com/loafle/overflow/module/meta/service/MetaProbePackageService.java new file mode 100644 index 0000000..701e21b --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/service/MetaProbePackageService.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.meta.service; + +/** + * Created by snoop on 17. 7. 27. + */ +public interface MetaProbePackageService { +} diff --git a/src/main/java/com/loafle/overflow/module/meta/service/MetaProbeStatusService.java b/src/main/java/com/loafle/overflow/module/meta/service/MetaProbeStatusService.java new file mode 100644 index 0000000..d150526 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/service/MetaProbeStatusService.java @@ -0,0 +1,8 @@ +package com.loafle.overflow.module.meta.service; + +/** + * Created by snoop on 17. 7. 27. + */ +public interface MetaProbeStatusService { + +} diff --git a/src/main/java/com/loafle/overflow/module/meta/service/MetaProbeTaskTypeService.java b/src/main/java/com/loafle/overflow/module/meta/service/MetaProbeTaskTypeService.java new file mode 100644 index 0000000..5392ab9 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/service/MetaProbeTaskTypeService.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.meta.service; + +/** + * Created by snoop on 17. 7. 27. + */ +public interface MetaProbeTaskTypeService { +} diff --git a/src/main/java/com/loafle/overflow/module/meta/service/MetaProbeVersionService.java b/src/main/java/com/loafle/overflow/module/meta/service/MetaProbeVersionService.java new file mode 100644 index 0000000..7636fa1 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/service/MetaProbeVersionService.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.meta.service; + +/** + * Created by snoop on 17. 7. 27. + */ +public interface MetaProbeVersionService { +} diff --git a/src/main/java/com/loafle/overflow/module/meta/service/MetaSensorDisplayItemService.java b/src/main/java/com/loafle/overflow/module/meta/service/MetaSensorDisplayItemService.java new file mode 100644 index 0000000..46841d8 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/service/MetaSensorDisplayItemService.java @@ -0,0 +1,8 @@ +package com.loafle.overflow.module.meta.service; + +/** + * Created by insanity on 17. 9. 20. + */ + +public interface MetaSensorDisplayItemService { +} diff --git a/src/main/java/com/loafle/overflow/module/meta/service/MetaSensorItemKeyService.java b/src/main/java/com/loafle/overflow/module/meta/service/MetaSensorItemKeyService.java new file mode 100644 index 0000000..51ceed0 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/service/MetaSensorItemKeyService.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.meta.service; + +/** + * Created by snoop on 17. 8. 29. + */ +public interface MetaSensorItemKeyService { +} diff --git a/src/main/java/com/loafle/overflow/module/meta/service/MetaSensorItemService.java b/src/main/java/com/loafle/overflow/module/meta/service/MetaSensorItemService.java new file mode 100644 index 0000000..3702175 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/service/MetaSensorItemService.java @@ -0,0 +1,8 @@ +package com.loafle.overflow.module.meta.service; + +/** + * Created by snoop on 17. 7. 27. + */ +public interface MetaSensorItemService { + +} diff --git a/src/main/java/com/loafle/overflow/module/meta/service/MetaSensorItemTypeService.java b/src/main/java/com/loafle/overflow/module/meta/service/MetaSensorItemTypeService.java new file mode 100644 index 0000000..9618c6f --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/service/MetaSensorItemTypeService.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.meta.service; + +/** + * Created by snoop on 17. 7. 27. + */ +public interface MetaSensorItemTypeService { +} diff --git a/src/main/java/com/loafle/overflow/module/meta/service/MetaSensorItemUnitService.java b/src/main/java/com/loafle/overflow/module/meta/service/MetaSensorItemUnitService.java new file mode 100644 index 0000000..36a18a2 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/service/MetaSensorItemUnitService.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.meta.service; + +/** + * Created by insanity on 17. 9. 20. + */ +public interface MetaSensorItemUnitService { +} diff --git a/src/main/java/com/loafle/overflow/module/meta/service/MetaSensorStatusService.java b/src/main/java/com/loafle/overflow/module/meta/service/MetaSensorStatusService.java new file mode 100644 index 0000000..eb3f57c --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/service/MetaSensorStatusService.java @@ -0,0 +1,8 @@ +package com.loafle.overflow.module.meta.service; + +/** + * Created by snoop on 17. 7. 27. + */ +public interface MetaSensorStatusService { + +} diff --git a/src/main/java/com/loafle/overflow/module/meta/service/MetaVendorCrawlerSensorItemService.java b/src/main/java/com/loafle/overflow/module/meta/service/MetaVendorCrawlerSensorItemService.java new file mode 100644 index 0000000..4041324 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/service/MetaVendorCrawlerSensorItemService.java @@ -0,0 +1,8 @@ +package com.loafle.overflow.module.meta.service; + +/** + * Created by snoop on 17. 7. 27. + */ +public interface MetaVendorCrawlerSensorItemService { + +} diff --git a/src/main/java/com/loafle/overflow/module/meta/service/MetaVendorCrawlerService.java b/src/main/java/com/loafle/overflow/module/meta/service/MetaVendorCrawlerService.java new file mode 100644 index 0000000..e44a414 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/service/MetaVendorCrawlerService.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.meta.service; + +/** + * Created by snoop on 17. 7. 27. + */ +public interface MetaVendorCrawlerService { +} diff --git a/src/main/java/com/loafle/overflow/module/meta/type/MetaCrawlerEnum.java b/src/main/java/com/loafle/overflow/module/meta/type/MetaCrawlerEnum.java new file mode 100644 index 0000000..008e87a --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/meta/type/MetaCrawlerEnum.java @@ -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; + } + +} diff --git a/src/main/java/com/loafle/overflow/module/noauthprobe/model/NoAuthProbe.java b/src/main/java/com/loafle/overflow/module/noauthprobe/model/NoAuthProbe.java new file mode 100644 index 0000000..df60d33 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/noauthprobe/model/NoAuthProbe.java @@ -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; +// } +} diff --git a/src/main/java/com/loafle/overflow/module/noauthprobe/service/NoAuthProbeService.java b/src/main/java/com/loafle/overflow/module/noauthprobe/service/NoAuthProbeService.java new file mode 100644 index 0000000..d393c1e --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/noauthprobe/service/NoAuthProbeService.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.noauthprobe.service; + +/** + * Created by snoop on 17. 6. 28. + */ +public interface NoAuthProbeService { +} diff --git a/src/main/java/com/loafle/overflow/module/notification/model/Notification.java b/src/main/java/com/loafle/overflow/module/notification/model/Notification.java new file mode 100644 index 0000000..8ce3b80 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/notification/model/Notification.java @@ -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; + } +} diff --git a/src/main/java/com/loafle/overflow/module/notification/service/NotificationService.java b/src/main/java/com/loafle/overflow/module/notification/service/NotificationService.java new file mode 100644 index 0000000..4a732af --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/notification/service/NotificationService.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.notification.service; + +/** + * Created by insanity on 17. 8. 25. + */ +public interface NotificationService { +} diff --git a/src/main/java/com/loafle/overflow/module/probe/model/Probe.java b/src/main/java/com/loafle/overflow/module/probe/model/Probe.java new file mode 100644 index 0000000..59c84d8 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/probe/model/Probe.java @@ -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; +// } +} diff --git a/src/main/java/com/loafle/overflow/module/probe/model/ProbeHost.java b/src/main/java/com/loafle/overflow/module/probe/model/ProbeHost.java new file mode 100644 index 0000000..ecbc688 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/probe/model/ProbeHost.java @@ -0,0 +1,48 @@ +package com.loafle.overflow.module.probe.model; + +import com.loafle.overflow.module.infra.model.InfraHost; + +import javax.persistence.*; + +/** + * Created by insanity on 17. 8. 21. + */ + +@Entity +@Table(name = "PROBE_INFRAHOST", schema = "public") +public class ProbeHost { + + private long id; + private Probe probe; + private InfraHost host; + + @Id + @GeneratedValue(strategy= GenerationType.IDENTITY) + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + @OneToOne + @JoinColumn(name = "PROBE_ID", nullable = false) + public Probe getProbe() { + return probe; + } + + public void setProbe(Probe probe) { + this.probe = probe; + } + + @OneToOne + @JoinColumn(name = "HOST_ID", nullable = false) + public InfraHost getHost() { + return host; + } + + public void setHost(InfraHost infraHost) { + this.host = infraHost; + } +} diff --git a/src/main/java/com/loafle/overflow/module/probe/model/ProbeTask.java b/src/main/java/com/loafle/overflow/module/probe/model/ProbeTask.java new file mode 100644 index 0000000..754b366 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/probe/model/ProbeTask.java @@ -0,0 +1,143 @@ +package com.loafle.overflow.module.probe.model; + + +import com.loafle.overflow.module.meta.model.MetaProbeTaskType; + +import javax.persistence.*; +import java.util.Date; + +/** + * Created by root on 17. 6. 22. + */ +@Entity +@Table(name = "PROBE_TASK", schema = "public") +public class ProbeTask { + private long id; + private MetaProbeTaskType taskType; + private Probe probe; + private String data; + private Date createDate; + private Date sendDate; + private Date startDate; + private Date endDate; + private Boolean succeed; + + @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 MetaProbeTaskType getTaskType() { + return taskType; + } + + public void setTaskType(MetaProbeTaskType taskType) { + this.taskType = taskType; + } + + @ManyToOne + @JoinColumn(name = "PROBE_ID", nullable = false) + public Probe getProbe() { + return probe; + } + + public void setProbe(Probe probe) { + this.probe = probe; + } + + @Column(name = "DATA", nullable = true, length = 255) + public String getData() { + return data; + } + + public void setData(String data) { + this.data = data; + } + + @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 = "SEND_DATE", nullable = true) + public Date getSendDate() { + return sendDate; + } + + public void setSendDate(Date sendDate) { + this.sendDate = sendDate; + } + + @Column(name = "START_DATE", nullable = true) + public Date getStartDate() { + return startDate; + } + + public void setStartDate(Date startDate) { + this.startDate = startDate; + } + + @Column(name = "END_DATE", nullable = true) + public Date getEndDate() { + return endDate; + } + + public void setEndDate(Date endDate) { + this.endDate = endDate; + } + + @Column(name = "SUCCEED", nullable = true) + public Boolean getSucceed() { + return succeed; + } + + public void setSucceed(Boolean succeed) { + this.succeed = succeed; + } + +// @Override +// public boolean equals(Object o) { +// if (this == o) return true; +// if (o == null || getClass() != o.getClass()) return false; +// +// ProbeTask that = (ProbeTask) o; +// +// if (id != that.id) return false; +// if (typeId != that.typeId) return false; +// if (probeId != that.probeId) return false; +// if (data != null ? !data.equals(that.data) : that.data != null) return false; +// if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false; +// if (sendDate != null ? !sendDate.equals(that.sendDate) : that.sendDate != null) return false; +// if (startDate != null ? !startDate.equals(that.startDate) : that.startDate != null) return false; +// if (endDate != null ? !endDate.equals(that.endDate) : that.endDate != null) return false; +// if (succeed != null ? !succeed.equals(that.succeed) : that.succeed != null) return false; +// +// return true; +// } +// +// @Override +// public int hashCode() { +// int result = (int) (id ^ (id >>> 32)); +// result = 31 * result + (int) typeId; +// result = 31 * result + (int) (probeId ^ (probeId >>> 32)); +// result = 31 * result + (data != null ? data.hashCode() : 0); +// result = 31 * result + (createDate != null ? createDate.hashCode() : 0); +// result = 31 * result + (sendDate != null ? sendDate.hashCode() : 0); +// result = 31 * result + (startDate != null ? startDate.hashCode() : 0); +// result = 31 * result + (endDate != null ? endDate.hashCode() : 0); +// result = 31 * result + (succeed != null ? succeed.hashCode() : 0); +// return result; +// } +} diff --git a/src/main/java/com/loafle/overflow/module/probe/service/ProbeHostService.java b/src/main/java/com/loafle/overflow/module/probe/service/ProbeHostService.java new file mode 100644 index 0000000..cdf1065 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/probe/service/ProbeHostService.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.probe.service; + +/** + * Created by snoop on 17. 8. 21. + */ +public interface ProbeHostService { +} diff --git a/src/main/java/com/loafle/overflow/module/probe/service/ProbeService.java b/src/main/java/com/loafle/overflow/module/probe/service/ProbeService.java new file mode 100644 index 0000000..6f4a7f4 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/probe/service/ProbeService.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.probe.service; + +/** + * Created by snoop on 17. 6. 28. + */ +public interface ProbeService { +} diff --git a/src/main/java/com/loafle/overflow/module/probe/service/ProbeTaskService.java b/src/main/java/com/loafle/overflow/module/probe/service/ProbeTaskService.java new file mode 100644 index 0000000..56184d0 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/probe/service/ProbeTaskService.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.probe.service; + +/** + * Created by snoop on 17. 6. 28. + */ +public interface ProbeTaskService { +} diff --git a/src/main/java/com/loafle/overflow/module/sensor/model/Sensor.java b/src/main/java/com/loafle/overflow/module/sensor/model/Sensor.java new file mode 100644 index 0000000..176a9f8 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/sensor/model/Sensor.java @@ -0,0 +1,95 @@ +package com.loafle.overflow.module.sensor.model; + +import com.loafle.overflow.module.meta.model.MetaCrawler; +import com.loafle.overflow.module.meta.model.MetaSensorStatus; +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 root on 17. 6. 22. + */ +@Entity +@Table(name = "SENSOR", schema = "public") +public class Sensor { + private long id; + private Date createDate; + private String description; + private MetaSensorStatus status; + private Target target; + private MetaCrawler crawler; + private String crawlerInputItems; + + @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 = "DESCRIPTION", nullable = true, length = 50) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + @ManyToOne + @JoinColumn(name = "STATUS") + public MetaSensorStatus getStatus() { + return status; + } + + public void setStatus(MetaSensorStatus status) { + this.status = status; + } + + @ManyToOne + @OnDelete(action = OnDeleteAction.CASCADE) + @JoinColumn(name = "TARGET_ID", nullable = false) + public Target getTarget() { + return target; + } + + public void setTarget(Target target) { + this.target = target; + } + + @ManyToOne + @JoinColumn(name = "CRAWLER_ID", nullable = false) + public MetaCrawler getCrawler() { + return crawler; + } + + public void setCrawler(MetaCrawler crawler) { + this.crawler = crawler; + } + + @Column(name = "CRAWLER_INPUT_ITEMS", nullable = true, length = 50) + public String getCrawlerInputItems() { + return crawlerInputItems; + } + + public void setCrawlerInputItems(String crawlerInputItems) { + this.crawlerInputItems = crawlerInputItems; + } + +} diff --git a/src/main/java/com/loafle/overflow/module/sensor/model/SensorItem.java b/src/main/java/com/loafle/overflow/module/sensor/model/SensorItem.java new file mode 100644 index 0000000..c15c4a5 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/sensor/model/SensorItem.java @@ -0,0 +1,62 @@ +package com.loafle.overflow.module.sensor.model; + +import com.loafle.overflow.module.meta.model.MetaSensorDisplayItem; +import org.hibernate.annotations.OnDelete; +import org.hibernate.annotations.OnDeleteAction; + +import javax.persistence.*; +import java.util.Date; + +/** + * Created by root on 17. 6. 22. + */ +@Entity +@Table(name = "SENSOR_ITEM", schema = "public") +public class SensorItem { + private long id; + private Sensor sensor; + private MetaSensorDisplayItem item; + private Date createDate; + + @Id + @GeneratedValue(strategy= GenerationType.IDENTITY) + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + @ManyToOne + @JoinColumn(name = "SENSOR_ID", nullable = false) + @OnDelete(action = OnDeleteAction.CASCADE) + public Sensor getSensor() { + return this.sensor; + } + + public void setSensor(Sensor sensor) { + this.sensor = sensor; + } + + @ManyToOne + @JoinColumn(name = "ITEM_ID", nullable = false) + public MetaSensorDisplayItem getItem() { + return item; + } + + public void setItem(MetaSensorDisplayItem item) { + this.item = item; + } + + @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; + } + +} diff --git a/src/main/java/com/loafle/overflow/module/sensor/model/SensorItemDependency.java b/src/main/java/com/loafle/overflow/module/sensor/model/SensorItemDependency.java new file mode 100644 index 0000000..6226f6b --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/sensor/model/SensorItemDependency.java @@ -0,0 +1,48 @@ +package com.loafle.overflow.module.sensor.model; + +import com.loafle.overflow.module.meta.model.MetaSensorDisplayItem; +import com.loafle.overflow.module.meta.model.MetaSensorItemKey; + +import javax.persistence.*; + +/** + * Created by insanity on 17. 9. 20. + */ +@Entity +@Table(name = "SENSOR_ITEM_DEPENDENCY", schema = "public") +public class SensorItemDependency { + private long id; + private MetaSensorDisplayItem displayItem; + private MetaSensorItemKey sensorItem; + + @Id + @GeneratedValue(strategy= GenerationType.IDENTITY) + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + + @ManyToOne + @JoinColumn(name = "DISPLAY_ITEM_ID", nullable = false) + public MetaSensorDisplayItem getDisplayItem() { + return displayItem; + } + + public void setDisplayItem(MetaSensorDisplayItem displayItem) { + this.displayItem = displayItem; + } + + @ManyToOne + @JoinColumn(name = "SENSOR_ITEM_ID", nullable = false) + public MetaSensorItemKey getSensorItem() { + return sensorItem; + } + + public void setSensorItem(MetaSensorItemKey sensorItem) { + this.sensorItem = sensorItem; + } +} diff --git a/src/main/java/com/loafle/overflow/module/sensor/service/SensorItemDependencyService.java b/src/main/java/com/loafle/overflow/module/sensor/service/SensorItemDependencyService.java new file mode 100644 index 0000000..3288ba5 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/sensor/service/SensorItemDependencyService.java @@ -0,0 +1,8 @@ +package com.loafle.overflow.module.sensor.service; + +/** + * Created by insanity on 17. 9. 20. + */ + +public interface SensorItemDependencyService { +} diff --git a/src/main/java/com/loafle/overflow/module/sensor/service/SensorItemService.java b/src/main/java/com/loafle/overflow/module/sensor/service/SensorItemService.java new file mode 100644 index 0000000..4042ff3 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/sensor/service/SensorItemService.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.sensor.service; + +/** + * Created by insanity on 17. 6. 28. + */ +public interface SensorItemService { +} diff --git a/src/main/java/com/loafle/overflow/module/sensor/service/SensorService.java b/src/main/java/com/loafle/overflow/module/sensor/service/SensorService.java new file mode 100644 index 0000000..9d7005a --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/sensor/service/SensorService.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.sensor.service; + +/** + * Created by insanity on 17. 6. 28. + */ +public interface SensorService { +} diff --git a/src/main/java/com/loafle/overflow/module/target/model/Target.java b/src/main/java/com/loafle/overflow/module/target/model/Target.java new file mode 100644 index 0000000..1dde87c --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/target/model/Target.java @@ -0,0 +1,85 @@ +package com.loafle.overflow.module.target.model; + +import javax.persistence.*; +import java.util.Date; + +/** + * Created by root on 17. 6. 22. + */ +@Entity +@Table(name = "TARGET", schema = "public") +public class Target { + + private long id; + private Date createDate; + private String displayName; + private String description; + + /* + private long id; + private Date createDate; + private String displayName; + private String description; + */ + + @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 = "DISPLAY_NAME") + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + @Column(name = "DESCRIPTION") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + +// @ManyToOne +// @JoinColumn(name = "PROBE_ID", nullable = false) +// @OnDelete(action = OnDeleteAction.CASCADE) +// public Probe getProbe() { +// return probe; +// } +// +// public void setProbe(Probe probe) { +// this.probe = probe; +// } +// +// @ManyToOne +// @JoinColumn(name = "INFRA_ID", nullable = false) +// public Infra getInfra() { +// return infra; +// } +// +// public void setInfra(Infra infra) { +// this.infra = infra; +// } + +} diff --git a/src/main/java/com/loafle/overflow/module/target/service/TargetDiscoveryService.java b/src/main/java/com/loafle/overflow/module/target/service/TargetDiscoveryService.java new file mode 100644 index 0000000..744b9b3 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/target/service/TargetDiscoveryService.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.target.service; + +/** + * Created by snoop on 17. 6. 28. + */ +public interface TargetDiscoveryService { +} diff --git a/src/main/java/com/loafle/overflow/module/target/service/TargetService.java b/src/main/java/com/loafle/overflow/module/target/service/TargetService.java new file mode 100644 index 0000000..c43199e --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/target/service/TargetService.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.target.service; + +/** + * Created by insanity on 17. 6. 28. + */ +public interface TargetService { +} diff --git a/src/main/java/com/loafle/overflow/module/websocket/model/UiWebsocket.java b/src/main/java/com/loafle/overflow/module/websocket/model/UiWebsocket.java new file mode 100644 index 0000000..09733fa --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/websocket/model/UiWebsocket.java @@ -0,0 +1,35 @@ +package com.loafle.overflow.module.websocket.model; + +import javax.persistence.*; +import java.util.Date; + +/** + * Created by root on 17. 6. 22. + */ +@Entity +@Table(name = "UI_WEBSOCKET", schema = "public") +public class UiWebsocket { + private long id; + private Date createDate; + + @Id + @GeneratedValue(strategy= GenerationType.IDENTITY) + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + @Basic + @Column(name = "CREATE_DATE", nullable = true) + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + +} diff --git a/src/main/resources/_ b/src/main/resources/_ new file mode 100644 index 0000000..e69de29 diff --git a/src/test/resources/logback.xml b/src/test/resources/logback.xml new file mode 100644 index 0000000..575281e --- /dev/null +++ b/src/test/resources/logback.xml @@ -0,0 +1,17 @@ + + + commons_java + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{32} - %msg%n + + + + + + + + + \ No newline at end of file