From d12ffc37f10ed6ff8174f65072f364af189e41ab Mon Sep 17 00:00:00 2001 From: geek Date: Tue, 7 Nov 2017 19:36:34 +0900 Subject: [PATCH] project shared --- .gitignore | 91 +++++++++ pom.xml | 97 ++++++++++ src/main/java/com/loafle/overflow/App.java | 7 + .../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/commons/model/PageParams.java | 43 ++++ .../module/commons/model/PublishMessage.java | 74 +++++++ .../module/commons/model/SessionMetadata.java | 15 ++ .../commons/service/MessagePublisher.java | 7 + .../discovery/model/DiscoeveryStartInfo.java | 63 ++++++ .../overflow/module/discovery/model/Host.java | 100 ++++++++++ .../overflow/module/discovery/model/Port.java | 122 ++++++++++++ .../module/discovery/model/Service.java | 97 ++++++++++ .../overflow/module/discovery/model/Zone.java | 70 +++++++ .../discovery/service/DiscoveryService.java | 8 + .../module/discovery/type/PortType.java | 18 ++ .../overflow/module/domain/model/Domain.java | 52 +++++ .../module/domain/model/DomainMember.java | 59 ++++++ .../domain/service/DomainMemberService.java | 8 + .../module/domain/service/DomainService.java | 8 + .../module/email/model/EmailAuth.java | 69 +++++++ .../email/service/EmailAuthService.java | 8 + .../module/history/model/History.java | 116 +++++++++++ .../history/service/HistoryService.java | 4 + .../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 | 9 + .../infra/service/InfraMachineService.java | 8 + .../service/InfraOSApplicationService.java | 9 + .../infra/service/InfraOSDaemonService.java | 8 + .../infra/service/InfraOSPortService.java | 9 + .../module/infra/service/InfraOSService.java | 8 + .../module/infra/service/InfraService.java | 9 + .../infra/service/InfraServiceService.java | 7 + .../overflow/module/member/model/Member.java | 114 +++++++++++ .../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 .../java/com/loafle/overflow/AppTest.java | 14 ++ src/test/resources/logback.xml | 17 ++ 113 files changed, 4897 insertions(+) create mode 100644 .gitignore create mode 100644 pom.xml create mode 100644 src/main/java/com/loafle/overflow/App.java 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/commons/model/PageParams.java create mode 100644 src/main/java/com/loafle/overflow/module/commons/model/PublishMessage.java create mode 100644 src/main/java/com/loafle/overflow/module/commons/model/SessionMetadata.java create mode 100644 src/main/java/com/loafle/overflow/module/commons/service/MessagePublisher.java create mode 100644 src/main/java/com/loafle/overflow/module/discovery/model/DiscoeveryStartInfo.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/discovery/type/PortType.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/java/com/loafle/overflow/AppTest.java create mode 100644 src/test/resources/logback.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57b203d --- /dev/null +++ b/.gitignore @@ -0,0 +1,91 @@ +# 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 +.vscode/settings.json + +.vscode/ \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..2677724 --- /dev/null +++ b/pom.xml @@ -0,0 +1,97 @@ + + + 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 + + + + 1.2.0 + 5.2.10.Final + 1.9.13 + + + + + io.grpc + grpc-netty + ${grpc.version} + + + io.grpc + grpc-protobuf + ${grpc.version} + + + io.grpc + grpc-stub + ${grpc.version} + + + + + org.hibernate + hibernate-entitymanager + ${hibernate.version} + + + + org.hibernate + hibernate-core + ${hibernate.version} + + + + org.codehaus.jackson + jackson-mapper-asl + ${jackson.mapper.version} + + + + + + + kr.motd.maven + os-maven-plugin + 1.5.0.Final + + + + + + cz.habarta.typescript-generator + typescript-generator-maven-plugin + 1.25.322 + + + generate + + generate + + process-classes + + + + jackson2 + + com.loafle.overflow.module.**.model.* + + module + implementationFile + + + + + \ No newline at end of file diff --git a/src/main/java/com/loafle/overflow/App.java b/src/main/java/com/loafle/overflow/App.java new file mode 100644 index 0000000..a227499 --- /dev/null +++ b/src/main/java/com/loafle/overflow/App.java @@ -0,0 +1,7 @@ +package com.loafle.overflow; + +public class App { + public static void main(String[] args) { + System.out.println("Hello World!"); + } +} \ 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/commons/model/PageParams.java b/src/main/java/com/loafle/overflow/module/commons/model/PageParams.java new file mode 100644 index 0000000..20c76ea --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/commons/model/PageParams.java @@ -0,0 +1,43 @@ +package com.loafle.overflow.module.commons.model; + +/** + * Created by geek on 17. 11. 7. + */ +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/commons/model/PublishMessage.java b/src/main/java/com/loafle/overflow/module/commons/model/PublishMessage.java new file mode 100644 index 0000000..89e516e --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/commons/model/PublishMessage.java @@ -0,0 +1,74 @@ +package com.loafle.overflow.module.commons.model; + +import java.util.ArrayList; +import java.util.List; + +/** + * Created by geek on 17. 11. 7. + */ +public class PublishMessage { + private List targets; + private PublishMessageBody message; + + 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 class PublishMessageBody { + private String method; + private List params; + + public PublishMessageBody() { + + } + public PublishMessageBody(String method) { + this.method = method; + } + public PublishMessageBody(String method, List params) { + this(method); + this.params = 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/commons/model/SessionMetadata.java b/src/main/java/com/loafle/overflow/module/commons/model/SessionMetadata.java new file mode 100644 index 0000000..441e73a --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/commons/model/SessionMetadata.java @@ -0,0 +1,15 @@ +package com.loafle.overflow.module.commons.model; + +import io.grpc.Context; +import io.grpc.Metadata; + +import static io.grpc.Metadata.ASCII_STRING_MARSHALLER; + +public class SessionMetadata { + public static final Context.Key CTX_EMAIL_KEY = Context.key("email"); + public static final Metadata.Key METADATA_EMAIL_KEY = Metadata.Key.of("email", ASCII_STRING_MARSHALLER); + + public static String getEmail() { + return CTX_EMAIL_KEY.get(); + } +} diff --git a/src/main/java/com/loafle/overflow/module/commons/service/MessagePublisher.java b/src/main/java/com/loafle/overflow/module/commons/service/MessagePublisher.java new file mode 100644 index 0000000..de762a6 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/commons/service/MessagePublisher.java @@ -0,0 +1,7 @@ +package com.loafle.overflow.module.commons.service; + +/** + * Created by geek on 17. 11. 7. + */ +public interface MessagePublisher { +} diff --git a/src/main/java/com/loafle/overflow/module/discovery/model/DiscoeveryStartInfo.java b/src/main/java/com/loafle/overflow/module/discovery/model/DiscoeveryStartInfo.java new file mode 100644 index 0000000..85b568d --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/discovery/model/DiscoeveryStartInfo.java @@ -0,0 +1,63 @@ +package com.loafle.overflow.module.discovery.model; + +import java.util.List; + +/** + * Created by geek on 17. 11. 7. + */ +public class DiscoeveryStartInfo { + String startIp; + String endIP; + String excludeIp; + String startPort; + String endPort; + List services; + + public String getStartIp() { + return startIp; + } + + public void setStartIp(String startIp) { + this.startIp = startIp; + } + + public String getEndIP() { + return endIP; + } + + public void setEndIP(String endIP) { + this.endIP = endIP; + } + + public String getExcludeIp() { + return excludeIp; + } + + public void setExcludeIp(String excludeIp) { + this.excludeIp = excludeIp; + } + + public String getStartPort() { + return startPort; + } + + public void setStartPort(String startPort) { + this.startPort = startPort; + } + + public String getEndPort() { + return endPort; + } + + public void setEndPort(String endPort) { + this.endPort = endPort; + } + + public List getServices() { + return services; + } + + public void setServices(List services) { + this.services = services; + } +} 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..35a1c31 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/discovery/model/Host.java @@ -0,0 +1,100 @@ +package com.loafle.overflow.module.discovery.model; + + +import java.util.Date; +import java.util.List; + +/** + * Created by root on 17. 6. 4. + */ + +public class Host { + + + private long id; + private long ip; + private long mac; + + private Date createDate; + private Date updateDate; + + private String os; + private boolean target; + + + private List ports; + + public List getPorts() { + return ports; + } + + public void setPorts(List ports) { + this.ports = ports; + } + + + + + public Host(){} + + public Host(long ip, long mac){ + this.ip = ip; + this.mac = mac; + } + + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + public long getIp() { + return ip; + } + + public void setIp(long ip) { + this.ip = ip; + } + + public long getMac() { + return mac; + } + + public void setMac(long mac) { + this.mac = mac; + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + public Date getUpdateDate() { + return updateDate; + } + + public void setUpdateDate(Date updateDate) { + this.updateDate = updateDate; + } + + public String getOs() { + return os; + } + + public void setOs(String os) { + this.os = os; + } + + public boolean isTarget() { + return target; + } + + public void setTarget(boolean target) { + this.target = target; + } +} 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..e6e28aa --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/discovery/model/Port.java @@ -0,0 +1,122 @@ +package com.loafle.overflow.module.discovery.model; + +/** + * Created by snoop on 17. 6. 27. + */ + + +import com.loafle.overflow.module.discovery.type.PortType; + +import java.util.Date; +import java.util.List; + +/** + * Created by root on 17. 6. 4. + */ + +public class Port { + + + private long id; + + + private Host host; + public Host getHost() { + return host; + } + + public void setHost(Host host) { + this.host = host; + } + + private PortType portType; + + + private int portNumber; + + + + private List services; + + public List getServices() { + return services; + } + + public void setServices(List services) { + this.services = services; + } + + + private Date createDate; + + + private Date updateDate; + + public Port() {} + + public Port(PortType type, int portNumber) { + this.portType = type; + this.portNumber = portNumber; + } + + public Port(Host host, PortType type, int portNumber) { + this.host = host; + this.portType = type; + this.portNumber = portNumber; + } + + + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + public PortType getPortType() { + return portType; + } + + public void setPortType(PortType portType) { + this.portType = portType; + } + + public int getPortNumber() { + return portNumber; + } + + public void setPortNumber(int portNumber) { + this.portNumber = portNumber; + } + + + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + public Date getUpdateDate() { + return updateDate; + } + + public void setUpdateDate(Date updateDate) { + this.updateDate = updateDate; + } + + public void mappingChildren(Host discoveryHost) { + this.setHost(discoveryHost); + + + List discoveryServices = this.getServices(); + if (discoveryServices != null) { + for (int z = 0 ; z < discoveryServices.size() ; ++z) { + discoveryServices.get(z).setPort(this); + } + } + } +} 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..e58138e --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/discovery/model/Service.java @@ -0,0 +1,97 @@ +package com.loafle.overflow.module.discovery.model; + + +import com.loafle.overflow.module.discovery.type.PortType; + +import java.util.Date; + +/** + * Created by root on 17. 6. 4. + */ + +public class Service { + + + private long id; + + + private Port port; + public Port getPort() { + return port; + } + + public void setPort(Port port) { + this.port = port; + } + + + private PortType portType; + + + private String serviceName; + + + private Date createDate; + + + private Date updateDate; + + private boolean target; + + public Service() {} + + public Service(Port port, PortType t, String serviceName) { + this.port = port; + this.portType = t; + this.serviceName = serviceName; + } + + public PortType getPortType() { + return portType; + } + + public void setPortType(PortType portType) { + this.portType = portType; + } + + public String getServiceName() { + return serviceName; + } + + public void setServiceName(String serviceName) { + this.serviceName = serviceName; + } + + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + public Date getUpdateDate() { + return updateDate; + } + + public void setUpdateDate(Date updateDate) { + this.updateDate = updateDate; + } + + public boolean isTarget() { + return target; + } + + public void setTarget(boolean target) { + this.target = target; + } +} 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..dd8b9b6 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/discovery/model/Zone.java @@ -0,0 +1,70 @@ +package com.loafle.overflow.module.discovery.model; + +/** + * Created by snoop on 17. 10. 31. + */ +public class Zone { + private long id; + private String network; + private String ip; + private String iface; + private String mac; + private long firstScanRange; + private long lastScanRange; + + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + public String getNetwork() { + return network; + } + + public void setNetwork(String network) { + this.network = network; + } + + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public String getIface() { + return iface; + } + + public void setIface(String iface) { + this.iface = iface; + } + + public String getMac() { + return mac; + } + + public void setMac(String mac) { + this.mac = mac; + } + + public long getFirstScanRange() { + return firstScanRange; + } + + public void setFirstScanRange(long firstScanRange) { + this.firstScanRange = firstScanRange; + } + + public long getLastScanRange() { + return lastScanRange; + } + + public void setLastScanRange(long lastScanRange) { + this.lastScanRange = lastScanRange; + } +} 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..d9eba49 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/discovery/service/DiscoveryService.java @@ -0,0 +1,8 @@ +package com.loafle.overflow.module.discovery.service; + +/** + * Created by snoop on 17. 9. 28. + */ +public interface DiscoveryService { + +} diff --git a/src/main/java/com/loafle/overflow/module/discovery/type/PortType.java b/src/main/java/com/loafle/overflow/module/discovery/type/PortType.java new file mode 100644 index 0000000..c080c24 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/discovery/type/PortType.java @@ -0,0 +1,18 @@ +package com.loafle.overflow.module.discovery.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/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..57e39d6 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/domain/service/DomainMemberService.java @@ -0,0 +1,8 @@ +package com.loafle.overflow.module.domain.service; + +/** + * Created by snoop on 17. 6. 28. + */ +public interface DomainMemberService { + +} 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..5af4f6d --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/domain/service/DomainService.java @@ -0,0 +1,8 @@ +package com.loafle.overflow.module.domain.service; + +/** + * Created by snoop on 17. 6. 28. + */ +public interface DomainService { + +} 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..15e278e --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/email/service/EmailAuthService.java @@ -0,0 +1,8 @@ +package com.loafle.overflow.module.email.service; + +/** + * Created by geek on 17. 6. 28. + */ +public interface EmailAuthService { + +} 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..73f6ce0 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/history/service/HistoryService.java @@ -0,0 +1,4 @@ +package com.loafle.overflow.module.history.service; + +public interface HistoryService { +} 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..1fe1bd3 --- /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..a07ad40 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/service/InfraHostService.java @@ -0,0 +1,9 @@ +package com.loafle.overflow.module.infra.service; + +/** + * Created by insanity on 17. 6. 28. + */ + +public interface InfraHostService { + +} 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..67d7d4a --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/service/InfraMachineService.java @@ -0,0 +1,8 @@ +package com.loafle.overflow.module.infra.service; + +/** + * Created by insanity on 17. 6. 28. + */ +public interface InfraMachineService { + +} 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..cef857a --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/service/InfraOSApplicationService.java @@ -0,0 +1,9 @@ +package com.loafle.overflow.module.infra.service; + +/** + * Created by insanity on 17. 6. 28. + */ + +public interface InfraOSApplicationService { + +} 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..8ed71cd --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/service/InfraOSDaemonService.java @@ -0,0 +1,8 @@ +package com.loafle.overflow.module.infra.service; + +/** + * Created by insanity on 17. 6. 28. + */ + +public interface InfraOSDaemonService { +} 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..a5873d6 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/service/InfraOSPortService.java @@ -0,0 +1,9 @@ +package com.loafle.overflow.module.infra.service; + +/** + * Created by insanity on 17. 6. 28. + */ + +public interface InfraOSPortService { + +} 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..2924f1d --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/service/InfraOSService.java @@ -0,0 +1,8 @@ +package com.loafle.overflow.module.infra.service; + +/** + * Created by insanity on 17. 6. 28. + */ + +public interface InfraOSService { +} 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..d22fa52 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/service/InfraService.java @@ -0,0 +1,9 @@ +package com.loafle.overflow.module.infra.service; + +/** + * Created by insanity on 17. 6. 28. + */ + +public interface InfraService { + +} 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..5b0cd4d --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/member/model/Member.java @@ -0,0 +1,114 @@ +package com.loafle.overflow.module.member.model; + +import com.loafle.overflow.module.meta.model.MetaMemberStatus; +import org.codehaus.jackson.annotate.JsonIgnore; + +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 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 + @JsonIgnore + @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/java/com/loafle/overflow/AppTest.java b/src/test/java/com/loafle/overflow/AppTest.java new file mode 100644 index 0000000..d580b5d --- /dev/null +++ b/src/test/java/com/loafle/overflow/AppTest.java @@ -0,0 +1,14 @@ + +package com.loafle.overflow; +import static org.junit.Assert.*; + +import org.junit.Ignore; +import org.junit.Test; + +public class AppTest { + @Test + @Ignore + public void testSum() { + fail("Not yet implemented"); + } +} \ No newline at end of file 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