초기 기본 웹애플리케이션 등록
This commit is contained in:
parent
7ba8f48c29
commit
bb36b2784e
42
.classpath
Normal file
42
.classpath
Normal file
@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v8.5">
|
||||
<attributes>
|
||||
<attribute name="owner.project.facets" value="jst.web"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
125
.gitignore
vendored
Normal file
125
.gitignore
vendored
Normal file
@ -0,0 +1,125 @@
|
||||
|
||||
# Created by https://www.toptal.com/developers/gitignore/api/java,windows,eclipse
|
||||
# Edit at https://www.toptal.com/developers/gitignore?templates=java,windows,eclipse
|
||||
|
||||
### nLib ###
|
||||
data/**/*
|
||||
|
||||
### Eclipse ###
|
||||
.metadata
|
||||
bin/
|
||||
tmp/
|
||||
*.tmp
|
||||
*.bak
|
||||
*.swp
|
||||
*~.nib
|
||||
local.properties
|
||||
.settings/
|
||||
.loadpath
|
||||
.recommenders
|
||||
|
||||
# External tool builders
|
||||
.externalToolBuilders/
|
||||
|
||||
# Locally stored "Eclipse launch configurations"
|
||||
*.launch
|
||||
|
||||
# PyDev specific (Python IDE for Eclipse)
|
||||
*.pydevproject
|
||||
|
||||
# CDT-specific (C/C++ Development Tooling)
|
||||
.cproject
|
||||
|
||||
# CDT- autotools
|
||||
.autotools
|
||||
|
||||
# Java annotation processor (APT)
|
||||
.factorypath
|
||||
|
||||
# PDT-specific (PHP Development Tools)
|
||||
.buildpath
|
||||
|
||||
# sbteclipse plugin
|
||||
.target
|
||||
|
||||
# Tern plugin
|
||||
.tern-project
|
||||
|
||||
# TeXlipse plugin
|
||||
.texlipse
|
||||
|
||||
# STS (Spring Tool Suite)
|
||||
.springBeans
|
||||
|
||||
# Code Recommenders
|
||||
.recommenders/
|
||||
|
||||
# Annotation Processing
|
||||
.apt_generated/
|
||||
.apt_generated_test/
|
||||
|
||||
# Scala IDE specific (Scala & Java development for Eclipse)
|
||||
.cache-main
|
||||
.scala_dependencies
|
||||
.worksheet
|
||||
|
||||
# Uncomment this line if you wish to ignore the project description file.
|
||||
# Typically, this file would be tracked if it contains build/dependency configurations:
|
||||
#.project
|
||||
|
||||
### Eclipse Patch ###
|
||||
# Spring Boot Tooling
|
||||
.sts4-cache/
|
||||
|
||||
### Java ###
|
||||
# Compiled class file
|
||||
*.class
|
||||
|
||||
# Log file
|
||||
*.log
|
||||
|
||||
# BlueJ files
|
||||
*.ctxt
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.nar
|
||||
*.ear
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.rar
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
|
||||
### Windows ###
|
||||
# Windows thumbnail cache files
|
||||
Thumbs.db
|
||||
Thumbs.db:encryptable
|
||||
ehthumbs.db
|
||||
ehthumbs_vista.db
|
||||
|
||||
# Dump file
|
||||
*.stackdump
|
||||
|
||||
# Folder config file
|
||||
[Dd]esktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Windows Installer files
|
||||
*.cab
|
||||
*.msi
|
||||
*.msix
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# Windows shortcuts
|
||||
*.lnk
|
||||
|
||||
# End of https://www.toptal.com/developers/gitignore/api/java,windows,eclipse
|
||||
49
.project
Normal file
49
.project
Normal file
@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>nlib</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.validation.validationbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.springframework.ide.eclipse.core.springbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.springframework.ide.eclipse.boot.validation.springbootbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
||||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.springframework.ide.eclipse.core.springnature</nature>
|
||||
<nature>egovframework.dev.imp.ide.natures.egovnature</nature>
|
||||
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
265
doc/CLD/00.Main.cld
Normal file
265
doc/CLD/00.Main.cld
Normal file
@ -0,0 +1,265 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<net.java.amateras.uml.model.RootModel>
|
||||
<backgroundColor>
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>206</blue>
|
||||
</backgroundColor>
|
||||
<foregroundColor>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</foregroundColor>
|
||||
<showIcon>true</showIcon>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.model.RootModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<sourceConnections/>
|
||||
<targetConnections/>
|
||||
<children>
|
||||
<net.java.amateras.uml.classdiagram.model.ClassModel>
|
||||
<backgroundColor reference="../../../backgroundColor"/>
|
||||
<foregroundColor reference="../../../foregroundColor"/>
|
||||
<showIcon>true</showIcon>
|
||||
<parent class="net.java.amateras.uml.model.RootModel" reference="../../.."/>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<constraint>
|
||||
<height>-1</height>
|
||||
<width>-1</width>
|
||||
<x>142</x>
|
||||
<y>106</y>
|
||||
</constraint>
|
||||
<sourceConnections/>
|
||||
<targetConnections>
|
||||
<net.java.amateras.uml.classdiagram.model.AggregationModel>
|
||||
<showIcon>true</showIcon>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.AggregationModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel">
|
||||
<backgroundColor reference="../../../../../../backgroundColor"/>
|
||||
<foregroundColor reference="../../../../../../foregroundColor"/>
|
||||
<showIcon>true</showIcon>
|
||||
<parent class="net.java.amateras.uml.model.RootModel" reference="../../../../../.."/>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<constraint>
|
||||
<height>-1</height>
|
||||
<width>-1</width>
|
||||
<x>144</x>
|
||||
<y>221</y>
|
||||
</constraint>
|
||||
<sourceConnections>
|
||||
<net.java.amateras.uml.classdiagram.model.AggregationModel reference="../../.."/>
|
||||
</sourceConnections>
|
||||
<targetConnections>
|
||||
<net.java.amateras.uml.classdiagram.model.AggregationModel>
|
||||
<showIcon>true</showIcon>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.AggregationModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel">
|
||||
<backgroundColor reference="../../../../../../../../../backgroundColor"/>
|
||||
<foregroundColor reference="../../../../../../../../../foregroundColor"/>
|
||||
<showIcon>true</showIcon>
|
||||
<parent class="net.java.amateras.uml.model.RootModel" reference="../../../../../../../../.."/>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<constraint>
|
||||
<height>-1</height>
|
||||
<width>-1</width>
|
||||
<x>384</x>
|
||||
<y>213</y>
|
||||
</constraint>
|
||||
<sourceConnections>
|
||||
<net.java.amateras.uml.classdiagram.model.AggregationModel reference="../../.."/>
|
||||
</sourceConnections>
|
||||
<targetConnections/>
|
||||
<children/>
|
||||
<filterProperty/>
|
||||
<propertyDescriptors>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_stereo_type</id>
|
||||
<display>Stereo Type</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_simpleEntityName</id>
|
||||
<display>Simple Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_entityName</id>
|
||||
<display>Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<id class="string">_background</id>
|
||||
<display>Background Color</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_attrs</id>
|
||||
<display>Attributes...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_operations</id>
|
||||
<display>Operations...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
<id class="string">_abstract</id>
|
||||
<display>abstract</display>
|
||||
<incompatible>false</incompatible>
|
||||
</net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
</propertyDescriptors>
|
||||
<stereoType></stereoType>
|
||||
<name>Class17</name>
|
||||
<isAbstract>false</isAbstract>
|
||||
</source>
|
||||
<target class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../.."/>
|
||||
<bendpoints/>
|
||||
<stereoType></stereoType>
|
||||
<fromMultiplicity></fromMultiplicity>
|
||||
<toMultiplicity></toMultiplicity>
|
||||
</net.java.amateras.uml.classdiagram.model.AggregationModel>
|
||||
</targetConnections>
|
||||
<children/>
|
||||
<filterProperty/>
|
||||
<propertyDescriptors>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_stereo_type</id>
|
||||
<display>Stereo Type</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_simpleEntityName</id>
|
||||
<display>Simple Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_entityName</id>
|
||||
<display>Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<id class="string">_background</id>
|
||||
<display>Background Color</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_attrs</id>
|
||||
<display>Attributes...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_operations</id>
|
||||
<display>Operations...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
<id class="string">_abstract</id>
|
||||
<display>abstract</display>
|
||||
<incompatible>false</incompatible>
|
||||
</net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
</propertyDescriptors>
|
||||
<stereoType></stereoType>
|
||||
<name>Class16</name>
|
||||
<isAbstract>false</isAbstract>
|
||||
</source>
|
||||
<target class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../.."/>
|
||||
<bendpoints/>
|
||||
<stereoType></stereoType>
|
||||
<fromMultiplicity></fromMultiplicity>
|
||||
<toMultiplicity></toMultiplicity>
|
||||
</net.java.amateras.uml.classdiagram.model.AggregationModel>
|
||||
</targetConnections>
|
||||
<children/>
|
||||
<filterProperty/>
|
||||
<propertyDescriptors>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_stereo_type</id>
|
||||
<display>Stereo Type</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_simpleEntityName</id>
|
||||
<display>Simple Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_entityName</id>
|
||||
<display>Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<id class="string">_background</id>
|
||||
<display>Background Color</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_attrs</id>
|
||||
<display>Attributes...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_operations</id>
|
||||
<display>Operations...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
<id class="string">_abstract</id>
|
||||
<display>abstract</display>
|
||||
<incompatible>false</incompatible>
|
||||
</net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
</propertyDescriptors>
|
||||
<stereoType></stereoType>
|
||||
<name>Class15</name>
|
||||
<isAbstract>false</isAbstract>
|
||||
</net.java.amateras.uml.classdiagram.model.ClassModel>
|
||||
<net.java.amateras.uml.classdiagram.model.ClassModel reference="../net.java.amateras.uml.classdiagram.model.ClassModel/targetConnections/net.java.amateras.uml.classdiagram.model.AggregationModel/source"/>
|
||||
<net.java.amateras.uml.classdiagram.model.ClassModel reference="../net.java.amateras.uml.classdiagram.model.ClassModel/targetConnections/net.java.amateras.uml.classdiagram.model.AggregationModel/source/targetConnections/net.java.amateras.uml.classdiagram.model.AggregationModel/source"/>
|
||||
</children>
|
||||
<filterProperty/>
|
||||
</net.java.amateras.uml.model.RootModel>
|
||||
265
doc/CLD/01.User.cld
Normal file
265
doc/CLD/01.User.cld
Normal file
@ -0,0 +1,265 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<net.java.amateras.uml.model.RootModel>
|
||||
<backgroundColor>
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>206</blue>
|
||||
</backgroundColor>
|
||||
<foregroundColor>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</foregroundColor>
|
||||
<showIcon>true</showIcon>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.model.RootModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<sourceConnections/>
|
||||
<targetConnections/>
|
||||
<children>
|
||||
<net.java.amateras.uml.classdiagram.model.ClassModel>
|
||||
<backgroundColor reference="../../../backgroundColor"/>
|
||||
<foregroundColor reference="../../../foregroundColor"/>
|
||||
<showIcon>true</showIcon>
|
||||
<parent class="net.java.amateras.uml.model.RootModel" reference="../../.."/>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<constraint>
|
||||
<height>-1</height>
|
||||
<width>-1</width>
|
||||
<x>142</x>
|
||||
<y>106</y>
|
||||
</constraint>
|
||||
<sourceConnections/>
|
||||
<targetConnections>
|
||||
<net.java.amateras.uml.classdiagram.model.AggregationModel>
|
||||
<showIcon>true</showIcon>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.AggregationModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel">
|
||||
<backgroundColor reference="../../../../../../backgroundColor"/>
|
||||
<foregroundColor reference="../../../../../../foregroundColor"/>
|
||||
<showIcon>true</showIcon>
|
||||
<parent class="net.java.amateras.uml.model.RootModel" reference="../../../../../.."/>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<constraint>
|
||||
<height>-1</height>
|
||||
<width>-1</width>
|
||||
<x>144</x>
|
||||
<y>221</y>
|
||||
</constraint>
|
||||
<sourceConnections>
|
||||
<net.java.amateras.uml.classdiagram.model.AggregationModel reference="../../.."/>
|
||||
</sourceConnections>
|
||||
<targetConnections>
|
||||
<net.java.amateras.uml.classdiagram.model.AggregationModel>
|
||||
<showIcon>true</showIcon>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.AggregationModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel">
|
||||
<backgroundColor reference="../../../../../../../../../backgroundColor"/>
|
||||
<foregroundColor reference="../../../../../../../../../foregroundColor"/>
|
||||
<showIcon>true</showIcon>
|
||||
<parent class="net.java.amateras.uml.model.RootModel" reference="../../../../../../../../.."/>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<constraint>
|
||||
<height>-1</height>
|
||||
<width>-1</width>
|
||||
<x>384</x>
|
||||
<y>213</y>
|
||||
</constraint>
|
||||
<sourceConnections>
|
||||
<net.java.amateras.uml.classdiagram.model.AggregationModel reference="../../.."/>
|
||||
</sourceConnections>
|
||||
<targetConnections/>
|
||||
<children/>
|
||||
<filterProperty/>
|
||||
<propertyDescriptors>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_stereo_type</id>
|
||||
<display>Stereo Type</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_simpleEntityName</id>
|
||||
<display>Simple Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_entityName</id>
|
||||
<display>Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<id class="string">_background</id>
|
||||
<display>Background Color</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_attrs</id>
|
||||
<display>Attributes...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_operations</id>
|
||||
<display>Operations...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
<id class="string">_abstract</id>
|
||||
<display>abstract</display>
|
||||
<incompatible>false</incompatible>
|
||||
</net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
</propertyDescriptors>
|
||||
<stereoType></stereoType>
|
||||
<name>Class17</name>
|
||||
<isAbstract>false</isAbstract>
|
||||
</source>
|
||||
<target class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../.."/>
|
||||
<bendpoints/>
|
||||
<stereoType></stereoType>
|
||||
<fromMultiplicity></fromMultiplicity>
|
||||
<toMultiplicity></toMultiplicity>
|
||||
</net.java.amateras.uml.classdiagram.model.AggregationModel>
|
||||
</targetConnections>
|
||||
<children/>
|
||||
<filterProperty/>
|
||||
<propertyDescriptors>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_stereo_type</id>
|
||||
<display>Stereo Type</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_simpleEntityName</id>
|
||||
<display>Simple Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_entityName</id>
|
||||
<display>Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<id class="string">_background</id>
|
||||
<display>Background Color</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_attrs</id>
|
||||
<display>Attributes...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_operations</id>
|
||||
<display>Operations...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
<id class="string">_abstract</id>
|
||||
<display>abstract</display>
|
||||
<incompatible>false</incompatible>
|
||||
</net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
</propertyDescriptors>
|
||||
<stereoType></stereoType>
|
||||
<name>Class16</name>
|
||||
<isAbstract>false</isAbstract>
|
||||
</source>
|
||||
<target class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../.."/>
|
||||
<bendpoints/>
|
||||
<stereoType></stereoType>
|
||||
<fromMultiplicity></fromMultiplicity>
|
||||
<toMultiplicity></toMultiplicity>
|
||||
</net.java.amateras.uml.classdiagram.model.AggregationModel>
|
||||
</targetConnections>
|
||||
<children/>
|
||||
<filterProperty/>
|
||||
<propertyDescriptors>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_stereo_type</id>
|
||||
<display>Stereo Type</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_simpleEntityName</id>
|
||||
<display>Simple Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_entityName</id>
|
||||
<display>Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<id class="string">_background</id>
|
||||
<display>Background Color</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_attrs</id>
|
||||
<display>Attributes...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_operations</id>
|
||||
<display>Operations...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
<id class="string">_abstract</id>
|
||||
<display>abstract</display>
|
||||
<incompatible>false</incompatible>
|
||||
</net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
</propertyDescriptors>
|
||||
<stereoType></stereoType>
|
||||
<name>Class15</name>
|
||||
<isAbstract>false</isAbstract>
|
||||
</net.java.amateras.uml.classdiagram.model.ClassModel>
|
||||
<net.java.amateras.uml.classdiagram.model.ClassModel reference="../net.java.amateras.uml.classdiagram.model.ClassModel/targetConnections/net.java.amateras.uml.classdiagram.model.AggregationModel/source"/>
|
||||
<net.java.amateras.uml.classdiagram.model.ClassModel reference="../net.java.amateras.uml.classdiagram.model.ClassModel/targetConnections/net.java.amateras.uml.classdiagram.model.AggregationModel/source/targetConnections/net.java.amateras.uml.classdiagram.model.AggregationModel/source"/>
|
||||
</children>
|
||||
<filterProperty/>
|
||||
</net.java.amateras.uml.model.RootModel>
|
||||
265
doc/CLD/02.Login.cld
Normal file
265
doc/CLD/02.Login.cld
Normal file
@ -0,0 +1,265 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<net.java.amateras.uml.model.RootModel>
|
||||
<backgroundColor>
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>206</blue>
|
||||
</backgroundColor>
|
||||
<foregroundColor>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</foregroundColor>
|
||||
<showIcon>true</showIcon>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.model.RootModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<sourceConnections/>
|
||||
<targetConnections/>
|
||||
<children>
|
||||
<net.java.amateras.uml.classdiagram.model.ClassModel>
|
||||
<backgroundColor reference="../../../backgroundColor"/>
|
||||
<foregroundColor reference="../../../foregroundColor"/>
|
||||
<showIcon>true</showIcon>
|
||||
<parent class="net.java.amateras.uml.model.RootModel" reference="../../.."/>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<constraint>
|
||||
<height>-1</height>
|
||||
<width>-1</width>
|
||||
<x>142</x>
|
||||
<y>106</y>
|
||||
</constraint>
|
||||
<sourceConnections/>
|
||||
<targetConnections>
|
||||
<net.java.amateras.uml.classdiagram.model.AggregationModel>
|
||||
<showIcon>true</showIcon>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.AggregationModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel">
|
||||
<backgroundColor reference="../../../../../../backgroundColor"/>
|
||||
<foregroundColor reference="../../../../../../foregroundColor"/>
|
||||
<showIcon>true</showIcon>
|
||||
<parent class="net.java.amateras.uml.model.RootModel" reference="../../../../../.."/>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<constraint>
|
||||
<height>-1</height>
|
||||
<width>-1</width>
|
||||
<x>144</x>
|
||||
<y>221</y>
|
||||
</constraint>
|
||||
<sourceConnections>
|
||||
<net.java.amateras.uml.classdiagram.model.AggregationModel reference="../../.."/>
|
||||
</sourceConnections>
|
||||
<targetConnections>
|
||||
<net.java.amateras.uml.classdiagram.model.AggregationModel>
|
||||
<showIcon>true</showIcon>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.AggregationModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel">
|
||||
<backgroundColor reference="../../../../../../../../../backgroundColor"/>
|
||||
<foregroundColor reference="../../../../../../../../../foregroundColor"/>
|
||||
<showIcon>true</showIcon>
|
||||
<parent class="net.java.amateras.uml.model.RootModel" reference="../../../../../../../../.."/>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<constraint>
|
||||
<height>-1</height>
|
||||
<width>-1</width>
|
||||
<x>384</x>
|
||||
<y>213</y>
|
||||
</constraint>
|
||||
<sourceConnections>
|
||||
<net.java.amateras.uml.classdiagram.model.AggregationModel reference="../../.."/>
|
||||
</sourceConnections>
|
||||
<targetConnections/>
|
||||
<children/>
|
||||
<filterProperty/>
|
||||
<propertyDescriptors>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_stereo_type</id>
|
||||
<display>Stereo Type</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_simpleEntityName</id>
|
||||
<display>Simple Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_entityName</id>
|
||||
<display>Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<id class="string">_background</id>
|
||||
<display>Background Color</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_attrs</id>
|
||||
<display>Attributes...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_operations</id>
|
||||
<display>Operations...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
<id class="string">_abstract</id>
|
||||
<display>abstract</display>
|
||||
<incompatible>false</incompatible>
|
||||
</net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
</propertyDescriptors>
|
||||
<stereoType></stereoType>
|
||||
<name>Class17</name>
|
||||
<isAbstract>false</isAbstract>
|
||||
</source>
|
||||
<target class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../.."/>
|
||||
<bendpoints/>
|
||||
<stereoType></stereoType>
|
||||
<fromMultiplicity></fromMultiplicity>
|
||||
<toMultiplicity></toMultiplicity>
|
||||
</net.java.amateras.uml.classdiagram.model.AggregationModel>
|
||||
</targetConnections>
|
||||
<children/>
|
||||
<filterProperty/>
|
||||
<propertyDescriptors>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_stereo_type</id>
|
||||
<display>Stereo Type</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_simpleEntityName</id>
|
||||
<display>Simple Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_entityName</id>
|
||||
<display>Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<id class="string">_background</id>
|
||||
<display>Background Color</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_attrs</id>
|
||||
<display>Attributes...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_operations</id>
|
||||
<display>Operations...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
<id class="string">_abstract</id>
|
||||
<display>abstract</display>
|
||||
<incompatible>false</incompatible>
|
||||
</net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
</propertyDescriptors>
|
||||
<stereoType></stereoType>
|
||||
<name>Class16</name>
|
||||
<isAbstract>false</isAbstract>
|
||||
</source>
|
||||
<target class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../.."/>
|
||||
<bendpoints/>
|
||||
<stereoType></stereoType>
|
||||
<fromMultiplicity></fromMultiplicity>
|
||||
<toMultiplicity></toMultiplicity>
|
||||
</net.java.amateras.uml.classdiagram.model.AggregationModel>
|
||||
</targetConnections>
|
||||
<children/>
|
||||
<filterProperty/>
|
||||
<propertyDescriptors>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_stereo_type</id>
|
||||
<display>Stereo Type</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_simpleEntityName</id>
|
||||
<display>Simple Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_entityName</id>
|
||||
<display>Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<id class="string">_background</id>
|
||||
<display>Background Color</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_attrs</id>
|
||||
<display>Attributes...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_operations</id>
|
||||
<display>Operations...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
<id class="string">_abstract</id>
|
||||
<display>abstract</display>
|
||||
<incompatible>false</incompatible>
|
||||
</net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
</propertyDescriptors>
|
||||
<stereoType></stereoType>
|
||||
<name>Class15</name>
|
||||
<isAbstract>false</isAbstract>
|
||||
</net.java.amateras.uml.classdiagram.model.ClassModel>
|
||||
<net.java.amateras.uml.classdiagram.model.ClassModel reference="../net.java.amateras.uml.classdiagram.model.ClassModel/targetConnections/net.java.amateras.uml.classdiagram.model.AggregationModel/source"/>
|
||||
<net.java.amateras.uml.classdiagram.model.ClassModel reference="../net.java.amateras.uml.classdiagram.model.ClassModel/targetConnections/net.java.amateras.uml.classdiagram.model.AggregationModel/source/targetConnections/net.java.amateras.uml.classdiagram.model.AggregationModel/source"/>
|
||||
</children>
|
||||
<filterProperty/>
|
||||
</net.java.amateras.uml.model.RootModel>
|
||||
265
doc/CLD/03.Board.cld
Normal file
265
doc/CLD/03.Board.cld
Normal file
@ -0,0 +1,265 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<net.java.amateras.uml.model.RootModel>
|
||||
<backgroundColor>
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>206</blue>
|
||||
</backgroundColor>
|
||||
<foregroundColor>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</foregroundColor>
|
||||
<showIcon>true</showIcon>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.model.RootModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<sourceConnections/>
|
||||
<targetConnections/>
|
||||
<children>
|
||||
<net.java.amateras.uml.classdiagram.model.ClassModel>
|
||||
<backgroundColor reference="../../../backgroundColor"/>
|
||||
<foregroundColor reference="../../../foregroundColor"/>
|
||||
<showIcon>true</showIcon>
|
||||
<parent class="net.java.amateras.uml.model.RootModel" reference="../../.."/>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<constraint>
|
||||
<height>-1</height>
|
||||
<width>-1</width>
|
||||
<x>142</x>
|
||||
<y>106</y>
|
||||
</constraint>
|
||||
<sourceConnections/>
|
||||
<targetConnections>
|
||||
<net.java.amateras.uml.classdiagram.model.AggregationModel>
|
||||
<showIcon>true</showIcon>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.AggregationModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel">
|
||||
<backgroundColor reference="../../../../../../backgroundColor"/>
|
||||
<foregroundColor reference="../../../../../../foregroundColor"/>
|
||||
<showIcon>true</showIcon>
|
||||
<parent class="net.java.amateras.uml.model.RootModel" reference="../../../../../.."/>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<constraint>
|
||||
<height>-1</height>
|
||||
<width>-1</width>
|
||||
<x>144</x>
|
||||
<y>221</y>
|
||||
</constraint>
|
||||
<sourceConnections>
|
||||
<net.java.amateras.uml.classdiagram.model.AggregationModel reference="../../.."/>
|
||||
</sourceConnections>
|
||||
<targetConnections>
|
||||
<net.java.amateras.uml.classdiagram.model.AggregationModel>
|
||||
<showIcon>true</showIcon>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.AggregationModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel">
|
||||
<backgroundColor reference="../../../../../../../../../backgroundColor"/>
|
||||
<foregroundColor reference="../../../../../../../../../foregroundColor"/>
|
||||
<showIcon>true</showIcon>
|
||||
<parent class="net.java.amateras.uml.model.RootModel" reference="../../../../../../../../.."/>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<constraint>
|
||||
<height>-1</height>
|
||||
<width>-1</width>
|
||||
<x>384</x>
|
||||
<y>213</y>
|
||||
</constraint>
|
||||
<sourceConnections>
|
||||
<net.java.amateras.uml.classdiagram.model.AggregationModel reference="../../.."/>
|
||||
</sourceConnections>
|
||||
<targetConnections/>
|
||||
<children/>
|
||||
<filterProperty/>
|
||||
<propertyDescriptors>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_stereo_type</id>
|
||||
<display>Stereo Type</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_simpleEntityName</id>
|
||||
<display>Simple Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_entityName</id>
|
||||
<display>Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<id class="string">_background</id>
|
||||
<display>Background Color</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_attrs</id>
|
||||
<display>Attributes...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_operations</id>
|
||||
<display>Operations...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
<id class="string">_abstract</id>
|
||||
<display>abstract</display>
|
||||
<incompatible>false</incompatible>
|
||||
</net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
</propertyDescriptors>
|
||||
<stereoType></stereoType>
|
||||
<name>Class17</name>
|
||||
<isAbstract>false</isAbstract>
|
||||
</source>
|
||||
<target class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../.."/>
|
||||
<bendpoints/>
|
||||
<stereoType></stereoType>
|
||||
<fromMultiplicity></fromMultiplicity>
|
||||
<toMultiplicity></toMultiplicity>
|
||||
</net.java.amateras.uml.classdiagram.model.AggregationModel>
|
||||
</targetConnections>
|
||||
<children/>
|
||||
<filterProperty/>
|
||||
<propertyDescriptors>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_stereo_type</id>
|
||||
<display>Stereo Type</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_simpleEntityName</id>
|
||||
<display>Simple Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_entityName</id>
|
||||
<display>Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<id class="string">_background</id>
|
||||
<display>Background Color</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_attrs</id>
|
||||
<display>Attributes...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_operations</id>
|
||||
<display>Operations...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
<id class="string">_abstract</id>
|
||||
<display>abstract</display>
|
||||
<incompatible>false</incompatible>
|
||||
</net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
</propertyDescriptors>
|
||||
<stereoType></stereoType>
|
||||
<name>Class16</name>
|
||||
<isAbstract>false</isAbstract>
|
||||
</source>
|
||||
<target class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../.."/>
|
||||
<bendpoints/>
|
||||
<stereoType></stereoType>
|
||||
<fromMultiplicity></fromMultiplicity>
|
||||
<toMultiplicity></toMultiplicity>
|
||||
</net.java.amateras.uml.classdiagram.model.AggregationModel>
|
||||
</targetConnections>
|
||||
<children/>
|
||||
<filterProperty/>
|
||||
<propertyDescriptors>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_stereo_type</id>
|
||||
<display>Stereo Type</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_simpleEntityName</id>
|
||||
<display>Simple Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_entityName</id>
|
||||
<display>Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<id class="string">_background</id>
|
||||
<display>Background Color</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_attrs</id>
|
||||
<display>Attributes...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_operations</id>
|
||||
<display>Operations...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
<id class="string">_abstract</id>
|
||||
<display>abstract</display>
|
||||
<incompatible>false</incompatible>
|
||||
</net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
</propertyDescriptors>
|
||||
<stereoType></stereoType>
|
||||
<name>Class15</name>
|
||||
<isAbstract>false</isAbstract>
|
||||
</net.java.amateras.uml.classdiagram.model.ClassModel>
|
||||
<net.java.amateras.uml.classdiagram.model.ClassModel reference="../net.java.amateras.uml.classdiagram.model.ClassModel/targetConnections/net.java.amateras.uml.classdiagram.model.AggregationModel/source"/>
|
||||
<net.java.amateras.uml.classdiagram.model.ClassModel reference="../net.java.amateras.uml.classdiagram.model.ClassModel/targetConnections/net.java.amateras.uml.classdiagram.model.AggregationModel/source/targetConnections/net.java.amateras.uml.classdiagram.model.AggregationModel/source"/>
|
||||
</children>
|
||||
<filterProperty/>
|
||||
</net.java.amateras.uml.model.RootModel>
|
||||
265
doc/CLD/04.Collection.cld
Normal file
265
doc/CLD/04.Collection.cld
Normal file
@ -0,0 +1,265 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<net.java.amateras.uml.model.RootModel>
|
||||
<backgroundColor>
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>206</blue>
|
||||
</backgroundColor>
|
||||
<foregroundColor>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</foregroundColor>
|
||||
<showIcon>true</showIcon>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.model.RootModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<sourceConnections/>
|
||||
<targetConnections/>
|
||||
<children>
|
||||
<net.java.amateras.uml.classdiagram.model.ClassModel>
|
||||
<backgroundColor reference="../../../backgroundColor"/>
|
||||
<foregroundColor reference="../../../foregroundColor"/>
|
||||
<showIcon>true</showIcon>
|
||||
<parent class="net.java.amateras.uml.model.RootModel" reference="../../.."/>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<constraint>
|
||||
<height>-1</height>
|
||||
<width>-1</width>
|
||||
<x>142</x>
|
||||
<y>106</y>
|
||||
</constraint>
|
||||
<sourceConnections/>
|
||||
<targetConnections>
|
||||
<net.java.amateras.uml.classdiagram.model.AggregationModel>
|
||||
<showIcon>true</showIcon>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.AggregationModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel">
|
||||
<backgroundColor reference="../../../../../../backgroundColor"/>
|
||||
<foregroundColor reference="../../../../../../foregroundColor"/>
|
||||
<showIcon>true</showIcon>
|
||||
<parent class="net.java.amateras.uml.model.RootModel" reference="../../../../../.."/>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<constraint>
|
||||
<height>-1</height>
|
||||
<width>-1</width>
|
||||
<x>144</x>
|
||||
<y>221</y>
|
||||
</constraint>
|
||||
<sourceConnections>
|
||||
<net.java.amateras.uml.classdiagram.model.AggregationModel reference="../../.."/>
|
||||
</sourceConnections>
|
||||
<targetConnections>
|
||||
<net.java.amateras.uml.classdiagram.model.AggregationModel>
|
||||
<showIcon>true</showIcon>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.AggregationModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel">
|
||||
<backgroundColor reference="../../../../../../../../../backgroundColor"/>
|
||||
<foregroundColor reference="../../../../../../../../../foregroundColor"/>
|
||||
<showIcon>true</showIcon>
|
||||
<parent class="net.java.amateras.uml.model.RootModel" reference="../../../../../../../../.."/>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<constraint>
|
||||
<height>-1</height>
|
||||
<width>-1</width>
|
||||
<x>384</x>
|
||||
<y>213</y>
|
||||
</constraint>
|
||||
<sourceConnections>
|
||||
<net.java.amateras.uml.classdiagram.model.AggregationModel reference="../../.."/>
|
||||
</sourceConnections>
|
||||
<targetConnections/>
|
||||
<children/>
|
||||
<filterProperty/>
|
||||
<propertyDescriptors>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_stereo_type</id>
|
||||
<display>Stereo Type</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_simpleEntityName</id>
|
||||
<display>Simple Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_entityName</id>
|
||||
<display>Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<id class="string">_background</id>
|
||||
<display>Background Color</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_attrs</id>
|
||||
<display>Attributes...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_operations</id>
|
||||
<display>Operations...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
<id class="string">_abstract</id>
|
||||
<display>abstract</display>
|
||||
<incompatible>false</incompatible>
|
||||
</net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
</propertyDescriptors>
|
||||
<stereoType></stereoType>
|
||||
<name>Class17</name>
|
||||
<isAbstract>false</isAbstract>
|
||||
</source>
|
||||
<target class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../.."/>
|
||||
<bendpoints/>
|
||||
<stereoType></stereoType>
|
||||
<fromMultiplicity></fromMultiplicity>
|
||||
<toMultiplicity></toMultiplicity>
|
||||
</net.java.amateras.uml.classdiagram.model.AggregationModel>
|
||||
</targetConnections>
|
||||
<children/>
|
||||
<filterProperty/>
|
||||
<propertyDescriptors>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_stereo_type</id>
|
||||
<display>Stereo Type</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_simpleEntityName</id>
|
||||
<display>Simple Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_entityName</id>
|
||||
<display>Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<id class="string">_background</id>
|
||||
<display>Background Color</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_attrs</id>
|
||||
<display>Attributes...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_operations</id>
|
||||
<display>Operations...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
<id class="string">_abstract</id>
|
||||
<display>abstract</display>
|
||||
<incompatible>false</incompatible>
|
||||
</net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
</propertyDescriptors>
|
||||
<stereoType></stereoType>
|
||||
<name>Class16</name>
|
||||
<isAbstract>false</isAbstract>
|
||||
</source>
|
||||
<target class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../.."/>
|
||||
<bendpoints/>
|
||||
<stereoType></stereoType>
|
||||
<fromMultiplicity></fromMultiplicity>
|
||||
<toMultiplicity></toMultiplicity>
|
||||
</net.java.amateras.uml.classdiagram.model.AggregationModel>
|
||||
</targetConnections>
|
||||
<children/>
|
||||
<filterProperty/>
|
||||
<propertyDescriptors>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_stereo_type</id>
|
||||
<display>Stereo Type</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_simpleEntityName</id>
|
||||
<display>Simple Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_entityName</id>
|
||||
<display>Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<id class="string">_background</id>
|
||||
<display>Background Color</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_attrs</id>
|
||||
<display>Attributes...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_operations</id>
|
||||
<display>Operations...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
<id class="string">_abstract</id>
|
||||
<display>abstract</display>
|
||||
<incompatible>false</incompatible>
|
||||
</net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
</propertyDescriptors>
|
||||
<stereoType></stereoType>
|
||||
<name>Class15</name>
|
||||
<isAbstract>false</isAbstract>
|
||||
</net.java.amateras.uml.classdiagram.model.ClassModel>
|
||||
<net.java.amateras.uml.classdiagram.model.ClassModel reference="../net.java.amateras.uml.classdiagram.model.ClassModel/targetConnections/net.java.amateras.uml.classdiagram.model.AggregationModel/source"/>
|
||||
<net.java.amateras.uml.classdiagram.model.ClassModel reference="../net.java.amateras.uml.classdiagram.model.ClassModel/targetConnections/net.java.amateras.uml.classdiagram.model.AggregationModel/source/targetConnections/net.java.amateras.uml.classdiagram.model.AggregationModel/source"/>
|
||||
</children>
|
||||
<filterProperty/>
|
||||
</net.java.amateras.uml.model.RootModel>
|
||||
265
doc/CLD/05.Rent.cld
Normal file
265
doc/CLD/05.Rent.cld
Normal file
@ -0,0 +1,265 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<net.java.amateras.uml.model.RootModel>
|
||||
<backgroundColor>
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>206</blue>
|
||||
</backgroundColor>
|
||||
<foregroundColor>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</foregroundColor>
|
||||
<showIcon>true</showIcon>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.model.RootModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<sourceConnections/>
|
||||
<targetConnections/>
|
||||
<children>
|
||||
<net.java.amateras.uml.classdiagram.model.ClassModel>
|
||||
<backgroundColor reference="../../../backgroundColor"/>
|
||||
<foregroundColor reference="../../../foregroundColor"/>
|
||||
<showIcon>true</showIcon>
|
||||
<parent class="net.java.amateras.uml.model.RootModel" reference="../../.."/>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<constraint>
|
||||
<height>-1</height>
|
||||
<width>-1</width>
|
||||
<x>142</x>
|
||||
<y>106</y>
|
||||
</constraint>
|
||||
<sourceConnections/>
|
||||
<targetConnections>
|
||||
<net.java.amateras.uml.classdiagram.model.AggregationModel>
|
||||
<showIcon>true</showIcon>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.AggregationModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel">
|
||||
<backgroundColor reference="../../../../../../backgroundColor"/>
|
||||
<foregroundColor reference="../../../../../../foregroundColor"/>
|
||||
<showIcon>true</showIcon>
|
||||
<parent class="net.java.amateras.uml.model.RootModel" reference="../../../../../.."/>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<constraint>
|
||||
<height>-1</height>
|
||||
<width>-1</width>
|
||||
<x>144</x>
|
||||
<y>221</y>
|
||||
</constraint>
|
||||
<sourceConnections>
|
||||
<net.java.amateras.uml.classdiagram.model.AggregationModel reference="../../.."/>
|
||||
</sourceConnections>
|
||||
<targetConnections>
|
||||
<net.java.amateras.uml.classdiagram.model.AggregationModel>
|
||||
<showIcon>true</showIcon>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.AggregationModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel">
|
||||
<backgroundColor reference="../../../../../../../../../backgroundColor"/>
|
||||
<foregroundColor reference="../../../../../../../../../foregroundColor"/>
|
||||
<showIcon>true</showIcon>
|
||||
<parent class="net.java.amateras.uml.model.RootModel" reference="../../../../../../../../.."/>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<constraint>
|
||||
<height>-1</height>
|
||||
<width>-1</width>
|
||||
<x>384</x>
|
||||
<y>213</y>
|
||||
</constraint>
|
||||
<sourceConnections>
|
||||
<net.java.amateras.uml.classdiagram.model.AggregationModel reference="../../.."/>
|
||||
</sourceConnections>
|
||||
<targetConnections/>
|
||||
<children/>
|
||||
<filterProperty/>
|
||||
<propertyDescriptors>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_stereo_type</id>
|
||||
<display>Stereo Type</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_simpleEntityName</id>
|
||||
<display>Simple Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_entityName</id>
|
||||
<display>Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<id class="string">_background</id>
|
||||
<display>Background Color</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_attrs</id>
|
||||
<display>Attributes...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_operations</id>
|
||||
<display>Operations...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
<id class="string">_abstract</id>
|
||||
<display>abstract</display>
|
||||
<incompatible>false</incompatible>
|
||||
</net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
</propertyDescriptors>
|
||||
<stereoType></stereoType>
|
||||
<name>Class17</name>
|
||||
<isAbstract>false</isAbstract>
|
||||
</source>
|
||||
<target class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../.."/>
|
||||
<bendpoints/>
|
||||
<stereoType></stereoType>
|
||||
<fromMultiplicity></fromMultiplicity>
|
||||
<toMultiplicity></toMultiplicity>
|
||||
</net.java.amateras.uml.classdiagram.model.AggregationModel>
|
||||
</targetConnections>
|
||||
<children/>
|
||||
<filterProperty/>
|
||||
<propertyDescriptors>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_stereo_type</id>
|
||||
<display>Stereo Type</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_simpleEntityName</id>
|
||||
<display>Simple Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_entityName</id>
|
||||
<display>Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<id class="string">_background</id>
|
||||
<display>Background Color</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_attrs</id>
|
||||
<display>Attributes...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_operations</id>
|
||||
<display>Operations...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
<id class="string">_abstract</id>
|
||||
<display>abstract</display>
|
||||
<incompatible>false</incompatible>
|
||||
</net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
</propertyDescriptors>
|
||||
<stereoType></stereoType>
|
||||
<name>Class16</name>
|
||||
<isAbstract>false</isAbstract>
|
||||
</source>
|
||||
<target class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../.."/>
|
||||
<bendpoints/>
|
||||
<stereoType></stereoType>
|
||||
<fromMultiplicity></fromMultiplicity>
|
||||
<toMultiplicity></toMultiplicity>
|
||||
</net.java.amateras.uml.classdiagram.model.AggregationModel>
|
||||
</targetConnections>
|
||||
<children/>
|
||||
<filterProperty/>
|
||||
<propertyDescriptors>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_stereo_type</id>
|
||||
<display>Stereo Type</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_simpleEntityName</id>
|
||||
<display>Simple Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_entityName</id>
|
||||
<display>Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<id class="string">_background</id>
|
||||
<display>Background Color</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_attrs</id>
|
||||
<display>Attributes...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_operations</id>
|
||||
<display>Operations...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
<id class="string">_abstract</id>
|
||||
<display>abstract</display>
|
||||
<incompatible>false</incompatible>
|
||||
</net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
</propertyDescriptors>
|
||||
<stereoType></stereoType>
|
||||
<name>Class15</name>
|
||||
<isAbstract>false</isAbstract>
|
||||
</net.java.amateras.uml.classdiagram.model.ClassModel>
|
||||
<net.java.amateras.uml.classdiagram.model.ClassModel reference="../net.java.amateras.uml.classdiagram.model.ClassModel/targetConnections/net.java.amateras.uml.classdiagram.model.AggregationModel/source"/>
|
||||
<net.java.amateras.uml.classdiagram.model.ClassModel reference="../net.java.amateras.uml.classdiagram.model.ClassModel/targetConnections/net.java.amateras.uml.classdiagram.model.AggregationModel/source/targetConnections/net.java.amateras.uml.classdiagram.model.AggregationModel/source"/>
|
||||
</children>
|
||||
<filterProperty/>
|
||||
</net.java.amateras.uml.model.RootModel>
|
||||
265
doc/CLD/09.Inform.cld
Normal file
265
doc/CLD/09.Inform.cld
Normal file
@ -0,0 +1,265 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<net.java.amateras.uml.model.RootModel>
|
||||
<backgroundColor>
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>206</blue>
|
||||
</backgroundColor>
|
||||
<foregroundColor>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</foregroundColor>
|
||||
<showIcon>true</showIcon>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.model.RootModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<sourceConnections/>
|
||||
<targetConnections/>
|
||||
<children>
|
||||
<net.java.amateras.uml.classdiagram.model.ClassModel>
|
||||
<backgroundColor reference="../../../backgroundColor"/>
|
||||
<foregroundColor reference="../../../foregroundColor"/>
|
||||
<showIcon>true</showIcon>
|
||||
<parent class="net.java.amateras.uml.model.RootModel" reference="../../.."/>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<constraint>
|
||||
<height>-1</height>
|
||||
<width>-1</width>
|
||||
<x>142</x>
|
||||
<y>106</y>
|
||||
</constraint>
|
||||
<sourceConnections/>
|
||||
<targetConnections>
|
||||
<net.java.amateras.uml.classdiagram.model.AggregationModel>
|
||||
<showIcon>true</showIcon>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.AggregationModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel">
|
||||
<backgroundColor reference="../../../../../../backgroundColor"/>
|
||||
<foregroundColor reference="../../../../../../foregroundColor"/>
|
||||
<showIcon>true</showIcon>
|
||||
<parent class="net.java.amateras.uml.model.RootModel" reference="../../../../../.."/>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<constraint>
|
||||
<height>-1</height>
|
||||
<width>-1</width>
|
||||
<x>144</x>
|
||||
<y>221</y>
|
||||
</constraint>
|
||||
<sourceConnections>
|
||||
<net.java.amateras.uml.classdiagram.model.AggregationModel reference="../../.."/>
|
||||
</sourceConnections>
|
||||
<targetConnections>
|
||||
<net.java.amateras.uml.classdiagram.model.AggregationModel>
|
||||
<showIcon>true</showIcon>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.AggregationModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel">
|
||||
<backgroundColor reference="../../../../../../../../../backgroundColor"/>
|
||||
<foregroundColor reference="../../../../../../../../../foregroundColor"/>
|
||||
<showIcon>true</showIcon>
|
||||
<parent class="net.java.amateras.uml.model.RootModel" reference="../../../../../../../../.."/>
|
||||
<listeners serialization="custom">
|
||||
<java.beans.PropertyChangeSupport>
|
||||
<default>
|
||||
<source class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../../.."/>
|
||||
<propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion>
|
||||
</default>
|
||||
<null/>
|
||||
</java.beans.PropertyChangeSupport>
|
||||
</listeners>
|
||||
<constraint>
|
||||
<height>-1</height>
|
||||
<width>-1</width>
|
||||
<x>384</x>
|
||||
<y>213</y>
|
||||
</constraint>
|
||||
<sourceConnections>
|
||||
<net.java.amateras.uml.classdiagram.model.AggregationModel reference="../../.."/>
|
||||
</sourceConnections>
|
||||
<targetConnections/>
|
||||
<children/>
|
||||
<filterProperty/>
|
||||
<propertyDescriptors>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_stereo_type</id>
|
||||
<display>Stereo Type</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_simpleEntityName</id>
|
||||
<display>Simple Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_entityName</id>
|
||||
<display>Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<id class="string">_background</id>
|
||||
<display>Background Color</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_attrs</id>
|
||||
<display>Attributes...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_operations</id>
|
||||
<display>Operations...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
<id class="string">_abstract</id>
|
||||
<display>abstract</display>
|
||||
<incompatible>false</incompatible>
|
||||
</net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
</propertyDescriptors>
|
||||
<stereoType></stereoType>
|
||||
<name>Class17</name>
|
||||
<isAbstract>false</isAbstract>
|
||||
</source>
|
||||
<target class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../.."/>
|
||||
<bendpoints/>
|
||||
<stereoType></stereoType>
|
||||
<fromMultiplicity></fromMultiplicity>
|
||||
<toMultiplicity></toMultiplicity>
|
||||
</net.java.amateras.uml.classdiagram.model.AggregationModel>
|
||||
</targetConnections>
|
||||
<children/>
|
||||
<filterProperty/>
|
||||
<propertyDescriptors>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_stereo_type</id>
|
||||
<display>Stereo Type</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_simpleEntityName</id>
|
||||
<display>Simple Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_entityName</id>
|
||||
<display>Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<id class="string">_background</id>
|
||||
<display>Background Color</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_attrs</id>
|
||||
<display>Attributes...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_operations</id>
|
||||
<display>Operations...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
<id class="string">_abstract</id>
|
||||
<display>abstract</display>
|
||||
<incompatible>false</incompatible>
|
||||
</net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
</propertyDescriptors>
|
||||
<stereoType></stereoType>
|
||||
<name>Class16</name>
|
||||
<isAbstract>false</isAbstract>
|
||||
</source>
|
||||
<target class="net.java.amateras.uml.classdiagram.model.ClassModel" reference="../../.."/>
|
||||
<bendpoints/>
|
||||
<stereoType></stereoType>
|
||||
<fromMultiplicity></fromMultiplicity>
|
||||
<toMultiplicity></toMultiplicity>
|
||||
</net.java.amateras.uml.classdiagram.model.AggregationModel>
|
||||
</targetConnections>
|
||||
<children/>
|
||||
<filterProperty/>
|
||||
<propertyDescriptors>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_stereo_type</id>
|
||||
<display>Stereo Type</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_simpleEntityName</id>
|
||||
<display>Simple Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<id class="string">_entityName</id>
|
||||
<display>Name</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.TextPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<id class="string">_background</id>
|
||||
<display>Background Color</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.ColorPropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_attrs</id>
|
||||
<display>Attributes...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<id class="string">_operations</id>
|
||||
<display>Operations...</display>
|
||||
<incompatible>false</incompatible>
|
||||
</org.eclipse.ui.views.properties.PropertyDescriptor>
|
||||
<net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
<id class="string">_abstract</id>
|
||||
<display>abstract</display>
|
||||
<incompatible>false</incompatible>
|
||||
</net.java.amateras.uml.properties.BooleanPropertyDescriptor>
|
||||
</propertyDescriptors>
|
||||
<stereoType></stereoType>
|
||||
<name>Class15</name>
|
||||
<isAbstract>false</isAbstract>
|
||||
</net.java.amateras.uml.classdiagram.model.ClassModel>
|
||||
<net.java.amateras.uml.classdiagram.model.ClassModel reference="../net.java.amateras.uml.classdiagram.model.ClassModel/targetConnections/net.java.amateras.uml.classdiagram.model.AggregationModel/source"/>
|
||||
<net.java.amateras.uml.classdiagram.model.ClassModel reference="../net.java.amateras.uml.classdiagram.model.ClassModel/targetConnections/net.java.amateras.uml.classdiagram.model.AggregationModel/source/targetConnections/net.java.amateras.uml.classdiagram.model.AggregationModel/source"/>
|
||||
</children>
|
||||
<filterProperty/>
|
||||
</net.java.amateras.uml.model.RootModel>
|
||||
667
pom.xml
Normal file
667
pom.xml
Normal file
@ -0,0 +1,667 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>iams</groupId>
|
||||
<artifactId>nlib</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>1.0.0</version>
|
||||
<name>nlib</name>
|
||||
<url>http://www.egovframe.go.kr</url>
|
||||
|
||||
<properties>
|
||||
<spring.maven.artifact.version>4.3.16.RELEASE</spring.maven.artifact.version>
|
||||
<egovframework.rte.version>3.8.0</egovframework.rte.version>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>mvn2</id>
|
||||
<url>http://repo1.maven.org/maven2/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>egovframe</id>
|
||||
<url>http://www.egovframe.go.kr/maven/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>egovframe2</id>
|
||||
<url>http://maven.egovframe.kr:8080/maven/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<!-- 표준프레임워크 실행환경 -->
|
||||
<dependency>
|
||||
<groupId>egovframework.rte</groupId>
|
||||
<artifactId>egovframework.rte.ptl.mvc</artifactId>
|
||||
<version>${egovframework.rte.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<groupId>commons-logging</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>egovframework.rte</groupId>
|
||||
<artifactId>egovframework.rte.psl.dataaccess</artifactId>
|
||||
<version>${egovframework.rte.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>egovframework.rte</groupId>
|
||||
<artifactId>egovframework.rte.fdl.idgnr</artifactId>
|
||||
<version>${egovframework.rte.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>egovframework.rte</groupId>
|
||||
<artifactId>egovframework.rte.fdl.property</artifactId>
|
||||
<version>${egovframework.rte.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
<version>2.5</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>jstl</artifactId>
|
||||
<version>1.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>taglibs</groupId>
|
||||
<artifactId>standard</artifactId>
|
||||
<version>1.1.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr</artifactId>
|
||||
<version>3.5</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.hsqldb</groupId>
|
||||
<artifactId>hsqldb</artifactId>
|
||||
<version>2.3.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- mysql이나 oracle DB 사용시 아래 설정 추가
|
||||
<dependency>
|
||||
<groupId>com.googlecode.log4jdbc</groupId>
|
||||
<artifactId>log4jdbc</artifactId>
|
||||
<version>1.2</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<groupId>org.slf4j</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-dbcp</groupId>
|
||||
<artifactId>commons-dbcp</artifactId>
|
||||
<version>1.4</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>5.1.31</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ojdbc</groupId>
|
||||
<artifactId>ojdbc</artifactId>
|
||||
<version>14</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/ojdbc-14.jar</systemPath>
|
||||
</dependency>
|
||||
-->
|
||||
|
||||
<dependency>
|
||||
<groupId>egovframework.rte</groupId>
|
||||
<artifactId>egovframework.rte.fdl.security</artifactId>
|
||||
<version>${egovframework.rte.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>egovframework.rte</groupId>
|
||||
<artifactId>egovframework.rte.fdl.excel</artifactId>
|
||||
<version>${egovframework.rte.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>egovframework.rte</groupId>
|
||||
<artifactId>egovframework.rte.bat.core</artifactId>
|
||||
<version>${egovframework.rte.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>egovframework.rte</groupId>
|
||||
<artifactId>egovframework.rte.fdl.crypto</artifactId>
|
||||
<version>${egovframework.rte.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.googlecode.log4jdbc</groupId>
|
||||
<artifactId>log4jdbc</artifactId>
|
||||
<version>1.2</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<groupId>org.slf4j</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-dbcp</groupId>
|
||||
<artifactId>commons-dbcp</artifactId>
|
||||
<version>1.4</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jasypt</groupId>
|
||||
<artifactId>jasypt</artifactId>
|
||||
<version>1.9.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cglib</groupId>
|
||||
<artifactId>cglib</artifactId>
|
||||
<version>3.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-compress</artifactId>
|
||||
<version>1.8.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>xerces</groupId>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
<version>2.11.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.sf.ehcache</groupId>
|
||||
<artifactId>ehcache-core</artifactId>
|
||||
<version>2.6.9</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<groupId>org.slf4j</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.sf.ehcache</groupId>
|
||||
<artifactId>ehcache-terracotta</artifactId>
|
||||
<version>2.1.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.quartz-scheduler</groupId>
|
||||
<artifactId>quartz</artifactId>
|
||||
<version>2.1.7</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<groupId>org.slf4j</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.quartz-scheduler</groupId>
|
||||
<artifactId>quartz-jobs</artifactId>
|
||||
<version>2.2.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>oro</groupId>
|
||||
<artifactId>oro</artifactId>
|
||||
<version>2.0.8</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ibm.icu</groupId>
|
||||
<artifactId>icu4j</artifactId>
|
||||
<version>53.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-net</groupId>
|
||||
<artifactId>commons-net</artifactId>
|
||||
<version>3.6</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-email</artifactId>
|
||||
<version>1.5</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>egovframework.com.ems</groupId>
|
||||
<artifactId>sndng-mail</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet.jsp</groupId>
|
||||
<artifactId>javax.servlet.jsp-api</artifactId>
|
||||
<version>2.3.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ldapsdk</groupId>
|
||||
<artifactId>ldapsdk</artifactId>
|
||||
<version>4.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.artofsolving</groupId>
|
||||
<artifactId>jodconverter</artifactId>
|
||||
<version>2.2.1</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<groupId>org.slf4j</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<groupId>commons-io</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<version>1.3.1</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<groupId>commons-io</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.twitter4j</groupId>
|
||||
<artifactId>twitter4j-core</artifactId>
|
||||
<version>4.0.7</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.ajaxtags</groupId>
|
||||
<artifactId>ajaxtags-resources</artifactId>
|
||||
<version>1.5.7</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ckeditor</groupId>
|
||||
<artifactId>ckeditor-java-core</artifactId>
|
||||
<version>3.5.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>batik-ext</artifactId>
|
||||
<version>1.7</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.social</groupId>
|
||||
<artifactId>spring-social-facebook</artifactId>
|
||||
<version>2.0.3.RELEASE</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>spring-web</artifactId>
|
||||
<groupId>org.springframework</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>spring-webmvc</artifactId>
|
||||
<groupId>org.springframework</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.scribejava</groupId>
|
||||
<artifactId>scribejava-apis</artifactId>
|
||||
<version>5.6.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.scribejava</groupId>
|
||||
<artifactId>scribejava-core</artifactId>
|
||||
<version>5.6.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>4.3.4</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<groupId>commons-logging</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>1.4.180</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.websocket</groupId>
|
||||
<artifactId>javax.websocket-api</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.glassfish</groupId>
|
||||
<artifactId>javax.json</artifactId>
|
||||
<version>1.0.4</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.ldap</groupId>
|
||||
<artifactId>spring-ldap-core</artifactId>
|
||||
<version>2.3.2.RELEASE</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-beans</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-core</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-tx</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>jcl-over-slf4j</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.codehaus.jackson</groupId>
|
||||
<artifactId>jackson-mapper-asl</artifactId>
|
||||
<version>1.9.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.mariadb.jdbc</groupId>
|
||||
<artifactId>mariadb-java-client</artifactId>
|
||||
<version>2.2.5</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>kr.go.mgov</groupId>
|
||||
<artifactId>smeapi</artifactId>
|
||||
<version>2.7</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/smeapi_2_7.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>kr.go.gpki</groupId>
|
||||
<artifactId>gpkisecureweb</artifactId>
|
||||
<version>1.0.4.9</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/gpkisecureweb-1.0.4.9.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>kr.go.gpki</groupId>
|
||||
<artifactId>libgpkiapi_jni</artifactId>
|
||||
<version>1.4.0.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/libgpkiapi_jni-1.4.0.0.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- XML-Map 변환 기능을 위한 추가 (DIGITALSHIP 2021.06.15)-->
|
||||
<dependency>
|
||||
<groupId>com.thoughtworks.xstream</groupId>
|
||||
<artifactId>xstream</artifactId>
|
||||
<version>1.4.4</version>
|
||||
</dependency>
|
||||
|
||||
<!-- XML/자바객체 변환 (DIGITALSHIP 2021.06.21)-->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||
<artifactId>jackson-dataformat-xml</artifactId>
|
||||
<version>2.9.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<defaultGoal>install</defaultGoal>
|
||||
<directory>${basedir}/target</directory>
|
||||
<finalName>${artifactId}-${version}</finalName>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.tomcat.maven</groupId>
|
||||
<artifactId>tomcat7-maven-plugin</artifactId>
|
||||
<version>2.2</version>
|
||||
<configuration>
|
||||
<port>80</port>
|
||||
<path>/</path>
|
||||
<systemProperties>
|
||||
<JAVA_OPTS>-Xms256m -Xmx768m -XX:MaxPermSize=256m</JAVA_OPTS>
|
||||
</systemProperties>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>hibernate3-maven-plugin</artifactId>
|
||||
<version>2.1</version>
|
||||
<configuration>
|
||||
<components>
|
||||
<component>
|
||||
<name>hbm2ddl</name>
|
||||
<implementation>annotationconfiguration</implementation>
|
||||
</component>
|
||||
</components>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.hsqldb</groupId>
|
||||
<artifactId>hsqldb</artifactId>
|
||||
<version>2.3.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<!-- EMMA -->
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>emma-maven-plugin</artifactId>
|
||||
<version>1.0-alpha-3</version>
|
||||
</plugin>
|
||||
<!-- PMD manven plugin -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-pmd-plugin</artifactId>
|
||||
<version>3.1</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<!-- EMMA -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<skipTests>true</skipTests>
|
||||
<forkMode>once</forkMode>
|
||||
<reportFormat>xml</reportFormat>
|
||||
<excludes>
|
||||
<exclude>**/Abstract*.java</exclude>
|
||||
<exclude>**/*Suite.java</exclude>
|
||||
</excludes>
|
||||
<includes>
|
||||
<include>**/*Test.java</include>
|
||||
</includes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>emma-maven-plugin</artifactId>
|
||||
<inherited>true</inherited>
|
||||
</plugin>
|
||||
<!-- JavaDoc -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>2.9.1</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<reporting>
|
||||
<outputDirectory>${basedir}/target/site</outputDirectory>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||
<version>2.7</version>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<id>sunlink</id>
|
||||
<reports>
|
||||
<report>javadoc</report>
|
||||
</reports>
|
||||
<inherited>true</inherited>
|
||||
<configuration>
|
||||
<links>
|
||||
<link>http://docs.oracle.com/javase/6/docs/api/</link>
|
||||
</links>
|
||||
</configuration>
|
||||
</reportSet>
|
||||
</reportSets>
|
||||
</plugin>
|
||||
<!-- JUnit Test Results & EMMA Coverage Reporting -->
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>emma-maven-plugin</artifactId>
|
||||
<inherited>true</inherited>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>surefire-report-maven-plugin</artifactId>
|
||||
<inherited>true</inherited>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<reports>
|
||||
<report>report-only</report>
|
||||
</reports>
|
||||
</reportSet>
|
||||
</reportSets>
|
||||
</plugin>
|
||||
<!-- PMD manven plugin -->
|
||||
<!--
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-pmd-plugin</artifactId>
|
||||
<version>3.1</version>
|
||||
<configuration>
|
||||
<rulesets>
|
||||
<ruleset>./Ruleset.xml</ruleset>
|
||||
</rulesets>
|
||||
<linkXref>true</linkXref>
|
||||
<sourceEncoding>${encoding}</sourceEncoding>
|
||||
<minimumTokens>100</minimumTokens>
|
||||
<targetJdk>${compileSource}</targetJdk>
|
||||
</configuration>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<reports>
|
||||
<report>pmd</report>
|
||||
</reports>
|
||||
</reportSet>
|
||||
</reportSets>
|
||||
</plugin>
|
||||
-->
|
||||
<!-- Generating JavaDoc Report -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<configuration>
|
||||
<minmemory>128m</minmemory>
|
||||
<maxmemory>512m</maxmemory>
|
||||
<encoding>${encoding}</encoding>
|
||||
<docencoding>${encoding}</docencoding>
|
||||
<charset>${encoding}</charset>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- Generating Java Source in HTML -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jxr-plugin</artifactId>
|
||||
<configuration>
|
||||
<inputEncoding>${encoding}</inputEncoding>
|
||||
<outputEncoding>${encoding}</outputEncoding>
|
||||
<linkJavadoc>true</linkJavadoc>
|
||||
<javadocDir>apidocs</javadocDir>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</reporting>
|
||||
</project>
|
||||
@ -1 +0,0 @@
|
||||
sample file
|
||||
@ -0,0 +1,121 @@
|
||||
package egovframework.com.cmm;
|
||||
/*
|
||||
* Copyright 2002-2005 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Reader;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.jdbc.support.lob.LobCreator;
|
||||
import org.springframework.jdbc.support.lob.LobHandler;
|
||||
|
||||
import egovframework.rte.psl.orm.ibatis.support.AbstractLobTypeHandler;
|
||||
|
||||
/**
|
||||
* iBATIS TypeHandler implementation for Strings that get mapped to CLOBs.
|
||||
* Retrieves the LobHandler to use from SqlMapClientFactoryBean at config time.
|
||||
*
|
||||
* <p>Particularly useful for storing Strings with more than 4000 characters in an
|
||||
* Oracle database (only possible via CLOBs), in combination with OracleLobHandler.
|
||||
*
|
||||
* <p>Can also be defined in generic iBATIS mappings, as DefaultLobCreator will
|
||||
* work with most JDBC-compliant database drivers. In this case, the field type
|
||||
* does not have to be BLOB: For databases like MySQL and MS SQL Server, any
|
||||
* large enough binary type will work.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 1.1.5
|
||||
* @see org.springframework.orm.ibatis.SqlMapClientFactoryBean#setLobHandler
|
||||
*
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2017.03.03 조성원 시큐어코딩(ES)-부적절한 예외 처리[CWE-253, CWE-440, CWE-754]
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class AltibaseClobStringTypeHandler extends AbstractLobTypeHandler {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(AltibaseClobStringTypeHandler.class);
|
||||
|
||||
/**
|
||||
* Constructor used by iBATIS: fetches config-time LobHandler from
|
||||
* SqlMapClientFactoryBean.
|
||||
* @see org.springframework.orm.ibatis.SqlMapClientFactoryBean#getConfigTimeLobHandler
|
||||
*/
|
||||
public AltibaseClobStringTypeHandler() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor used for testing: takes an explicit LobHandler.
|
||||
*/
|
||||
protected AltibaseClobStringTypeHandler(LobHandler lobHandler) {
|
||||
super(lobHandler);
|
||||
}
|
||||
|
||||
protected void setParameterInternal(
|
||||
PreparedStatement ps, int index, Object value, String jdbcType, LobCreator lobCreator)
|
||||
throws SQLException {
|
||||
lobCreator.setClobAsString(ps, index, (String) value);
|
||||
}
|
||||
|
||||
|
||||
protected Object getResultInternal(ResultSet rs, int index, LobHandler lobHandler)
|
||||
throws SQLException {
|
||||
|
||||
StringBuffer read_data = new StringBuffer("");
|
||||
int read_length;
|
||||
|
||||
char [] buf = new char[1024];
|
||||
|
||||
Reader rd = lobHandler.getClobAsCharacterStream(rs, index);
|
||||
try {
|
||||
while( (read_length=rd.read(buf)) != -1) {
|
||||
read_data.append(buf, 0, read_length);
|
||||
}
|
||||
} catch (IOException ie) {
|
||||
SQLException sqle = new SQLException(ie.getMessage());
|
||||
throw sqle;
|
||||
// 2011.10.10 보안점검 후속조치
|
||||
} finally {
|
||||
if (rd != null) {
|
||||
try {
|
||||
rd.close();
|
||||
//2017.03.03 조성원 시큐어코딩(ES)-부적절한 예외 처리[CWE-253, CWE-440, CWE-754]
|
||||
} catch (IOException ignore) {
|
||||
LOGGER.error("[IOException] : Connection Close");
|
||||
} catch (Exception ignore) {
|
||||
LOGGER.error("["+ ignore.getClass() +"] Connection Close : " + ignore.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return read_data.toString();
|
||||
|
||||
//return lobHandler.getClobAsString(rs, index);
|
||||
}
|
||||
|
||||
public Object valueOf(String s) {
|
||||
return s;
|
||||
}
|
||||
|
||||
}
|
||||
185
src/main/java/egovframework/com/cmm/ComDefaultCodeVO.java
Normal file
185
src/main/java/egovframework/com/cmm/ComDefaultCodeVO.java
Normal file
@ -0,0 +1,185 @@
|
||||
package egovframework.com.cmm;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
|
||||
/**
|
||||
* 클래스
|
||||
* @author 공통서비스개발팀 이삼섭
|
||||
* @since 2009.06.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.3.11 이삼섭 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class ComDefaultCodeVO implements Serializable {
|
||||
/** 코드 ID */
|
||||
private String codeId = "";
|
||||
|
||||
/** 상세코드 */
|
||||
private String code = "";
|
||||
|
||||
/** 코드명 */
|
||||
private String codeNm = "";
|
||||
|
||||
/** 코드설명 */
|
||||
private String codeDc = "";
|
||||
|
||||
/** 특정테이블명 */
|
||||
private String tableNm = ""; //특정테이블에서 코드정보를추출시 사용
|
||||
|
||||
/** 상세 조건 여부 */
|
||||
private String haveDetailCondition = "N";
|
||||
|
||||
/** 상세 조건 */
|
||||
private String detailCondition = "";
|
||||
|
||||
/**
|
||||
* codeId attribute를 리턴한다.
|
||||
*
|
||||
* @return the codeId
|
||||
*/
|
||||
public String getCodeId() {
|
||||
return codeId;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeId attribute 값을 설정한다.
|
||||
*
|
||||
* @param codeId
|
||||
* the codeId to set
|
||||
*/
|
||||
public void setCodeId(String codeId) {
|
||||
this.codeId = codeId;
|
||||
}
|
||||
|
||||
/**
|
||||
* code attribute를 리턴한다.
|
||||
*
|
||||
* @return the code
|
||||
*/
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
/**
|
||||
* code attribute 값을 설정한다.
|
||||
*
|
||||
* @param code
|
||||
* the code to set
|
||||
*/
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeNm attribute를 리턴한다.
|
||||
*
|
||||
* @return the codeNm
|
||||
*/
|
||||
public String getCodeNm() {
|
||||
return codeNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeNm attribute 값을 설정한다.
|
||||
*
|
||||
* @param codeNm
|
||||
* the codeNm to set
|
||||
*/
|
||||
public void setCodeNm(String codeNm) {
|
||||
this.codeNm = codeNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeDc attribute를 리턴한다.
|
||||
*
|
||||
* @return the codeDc
|
||||
*/
|
||||
public String getCodeDc() {
|
||||
return codeDc;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeDc attribute 값을 설정한다.
|
||||
*
|
||||
* @param codeDc
|
||||
* the codeDc to set
|
||||
*/
|
||||
public void setCodeDc(String codeDc) {
|
||||
this.codeDc = codeDc;
|
||||
}
|
||||
|
||||
/**
|
||||
* tableNm attribute를 리턴한다.
|
||||
*
|
||||
* @return the tableNm
|
||||
*/
|
||||
public String getTableNm() {
|
||||
return tableNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* tableNm attribute 값을 설정한다.
|
||||
*
|
||||
* @param tableNm
|
||||
* the tableNm to set
|
||||
*/
|
||||
public void setTableNm(String tableNm) {
|
||||
this.tableNm = tableNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* haveDetailCondition attribute를 리턴한다.
|
||||
*
|
||||
* @return the haveDetailCondition
|
||||
*/
|
||||
public String getHaveDetailCondition() {
|
||||
return haveDetailCondition;
|
||||
}
|
||||
|
||||
/**
|
||||
* haveDetailCondition attribute 값을 설정한다.
|
||||
*
|
||||
* @param haveDetailCondition
|
||||
* the haveDetailCondition to set
|
||||
*/
|
||||
public void setHaveDetailCondition(String haveDetailCondition) {
|
||||
this.haveDetailCondition = haveDetailCondition;
|
||||
}
|
||||
|
||||
/**
|
||||
* detailCondition attribute를 리턴한다.
|
||||
*
|
||||
* @return the detailCondition
|
||||
*/
|
||||
public String getDetailCondition() {
|
||||
return detailCondition;
|
||||
}
|
||||
|
||||
/**
|
||||
* detailCondition attribute 값을 설정한다.
|
||||
*
|
||||
* @param detailCondition
|
||||
* the detailCondition to set
|
||||
*/
|
||||
public void setDetailCondition(String detailCondition) {
|
||||
this.detailCondition = detailCondition;
|
||||
}
|
||||
|
||||
/**
|
||||
* toString 메소드를 대치한다.
|
||||
*/
|
||||
public String toString() {
|
||||
return ToStringBuilder.reflectionToString(this);
|
||||
}
|
||||
}
|
||||
166
src/main/java/egovframework/com/cmm/ComDefaultVO.java
Normal file
166
src/main/java/egovframework/com/cmm/ComDefaultVO.java
Normal file
@ -0,0 +1,166 @@
|
||||
package egovframework.com.cmm;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
|
||||
/**
|
||||
* @Class Name : ComDefaultVO.java
|
||||
* @Description : ComDefaultVO class
|
||||
* @Modification Information
|
||||
* @
|
||||
* @ 수정일 수정자 수정내용
|
||||
* @ ------- -------- ---------------------------
|
||||
* @ 2009.02.01 조재영 최초 생성
|
||||
*
|
||||
* @author 공통서비스 개발팀 조재영
|
||||
* @since 2009.02.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class ComDefaultVO implements Serializable {
|
||||
|
||||
/** 검색조건 */
|
||||
private String searchCondition = "";
|
||||
|
||||
/** 검색Keyword */
|
||||
private String searchKeyword = "";
|
||||
|
||||
/** 검색사용여부 */
|
||||
private String searchUseYn = "";
|
||||
|
||||
/** 현재페이지 */
|
||||
private int pageIndex = 1;
|
||||
|
||||
/** 페이지갯수 */
|
||||
private int pageUnit = 10;
|
||||
|
||||
/** 페이지사이즈 */
|
||||
private int pageSize = 10;
|
||||
|
||||
/** firstIndex */
|
||||
private int firstIndex = 1;
|
||||
|
||||
/** lastIndex */
|
||||
private int lastIndex = 1;
|
||||
|
||||
/** recordCountPerPage */
|
||||
private int recordCountPerPage = 10;
|
||||
|
||||
/** 검색KeywordFrom */
|
||||
private String searchKeywordFrom = "";
|
||||
|
||||
/** 검색KeywordTo */
|
||||
private String searchKeywordTo = "";
|
||||
|
||||
public int getFirstIndex() {
|
||||
return firstIndex;
|
||||
}
|
||||
|
||||
public void setFirstIndex(int firstIndex) {
|
||||
this.firstIndex = firstIndex;
|
||||
}
|
||||
|
||||
public int getLastIndex() {
|
||||
return lastIndex;
|
||||
}
|
||||
|
||||
public void setLastIndex(int lastIndex) {
|
||||
this.lastIndex = lastIndex;
|
||||
}
|
||||
|
||||
public int getRecordCountPerPage() {
|
||||
return recordCountPerPage;
|
||||
}
|
||||
|
||||
public void setRecordCountPerPage(int recordCountPerPage) {
|
||||
this.recordCountPerPage = recordCountPerPage;
|
||||
}
|
||||
|
||||
public String getSearchCondition() {
|
||||
return searchCondition;
|
||||
}
|
||||
|
||||
public void setSearchCondition(String searchCondition) {
|
||||
this.searchCondition = searchCondition;
|
||||
}
|
||||
|
||||
public String getSearchKeyword() {
|
||||
return searchKeyword;
|
||||
}
|
||||
|
||||
public void setSearchKeyword(String searchKeyword) {
|
||||
this.searchKeyword = searchKeyword;
|
||||
}
|
||||
|
||||
public String getSearchUseYn() {
|
||||
return searchUseYn;
|
||||
}
|
||||
|
||||
public void setSearchUseYn(String searchUseYn) {
|
||||
this.searchUseYn = searchUseYn;
|
||||
}
|
||||
|
||||
public int getPageIndex() {
|
||||
return pageIndex;
|
||||
}
|
||||
|
||||
public void setPageIndex(int pageIndex) {
|
||||
this.pageIndex = pageIndex;
|
||||
}
|
||||
|
||||
public int getPageUnit() {
|
||||
return pageUnit;
|
||||
}
|
||||
|
||||
public void setPageUnit(int pageUnit) {
|
||||
this.pageUnit = pageUnit;
|
||||
}
|
||||
|
||||
public int getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(int pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return ToStringBuilder.reflectionToString(this);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* searchKeywordFrom attribute를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSearchKeywordFrom() {
|
||||
return searchKeywordFrom;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchKeywordFrom attribute 값을 설정한다.
|
||||
* @param searchKeywordFrom String
|
||||
*/
|
||||
public void setSearchKeywordFrom(String searchKeywordFrom) {
|
||||
this.searchKeywordFrom = searchKeywordFrom;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchKeywordTo attribute를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSearchKeywordTo() {
|
||||
return searchKeywordTo;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchKeywordTo attribute 값을 설정한다.
|
||||
* @param searchKeywordTo String
|
||||
*/
|
||||
public void setSearchKeywordTo(String searchKeywordTo) {
|
||||
this.searchKeywordTo = searchKeywordTo;
|
||||
}
|
||||
}
|
||||
184
src/main/java/egovframework/com/cmm/EgovBrowserUtil.java
Normal file
184
src/main/java/egovframework/com/cmm/EgovBrowserUtil.java
Normal file
@ -0,0 +1,184 @@
|
||||
package egovframework.com.cmm;
|
||||
|
||||
import java.net.URLEncoder;
|
||||
import java.util.HashMap;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* 웹브라우저 종류및 버전 파악하기 ( IE및 Edge, Safari, Chrome, Firefox, Opera )
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ----------- -------- ---------------------------
|
||||
* 2018.08.27 신용호 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
public class EgovBrowserUtil {
|
||||
|
||||
public static final String FIREFOX = "Firefox";
|
||||
public static final String SAFARI = "Safari";
|
||||
public static final String CHROME = "Chrome";
|
||||
public static final String OPERA = "Opera";
|
||||
public static final String MSIE = "MSIE";
|
||||
public static final String EDGE = "Edge";
|
||||
public static final String OTHER = "Other";
|
||||
|
||||
public static final String TYPEKEY = "type";
|
||||
public static final String VERSIONKEY = "version";
|
||||
|
||||
public static HashMap<String,String> getBrowser(String userAgent) {
|
||||
|
||||
HashMap<String,String> result = new HashMap<String,String>();
|
||||
Pattern pattern = null;
|
||||
Matcher matcher = null;
|
||||
//System.out.println("=====>>>>> userAgent = "+userAgent);
|
||||
|
||||
pattern = Pattern.compile("MSIE ([0-9]{1,2}.[0-9])");
|
||||
matcher = pattern.matcher(userAgent);
|
||||
if (matcher.find())
|
||||
{
|
||||
result.put(TYPEKEY,MSIE);
|
||||
result.put(VERSIONKEY,matcher.group(1));
|
||||
return result;
|
||||
}
|
||||
|
||||
if (userAgent.indexOf("Trident/7.0") > -1) {
|
||||
result.put(TYPEKEY,MSIE);
|
||||
result.put(VERSIONKEY,"11.0");
|
||||
return result;
|
||||
}
|
||||
|
||||
pattern = Pattern.compile("Edge/([0-9]{1,3}.[0-9]{1,5})");
|
||||
matcher = pattern.matcher(userAgent);
|
||||
if (matcher.find())
|
||||
{
|
||||
result.put(TYPEKEY,EDGE);
|
||||
result.put(VERSIONKEY,matcher.group(1));
|
||||
return result;
|
||||
}
|
||||
|
||||
pattern = Pattern.compile("Firefox/([0-9]{1,3}.[0-9]{1,3})");
|
||||
matcher = pattern.matcher(userAgent);
|
||||
if (matcher.find())
|
||||
{
|
||||
result.put(TYPEKEY,FIREFOX);
|
||||
result.put(VERSIONKEY,matcher.group(1));
|
||||
return result;
|
||||
}
|
||||
|
||||
pattern = Pattern.compile("OPR/([0-9]{1,3}.[0-9]{1,3})");
|
||||
matcher = pattern.matcher(userAgent);
|
||||
if (matcher.find())
|
||||
{
|
||||
result.put(TYPEKEY,OPERA);
|
||||
result.put(VERSIONKEY,matcher.group(1));
|
||||
return result;
|
||||
}
|
||||
|
||||
pattern = Pattern.compile("Chrome/([0-9]{1,3}.[0-9]{1,3})");
|
||||
matcher = pattern.matcher(userAgent);
|
||||
if (matcher.find())
|
||||
{
|
||||
result.put(TYPEKEY,CHROME);
|
||||
result.put(VERSIONKEY,matcher.group(1));
|
||||
return result;
|
||||
}
|
||||
|
||||
pattern = Pattern.compile("Version/([0-9]{1,2}.[0-9]{1,3})");
|
||||
matcher = pattern.matcher(userAgent);
|
||||
if (matcher.find())
|
||||
{
|
||||
result.put(TYPEKEY,SAFARI);
|
||||
result.put(VERSIONKEY,matcher.group(1));
|
||||
return result;
|
||||
}
|
||||
|
||||
result.put(TYPEKEY,OTHER);
|
||||
result.put(VERSIONKEY,"0.0");
|
||||
return result;
|
||||
}
|
||||
|
||||
public static String getDisposition(String filename, String userAgent, String charSet) throws Exception {
|
||||
|
||||
String encodedFilename = null;
|
||||
HashMap<String,String> result = EgovBrowserUtil.getBrowser(userAgent);
|
||||
float version = Float.parseFloat(result.get(EgovBrowserUtil.VERSIONKEY));
|
||||
//System.out.println("=====>>>>> browser type = "+result.get(TYPEKEY));
|
||||
//System.out.println("=====>>>>> browser version = "+result.get(VERSIONKEY));
|
||||
//System.out.println("=====>>>>> filename = "+filename);
|
||||
|
||||
if ( EgovBrowserUtil.MSIE.equals(result.get(EgovBrowserUtil.TYPEKEY)) && version <= 8.0f ) {
|
||||
encodedFilename = "Content-Disposition: attachment; filename="+URLEncoder.encode(filename, charSet).replaceAll("\\+", "%20");
|
||||
} else if ( EgovBrowserUtil.OTHER.equals(result.get(EgovBrowserUtil.TYPEKEY)) ) {
|
||||
throw new RuntimeException("Not supported browser");
|
||||
} else {
|
||||
encodedFilename = "attachment; filename*="+charSet+"''"+URLEncoder.encode(filename, charSet);
|
||||
}
|
||||
|
||||
return encodedFilename;
|
||||
}
|
||||
|
||||
//KISA 보안약점 조치 (2018-10-29, 윤창원)
|
||||
/* public static void main(String[] args) {
|
||||
// TODO Auto-generated method stub
|
||||
String testUserAgent[] = {
|
||||
// IE 7.0
|
||||
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)"
|
||||
,"Mozilla/4.0 (Mozilla/4.0; MSIE 7.0; Windows NT 5.1; FDM; SV1; .NET CLR 3.0.04506.30)"
|
||||
// IE 8.0
|
||||
,"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0)"
|
||||
// IE 9.0
|
||||
,"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)"
|
||||
// IE 10.0
|
||||
,"Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)"
|
||||
// IE 11.0
|
||||
,"Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
|
||||
// Chrome 68.0.3440.106
|
||||
,"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
|
||||
// Edge 17.17134
|
||||
,"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134"
|
||||
// Opera 55.0.2994.44
|
||||
,"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36 OPR/55.0.2994.44"
|
||||
,"Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 OPR/26.0.1656.60"
|
||||
// Firefox 61.0
|
||||
,"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0"
|
||||
// Safari 11.1.2
|
||||
,"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15"
|
||||
// iPhone 11.0
|
||||
,"Mozilla/5.0 (iPhone; CPU iPhone OS 11_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.0 Mobile/15E148 Safari/604.1"
|
||||
// iPad 9.0
|
||||
,"Mozilla/5.0 (iPad; CPU OS 9_3_5 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13G36 Safari/601.1"
|
||||
// Window Pohone 10
|
||||
,"Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Nokia; Lumia 520) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Mobile Safari/537.36 Edge/12.0"
|
||||
// Window Pohone 8.1
|
||||
,"Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; NOKIA; Lumia 520) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537"
|
||||
// Window Pohone 8
|
||||
,"Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch)"
|
||||
// Window Pohone 7
|
||||
,"Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0)"
|
||||
// XBOX One
|
||||
,"Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0; Xbox; Xbox One)"
|
||||
// XBOX 360
|
||||
,"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; Xbox)"
|
||||
};
|
||||
|
||||
HashMap<String,String> result = null;
|
||||
for (int i = 0; i < testUserAgent.length; i++) {
|
||||
result = getBrowser(testUserAgent[i]);
|
||||
System.out.println("1. User Agent : "+testUserAgent[i]);
|
||||
System.out.println("2. Browser Type : "+result.get(TYPEKEY));
|
||||
System.out.println("2. Browser Version : "+result.get(VERSIONKEY));
|
||||
//System.out.println("2. Browser Version convert: "+Float.parseFloat(result.get(VERSIONKEY)));
|
||||
System.out.println("");
|
||||
}
|
||||
|
||||
}*/
|
||||
|
||||
}
|
||||
405
src/main/java/egovframework/com/cmm/EgovComCrossSiteHndlr.java
Normal file
405
src/main/java/egovframework/com/cmm/EgovComCrossSiteHndlr.java
Normal file
@ -0,0 +1,405 @@
|
||||
package egovframework.com.cmm;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Reader;
|
||||
|
||||
import javax.servlet.jsp.JspException;
|
||||
import javax.servlet.jsp.JspWriter;
|
||||
import javax.servlet.jsp.PageContext;
|
||||
import javax.servlet.jsp.tagext.BodyTagSupport;
|
||||
|
||||
import org.apache.taglibs.standard.tag.common.core.Util;
|
||||
|
||||
/**
|
||||
* Cross-Site Scripting 체크하여 값을 되돌려 받는 핸들러 JSP TLD, 자바에서 사용가능
|
||||
*
|
||||
* @author 공통서비스 장동한
|
||||
* @since 2010.11.09
|
||||
* @version 1.0
|
||||
* @see <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2010.11.09 장동한 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EgovComCrossSiteHndlr extends BodyTagSupport {
|
||||
|
||||
/*
|
||||
* (One almost wishes XML and JSP could support "anonymous tags," given the
|
||||
* amount of trouble we had naming this one!) :-) - sb
|
||||
*/
|
||||
|
||||
// *********************************************************************
|
||||
// Internal state
|
||||
|
||||
protected Object value; // tag attribute
|
||||
protected String def; // tag attribute
|
||||
protected boolean escapeXml; // tag attribute
|
||||
private boolean needBody; // non-space body needed?
|
||||
|
||||
// *********************************************************************
|
||||
// Construction and initialization
|
||||
|
||||
private final String m_sDiffChar ="()[]{}\"',:;= \t\r\n%!+-";
|
||||
//private String m_sDiffChar ="()[]{}\"',:;=%!+-";
|
||||
private final String m_sArrDiffChar [] = {
|
||||
"(",")",
|
||||
"[","]",
|
||||
"{","}",
|
||||
""","'",
|
||||
",",":",
|
||||
";","=",
|
||||
" ","\t", //" ","\t",
|
||||
"\r","\n", //"\r","\n",
|
||||
"%","!",
|
||||
"+","-"
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructs a new handler. As with TagSupport, subclasses should not
|
||||
* provide other constructors and are expected to call the superclass
|
||||
* constructor.
|
||||
*/
|
||||
public EgovComCrossSiteHndlr() {
|
||||
super();
|
||||
init();
|
||||
}
|
||||
|
||||
// resets local state
|
||||
private void init() {
|
||||
value = def = null;
|
||||
escapeXml = true;
|
||||
needBody = false;
|
||||
}
|
||||
|
||||
// Releases any resources we may have (or inherit)
|
||||
public void release() {
|
||||
super.release();
|
||||
init();
|
||||
}
|
||||
|
||||
// *********************************************************************
|
||||
// Tag logic
|
||||
|
||||
// evaluates 'value' and determines if the body should be evaluted
|
||||
public int doStartTag() throws JspException {
|
||||
|
||||
needBody = false; // reset state related to 'default'
|
||||
this.bodyContent = null; // clean-up body (just in case container is
|
||||
// pooling tag handlers)
|
||||
|
||||
JspWriter out = pageContext.getOut();
|
||||
//System.out.println("EgovComCrossSiteFilter> ============================");
|
||||
try {
|
||||
// print value if available; otherwise, try 'default'
|
||||
if (value != null) {
|
||||
//System.out.println("EgovComCrossSiteFilter> =value");
|
||||
String sWriteEscapedXml = getWriteEscapedXml();
|
||||
//System.out.println("EgovComCrossSiteFilter sWriteEscapedXml>" + sWriteEscapedXml);
|
||||
out.print(sWriteEscapedXml);
|
||||
return SKIP_BODY;
|
||||
} else {
|
||||
// if we don't have a 'default' attribute, just go to the body
|
||||
if (def == null) {
|
||||
needBody = true;
|
||||
return EVAL_BODY_BUFFERED;
|
||||
}
|
||||
|
||||
//System.out.println("EgovComCrossSiteFilter def> ="+def);
|
||||
|
||||
// if we do have 'default', print it
|
||||
if (def != null) {
|
||||
// good 'default'
|
||||
out(pageContext, escapeXml, def);
|
||||
//System.out.println("EgovComCrossSiteFilter> ="+def);
|
||||
}
|
||||
return SKIP_BODY;
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
throw new JspException(ex.toString(), ex);
|
||||
}
|
||||
}
|
||||
|
||||
// prints the body if necessary; reports errors
|
||||
public int doEndTag() throws JspException {
|
||||
try {
|
||||
//System.out.println("EgovComCrossSiteFilter ==== doEndTag");
|
||||
if (!needBody){
|
||||
return EVAL_PAGE; // nothing more to do
|
||||
}
|
||||
|
||||
// trim and print out the body
|
||||
if (bodyContent != null && bodyContent.getString() != null){
|
||||
//String sWriteEscapedXml = getWriteEscapedXml();
|
||||
//out2(pageContext, escapeXml, sWriteEscapedXml.toString());
|
||||
//System.out.println("EgovComCrossSiteFilter> end");
|
||||
//System.out.println("EgovComCrossSiteFilter sWriteEscapedXml > sWriteEscapedXml");
|
||||
out(pageContext, escapeXml, bodyContent.getString().trim());
|
||||
|
||||
}
|
||||
return EVAL_PAGE;
|
||||
} catch (IOException ex) {
|
||||
throw new JspException(ex.toString(), ex);
|
||||
}
|
||||
}
|
||||
|
||||
// *********************************************************************
|
||||
// Public utility methods
|
||||
|
||||
/**
|
||||
* Outputs <tt>text</tt> to <tt>pageContext</tt>'s current JspWriter. If
|
||||
* <tt>escapeXml</tt> is true, performs the following substring replacements
|
||||
* (to facilitate output to XML/HTML pages):
|
||||
*
|
||||
* & -> & < -> < > -> > " -> " ' -> '
|
||||
*
|
||||
* See also Util.escapeXml().
|
||||
*/
|
||||
public static void out(PageContext pageContext, boolean escapeXml,
|
||||
Object obj) throws IOException {
|
||||
JspWriter w = pageContext.getOut();
|
||||
|
||||
if (!escapeXml) {
|
||||
// write chars as is
|
||||
if (obj instanceof Reader) {
|
||||
Reader reader = (Reader) obj;
|
||||
char[] buf = new char[4096];
|
||||
int count;
|
||||
while ((count = reader.read(buf, 0, 4096)) != -1) {
|
||||
w.write(buf, 0, count);
|
||||
}
|
||||
} else {
|
||||
w.write(obj.toString());
|
||||
}
|
||||
} else {
|
||||
// escape XML chars
|
||||
if (obj instanceof Reader) {
|
||||
Reader reader = (Reader) obj;
|
||||
char[] buf = new char[4096];
|
||||
int count;
|
||||
while ((count = reader.read(buf, 0, 4096)) != -1) {
|
||||
writeEscapedXml(buf, count, w);
|
||||
}
|
||||
} else {
|
||||
String text = obj.toString();
|
||||
writeEscapedXml(text.toCharArray(), text.length(), w);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public static void out2(PageContext pageContext, boolean escapeXml,
|
||||
Object obj) throws IOException {
|
||||
JspWriter w = pageContext.getOut();
|
||||
|
||||
w.write(obj.toString());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Optimized to create no extra objects and write directly to the JspWriter
|
||||
* using blocks of escaped and unescaped characters
|
||||
*
|
||||
*/
|
||||
private static void writeEscapedXml(char[] buffer, int length, JspWriter w)
|
||||
throws IOException {
|
||||
int start = 0;
|
||||
|
||||
for (int i = 0; i < length; i++) {
|
||||
char c = buffer[i];
|
||||
if (c <= Util.HIGHEST_SPECIAL) {
|
||||
char[] escaped = Util.specialCharactersRepresentation[c];
|
||||
if (escaped != null) {
|
||||
// add unescaped portion
|
||||
if (start < i) {
|
||||
w.write(buffer, start, i - start);
|
||||
}
|
||||
// add escaped xml
|
||||
w.write(escaped);
|
||||
start = i + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
// add rest of unescaped portion
|
||||
if (start < length) {
|
||||
w.write(buffer, start, length - start);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Optimized to create no extra objects and write directly to the JspWriter
|
||||
* using blocks of escaped and unescaped characters
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
private String getWriteEscapedXml() throws IOException {
|
||||
String sRtn = "";
|
||||
|
||||
Object obj = this.value;
|
||||
|
||||
int start = 0;
|
||||
String text = obj.toString();
|
||||
|
||||
int length = text.length();
|
||||
char[] buffer = text.toCharArray();
|
||||
boolean booleanDiff = false;
|
||||
//String sDiffChar
|
||||
//String sArrDiffChar
|
||||
char[] cDiffChar = this.m_sDiffChar.toCharArray();
|
||||
|
||||
for(int i = 0; i < length; i++) {
|
||||
char c = buffer[i];
|
||||
|
||||
booleanDiff = false;
|
||||
|
||||
for(int k = 0; k < cDiffChar.length; k++){
|
||||
if(c == cDiffChar[k]){
|
||||
sRtn = sRtn + m_sArrDiffChar[k];
|
||||
booleanDiff = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(booleanDiff) continue;
|
||||
|
||||
if (c <= Util.HIGHEST_SPECIAL) {
|
||||
char[] escaped = Util.specialCharactersRepresentation[c];
|
||||
if (escaped != null) {
|
||||
// add unescaped portion
|
||||
//if (start < i) {
|
||||
// sRtn = sRtn + text.substring(start, i - start);
|
||||
//}
|
||||
// add escaped xml
|
||||
//sRtn = sRtn + escaped;
|
||||
//System.out.println(buffer[i]+" :: " + escaped);
|
||||
for (int j = 0; j < escaped.length; j++) {
|
||||
//System.out.println(buffer[i]+" :>: " + escaped[j]);
|
||||
sRtn = sRtn + escaped[j];
|
||||
}
|
||||
//sRtn = sRtn+ escaped.toString();
|
||||
//sRtn = sRtn + String.valueOf(buffer[i]);
|
||||
start = i + 1;
|
||||
}else{
|
||||
sRtn = sRtn + c;
|
||||
}
|
||||
}else{
|
||||
sRtn = sRtn + c;
|
||||
}
|
||||
}
|
||||
|
||||
return sRtn;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Optimized to create no extra objects and write directly to the JspWriter
|
||||
* using blocks of escaped and unescaped characters
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
private String getWriteEscapedXml(String sWriteString) throws IOException {
|
||||
|
||||
String sRtn = "";
|
||||
|
||||
Object obj = sWriteString;
|
||||
|
||||
int start = 0;
|
||||
String text = obj.toString();
|
||||
|
||||
int length = text.length();
|
||||
char[] buffer = text.toCharArray();
|
||||
boolean booleanDiff = false;
|
||||
//String sDiffChar
|
||||
//String sArrDiffChar
|
||||
char[] cDiffChar = this.m_sDiffChar.toCharArray();
|
||||
|
||||
for(int i = 0; i < length; i++) {
|
||||
char c = buffer[i];
|
||||
|
||||
booleanDiff = false;
|
||||
|
||||
for(int k = 0; k < cDiffChar.length; k++){
|
||||
if(c == cDiffChar[k]){
|
||||
sRtn = sRtn + m_sArrDiffChar[k];
|
||||
booleanDiff = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(booleanDiff) continue;
|
||||
|
||||
if (c <= Util.HIGHEST_SPECIAL) {
|
||||
char[] escaped = Util.specialCharactersRepresentation[c];
|
||||
if (escaped != null) {
|
||||
// add unescaped portion
|
||||
//if (start < i) {
|
||||
// sRtn = sRtn + text.substring(start, i - start);
|
||||
//}
|
||||
// add escaped xml
|
||||
//sRtn = sRtn + escaped;
|
||||
//System.out.println(buffer[i]+" :: " + escaped);
|
||||
for (int j = 0; j < escaped.length; j++) {
|
||||
//System.out.println(buffer[i]+" :>: " + escaped[j]);
|
||||
sRtn = sRtn + escaped[j];
|
||||
}
|
||||
//sRtn = sRtn+ escaped.toString();
|
||||
//sRtn = sRtn + String.valueOf(buffer[i]);
|
||||
start = i + 1;
|
||||
}else{
|
||||
sRtn = sRtn + c;
|
||||
}
|
||||
}else{
|
||||
sRtn = sRtn + c;
|
||||
}
|
||||
}
|
||||
|
||||
return sRtn;
|
||||
}
|
||||
|
||||
// for tag attribute
|
||||
public void setValue(Object value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
// for tag attribute
|
||||
public void setDefault(String def) {
|
||||
this.def = def;
|
||||
}
|
||||
|
||||
// for tag attribute
|
||||
public void setEscapeXml(boolean escapeXml) {
|
||||
this.escapeXml = escapeXml;
|
||||
}
|
||||
|
||||
/** 2011.10.10 cmd 라인상에서 편의제공을 위해 제공, 필요없을시 삭제하여도 무방함
|
||||
public static void main(String[] args) throws IOException
|
||||
{
|
||||
|
||||
EgovComCrossSiteHndlr egovComCrossSiteHndlr = new EgovComCrossSiteHndlr();
|
||||
|
||||
egovComCrossSiteHndlr.value = "TRNSMIT";
|
||||
|
||||
String sCrossSiteHndlr = egovComCrossSiteHndlr.getWriteEscapedXml();
|
||||
//System.out.println("writeEscapedXml " + egovComCrossSiteHndlr.getWriteEscapedXml());
|
||||
/*
|
||||
System.out.println("sCrossSiteHndlr|"+ sCrossSiteHndlr + "|");
|
||||
|
||||
try{
|
||||
System.out.println("TRY TEST 1");
|
||||
throw new Exception();
|
||||
}catch(Exception e){
|
||||
System.out.println("TRY TEST 2");
|
||||
}finally{
|
||||
System.out.println("TRY TEST 3");
|
||||
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
48
src/main/java/egovframework/com/cmm/EgovComExcepHndlr.java
Normal file
48
src/main/java/egovframework/com/cmm/EgovComExcepHndlr.java
Normal file
@ -0,0 +1,48 @@
|
||||
package egovframework.com.cmm;
|
||||
|
||||
import egovframework.rte.fdl.cmmn.exception.handler.ExceptionHandler;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* @Class Name : EgovComExcepHndlr.java
|
||||
* @Description : 공통서비스의 exception 처리 클래스
|
||||
* @Modification Information
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------- -------------------
|
||||
* 2009. 3. 13. 이삼섭
|
||||
*
|
||||
* @author 공통 서비스 개발팀 이삼섭
|
||||
* @since 2009. 3. 13.
|
||||
* @version
|
||||
* @see
|
||||
*
|
||||
*/
|
||||
public class EgovComExcepHndlr implements ExceptionHandler {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(EgovComExcepHndlr.class);
|
||||
|
||||
/*
|
||||
@Resource(name = "otherSSLMailSender")
|
||||
private SimpleSSLMail mailSender;
|
||||
*/
|
||||
/**
|
||||
* 발생된 Exception을 처리한다.
|
||||
*/
|
||||
public void occur(Exception ex, String packageName) {
|
||||
//log.debug(" EgovServiceExceptionHandler run...............");
|
||||
|
||||
/*
|
||||
try {
|
||||
mailSender. send(ex, packageName);
|
||||
log.debug(" sending a alert mail is completed ");
|
||||
} catch (Exception e) {
|
||||
LOGGER.error(packageName, ex);
|
||||
}
|
||||
*/
|
||||
|
||||
LOGGER.error(packageName, ex);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package egovframework.com.cmm;
|
||||
|
||||
import egovframework.rte.fdl.cmmn.exception.handler.ExceptionHandler;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class EgovComOthersExcepHndlr implements ExceptionHandler {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(EgovComOthersExcepHndlr.class);
|
||||
|
||||
public void occur(Exception exception, String packageName) {
|
||||
//log.debug(" EgovServiceExceptionHandler run...............");
|
||||
LOGGER.error(packageName, exception);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,65 @@
|
||||
package egovframework.com.cmm;
|
||||
|
||||
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
/**
|
||||
* EgovComUtil 클래스
|
||||
*
|
||||
* @author 서준식
|
||||
* @since 2011.09.15
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------------- ----------------------
|
||||
* 2011.09.15 서준식 최초 생성
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
@Service("egovUtil")
|
||||
public class EgovComponentChecker extends EgovAbstractServiceImpl implements ApplicationContextAware{
|
||||
|
||||
|
||||
public static ApplicationContext context;
|
||||
|
||||
@SuppressWarnings("static-access")
|
||||
public void setApplicationContext(ApplicationContext context)
|
||||
throws BeansException {
|
||||
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Spring MVC에서 설정한 빈이 아닌 서비스 빈(컴포넌트)만을 검색할 수 있음
|
||||
*
|
||||
*/
|
||||
public static boolean hasComponent(String componentName){
|
||||
|
||||
try{
|
||||
Object component = context.getBean(componentName);
|
||||
|
||||
if(component == null){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
|
||||
}catch(NoSuchBeanDefinitionException ex){// 해당 컴포넌트를 찾을 수없을 경우 false반환
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
87
src/main/java/egovframework/com/cmm/EgovMessageSource.java
Normal file
87
src/main/java/egovframework/com/cmm/EgovMessageSource.java
Normal file
@ -0,0 +1,87 @@
|
||||
package egovframework.com.cmm;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import org.springframework.context.MessageSource;
|
||||
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
|
||||
|
||||
/**
|
||||
* 메시지 리소스 사용을 위한 MessageSource 인터페이스 및 ReloadableResourceBundleMessageSource 클래스의 구현체
|
||||
* @author 공통서비스 개발팀 이문준
|
||||
* @since 2009.06.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.11 이문준 최초 생성
|
||||
* 2017.07.21 장동한 args, locale 설정
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
public class EgovMessageSource extends ReloadableResourceBundleMessageSource implements MessageSource {
|
||||
|
||||
private ReloadableResourceBundleMessageSource reloadableResourceBundleMessageSource;
|
||||
|
||||
/**
|
||||
* getReloadableResourceBundleMessageSource()
|
||||
* @param reloadableResourceBundleMessageSource - resource MessageSource
|
||||
* @return ReloadableResourceBundleMessageSource
|
||||
*/
|
||||
public void setReloadableResourceBundleMessageSource(ReloadableResourceBundleMessageSource reloadableResourceBundleMessageSource) {
|
||||
this.reloadableResourceBundleMessageSource = reloadableResourceBundleMessageSource;
|
||||
}
|
||||
|
||||
/**
|
||||
* getReloadableResourceBundleMessageSource()
|
||||
* @return ReloadableResourceBundleMessageSource
|
||||
*/
|
||||
public ReloadableResourceBundleMessageSource getReloadableResourceBundleMessageSource() {
|
||||
return reloadableResourceBundleMessageSource;
|
||||
}
|
||||
|
||||
/**
|
||||
* 정의된 메세지 조회
|
||||
* @param code - 메세지 코드
|
||||
* @return String
|
||||
*/
|
||||
public String getMessage(String code) {
|
||||
return getReloadableResourceBundleMessageSource().getMessage(code, null, Locale.getDefault());
|
||||
}
|
||||
|
||||
/**
|
||||
* 정의된 메세지 조회
|
||||
* @param code - 메세지 코드
|
||||
* @param locale - 로케일
|
||||
* @return String
|
||||
*/
|
||||
public String getMessage(String code, Locale locale) {
|
||||
return getReloadableResourceBundleMessageSource().getMessage(code, null, locale);
|
||||
}
|
||||
|
||||
/**
|
||||
* 정의된 메세지 조회
|
||||
* @param code - 메세지 코드
|
||||
* @param args - 매개변수
|
||||
* @return String
|
||||
*/
|
||||
public String getMessageArgs(String code, Object[] args) {
|
||||
return getReloadableResourceBundleMessageSource().getMessage(code, args, Locale.getDefault());
|
||||
}
|
||||
|
||||
/**
|
||||
* 정의된 메세지 조회
|
||||
* @param code - 메세지 코드
|
||||
* @param args - 매개변수
|
||||
* @param locale - 로케일
|
||||
* @return String
|
||||
*/
|
||||
public String getMessageArgsLocale(String code, Object[] args, Locale locale) {
|
||||
return getReloadableResourceBundleMessageSource().getMessage(code, args, locale);
|
||||
}
|
||||
|
||||
}
|
||||
125
src/main/java/egovframework/com/cmm/EgovWebUtil.java
Normal file
125
src/main/java/egovframework/com/cmm/EgovWebUtil.java
Normal file
@ -0,0 +1,125 @@
|
||||
package egovframework.com.cmm;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* 교차접속 스크립트 공격 취약성 방지(파라미터 문자열 교체)
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ----------- -------- ---------------------------
|
||||
* 2011.10.10 한성곤 최초 생성
|
||||
* 2017-02-07 이정은 시큐어코딩(ES) - 시큐어코딩 경로 조작 및 자원 삽입[CWE-22, CWE-23, CWE-95, CWE-99]
|
||||
* 2018.08.17 신용호 filePathBlackList 수정
|
||||
* 2018.10.10 신용호 . => \\.으로 수정
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
public class EgovWebUtil {
|
||||
public static String clearXSSMinimum(String value) {
|
||||
if (value == null || value.trim().equals("")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
String returnValue = value;
|
||||
|
||||
returnValue = returnValue.replaceAll("&", "&");
|
||||
returnValue = returnValue.replaceAll("<", "<");
|
||||
returnValue = returnValue.replaceAll(">", ">");
|
||||
returnValue = returnValue.replaceAll("\"", """);
|
||||
returnValue = returnValue.replaceAll("\'", "'");
|
||||
returnValue = returnValue.replaceAll("\\.", ".");
|
||||
returnValue = returnValue.replaceAll("%2E", ".");
|
||||
returnValue = returnValue.replaceAll("%2F", "/");
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
public static String clearXSSMaximum(String value) {
|
||||
String returnValue = value;
|
||||
returnValue = clearXSSMinimum(returnValue);
|
||||
|
||||
returnValue = returnValue.replaceAll("%00", null);
|
||||
|
||||
returnValue = returnValue.replaceAll("%", "%");
|
||||
|
||||
// \\. => .
|
||||
|
||||
returnValue = returnValue.replaceAll("\\.\\./", ""); // ../
|
||||
returnValue = returnValue.replaceAll("\\.\\.\\\\", ""); // ..\
|
||||
returnValue = returnValue.replaceAll("\\./", ""); // ./
|
||||
returnValue = returnValue.replaceAll("%2F", "");
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
public static String filePathBlackList(String value) {
|
||||
String returnValue = value;
|
||||
if (returnValue == null || returnValue.trim().equals("")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
returnValue = returnValue.replaceAll("\\.\\.", "");
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* 행안부 보안취약점 점검 조치 방안.
|
||||
*
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
public static String filePathReplaceAll(String value) {
|
||||
String returnValue = value;
|
||||
if (returnValue == null || returnValue.trim().equals("")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
returnValue = returnValue.replaceAll("/", "");
|
||||
returnValue = returnValue.replaceAll("\\", "");
|
||||
returnValue = returnValue.replaceAll("\\.\\.", ""); // ..
|
||||
returnValue = returnValue.replaceAll("&", "");
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
public static String fileInjectPathReplaceAll(String value) {
|
||||
String returnValue = value;
|
||||
if (returnValue == null || returnValue.trim().equals("")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
returnValue = returnValue.replaceAll("/", "");
|
||||
returnValue = returnValue.replaceAll("\\..", ""); // ..
|
||||
returnValue = returnValue.replaceAll("\\\\", "");// \
|
||||
returnValue = returnValue.replaceAll("&", "");
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
public static String filePathWhiteList(String value) {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static boolean isIPAddress(String str) {
|
||||
Pattern ipPattern = Pattern.compile("\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}");
|
||||
|
||||
return ipPattern.matcher(str).matches();
|
||||
}
|
||||
|
||||
public static String removeCRLF(String parameter) {
|
||||
return parameter.replaceAll("\r", "").replaceAll("\n", "");
|
||||
}
|
||||
|
||||
public static String removeSQLInjectionRisk(String parameter) {
|
||||
return parameter.replaceAll("\\p{Space}", "").replaceAll("\\*", "").replaceAll("%", "").replaceAll(";", "").replaceAll("-", "").replaceAll("\\+", "").replaceAll(",", "");
|
||||
}
|
||||
|
||||
public static String removeOSCmdRisk(String parameter) {
|
||||
return parameter.replaceAll("\\p{Space}", "").replaceAll("\\*", "").replaceAll("|", "").replaceAll(";", "");
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,53 @@
|
||||
package egovframework.com.cmm;
|
||||
|
||||
import egovframework.rte.ptl.mvc.tags.ui.pagination.AbstractPaginationRenderer;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
|
||||
import org.springframework.web.context.ServletContextAware;
|
||||
/**
|
||||
* ImagePaginationRenderer.java 클래스
|
||||
*
|
||||
* @author 서준식
|
||||
* @since 2011. 9. 16.
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------------- ----------------------
|
||||
* 2011. 9. 16. 서준식 이미지 경로에 ContextPath추가
|
||||
* 2016. 6. 17. 장동한 표준프레임워크 v3.6 리뉴얼
|
||||
* </pre>
|
||||
*/
|
||||
public class ImagePaginationRenderer extends AbstractPaginationRenderer implements ServletContextAware{
|
||||
|
||||
private ServletContext servletContext;
|
||||
|
||||
public ImagePaginationRenderer() {
|
||||
|
||||
}
|
||||
|
||||
public void initVariables(){
|
||||
|
||||
firstPageLabel = "<li class=\"first\"><a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \">첫 페이지</a></li>";
|
||||
previousPageLabel = "<li class=\"prev\"><a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \">이전 페이지</a></li>";
|
||||
|
||||
currentPageLabel = "<li class=\"current\"><a onClick=\"return false;\">{0}</a></li>";
|
||||
otherPageLabel = "<li><a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \">{2}</a></li>";
|
||||
|
||||
nextPageLabel = "<li class=\"next\"><a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \">다음 페이지</a></li>";
|
||||
lastPageLabel = "<li class=\"last\"><a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \">끝 페이지</a></li>";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setServletContext(ServletContext servletContext) {
|
||||
this.servletContext = servletContext;
|
||||
initVariables();
|
||||
}
|
||||
|
||||
}
|
||||
50
src/main/java/egovframework/com/cmm/IncludedCompInfoVO.java
Normal file
50
src/main/java/egovframework/com/cmm/IncludedCompInfoVO.java
Normal file
@ -0,0 +1,50 @@
|
||||
package egovframework.com.cmm;
|
||||
|
||||
/**
|
||||
* IncludedInfo annotation을 바탕으로 화면에 표시할 정보를 구성하기 위한 VO 클래스
|
||||
* @author 공통컴포넌트 정진오
|
||||
* @since 2011.08.26
|
||||
* @version 2.0.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2011.08.26 정진오 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
public class IncludedCompInfoVO {
|
||||
|
||||
private String name;
|
||||
private String listUrl;
|
||||
private int order;
|
||||
private int gid;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
public String getListUrl() {
|
||||
return listUrl;
|
||||
}
|
||||
public void setListUrl(String listUrl) {
|
||||
this.listUrl = listUrl;
|
||||
}
|
||||
public int getOrder() {
|
||||
return order;
|
||||
}
|
||||
public void setOrder(int order) {
|
||||
this.order = order;
|
||||
}
|
||||
public int getGid() {
|
||||
return gid;
|
||||
}
|
||||
public void setGid(int gid) {
|
||||
this.gid = gid;
|
||||
}
|
||||
}
|
||||
250
src/main/java/egovframework/com/cmm/LoginVO.java
Normal file
250
src/main/java/egovframework/com/cmm/LoginVO.java
Normal file
@ -0,0 +1,250 @@
|
||||
package egovframework.com.cmm;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Class Name : LoginVO.java
|
||||
* @Description : Login VO class
|
||||
* @Modification Information
|
||||
* @
|
||||
* @ 수정일 수정자 수정내용
|
||||
* @ ------- -------- ---------------------------
|
||||
* @ 2009.03.03 박지욱 최초 생성
|
||||
*
|
||||
* @author 공통서비스 개발팀 박지욱
|
||||
* @since 2009.03.03
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
*/
|
||||
public class LoginVO implements Serializable{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -8274004534207618049L;
|
||||
|
||||
/** 아이디 */
|
||||
private String id;
|
||||
/** 이름 */
|
||||
private String name;
|
||||
/** 주민등록번호 */
|
||||
private String ihidNum;
|
||||
/** 이메일주소 */
|
||||
private String email;
|
||||
/** 비밀번호 */
|
||||
private String password;
|
||||
/** 비밀번호 힌트 */
|
||||
private String passwordHint;
|
||||
/** 비밀번호 정답 */
|
||||
private String passwordCnsr;
|
||||
/** 사용자구분 */
|
||||
private String userSe;
|
||||
/** 조직(부서)ID */
|
||||
private String orgnztId;
|
||||
/** 조직(부서)명 */
|
||||
private String orgnztNm;
|
||||
/** 고유아이디 */
|
||||
private String uniqId;
|
||||
/** 로그인 후 이동할 페이지 */
|
||||
private String url;
|
||||
/** 사용자 IP정보 */
|
||||
private String ip;
|
||||
/** GPKI인증 DN */
|
||||
private String dn;
|
||||
/**
|
||||
* id attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
/**
|
||||
* id attribute 값을 설정한다.
|
||||
* @param id String
|
||||
*/
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
/**
|
||||
* name attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
/**
|
||||
* name attribute 값을 설정한다.
|
||||
* @param name String
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
/**
|
||||
* ihidNum attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getIhidNum() {
|
||||
return ihidNum;
|
||||
}
|
||||
/**
|
||||
* ihidNum attribute 값을 설정한다.
|
||||
* @param ihidNum String
|
||||
*/
|
||||
public void setIhidNum(String ihidNum) {
|
||||
this.ihidNum = ihidNum;
|
||||
}
|
||||
/**
|
||||
* email attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
/**
|
||||
* email attribute 값을 설정한다.
|
||||
* @param email String
|
||||
*/
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
/**
|
||||
* password attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
/**
|
||||
* password attribute 값을 설정한다.
|
||||
* @param password String
|
||||
*/
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
/**
|
||||
* passwordHint attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getPasswordHint() {
|
||||
return passwordHint;
|
||||
}
|
||||
/**
|
||||
* passwordHint attribute 값을 설정한다.
|
||||
* @param passwordHint String
|
||||
*/
|
||||
public void setPasswordHint(String passwordHint) {
|
||||
this.passwordHint = passwordHint;
|
||||
}
|
||||
/**
|
||||
* passwordCnsr attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getPasswordCnsr() {
|
||||
return passwordCnsr;
|
||||
}
|
||||
/**
|
||||
* passwordCnsr attribute 값을 설정한다.
|
||||
* @param passwordCnsr String
|
||||
*/
|
||||
public void setPasswordCnsr(String passwordCnsr) {
|
||||
this.passwordCnsr = passwordCnsr;
|
||||
}
|
||||
/**
|
||||
* userSe attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getUserSe() {
|
||||
return userSe;
|
||||
}
|
||||
/**
|
||||
* userSe attribute 값을 설정한다.
|
||||
* @param userSe String
|
||||
*/
|
||||
public void setUserSe(String userSe) {
|
||||
this.userSe = userSe;
|
||||
}
|
||||
/**
|
||||
* orgnztId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getOrgnztId() {
|
||||
return orgnztId;
|
||||
}
|
||||
/**
|
||||
* orgnztId attribute 값을 설정한다.
|
||||
* @param orgnztId String
|
||||
*/
|
||||
public void setOrgnztId(String orgnztId) {
|
||||
this.orgnztId = orgnztId;
|
||||
}
|
||||
/**
|
||||
* uniqId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getUniqId() {
|
||||
return uniqId;
|
||||
}
|
||||
/**
|
||||
* uniqId attribute 값을 설정한다.
|
||||
* @param uniqId String
|
||||
*/
|
||||
public void setUniqId(String uniqId) {
|
||||
this.uniqId = uniqId;
|
||||
}
|
||||
/**
|
||||
* url attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
/**
|
||||
* url attribute 값을 설정한다.
|
||||
* @param url String
|
||||
*/
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
/**
|
||||
* ip attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getIp() {
|
||||
return ip;
|
||||
}
|
||||
/**
|
||||
* ip attribute 값을 설정한다.
|
||||
* @param ip String
|
||||
*/
|
||||
public void setIp(String ip) {
|
||||
this.ip = ip;
|
||||
}
|
||||
/**
|
||||
* dn attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getDn() {
|
||||
return dn;
|
||||
}
|
||||
/**
|
||||
* dn attribute 값을 설정한다.
|
||||
* @param dn String
|
||||
*/
|
||||
public void setDn(String dn) {
|
||||
this.dn = dn;
|
||||
}
|
||||
/**
|
||||
* @return the orgnztNm
|
||||
*/
|
||||
public String getOrgnztNm() {
|
||||
return orgnztNm;
|
||||
}
|
||||
/**
|
||||
* @param orgnztNm the orgnztNm to set
|
||||
*/
|
||||
public void setOrgnztNm(String orgnztNm) {
|
||||
this.orgnztNm = orgnztNm;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
package egovframework.com.cmm;
|
||||
|
||||
import egovframework.rte.ptl.mvc.tags.ui.pagination.AbstractPaginationRenderer;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
|
||||
import org.springframework.web.context.ServletContextAware;
|
||||
/**
|
||||
* ImagePaginationRenderer.java 클래스
|
||||
*
|
||||
* @author 서준식
|
||||
* @since 2011. 9. 16.
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------------- ----------------------
|
||||
* 2011. 9. 16. 서준식 이미지 경로에 ContextPath추가
|
||||
* 2016. 6. 17. 장동한 표준프레임워크 v3.6 리뉴얼
|
||||
* </pre>
|
||||
*/
|
||||
public class RegacyPaginationRenderer extends AbstractPaginationRenderer implements ServletContextAware{
|
||||
|
||||
private ServletContext servletContext;
|
||||
|
||||
public RegacyPaginationRenderer() {
|
||||
|
||||
}
|
||||
|
||||
public void initVariables(){
|
||||
|
||||
firstPageLabel = "<a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \"><img src=\"" + servletContext.getContextPath() + "/images/egovframework/com/cmm/icon/icon_prevend.gif\" alt=\"처음\" border=\"0\"/></a> ";
|
||||
previousPageLabel = "<a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \"><img src=\"" + servletContext.getContextPath() + "/images/egovframework/com/cmm/icon/icon_prev.gif\" alt=\"이전\" border=\"0\"/></a> ";
|
||||
currentPageLabel = "<strong>{0}</strong> ";
|
||||
otherPageLabel = "<a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \">{2}</a> ";
|
||||
nextPageLabel = "<a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \"><img src=\"" + servletContext.getContextPath() + "/images/egovframework/com/cmm/icon/icon_next.gif\" alt=\"다음\" border=\"0\"/></a> ";
|
||||
lastPageLabel = "<a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \"><img src=\"" + servletContext.getContextPath() + "/images/egovframework/com/cmm/icon/icon_nextend.gif\" alt=\"마지막\" border=\"0\"/></a> ";
|
||||
}
|
||||
|
||||
public void setServletContext(ServletContext servletContext) {
|
||||
this.servletContext = servletContext;
|
||||
initVariables();
|
||||
}
|
||||
|
||||
}
|
||||
120
src/main/java/egovframework/com/cmm/SessionVO.java
Normal file
120
src/main/java/egovframework/com/cmm/SessionVO.java
Normal file
@ -0,0 +1,120 @@
|
||||
package egovframework.com.cmm;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 세션 VO 클래스
|
||||
* @author 공통서비스 개발팀 박지욱
|
||||
* @since 2009.03.06
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.06 박지욱 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class SessionVO implements Serializable {
|
||||
|
||||
/** 아이디 */
|
||||
private String sUserId;
|
||||
/** 이름 */
|
||||
private String sUserNm;
|
||||
/** 이메일 */
|
||||
private String sEmail;
|
||||
/** 사용자구분 */
|
||||
private String sUserSe;
|
||||
/** 조직(부서)ID */
|
||||
private String orgnztId;
|
||||
/** 고유아이디 */
|
||||
private String uniqId;
|
||||
/**
|
||||
* sUserId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSUserId() {
|
||||
return sUserId;
|
||||
}
|
||||
/**
|
||||
* sUserId attribute 값을 설정한다.
|
||||
* @param sUserId String
|
||||
*/
|
||||
public void setSUserId(String userId) {
|
||||
sUserId = userId;
|
||||
}
|
||||
/**
|
||||
* sUserNm attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSUserNm() {
|
||||
return sUserNm;
|
||||
}
|
||||
/**
|
||||
* sUserNm attribute 값을 설정한다.
|
||||
* @param sUserNm String
|
||||
*/
|
||||
public void setSUserNm(String userNm) {
|
||||
sUserNm = userNm;
|
||||
}
|
||||
/**
|
||||
* sEmail attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSEmail() {
|
||||
return sEmail;
|
||||
}
|
||||
/**
|
||||
* sEmail attribute 값을 설정한다.
|
||||
* @param sEmail String
|
||||
*/
|
||||
public void setSEmail(String email) {
|
||||
sEmail = email;
|
||||
}
|
||||
/**
|
||||
* sUserSe attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSUserSe() {
|
||||
return sUserSe;
|
||||
}
|
||||
/**
|
||||
* sUserSe attribute 값을 설정한다.
|
||||
* @param sUserSe String
|
||||
*/
|
||||
public void setSUserSe(String userSe) {
|
||||
sUserSe = userSe;
|
||||
}
|
||||
/**
|
||||
* orgnztId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getOrgnztId() {
|
||||
return orgnztId;
|
||||
}
|
||||
/**
|
||||
* orgnztId attribute 값을 설정한다.
|
||||
* @param orgnztId String
|
||||
*/
|
||||
public void setOrgnztId(String orgnztId) {
|
||||
this.orgnztId = orgnztId;
|
||||
}
|
||||
/**
|
||||
* uniqId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getUniqId() {
|
||||
return uniqId;
|
||||
}
|
||||
/**
|
||||
* uniqId attribute 값을 설정한다.
|
||||
* @param uniqId String
|
||||
*/
|
||||
public void setUniqId(String uniqId) {
|
||||
this.uniqId = uniqId;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package egovframework.com.cmm.annotation;
|
||||
|
||||
/**
|
||||
* 컴포넌트의 포함 정보 표현을 위한 annotation 클래스
|
||||
* 기본적으로 Controller 클래스에 annotation을 부여하되,
|
||||
* 하나의 Controller에 여러 개의 목록성 url mapping이 제공되는 경우에는
|
||||
* 메소드에 annotation을 부여한다.
|
||||
* @author 공통컴포넌트 정진오
|
||||
* @since 2011.08.26
|
||||
* @version 2.0.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2011.08.26 정진오 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface IncludedInfo {
|
||||
String name() default ""; // 컴포넌트의 한글 이름
|
||||
String listUrl() default ""; // 컴포넌트의 목록정보조회를 위한 URL
|
||||
int order() default 0; // 자동 생성되는 메뉴 목록에 표시되는 순서
|
||||
int gid() default 0; // 컴포넌트의 Group ID(대분류 구분)
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package egovframework.com.cmm.config;
|
||||
|
||||
/**
|
||||
* EgovLoginConfig 클래스
|
||||
* <Notice>
|
||||
* 사용자 인증수행제한에 대한 설정을 관리하는 클래스
|
||||
* <Disclaimer>
|
||||
* N/A
|
||||
*
|
||||
* @author 장동한
|
||||
* @since 2017.07.17
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------------- ----------------------
|
||||
* 2016.07.17 장동한 최초 생성
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
|
||||
public class EgovLoginConfig {
|
||||
//로그인 인증 제한 여부
|
||||
boolean lock = false;
|
||||
//로그인 인증 제한 횟수
|
||||
int lockCount = 0;
|
||||
|
||||
public boolean isLock() {
|
||||
return lock;
|
||||
}
|
||||
|
||||
public void setLock(boolean lock) {
|
||||
this.lock = lock;
|
||||
}
|
||||
|
||||
public int getLockCount() {
|
||||
return lockCount;
|
||||
}
|
||||
|
||||
public void setLockCount(int lockCount) {
|
||||
this.lockCount = lockCount;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,173 @@
|
||||
package egovframework.com.cmm.config;
|
||||
|
||||
import javax.servlet.FilterRegistration;
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRegistration;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.WebApplicationInitializer;
|
||||
import org.springframework.web.context.ContextLoaderListener;
|
||||
import org.springframework.web.context.support.XmlWebApplicationContext;
|
||||
import org.springframework.web.filter.DelegatingFilterProxy;
|
||||
import org.springframework.web.filter.HiddenHttpMethodFilter;
|
||||
import org.springframework.web.multipart.support.MultipartFilter;
|
||||
import org.springframework.web.servlet.DispatcherServlet;
|
||||
|
||||
import egovframework.com.cmm.filter.HTMLTagFilter;
|
||||
import egovframework.com.cmm.service.EgovProperties;
|
||||
import egovframework.com.sec.security.filter.EgovSpringSecurityLoginFilter;
|
||||
import egovframework.com.sec.security.filter.EgovSpringSecurityLogoutFilter;
|
||||
import egovframework.com.uat.uap.filter.EgovLoginPolicyFilter;
|
||||
import egovframework.com.utl.wed.filter.CkFilter;
|
||||
|
||||
|
||||
/**
|
||||
* EgovWebApplicationInitializer 클래스
|
||||
* <Notice>
|
||||
* 사용자 인증 권한처리를 분리(session, spring security) 하기 위해서 web.xml의 기능을
|
||||
* Servlet3.x WebApplicationInitializer 기능으로 처리
|
||||
* <Disclaimer>
|
||||
* N/A
|
||||
*
|
||||
* @author 장동한
|
||||
* @since 2016.06.23
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------------- ----------------------
|
||||
* 2016.06.23 장동한 최초 생성
|
||||
* 2018.10.02 신용호 Facebook 관련 HiddenHttpMethodFilter 추가
|
||||
* 2018.10.26 신용호 EgovLoginPolicyFilter 추가 (IP접근처리)
|
||||
* 2018.12.03 신용호 springMultipartFilter,HTMLTagFilter 추가 (XSS방지처리)
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
|
||||
public class EgovWebApplicationInitializer implements WebApplicationInitializer {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(EgovWebApplicationInitializer.class);
|
||||
@Override
|
||||
public void onStartup(ServletContext servletContext) throws ServletException {
|
||||
LOGGER.debug("EgovWebApplicationInitializer START-============================================");
|
||||
|
||||
//-------------------------------------------------------------
|
||||
// Egov Web ServletContextListener 설정
|
||||
//-------------------------------------------------------------
|
||||
servletContext.addListener(new egovframework.com.cmm.context.EgovWebServletContextListener());
|
||||
|
||||
//-------------------------------------------------------------
|
||||
// Spring CharacterEncodingFilter 설정
|
||||
//-------------------------------------------------------------
|
||||
FilterRegistration.Dynamic characterEncoding = servletContext.addFilter("encodingFilter", new org.springframework.web.filter.CharacterEncodingFilter());
|
||||
characterEncoding.setInitParameter("encoding", "UTF-8");
|
||||
characterEncoding.setInitParameter("forceEncoding", "true");
|
||||
characterEncoding.addMappingForUrlPatterns(null, false, "*.do");
|
||||
//characterEncoding.addMappingForUrlPatterns(EnumSet.of(DispatcherType.REQUEST), true, "*.do");
|
||||
|
||||
//-------------------------------------------------------------
|
||||
// Spring ServletContextListener 설정
|
||||
//-------------------------------------------------------------
|
||||
XmlWebApplicationContext rootContext = new XmlWebApplicationContext();
|
||||
rootContext.setConfigLocations(new String[] { "classpath*:egovframework/spring/com/**/context-*.xml" });
|
||||
//rootContext.setConfigLocations(new String[] { "classpath*:egovframework/spring/com/context-*.xml","classpath*:egovframework/spring/com/*/context-*.xml" });
|
||||
rootContext.refresh();
|
||||
rootContext.start();
|
||||
|
||||
servletContext.addListener(new ContextLoaderListener(rootContext));
|
||||
|
||||
//-------------------------------------------------------------
|
||||
// Spring ServletContextListener 설정
|
||||
//-------------------------------------------------------------
|
||||
XmlWebApplicationContext xmlWebApplicationContext = new XmlWebApplicationContext();
|
||||
xmlWebApplicationContext.setConfigLocation("/WEB-INF/config/egovframework/springmvc/egov-com-*.xml");
|
||||
ServletRegistration.Dynamic dispatcher = servletContext.addServlet("dispatcher", new DispatcherServlet(xmlWebApplicationContext));
|
||||
//dispatcher.addMapping("*.do");
|
||||
dispatcher.addMapping("/"); // Facebook OAuth 사용시 변경
|
||||
dispatcher.setLoadOnStartup(1);
|
||||
|
||||
if("security".equals(EgovProperties.getProperty("Globals.Auth").trim())) {
|
||||
|
||||
//-------------------------------------------------------------
|
||||
// springSecurityFilterChain 설정
|
||||
//-------------------------------------------------------------
|
||||
FilterRegistration.Dynamic springSecurityFilterChain = servletContext.addFilter("springSecurityFilterChain", new DelegatingFilterProxy());
|
||||
springSecurityFilterChain.addMappingForUrlPatterns(null, false, "*");
|
||||
//servletContext.addFilter("springSecurityFilterChain", new DelegatingFilterProxy("springSecurityFilterChain")).addMappingForUrlPatterns(null, false, "/*");
|
||||
|
||||
//-------------------------------------------------------------
|
||||
// HttpSessionEventPublisher 설정
|
||||
//-------------------------------------------------------------
|
||||
servletContext.addListener(new org.springframework.security.web.session.HttpSessionEventPublisher());
|
||||
|
||||
//-------------------------------------------------------------
|
||||
// EgovSpringSecurityLoginFilter 설정
|
||||
//-------------------------------------------------------------
|
||||
FilterRegistration.Dynamic egovSpringSecurityLoginFilter = servletContext.addFilter("egovSpringSecurityLoginFilter", new EgovSpringSecurityLoginFilter());
|
||||
//로그인 실패시 반활 될 URL설정
|
||||
egovSpringSecurityLoginFilter.setInitParameter("loginURL", "/uat/uia/egovLoginUsr.do");
|
||||
//로그인 처리 URL설정
|
||||
egovSpringSecurityLoginFilter.setInitParameter("loginProcessURL", "/uat/uia/actionLogin.do");
|
||||
//처리 Url Pattern
|
||||
egovSpringSecurityLoginFilter.addMappingForUrlPatterns(null, false, "*.do");
|
||||
|
||||
//-------------------------------------------------------------
|
||||
// EgovSpringSecurityLogoutFilter 설정
|
||||
//-------------------------------------------------------------
|
||||
FilterRegistration.Dynamic egovSpringSecurityLogoutFilter = servletContext.addFilter("egovSpringSecurityLogoutFilter", new EgovSpringSecurityLogoutFilter());
|
||||
egovSpringSecurityLogoutFilter.addMappingForUrlPatterns(null, false, "/uat/uia/actionLogout.do");
|
||||
|
||||
} else if("session".equals(EgovProperties.getProperty("Globals.Auth").trim())) {
|
||||
//-------------------------------------------------------------
|
||||
// EgovLoginPolicyFilter 설정
|
||||
//-------------------------------------------------------------
|
||||
FilterRegistration.Dynamic egovLoginPolicyFilter = servletContext.addFilter("LoginPolicyFilter", new EgovLoginPolicyFilter());
|
||||
egovLoginPolicyFilter.addMappingForUrlPatterns(null, false, "/uat/uia/actionLogin.do");
|
||||
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------
|
||||
// CkFilter 설정 (CKEditor 사용시 설정)
|
||||
//-------------------------------------------------------------
|
||||
FilterRegistration.Dynamic regCkFilter = servletContext.addFilter("CKFilter", new CkFilter());
|
||||
regCkFilter.setInitParameter("properties", "egovframework/egovProps/ck.properties");
|
||||
regCkFilter.addMappingForUrlPatterns(null, false, "/ckupload");
|
||||
|
||||
//-------------------------------------------------------------
|
||||
// HiddenHttpMethodFilter 설정 (Facebook OAuth 사용시 설정)
|
||||
//-------------------------------------------------------------
|
||||
FilterRegistration.Dynamic hiddenHttpMethodFilter = servletContext.addFilter("hiddenHttpMethodFilter", new HiddenHttpMethodFilter());
|
||||
hiddenHttpMethodFilter.addMappingForUrlPatterns(null, false, "/*");
|
||||
|
||||
//-------------------------------------------------------------
|
||||
// Tomcat의 경우 allowCasualMultipartParsing="true" 추가
|
||||
// <Context docBase="" path="/" reloadable="true" allowCasualMultipartParsing="true">
|
||||
//-------------------------------------------------------------
|
||||
MultipartFilter springMultipartFilter = new MultipartFilter();
|
||||
springMultipartFilter.setMultipartResolverBeanName("multipartResolver");
|
||||
FilterRegistration.Dynamic multipartFilter = servletContext.addFilter("springMultipartFilter", springMultipartFilter);
|
||||
multipartFilter.addMappingForUrlPatterns(null, false, "*.do");
|
||||
|
||||
//-------------------------------------------------------------
|
||||
// HTMLTagFilter의 경우는 파라미터에 대하여 XSS 오류 방지를 위한 변환을 처리합니다.
|
||||
//-------------------------------------------------------------
|
||||
// HTMLTagFIlter의 경우는 JSP의 <c:out /> 등을 사용하지 못하는 특수한 상황에서 사용하시면 됩니다.
|
||||
// (<c:out />의 경우 뷰단에서 데이터 출력시 XSS 방지 처리가 됨)
|
||||
FilterRegistration.Dynamic htmlTagFilter = servletContext.addFilter("htmlTagFilter", new HTMLTagFilter());
|
||||
htmlTagFilter.addMappingForUrlPatterns(null, false, "*.do");
|
||||
|
||||
//-------------------------------------------------------------
|
||||
// Spring RequestContextListener 설정
|
||||
//-------------------------------------------------------------
|
||||
servletContext.addListener(new org.springframework.web.context.request.RequestContextListener());
|
||||
|
||||
LOGGER.debug("EgovWebApplicationInitializer END-============================================");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
package egovframework.com.cmm.context;
|
||||
|
||||
import egovframework.com.cmm.service.EgovProperties;
|
||||
|
||||
import javax.servlet.ServletContextEvent;
|
||||
import javax.servlet.ServletContextListener;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* EgovWebServletContextListener 클래스
|
||||
* <Notice>
|
||||
* 데이터베이스 설정을 spring.profiles.active 방식으로 처리
|
||||
* (공통컴포넌트 특성상 데이터베이스별 분리/개발,검증,운영서버로 분리 가능)
|
||||
* <Disclaimer>
|
||||
* N/A
|
||||
*
|
||||
* @author 장동한
|
||||
* @since 2016.06.23
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------------- ----------------------
|
||||
* 2016.06.23 장동한 최초 생성
|
||||
* 2017.03.03 조성원 시큐어코딩(ES)-오류 메시지를 통한 정보노출[CWE-209]
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
public class EgovWebServletContextListener implements ServletContextListener {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(EgovWebServletContextListener.class);
|
||||
|
||||
public EgovWebServletContextListener(){
|
||||
setEgovProfileSetting();
|
||||
}
|
||||
|
||||
public void contextInitialized(ServletContextEvent event){
|
||||
if(System.getProperty("spring.profiles.active") == null){
|
||||
setEgovProfileSetting();
|
||||
}
|
||||
}
|
||||
|
||||
public void contextDestroyed(ServletContextEvent event) {
|
||||
if(System.getProperty("spring.profiles.active") != null){
|
||||
System.setProperty("spring.profiles.active", null);
|
||||
}
|
||||
}
|
||||
|
||||
public void setEgovProfileSetting(){
|
||||
try {
|
||||
LOGGER.debug("===========================Start EgovServletContextLoad START ===========");
|
||||
System.setProperty("spring.profiles.active", EgovProperties.getProperty("Globals.DbType")+","+EgovProperties.getProperty("Globals.Auth"));
|
||||
LOGGER.debug("Setting spring.profiles.active>"+System.getProperty("spring.profiles.active"));
|
||||
LOGGER.debug("===========================END EgovServletContextLoad END ===========");
|
||||
//2017.03.03 조성원 시큐어코딩(ES)-오류 메시지를 통한 정보노출[CWE-209]
|
||||
} catch(IllegalArgumentException e) {
|
||||
LOGGER.error("[IllegalArgumentException] Try/Catch...usingParameters Runing : "+ e.getMessage());
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("[" + e.getClass() +"] search fail : " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
package egovframework.com.cmm.exception;
|
||||
|
||||
import egovframework.rte.fdl.cmmn.exception.BaseRuntimeException;
|
||||
|
||||
/**
|
||||
* EgovXssException 클래스
|
||||
*
|
||||
* @author 장동한
|
||||
* @since 2016.10.27
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------------- ----------------------
|
||||
* 2016.10.17 장동한 최초 생성
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
public class EgovXssException extends BaseRuntimeException {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* EgovXssException 생성자.
|
||||
*
|
||||
* @param defaultMessage 메세지 지정
|
||||
* @param wrappedException 원인 Exception
|
||||
*/
|
||||
public EgovXssException(String message, String messageKey) {
|
||||
this.messageKey = messageKey;
|
||||
this.messageParameters = null;
|
||||
this.message = message;
|
||||
this.wrappedException = null;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright 2008-2009 MOPAS(MINISTRY OF SECURITY AND PUBLIC ADMINISTRATION).
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package egovframework.com.cmm.filter;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.FilterConfig;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
public class HTMLTagFilter implements Filter{
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private FilterConfig config;
|
||||
|
||||
public void doFilter(ServletRequest request, ServletResponse response,
|
||||
FilterChain chain) throws IOException, ServletException {
|
||||
|
||||
chain.doFilter(new HTMLTagFilterRequestWrapper((HttpServletRequest)request), response);
|
||||
}
|
||||
|
||||
public void init(FilterConfig config) throws ServletException {
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
public void destroy() {
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,187 @@
|
||||
/*
|
||||
* Copyright 2008-2009 MOPAS(MINISTRY OF SECURITY AND PUBLIC ADMINISTRATION).
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package egovframework.com.cmm.filter;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletRequestWrapper;
|
||||
|
||||
/**
|
||||
*
|
||||
* HTMLTagFilterRequestWrapper
|
||||
* @author 공통컴포넌트 팀 신용호
|
||||
* @since 2018.03.21
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2018.03.21 신용호 getParameterMap()구현 추가
|
||||
* 2019.01.31 신용호 whiteList 태그 추가
|
||||
*
|
||||
*/
|
||||
|
||||
public class HTMLTagFilterRequestWrapper extends HttpServletRequestWrapper {
|
||||
|
||||
// Tag 화이트 리스트 ( 허용할 태그 등록 )
|
||||
static private String[] whiteListTag = { "<p>","</p>","<br />" };
|
||||
|
||||
public HTMLTagFilterRequestWrapper(HttpServletRequest request) {
|
||||
super(request);
|
||||
}
|
||||
|
||||
public String[] getParameterValues(String parameter) {
|
||||
|
||||
String[] values = super.getParameterValues(parameter);
|
||||
|
||||
if(values==null){
|
||||
return null;
|
||||
}
|
||||
|
||||
for (int i = 0; i < values.length; i++) {
|
||||
if (values[i] != null) {
|
||||
values[i] = getSafeParamData(values[i]);
|
||||
//System.out.println( "[HTMLTagFilter getParameterValues] "+ parameter + "===>>>"+values[i] );
|
||||
} else {
|
||||
values[i] = null;
|
||||
}
|
||||
}
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
public String getParameter(String parameter) {
|
||||
|
||||
String value = super.getParameter(parameter);
|
||||
|
||||
if(value==null){
|
||||
return null;
|
||||
}
|
||||
|
||||
value = getSafeParamData(value);
|
||||
//System.out.println( "[HTMLTagFilter getParameter] "+ parameter + "===>>>"+value );
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Map으로 바인딩된 경우를 처리한다.
|
||||
*
|
||||
* @return Map - String Type Key / String배열타입 값
|
||||
*/
|
||||
public Map<String, String[]> getParameterMap() {
|
||||
Map<String, String[]> valueMap = super.getParameterMap();
|
||||
|
||||
String[] values;
|
||||
for( String key : valueMap.keySet() ){
|
||||
values = valueMap.get(key);
|
||||
|
||||
for (int i = 0; i < values.length; i++) {
|
||||
if (values[i] != null) {
|
||||
values[i] = getSafeParamData(values[i]);
|
||||
//System.out.println( "[HTMLTagFilter getParameterMap] "+ key + "===>>>"+values[i] );
|
||||
} else {
|
||||
values[i] = null;
|
||||
}
|
||||
}
|
||||
|
||||
//System.out.println( String.format("키 : %s, 값 : %s", key, valueMap.get(key)) );
|
||||
}
|
||||
|
||||
return valueMap;
|
||||
}
|
||||
|
||||
private String getSafeParamData(String value) {
|
||||
StringBuffer strBuff = new StringBuffer();
|
||||
|
||||
for (int i = 0; i < value.length(); i++) {
|
||||
char c = value.charAt(i);
|
||||
switch (c) {
|
||||
case '<':
|
||||
if ( checkNextWhiteListTag(i, value) == false )
|
||||
strBuff.append("<");
|
||||
else
|
||||
strBuff.append(c);
|
||||
//System.out.println("checkNextWhiteListTag = "+checkNextWhiteListTag(i, value));
|
||||
break;
|
||||
case '>':
|
||||
if ( checkPrevWhiteListTag(i, value) == false )
|
||||
strBuff.append(">");
|
||||
else
|
||||
strBuff.append(c);
|
||||
//System.out.println("checkPrevWhiteListTag = "+checkPrevWhiteListTag(i, value));
|
||||
break;
|
||||
//case '&':
|
||||
// strBuff.append("&");
|
||||
// break;
|
||||
case '"':
|
||||
strBuff.append(""");
|
||||
break;
|
||||
case '\'':
|
||||
strBuff.append("'");
|
||||
break;
|
||||
default:
|
||||
strBuff.append(c);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
value = strBuff.toString();
|
||||
return value;
|
||||
}
|
||||
|
||||
private boolean checkNextWhiteListTag(int index, String data) {
|
||||
String extractData = "";
|
||||
//int beginIndex = 0;
|
||||
int endIndex = 0;
|
||||
for(String whiteListData: whiteListTag) {
|
||||
//System.out.println("===>>> whiteListData="+whiteListData);
|
||||
endIndex = index+whiteListData.length();
|
||||
if ( data.length() > endIndex )
|
||||
extractData = data.substring(index, endIndex);
|
||||
else
|
||||
extractData = "";
|
||||
//System.out.println("extractData="+extractData);
|
||||
if ( whiteListData.equals(extractData) ) return true; // whiteList 대상으로 판정
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean checkPrevWhiteListTag(int index, String data) {
|
||||
String extractData = "";
|
||||
int beginIndex = 0;
|
||||
int endIndex = 0;
|
||||
for(String whiteListData: whiteListTag) {
|
||||
//System.out.println("===>>> whiteListData="+whiteListData);
|
||||
beginIndex = index-whiteListData.length()+1;
|
||||
endIndex = index+1;
|
||||
//System.out.println(" range ["+beginIndex+" ~ "+endIndex+"]");
|
||||
if ( beginIndex >= 0 )
|
||||
extractData = data.substring(beginIndex, endIndex);
|
||||
else
|
||||
extractData = "";
|
||||
//System.out.println("extractData="+extractData);
|
||||
if ( whiteListData.equals(extractData) ) return true; // whiteList 대상으로 판정
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,91 @@
|
||||
package egovframework.com.cmm.interceptor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import org.springframework.web.servlet.ModelAndViewDefiningException;
|
||||
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
|
||||
|
||||
import egovframework.com.cmm.util.EgovUserDetailsHelper;
|
||||
|
||||
/**
|
||||
* 인증여부 체크 인터셉터
|
||||
* @author 공통서비스 개발팀 서준식
|
||||
* @since 2011.07.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2011.07.01 서준식 최초 생성
|
||||
* 2011.09.07 서준식 인증이 필요없는 URL을 패스하는 로직 추가
|
||||
* 2017.08.31 장동한 인증된 사용자 체크로직 변경 및 관리자 권한 체크 로직 추가
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
|
||||
public class AuthenticInterceptor extends HandlerInterceptorAdapter {
|
||||
|
||||
@Autowired
|
||||
private Environment environment;
|
||||
|
||||
/** log */
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(AuthenticInterceptor.class);
|
||||
|
||||
/** 관리자 접근 권한 패턴 목록 */
|
||||
private List<String> adminAuthPatternList;
|
||||
|
||||
public List<String> getAdminAuthPatternList() {
|
||||
return adminAuthPatternList;
|
||||
}
|
||||
|
||||
public void setAdminAuthPatternList(List<String> adminAuthPatternList) {
|
||||
this.adminAuthPatternList = adminAuthPatternList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 인증된 사용자 여부로 인증 여부를 체크한다.
|
||||
* 관리자 권한에 따라 접근 페이지 권한을 체크한다.
|
||||
*/
|
||||
@Override
|
||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
|
||||
//인증된사용자 여부
|
||||
boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
|
||||
//미민증사용자 체크
|
||||
if(!isAuthenticated) {
|
||||
ModelAndView modelAndView = new ModelAndView("redirect:/uat/uia/egovLoginUsr.do");
|
||||
throw new ModelAndViewDefiningException(modelAndView);
|
||||
}
|
||||
//인증된 권한 목록
|
||||
List<String> authList = (List<String>)EgovUserDetailsHelper.getAuthorities();
|
||||
//관리자인증여부
|
||||
boolean adminAuthUrlPatternMatcher = false;
|
||||
//AntPathRequestMatcher
|
||||
AntPathRequestMatcher antPathRequestMatcher = null;
|
||||
//관리자가 아닐때 체크함
|
||||
for(String adminAuthPattern : adminAuthPatternList){
|
||||
antPathRequestMatcher = new AntPathRequestMatcher(adminAuthPattern);
|
||||
if(antPathRequestMatcher.matches(request)){
|
||||
adminAuthUrlPatternMatcher = true;
|
||||
}
|
||||
}
|
||||
//관리자 권한 체크
|
||||
if(adminAuthUrlPatternMatcher && !authList.contains("ADMIN")){
|
||||
ModelAndView modelAndView = new ModelAndView("redirect:/uat/uia/egovLoginUsr.do?auth_error=1");
|
||||
throw new ModelAndViewDefiningException(modelAndView);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
package egovframework.com.cmm.interceptor;
|
||||
|
||||
import egovframework.com.cmm.LoginVO;
|
||||
import egovframework.com.cmm.util.EgovUserDetailsHelper;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
|
||||
|
||||
/**
|
||||
* 사용자IP 체크 인터셉터
|
||||
* @author 유지보수팀 이기하
|
||||
* @since 2013.03.28
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2013.03.28 이기하 최초 생성
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
public class IpObtainInterceptor extends HandlerInterceptorAdapter {
|
||||
|
||||
@Override
|
||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
|
||||
|
||||
String clientIp = request.getRemoteAddr();
|
||||
|
||||
LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
|
||||
|
||||
if (loginVO != null) {
|
||||
loginVO.setIp(clientIp);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
217
src/main/java/egovframework/com/cmm/service/CmmnDetailCode.java
Normal file
217
src/main/java/egovframework/com/cmm/service/CmmnDetailCode.java
Normal file
@ -0,0 +1,217 @@
|
||||
package egovframework.com.cmm.service;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 공통상세코드 모델 클래스
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
* 2017.09.07 이정은 표준프레임워크 v3.7 개선(clCode 추가)
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
public class CmmnDetailCode implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/*
|
||||
* 분류코드
|
||||
*/
|
||||
private String clCode = "";
|
||||
|
||||
/*
|
||||
* 코드ID
|
||||
*/
|
||||
private String codeId = "";
|
||||
|
||||
/*
|
||||
* 코드ID명
|
||||
*/
|
||||
private String codeIdNm = "";
|
||||
|
||||
/*
|
||||
* 상세코드
|
||||
*/
|
||||
private String code = "";
|
||||
|
||||
/*
|
||||
* 상세코드명
|
||||
*/
|
||||
private String codeNm = "";
|
||||
|
||||
/*
|
||||
* 상세코드설명
|
||||
*/
|
||||
private String codeDc = "";
|
||||
|
||||
/*
|
||||
* 사용여부
|
||||
*/
|
||||
private String useAt = "";
|
||||
|
||||
/*
|
||||
* 최초등록자ID
|
||||
*/
|
||||
private String frstRegisterId = "";
|
||||
|
||||
/*
|
||||
* 최종수정자ID
|
||||
*/
|
||||
private String lastUpdusrId = "";
|
||||
|
||||
|
||||
/**
|
||||
* clCode attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getClCode() {
|
||||
return clCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* clCode attribute 값을 설정한다.
|
||||
* @param clCode String
|
||||
*/
|
||||
public void setClCode(String clCode) {
|
||||
this.clCode = clCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getCodeId() {
|
||||
return codeId;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeId attribute 값을 설정한다.
|
||||
* @param codeId String
|
||||
*/
|
||||
public void setCodeId(String codeId) {
|
||||
this.codeId = codeId;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeIdNm attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getCodeIdNm() {
|
||||
return codeIdNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeIdNm attribute 값을 설정한다.
|
||||
* @param codeIdNm String
|
||||
*/
|
||||
public void setCodeIdNm(String codeIdNm) {
|
||||
this.codeIdNm = codeIdNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* code attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
/**
|
||||
* code attribute 값을 설정한다.
|
||||
* @param code String
|
||||
*/
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeNm attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getCodeNm() {
|
||||
return codeNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeNm attribute 값을 설정한다.
|
||||
* @param codeNm String
|
||||
*/
|
||||
public void setCodeNm(String codeNm) {
|
||||
this.codeNm = codeNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeDc attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getCodeDc() {
|
||||
return codeDc;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeDc attribute 값을 설정한다.
|
||||
* @param codeDc String
|
||||
*/
|
||||
public void setCodeDc(String codeDc) {
|
||||
this.codeDc = codeDc;
|
||||
}
|
||||
|
||||
/**
|
||||
* useAt attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getUseAt() {
|
||||
return useAt;
|
||||
}
|
||||
|
||||
/**
|
||||
* useAt attribute 값을 설정한다.
|
||||
* @param useAt String
|
||||
*/
|
||||
public void setUseAt(String useAt) {
|
||||
this.useAt = useAt;
|
||||
}
|
||||
|
||||
/**
|
||||
* frstRegisterId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getFrstRegisterId() {
|
||||
return frstRegisterId;
|
||||
}
|
||||
|
||||
/**
|
||||
* frstRegisterId attribute 값을 설정한다.
|
||||
* @param frstRegisterId String
|
||||
*/
|
||||
public void setFrstRegisterId(String frstRegisterId) {
|
||||
this.frstRegisterId = frstRegisterId;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastUpdusrId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getLastUpdusrId() {
|
||||
return lastUpdusrId;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastUpdusrId attribute 값을 설정한다.
|
||||
* @param lastUpdusrId String
|
||||
*/
|
||||
public void setLastUpdusrId(String lastUpdusrId) {
|
||||
this.lastUpdusrId = lastUpdusrId;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
package egovframework.com.cmm.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import egovframework.com.cmm.ComDefaultCodeVO;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* 공통코드등 전체 업무에서 공용해서 사용해야 하는 서비스를 정의하기 위한 서비스 인터페이스
|
||||
* @author 공통서비스 개발팀 이삼섭
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.11 이삼섭 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
public interface EgovCmmUseService {
|
||||
|
||||
/**
|
||||
* 공통코드를 조회한다.
|
||||
*
|
||||
* @param vo
|
||||
* @return List(코드)
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<CmmnDetailCode> selectCmmCodeDetail(ComDefaultCodeVO vo) throws Exception;
|
||||
|
||||
/**
|
||||
* ComDefaultCodeVO의 리스트를 받아서 여러개의 코드 리스트를 맵에 담아서 리턴한다.
|
||||
*
|
||||
* @param voList
|
||||
* @return Map(코드)
|
||||
* @throws Exception
|
||||
*/
|
||||
public Map<String, List<CmmnDetailCode>> selectCmmCodeDetails(List<?> voList) throws Exception;
|
||||
|
||||
/**
|
||||
* 조직정보를 코드형태로 리턴한다.
|
||||
*
|
||||
* @param 조회조건정보 vo
|
||||
* @return 조직정보 List
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<CmmnDetailCode> selectOgrnztIdDetail(ComDefaultCodeVO vo) throws Exception;
|
||||
|
||||
/**
|
||||
* 그룹정보를 코드형태로 리턴한다.
|
||||
*
|
||||
* @param 조회조건정보 vo
|
||||
* @return 그룹정보 List
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<CmmnDetailCode> selectGroupIdDetail(ComDefaultCodeVO vo) throws Exception;
|
||||
}
|
||||
@ -0,0 +1,115 @@
|
||||
package egovframework.com.cmm.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Class Name : EgovFileMngService.java
|
||||
* @Description : 파일정보의 관리를 위한 서비스 인터페이스
|
||||
* @Modification Information
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------- -------------------
|
||||
* 2009. 3. 25. 이삼섭 최초생성
|
||||
*
|
||||
* @author 공통 서비스 개발팀 이삼섭
|
||||
* @since 2009. 3. 25.
|
||||
* @version
|
||||
* @see
|
||||
*
|
||||
*/
|
||||
public interface EgovFileMngService {
|
||||
|
||||
/**
|
||||
* 파일에 대한 목록을 조회한다.
|
||||
*
|
||||
* @param fvo
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<FileVO> selectFileInfs(FileVO fvo) throws Exception;
|
||||
|
||||
/**
|
||||
* 하나의 파일에 대한 정보(속성 및 상세)를 등록한다.
|
||||
*
|
||||
* @param fvo
|
||||
* @throws Exception
|
||||
*/
|
||||
public String insertFileInf(FileVO fvo) throws Exception;
|
||||
|
||||
/**
|
||||
* 여러 개의 파일에 대한 정보(속성 및 상세)를 등록한다.
|
||||
*
|
||||
* @param fvoList
|
||||
* @throws Exception
|
||||
*/
|
||||
public String insertFileInfs(List<?> fvoList) throws Exception;
|
||||
|
||||
/**
|
||||
* 여러 개의 파일에 대한 정보(속성 및 상세)를 수정한다.
|
||||
*
|
||||
* @param fvoList
|
||||
* @throws Exception
|
||||
*/
|
||||
public void updateFileInfs(List<?> fvoList) throws Exception;
|
||||
|
||||
/**
|
||||
* 여러 개의 파일을 삭제한다.
|
||||
*
|
||||
* @param fvoList
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteFileInfs(List<?> fvoList) throws Exception;
|
||||
|
||||
/**
|
||||
* 하나의 파일을 삭제한다.
|
||||
*
|
||||
* @param fvo
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteFileInf(FileVO fvo) throws Exception;
|
||||
|
||||
/**
|
||||
* 파일에 대한 상세정보를 조회한다.
|
||||
*
|
||||
* @param fvo
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public FileVO selectFileInf(FileVO fvo) throws Exception;
|
||||
|
||||
/**
|
||||
* 파일 구분자에 대한 최대값을 구한다.
|
||||
*
|
||||
* @param fvo
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public int getMaxFileSN(FileVO fvo) throws Exception;
|
||||
|
||||
/**
|
||||
* 전체 파일을 삭제한다.
|
||||
*
|
||||
* @param fvo
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAllFileInf(FileVO fvo) throws Exception;
|
||||
|
||||
/**
|
||||
* 파일명 검색에 대한 목록을 조회한다.
|
||||
*
|
||||
* @param fvo
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Map<String, Object> selectFileListByFileNm(FileVO fvo) throws Exception;
|
||||
|
||||
/**
|
||||
* 이미지 파일에 대한 목록을 조회한다.
|
||||
*
|
||||
* @param vo
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<FileVO> selectImageFileList(FileVO vo) throws Exception;
|
||||
}
|
||||
436
src/main/java/egovframework/com/cmm/service/EgovFileMngUtil.java
Normal file
436
src/main/java/egovframework/com/cmm/service/EgovFileMngUtil.java
Normal file
@ -0,0 +1,436 @@
|
||||
package egovframework.com.cmm.service;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.sql.Timestamp;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import egovframework.com.cmm.EgovWebUtil;
|
||||
import egovframework.com.cmm.util.EgovResourceCloseHelper;
|
||||
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* @Class Name : EgovFileMngUtil.java
|
||||
* @Description : 메시지 처리 관련 유틸리티
|
||||
* @Modification Information
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.02.13 이삼섭 최초 생성
|
||||
* 2011.08.09 서준식 utl.fcc패키지와 Dependency제거를 위해 getTimeStamp()메서드 추가
|
||||
* 2017.03.03 조성원 시큐어코딩(ES)-부적절한 예외 처리[CWE-253, CWE-440, CWE-754]
|
||||
* @author 공통 서비스 개발팀 이삼섭
|
||||
* @since 2009. 02. 13
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
*/
|
||||
@Component("EgovFileMngUtil")
|
||||
public class EgovFileMngUtil {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(EgovFileMngUtil.class);
|
||||
|
||||
public static final int BUFF_SIZE = 2048;
|
||||
|
||||
@Resource(name = "egovFileIdGnrService")
|
||||
private EgovIdGnrService idgenService;
|
||||
|
||||
/**
|
||||
* 첨부파일에 대한 목록 정보를 취득한다.
|
||||
*
|
||||
* @param files
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<FileVO> parseFileInf(Map<String, MultipartFile> files, String KeyStr, int fileKeyParam, String atchFileId, String storePath) throws Exception {
|
||||
int fileKey = fileKeyParam;
|
||||
|
||||
String storePathString = "";
|
||||
String atchFileIdString = "";
|
||||
|
||||
if ("".equals(storePath) || storePath == null) {
|
||||
storePathString = EgovProperties.getProperty("Globals.fileStorePath");
|
||||
} else {
|
||||
storePathString = EgovProperties.getProperty(storePath);
|
||||
}
|
||||
|
||||
if ("".equals(atchFileId) || atchFileId == null) {
|
||||
atchFileIdString = idgenService.getNextStringId();
|
||||
} else {
|
||||
atchFileIdString = atchFileId;
|
||||
}
|
||||
|
||||
File saveFolder = new File(EgovWebUtil.filePathBlackList(storePathString));
|
||||
|
||||
if (!saveFolder.exists() || saveFolder.isFile()) {
|
||||
//2017.03.03 조성원 시큐어코딩(ES)-부적절한 예외 처리[CWE-253, CWE-440, CWE-754]
|
||||
if (saveFolder.mkdirs()){
|
||||
LOGGER.debug("[file.mkdirs] saveFolder : Creation Success ");
|
||||
}else{
|
||||
LOGGER.error("[file.mkdirs] saveFolder : Creation Fail ");
|
||||
}
|
||||
}
|
||||
|
||||
Iterator<Entry<String, MultipartFile>> itr = files.entrySet().iterator();
|
||||
MultipartFile file;
|
||||
String filePath = "";
|
||||
List<FileVO> result = new ArrayList<FileVO>();
|
||||
FileVO fvo;
|
||||
|
||||
while (itr.hasNext()) {
|
||||
Entry<String, MultipartFile> entry = itr.next();
|
||||
|
||||
file = entry.getValue();
|
||||
String orginFileName = file.getOriginalFilename();
|
||||
|
||||
//--------------------------------------
|
||||
// 원 파일명이 없는 경우 처리
|
||||
// (첨부가 되지 않은 input file type)
|
||||
//--------------------------------------
|
||||
if ("".equals(orginFileName)) {
|
||||
continue;
|
||||
}
|
||||
////------------------------------------
|
||||
|
||||
int index = orginFileName.lastIndexOf(".");
|
||||
//String fileName = orginFileName.substring(0, index);
|
||||
String fileExt = orginFileName.substring(index + 1);
|
||||
String newName = KeyStr + getTimeStamp() + fileKey;
|
||||
long size = file.getSize();
|
||||
|
||||
if (!"".equals(orginFileName)) {
|
||||
filePath = storePathString + File.separator + newName;
|
||||
file.transferTo(new File(EgovWebUtil.filePathBlackList(filePath)));
|
||||
}
|
||||
|
||||
fvo = new FileVO();
|
||||
fvo.setFileExtsn(fileExt);
|
||||
fvo.setFileStreCours(storePathString);
|
||||
fvo.setFileMg(Long.toString(size));
|
||||
fvo.setOrignlFileNm(orginFileName);
|
||||
fvo.setStreFileNm(newName);
|
||||
fvo.setAtchFileId(atchFileIdString);
|
||||
fvo.setFileSn(String.valueOf(fileKey));
|
||||
|
||||
result.add(fvo);
|
||||
|
||||
fileKey++;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 첨부파일을 서버에 저장한다.
|
||||
*
|
||||
* @param file
|
||||
* @param newName
|
||||
* @param stordFilePath
|
||||
* @throws Exception
|
||||
*/
|
||||
protected void writeUploadedFile(MultipartFile file, String newName, String stordFilePath) throws Exception {
|
||||
InputStream stream = null;
|
||||
OutputStream bos = null;
|
||||
|
||||
try {
|
||||
stream = file.getInputStream();
|
||||
File cFile = new File(stordFilePath);
|
||||
|
||||
if (!cFile.isDirectory()) {
|
||||
boolean _flag = cFile.mkdir();
|
||||
if (!_flag) {
|
||||
throw new IOException("Directory creation Failed ");
|
||||
}
|
||||
}
|
||||
|
||||
bos = new FileOutputStream(stordFilePath + File.separator + newName);
|
||||
|
||||
int bytesRead = 0;
|
||||
byte[] buffer = new byte[BUFF_SIZE];
|
||||
|
||||
while ((bytesRead = stream.read(buffer, 0, BUFF_SIZE)) != -1) {
|
||||
bos.write(buffer, 0, bytesRead);
|
||||
}
|
||||
} finally {
|
||||
EgovResourceCloseHelper.close(bos, stream);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 서버의 파일을 다운로드한다.
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @throws Exception
|
||||
*/
|
||||
public static void downFile(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
|
||||
String downFileName = "";
|
||||
String orgFileName = "";
|
||||
|
||||
if ((String) request.getAttribute("downFile") == null) {
|
||||
downFileName = "";
|
||||
} else {
|
||||
downFileName = (String) request.getAttribute("downFile");
|
||||
}
|
||||
|
||||
if ((String) request.getAttribute("orgFileName") == null) {
|
||||
orgFileName = "";
|
||||
} else {
|
||||
orgFileName = (String) request.getAttribute("orginFile");
|
||||
}
|
||||
|
||||
orgFileName = orgFileName.replaceAll("\r", "").replaceAll("\n", "");
|
||||
|
||||
File file = new File(EgovWebUtil.filePathBlackList(downFileName));
|
||||
|
||||
if (!file.exists()) {
|
||||
throw new FileNotFoundException(downFileName);
|
||||
}
|
||||
|
||||
if (!file.isFile()) {
|
||||
throw new FileNotFoundException(downFileName);
|
||||
}
|
||||
|
||||
byte[] buffer = new byte[BUFF_SIZE]; //buffer size 2K.
|
||||
|
||||
response.setContentType("application/x-msdownload");
|
||||
response.setHeader("Content-Disposition:", "attachment; filename=" + new String(orgFileName.getBytes(), "UTF-8"));
|
||||
response.setHeader("Content-Transfer-Encoding", "binary");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Expires", "0");
|
||||
|
||||
BufferedInputStream fin = null;
|
||||
BufferedOutputStream outs = null;
|
||||
|
||||
try {
|
||||
fin = new BufferedInputStream(new FileInputStream(file));
|
||||
outs = new BufferedOutputStream(response.getOutputStream());
|
||||
int read = 0;
|
||||
|
||||
while ((read = fin.read(buffer)) != -1) {
|
||||
outs.write(buffer, 0, read);
|
||||
}
|
||||
} finally {
|
||||
EgovResourceCloseHelper.close(outs, fin);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 첨부로 등록된 파일을 서버에 업로드한다.
|
||||
*
|
||||
* @param file
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static HashMap<String, String> uploadFile(MultipartFile file) throws Exception {
|
||||
|
||||
HashMap<String, String> map = new HashMap<String, String>();
|
||||
//Write File 이후 Move File????
|
||||
String newName = "";
|
||||
String stordFilePath = EgovProperties.getProperty("Globals.fileStorePath");
|
||||
String orginFileName = file.getOriginalFilename();
|
||||
|
||||
int index = orginFileName.lastIndexOf(".");
|
||||
//String fileName = orginFileName.substring(0, _index);
|
||||
String fileExt = orginFileName.substring(index + 1);
|
||||
long size = file.getSize();
|
||||
|
||||
//newName 은 Naming Convention에 의해서 생성
|
||||
newName = getTimeStamp(); // 2012.11 KISA 보안조치
|
||||
writeFile(file, newName, stordFilePath);
|
||||
//storedFilePath는 지정
|
||||
map.put(Globals.ORIGIN_FILE_NM, orginFileName);
|
||||
map.put(Globals.UPLOAD_FILE_NM, newName);
|
||||
map.put(Globals.FILE_EXT, fileExt);
|
||||
map.put(Globals.FILE_PATH, stordFilePath);
|
||||
map.put(Globals.FILE_SIZE, String.valueOf(size));
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 파일을 실제 물리적인 경로에 생성한다.
|
||||
*
|
||||
* @param file
|
||||
* @param newName
|
||||
* @param stordFilePath
|
||||
* @throws Exception
|
||||
*/
|
||||
protected static void writeFile(MultipartFile file, String newName, String stordFilePath) throws Exception {
|
||||
InputStream stream = null;
|
||||
OutputStream bos = null;
|
||||
|
||||
try {
|
||||
stream = file.getInputStream();
|
||||
File cFile = new File(EgovWebUtil.filePathBlackList(stordFilePath));
|
||||
|
||||
if (!cFile.isDirectory()){
|
||||
//2017.03.03 조성원 시큐어코딩(ES)-부적절한 예외 처리[CWE-253, CWE-440, CWE-754]
|
||||
if (cFile.mkdirs()){
|
||||
LOGGER.debug("[file.mkdirs] saveFolder : Creation Success ");
|
||||
}else{
|
||||
LOGGER.error("[file.mkdirs] saveFolder : Creation Fail ");
|
||||
}
|
||||
}
|
||||
|
||||
bos = new FileOutputStream(EgovWebUtil.filePathBlackList(stordFilePath + File.separator + newName));
|
||||
|
||||
int bytesRead = 0;
|
||||
byte[] buffer = new byte[BUFF_SIZE];
|
||||
|
||||
while ((bytesRead = stream.read(buffer, 0, BUFF_SIZE)) != -1) {
|
||||
bos.write(buffer, 0, bytesRead);
|
||||
}
|
||||
} finally {
|
||||
EgovResourceCloseHelper.close(bos, stream);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 서버 파일에 대하여 다운로드를 처리한다.
|
||||
*
|
||||
* @param response
|
||||
* @param streFileNm 파일저장 경로가 포함된 형태
|
||||
* @param orignFileNm
|
||||
* @throws Exception
|
||||
*/
|
||||
public void downFile(HttpServletResponse response, String streFileNm, String orignFileNm) throws Exception {
|
||||
String downFileName = streFileNm;
|
||||
String orgFileName = orignFileNm;
|
||||
|
||||
File file = new File(downFileName);
|
||||
|
||||
if (!file.exists()) {
|
||||
throw new FileNotFoundException(downFileName);
|
||||
}
|
||||
|
||||
if (!file.isFile()) {
|
||||
throw new FileNotFoundException(downFileName);
|
||||
}
|
||||
|
||||
int fSize = (int) file.length();
|
||||
if (fSize > 0) {
|
||||
BufferedInputStream in = null;
|
||||
|
||||
try {
|
||||
in = new BufferedInputStream(new FileInputStream(file));
|
||||
|
||||
String mimetype = "application/x-msdownload";
|
||||
|
||||
//response.setBufferSize(fSize);
|
||||
response.setContentType(mimetype);
|
||||
response.setHeader("Content-Disposition:", "attachment; filename=" + orgFileName);
|
||||
response.setContentLength(fSize);
|
||||
//response.setHeader("Content-Transfer-Encoding","binary");
|
||||
//response.setHeader("Pragma","no-cache");
|
||||
//response.setHeader("Expires","0");
|
||||
FileCopyUtils.copy(in, response.getOutputStream());
|
||||
} finally {
|
||||
EgovResourceCloseHelper.close(in);
|
||||
}
|
||||
response.getOutputStream().flush();
|
||||
response.getOutputStream().close();
|
||||
}
|
||||
|
||||
/*
|
||||
String uploadPath = propertiesService.getString("fileDir");
|
||||
|
||||
File uFile = new File(uploadPath, requestedFile);
|
||||
int fSize = (int) uFile.length();
|
||||
|
||||
if (fSize > 0) {
|
||||
BufferedInputStream in = new BufferedInputStream(new FileInputStream(uFile));
|
||||
|
||||
String mimetype = "text/html";
|
||||
|
||||
//response.setBufferSize(fSize);
|
||||
response.setContentType(mimetype);
|
||||
response.setHeader("Content-Disposition", "attachment; filename=\"" + requestedFile + "\"");
|
||||
response.setContentLength(fSize);
|
||||
|
||||
FileCopyUtils.copy(in, response.getOutputStream());
|
||||
in.close();
|
||||
response.getOutputStream().flush();
|
||||
response.getOutputStream().close();
|
||||
} else {
|
||||
response.setContentType("text/html");
|
||||
PrintWriter printwriter = response.getWriter();
|
||||
printwriter.println("<html>");
|
||||
printwriter.println("<br><br><br><h2>Could not get file name:<br>" + requestedFile + "</h2>");
|
||||
printwriter.println("<br><br><br><center><h3><a href='javascript: history.go(-1)'>Back</a></h3></center>");
|
||||
printwriter.println("<br><br><br>© webAccess");
|
||||
printwriter.println("</html>");
|
||||
printwriter.flush();
|
||||
printwriter.close();
|
||||
}
|
||||
//*/
|
||||
|
||||
/*
|
||||
response.setContentType("application/x-msdownload");
|
||||
response.setHeader("Content-Disposition:", "attachment; filename=" + new String(orgFileName.getBytes(),"UTF-8" ));
|
||||
response.setHeader("Content-Transfer-Encoding","binary");
|
||||
response.setHeader("Pragma","no-cache");
|
||||
response.setHeader("Expires","0");
|
||||
|
||||
BufferedInputStream fin = new BufferedInputStream(new FileInputStream(file));
|
||||
BufferedOutputStream outs = new BufferedOutputStream(response.getOutputStream());
|
||||
int read = 0;
|
||||
|
||||
while ((read = fin.read(b)) != -1) {
|
||||
outs.write(b,0,read);
|
||||
}
|
||||
log.debug(this.getClass().getName()+" BufferedOutputStream Write Complete!!! ");
|
||||
|
||||
outs.close();
|
||||
fin.close();
|
||||
//*/
|
||||
}
|
||||
|
||||
/**
|
||||
* 공통 컴포넌트 utl.fcc 패키지와 Dependency제거를 위해 내부 메서드로 추가 정의함
|
||||
* 응용어플리케이션에서 고유값을 사용하기 위해 시스템에서17자리의TIMESTAMP값을 구하는 기능
|
||||
*
|
||||
* @param
|
||||
* @return Timestamp 값
|
||||
* @see
|
||||
*/
|
||||
private static String getTimeStamp() {
|
||||
|
||||
String rtnStr = null;
|
||||
|
||||
// 문자열로 변환하기 위한 패턴 설정(년도-월-일 시:분:초:초(자정이후 초))
|
||||
String pattern = "yyyyMMddhhmmssSSS";
|
||||
|
||||
SimpleDateFormat sdfCurrent = new SimpleDateFormat(pattern, Locale.KOREA);
|
||||
Timestamp ts = new Timestamp(System.currentTimeMillis());
|
||||
|
||||
rtnStr = sdfCurrent.format(ts.getTime());
|
||||
|
||||
return rtnStr;
|
||||
}
|
||||
}
|
||||
223
src/main/java/egovframework/com/cmm/service/EgovProperties.java
Normal file
223
src/main/java/egovframework/com/cmm/service/EgovProperties.java
Normal file
@ -0,0 +1,223 @@
|
||||
package egovframework.com.cmm.service;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
import egovframework.com.cmm.EgovWebUtil;
|
||||
import egovframework.com.cmm.util.EgovResourceCloseHelper;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Class Name : EgovProperties.java
|
||||
* Description : properties값들을 파일로부터 읽어와 Globals클래스의 정적변수로 로드시켜주는 클래스로
|
||||
* 문자열 정보 기준으로 사용할 전역변수를 시스템 재시작으로 반영할 수 있도록 한다.
|
||||
* Modification Information
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2009.01.19 박지욱 최초 생성
|
||||
* 2011.07.20 서준식 Globals파일의 상대경로를 읽은 메서드 추가
|
||||
* 2014.10.13 이기하 Globals.properties 값이 null일 경우 오류처리
|
||||
* 2019.04.26 신용호 RELATIVE_PATH_PREFIX Path 적용 방식 개선
|
||||
* @author 공통 서비스 개발팀 박지욱
|
||||
* @since 2009. 01. 19
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
*/
|
||||
|
||||
public class EgovProperties {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(EgovProperties.class);
|
||||
|
||||
//파일구분자
|
||||
final static String FILE_SEPARATOR = System.getProperty("file.separator");
|
||||
|
||||
//프로퍼티 파일의 물리적 위치
|
||||
//public static final String GLOBALS_PROPERTIES_FILE = System.getProperty("user.home") + FILE_SEPARATOR + "egovProps" +FILE_SEPARATOR + "globals.properties";
|
||||
|
||||
public static final String RELATIVE_PATH_PREFIX = EgovProperties.class.getResource("").getPath().substring(0, EgovProperties.class.getResource("").getPath().lastIndexOf("com"));
|
||||
//public static final String RELATIVE_PATH_PREFIX = EgovProperties.class.getProtectionDomain().getCodeSource().getLocation().getPath().substring(0,EgovProperties.class.getProtectionDomain().getCodeSource().getLocation().getPath().indexOf("WEB-INF/classes/")+"WEB-INF/classes/".length())+"egovframework/";
|
||||
|
||||
public static final String GLOBALS_PROPERTIES_FILE = RELATIVE_PATH_PREFIX + "egovProps" + FILE_SEPARATOR + "globals.properties";
|
||||
|
||||
/**
|
||||
* 인자로 주어진 문자열을 Key값으로 하는 상대경로 프로퍼티 값을 절대경로로 반환한다(Globals.java 전용)
|
||||
* @param keyName String
|
||||
* @return String
|
||||
*/
|
||||
public static String getPathProperty(String keyName) {
|
||||
String value = "";
|
||||
|
||||
LOGGER.debug("getPathProperty : {} = {}", GLOBALS_PROPERTIES_FILE, keyName);
|
||||
|
||||
FileInputStream fis = null;
|
||||
try {
|
||||
Properties props = new Properties();
|
||||
|
||||
fis = new FileInputStream(EgovWebUtil.filePathBlackList(GLOBALS_PROPERTIES_FILE));
|
||||
props.load(new BufferedInputStream(fis));
|
||||
|
||||
value = props.getProperty(keyName);
|
||||
value = (value == null) ? "" : value.trim();//KISA 보안약점 조치 (2018-10-29, 윤창원)
|
||||
value = RELATIVE_PATH_PREFIX + "egovProps" + System.getProperty("file.separator") + value;
|
||||
} catch (FileNotFoundException fne) {
|
||||
LOGGER.debug("Property file not found.", fne);
|
||||
throw new RuntimeException("Property file not found", fne);
|
||||
} catch (IOException ioe) {
|
||||
LOGGER.debug("Property file IO exception", ioe);
|
||||
throw new RuntimeException("Property file IO exception", ioe);
|
||||
} finally {
|
||||
EgovResourceCloseHelper.close(fis);
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 인자로 주어진 문자열을 Key값으로 하는 프로퍼티 값을 반환한다(Globals.java 전용)
|
||||
* @param keyName String
|
||||
* @return String
|
||||
*/
|
||||
public static String getProperty(String keyName) {
|
||||
String value = "";
|
||||
|
||||
LOGGER.debug("===>>> getProperty"+EgovProperties.class.getProtectionDomain().getCodeSource().getLocation().getPath());
|
||||
LOGGER.debug("getProperty : {} = {}", GLOBALS_PROPERTIES_FILE, keyName);
|
||||
|
||||
FileInputStream fis = null;
|
||||
try {
|
||||
Properties props = new Properties();
|
||||
|
||||
fis = new FileInputStream(EgovWebUtil.filePathBlackList(GLOBALS_PROPERTIES_FILE));
|
||||
|
||||
props.load(new BufferedInputStream(fis));
|
||||
if (props.getProperty(keyName) == null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
value = props.getProperty(keyName).trim();
|
||||
} catch (FileNotFoundException fne) {
|
||||
LOGGER.debug("Property file not found.", fne);
|
||||
throw new RuntimeException("Property file not found", fne);
|
||||
} catch (IOException ioe) {
|
||||
LOGGER.debug("Property file IO exception", ioe);
|
||||
throw new RuntimeException("Property file IO exception", ioe);
|
||||
} finally {
|
||||
EgovResourceCloseHelper.close(fis);
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 주어진 파일에서 인자로 주어진 문자열을 Key값으로 하는 프로퍼티 상대 경로값을 절대 경로값으로 반환한다
|
||||
* @param fileName String
|
||||
* @param key String
|
||||
* @return String
|
||||
*/
|
||||
public static String getPathProperty(String fileName, String key) {
|
||||
FileInputStream fis = null;
|
||||
try {
|
||||
Properties props = new Properties();
|
||||
|
||||
fis = new FileInputStream(EgovWebUtil.filePathBlackList(fileName));
|
||||
props.load(new BufferedInputStream(fis));
|
||||
fis.close();
|
||||
|
||||
String value = props.getProperty(key);
|
||||
value = RELATIVE_PATH_PREFIX + "egovProps" + System.getProperty("file.separator") + value;
|
||||
|
||||
return value;
|
||||
} catch (FileNotFoundException fne) {
|
||||
LOGGER.debug("Property file not found.", fne);
|
||||
throw new RuntimeException("Property file not found", fne);
|
||||
} catch (IOException ioe) {
|
||||
LOGGER.debug("Property file IO exception", ioe);
|
||||
throw new RuntimeException("Property file IO exception", ioe);
|
||||
} finally {
|
||||
EgovResourceCloseHelper.close(fis);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 주어진 파일에서 인자로 주어진 문자열을 Key값으로 하는 프로퍼티 값을 반환한다
|
||||
* @param fileName String
|
||||
* @param key String
|
||||
* @return String
|
||||
*/
|
||||
public static String getProperty(String fileName, String key) {
|
||||
FileInputStream fis = null;
|
||||
try {
|
||||
Properties props = new Properties();
|
||||
|
||||
fis = new FileInputStream(EgovWebUtil.filePathBlackList(fileName));
|
||||
props.load(new BufferedInputStream(fis));
|
||||
fis.close();
|
||||
|
||||
String value = props.getProperty(key);
|
||||
|
||||
return value;
|
||||
} catch (FileNotFoundException fne) {
|
||||
LOGGER.debug("Property file not found.", fne);
|
||||
throw new RuntimeException("Property file not found", fne);
|
||||
} catch (IOException ioe) {
|
||||
LOGGER.debug("Property file IO exception", ioe);
|
||||
throw new RuntimeException("Property file IO exception", ioe);
|
||||
} finally {
|
||||
EgovResourceCloseHelper.close(fis);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 주어진 프로파일의 내용을 파싱하여 (key-value) 형태의 구조체 배열을 반환한다.
|
||||
* @param property String
|
||||
* @return ArrayList
|
||||
*/
|
||||
public static ArrayList<Map<String, String>> loadPropertyFile(String property) {
|
||||
|
||||
// key - value 형태로 된 배열 결과
|
||||
ArrayList<Map<String, String>> keyList = new ArrayList<Map<String, String>>();
|
||||
|
||||
String src = property.replace('\\', File.separatorChar).replace('/', File.separatorChar);
|
||||
FileInputStream fis = null;
|
||||
try {
|
||||
|
||||
File srcFile = new File(EgovWebUtil.filePathBlackList(src));
|
||||
if (srcFile.exists()) {
|
||||
|
||||
Properties props = new Properties();
|
||||
fis = new FileInputStream(src);
|
||||
props.load(new BufferedInputStream(fis));
|
||||
fis.close();
|
||||
|
||||
Enumeration<?> plist = props.propertyNames();
|
||||
if (plist != null) {
|
||||
while (plist.hasMoreElements()) {
|
||||
Map<String, String> map = new HashMap<String, String>();
|
||||
String key = (String) plist.nextElement();
|
||||
map.put(key, props.getProperty(key));
|
||||
keyList.add(map);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
LOGGER.debug("IO Exception", ex);
|
||||
throw new RuntimeException(ex);
|
||||
} finally {
|
||||
EgovResourceCloseHelper.close(fis);
|
||||
}
|
||||
|
||||
return keyList;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package egovframework.com.cmm.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface EgovUserDetailsService {
|
||||
|
||||
/**
|
||||
* 인증된 사용자객체를 VO형식으로 가져온다.
|
||||
* @return Object - 사용자 ValueObject
|
||||
*/
|
||||
public Object getAuthenticatedUser();
|
||||
|
||||
/**
|
||||
* 인증된 사용자의 권한 정보를 가져온다.
|
||||
* 예) [ROLE_ADMIN, ROLE_USER, ROLE_A, ROLE_B, ROLE_RESTRICTED, IS_AUTHENTICATED_FULLY, IS_AUTHENTICATED_REMEMBERED, IS_AUTHENTICATED_ANONYMOUSLY]
|
||||
* @return List - 사용자 권한정보 목록
|
||||
*/
|
||||
public List<String> getAuthorities();
|
||||
|
||||
/**
|
||||
* 인증된 사용자 여부를 체크한다.
|
||||
* @return Boolean - 인증된 사용자 여부(TRUE / FALSE)
|
||||
*/
|
||||
public Boolean isAuthenticated();
|
||||
|
||||
}
|
||||
240
src/main/java/egovframework/com/cmm/service/FileVO.java
Normal file
240
src/main/java/egovframework/com/cmm/service/FileVO.java
Normal file
@ -0,0 +1,240 @@
|
||||
package egovframework.com.cmm.service;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
|
||||
/**
|
||||
* @Class Name : FileVO.java
|
||||
* @Description : 파일정보 처리를 위한 VO 클래스
|
||||
* @Modification Information
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------- -------------------
|
||||
* 2009. 3. 25. 이삼섭
|
||||
*
|
||||
* @author 공통 서비스 개발팀 이삼섭
|
||||
* @since 2009. 3. 25.
|
||||
* @version
|
||||
* @see
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class FileVO implements Serializable {
|
||||
|
||||
/**
|
||||
* 첨부파일 아이디
|
||||
*/
|
||||
public String atchFileId = "";
|
||||
/**
|
||||
* 생성일자
|
||||
*/
|
||||
public String creatDt = "";
|
||||
/**
|
||||
* 파일내용
|
||||
*/
|
||||
public String fileCn = "";
|
||||
/**
|
||||
* 파일확장자
|
||||
*/
|
||||
public String fileExtsn = "";
|
||||
/**
|
||||
* 파일크기
|
||||
*/
|
||||
public String fileMg = "";
|
||||
/**
|
||||
* 파일연번
|
||||
*/
|
||||
public String fileSn = "";
|
||||
/**
|
||||
* 파일저장경로
|
||||
*/
|
||||
public String fileStreCours = "";
|
||||
/**
|
||||
* 원파일명
|
||||
*/
|
||||
public String orignlFileNm = "";
|
||||
/**
|
||||
* 저장파일명
|
||||
*/
|
||||
public String streFileNm = "";
|
||||
|
||||
/**
|
||||
* atchFileId attribute를 리턴한다.
|
||||
*
|
||||
* @return the atchFileId
|
||||
*/
|
||||
public String getAtchFileId() {
|
||||
return atchFileId;
|
||||
}
|
||||
|
||||
/**
|
||||
* atchFileId attribute 값을 설정한다.
|
||||
*
|
||||
* @param atchFileId
|
||||
* the atchFileId to set
|
||||
*/
|
||||
public void setAtchFileId(String atchFileId) {
|
||||
this.atchFileId = atchFileId;
|
||||
}
|
||||
|
||||
/**
|
||||
* creatDt attribute를 리턴한다.
|
||||
*
|
||||
* @return the creatDt
|
||||
*/
|
||||
public String getCreatDt() {
|
||||
return creatDt;
|
||||
}
|
||||
|
||||
/**
|
||||
* creatDt attribute 값을 설정한다.
|
||||
*
|
||||
* @param creatDt
|
||||
* the creatDt to set
|
||||
*/
|
||||
public void setCreatDt(String creatDt) {
|
||||
this.creatDt = creatDt;
|
||||
}
|
||||
|
||||
/**
|
||||
* fileCn attribute를 리턴한다.
|
||||
*
|
||||
* @return the fileCn
|
||||
*/
|
||||
public String getFileCn() {
|
||||
return fileCn;
|
||||
}
|
||||
|
||||
/**
|
||||
* fileCn attribute 값을 설정한다.
|
||||
*
|
||||
* @param fileCn
|
||||
* the fileCn to set
|
||||
*/
|
||||
public void setFileCn(String fileCn) {
|
||||
this.fileCn = fileCn;
|
||||
}
|
||||
|
||||
/**
|
||||
* fileExtsn attribute를 리턴한다.
|
||||
*
|
||||
* @return the fileExtsn
|
||||
*/
|
||||
public String getFileExtsn() {
|
||||
return fileExtsn;
|
||||
}
|
||||
|
||||
/**
|
||||
* fileExtsn attribute 값을 설정한다.
|
||||
*
|
||||
* @param fileExtsn
|
||||
* the fileExtsn to set
|
||||
*/
|
||||
public void setFileExtsn(String fileExtsn) {
|
||||
this.fileExtsn = fileExtsn;
|
||||
}
|
||||
|
||||
/**
|
||||
* fileMg attribute를 리턴한다.
|
||||
*
|
||||
* @return the fileMg
|
||||
*/
|
||||
public String getFileMg() {
|
||||
return fileMg;
|
||||
}
|
||||
|
||||
/**
|
||||
* fileMg attribute 값을 설정한다.
|
||||
*
|
||||
* @param fileMg
|
||||
* the fileMg to set
|
||||
*/
|
||||
public void setFileMg(String fileMg) {
|
||||
this.fileMg = fileMg;
|
||||
}
|
||||
|
||||
/**
|
||||
* fileSn attribute를 리턴한다.
|
||||
*
|
||||
* @return the fileSn
|
||||
*/
|
||||
public String getFileSn() {
|
||||
return fileSn;
|
||||
}
|
||||
|
||||
/**
|
||||
* fileSn attribute 값을 설정한다.
|
||||
*
|
||||
* @param fileSn
|
||||
* the fileSn to set
|
||||
*/
|
||||
public void setFileSn(String fileSn) {
|
||||
this.fileSn = fileSn;
|
||||
}
|
||||
|
||||
/**
|
||||
* fileStreCours attribute를 리턴한다.
|
||||
*
|
||||
* @return the fileStreCours
|
||||
*/
|
||||
public String getFileStreCours() {
|
||||
return fileStreCours;
|
||||
}
|
||||
|
||||
/**
|
||||
* fileStreCours attribute 값을 설정한다.
|
||||
*
|
||||
* @param fileStreCours
|
||||
* the fileStreCours to set
|
||||
*/
|
||||
public void setFileStreCours(String fileStreCours) {
|
||||
this.fileStreCours = fileStreCours;
|
||||
}
|
||||
|
||||
/**
|
||||
* orignlFileNm attribute를 리턴한다.
|
||||
*
|
||||
* @return the orignlFileNm
|
||||
*/
|
||||
public String getOrignlFileNm() {
|
||||
return orignlFileNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* orignlFileNm attribute 값을 설정한다.
|
||||
*
|
||||
* @param orignlFileNm
|
||||
* the orignlFileNm to set
|
||||
*/
|
||||
public void setOrignlFileNm(String orignlFileNm) {
|
||||
this.orignlFileNm = orignlFileNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* streFileNm attribute를 리턴한다.
|
||||
*
|
||||
* @return the streFileNm
|
||||
*/
|
||||
public String getStreFileNm() {
|
||||
return streFileNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* streFileNm attribute 값을 설정한다.
|
||||
*
|
||||
* @param streFileNm
|
||||
* the streFileNm to set
|
||||
*/
|
||||
public void setStreFileNm(String streFileNm) {
|
||||
this.streFileNm = streFileNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* toString 메소드를 대치한다.
|
||||
*/
|
||||
public String toString() {
|
||||
return ToStringBuilder.reflectionToString(this);
|
||||
}
|
||||
|
||||
}
|
||||
58
src/main/java/egovframework/com/cmm/service/Globals.java
Normal file
58
src/main/java/egovframework/com/cmm/service/Globals.java
Normal file
@ -0,0 +1,58 @@
|
||||
package egovframework.com.cmm.service;
|
||||
|
||||
/**
|
||||
* Class Name : Globals.java
|
||||
* Description : 시스템 구동 시 프로퍼티를 통해 사용될 전역변수를 정의한다.
|
||||
* Modification Information
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.01.19 박지욱 최초 생성
|
||||
*
|
||||
* @author 공통 서비스 개발팀 박지욱
|
||||
* @since 2009. 01. 19
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
*/
|
||||
|
||||
public class Globals {
|
||||
//OS 유형
|
||||
public static final String OS_TYPE = EgovProperties.getProperty("Globals.OsType");
|
||||
//DB 유형
|
||||
public static final String DB_TYPE = EgovProperties.getProperty("Globals.DbType");
|
||||
//메인 페이지
|
||||
public static final String MAIN_PAGE = EgovProperties.getProperty("Globals.MainPage");
|
||||
//ShellFile 경로
|
||||
public static final String SHELL_FILE_PATH = EgovProperties.getPathProperty("Globals.ShellFilePath");
|
||||
//퍼로퍼티 파일 위치
|
||||
public static final String CONF_PATH = EgovProperties.getPathProperty("Globals.ConfPath");
|
||||
//Server정보 프로퍼티 위치
|
||||
public static final String SERVER_CONF_PATH = EgovProperties.getPathProperty("Globals.ServerConfPath");
|
||||
//Client정보 프로퍼티 위치
|
||||
public static final String CLIENT_CONF_PATH = EgovProperties.getPathProperty("Globals.ClientConfPath");
|
||||
//파일포맷 정보 프로퍼티 위치
|
||||
public static final String FILE_FORMAT_PATH = EgovProperties.getPathProperty("Globals.FileFormatPath");
|
||||
|
||||
//파일 업로드 원 파일명
|
||||
public static final String ORIGIN_FILE_NM = "originalFileName";
|
||||
//파일 확장자
|
||||
public static final String FILE_EXT = "fileExtension";
|
||||
//파일크기
|
||||
public static final String FILE_SIZE = "fileSize";
|
||||
//업로드된 파일명
|
||||
public static final String UPLOAD_FILE_NM = "uploadFileName";
|
||||
//파일경로
|
||||
public static final String FILE_PATH = "filePath";
|
||||
|
||||
//메일발송요청 XML파일경로
|
||||
public static final String MAIL_REQUEST_PATH = EgovProperties.getPathProperty("Globals.MailRequestPath");
|
||||
//메일발송응답 XML파일경로
|
||||
public static final String MAIL_RESPONSE_PATH = EgovProperties.getPathProperty("Globals.MailRResponsePath");
|
||||
|
||||
// G4C 연결용 IP (localhost)
|
||||
public static final String LOCAL_IP = EgovProperties.getProperty("Globals.LocalIp");
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package egovframework.com.cmm.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.com.cmm.ComDefaultCodeVO;
|
||||
import egovframework.com.cmm.service.CmmnDetailCode;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @Class Name : CmmUseDAO.java
|
||||
* @Description : 공통코드등 전체 업무에서 공용해서 사용해야 하는 서비스를 정의하기위한 데이터 접근 클래스
|
||||
* @Modification Information
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------- -------------------
|
||||
* 2009. 3. 11. 이삼섭
|
||||
*
|
||||
* @author 공통 서비스 개발팀 이삼섭
|
||||
* @since 2009. 3. 11.
|
||||
* @version
|
||||
* @see
|
||||
*
|
||||
*/
|
||||
@Repository("cmmUseDAO")
|
||||
public class CmmUseDAO extends EgovComAbstractDAO {
|
||||
|
||||
/**
|
||||
* 주어진 조건에 따른 공통코드를 불러온다.
|
||||
*
|
||||
* @param vo
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<CmmnDetailCode> selectCmmCodeDetail(ComDefaultCodeVO vo) throws Exception {
|
||||
return (List<CmmnDetailCode>) list("CmmUseDAO.selectCmmCodeDetail", vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 공통코드로 사용할 조직정보를 를 불러온다.
|
||||
*
|
||||
* @param vo
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<CmmnDetailCode> selectOgrnztIdDetail(ComDefaultCodeVO vo) throws Exception {
|
||||
return (List<CmmnDetailCode>) list("CmmUseDAO.selectOgrnztIdDetail", vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 공통코드로 사용할그룹정보를 를 불러온다.
|
||||
* @param vo
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<CmmnDetailCode> selectGroupIdDetail(ComDefaultCodeVO vo) throws Exception {
|
||||
return (List<CmmnDetailCode>) list("CmmUseDAO.selectGroupIdDetail", vo);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package egovframework.com.cmm.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.com.cmm.LoginVO;
|
||||
import egovframework.com.cmm.service.EgovUserDetailsService;
|
||||
|
||||
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author 공통서비스 개발팀 서준식
|
||||
* @since 2011. 8. 12.
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* 개정이력(Modification Information)
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2011. 8. 12. 서준식 최초생성
|
||||
* 2017. 9. 04. 장동한 클래스 이름 변경(EgovTestUserDetailsServiceImpl > EgovUserDetailsService)
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
public class EgoDummyUserDetailsServiceImpl extends EgovAbstractServiceImpl implements
|
||||
EgovUserDetailsService {
|
||||
|
||||
//로그인 객체
|
||||
LoginVO loginVO = new LoginVO();
|
||||
//권한목록 객체
|
||||
List<String> listAuth = new ArrayList<String>();
|
||||
|
||||
@Override
|
||||
public Object getAuthenticatedUser() {
|
||||
loginVO.setId("TEST1");
|
||||
loginVO.setPassword("raHLBnHFcunwNzcDcfad4PhD11hHgXSUr7fc1Jk9uoQ=");
|
||||
loginVO.setUserSe("USR");
|
||||
loginVO.setEmail("egovframe@nia.or.kr");
|
||||
loginVO.setIhidNum("");
|
||||
loginVO.setName("더미사용자");
|
||||
loginVO.setOrgnztId("ORGNZT_0000000000000");
|
||||
loginVO.setUniqId("USRCNFRM_00000000000");
|
||||
return loginVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getAuthorities() {
|
||||
// 권한 설정을 리턴한다.
|
||||
listAuth.add("IS_AUTHENTICATED_ANONYMOUSLY");
|
||||
listAuth.add("IS_AUTHENTICATED_FULLY");
|
||||
listAuth.add("IS_AUTHENTICATED_REMEMBERED");
|
||||
listAuth.add("ROLE_ADMIN");
|
||||
listAuth.add("ROLE_ANONYMOUS");
|
||||
listAuth.add("ROLE_RESTRICTED");
|
||||
listAuth.add("ROLE_USER");
|
||||
return listAuth;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean isAuthenticated() {
|
||||
// 인증된 유저인지 확인한다.
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,91 @@
|
||||
package egovframework.com.cmm.service.impl;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import egovframework.com.cmm.ComDefaultCodeVO;
|
||||
import egovframework.com.cmm.service.CmmnDetailCode;
|
||||
import egovframework.com.cmm.service.EgovCmmUseService;
|
||||
|
||||
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @Class Name : EgovCmmUseServiceImpl.java
|
||||
* @Description : 공통코드등 전체 업무에서 공용해서 사용해야 하는 서비스를 정의하기위한 서비스 구현 클래스
|
||||
* @Modification Information
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------- -------------------
|
||||
* 2009. 3. 11. 이삼섭
|
||||
*
|
||||
* @author 공통 서비스 개발팀 이삼섭
|
||||
* @since 2009. 3. 11.
|
||||
* @version
|
||||
* @see
|
||||
*
|
||||
*/
|
||||
@Service("EgovCmmUseService")
|
||||
public class EgovCmmUseServiceImpl extends EgovAbstractServiceImpl implements EgovCmmUseService {
|
||||
|
||||
@Resource(name = "cmmUseDAO")
|
||||
private CmmUseDAO cmmUseDAO;
|
||||
|
||||
/**
|
||||
* 공통코드를 조회한다.
|
||||
*
|
||||
* @param vo
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<CmmnDetailCode> selectCmmCodeDetail(ComDefaultCodeVO vo) throws Exception {
|
||||
return cmmUseDAO.selectCmmCodeDetail(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* ComDefaultCodeVO의 리스트를 받아서 여러개의 코드 리스트를 맵에 담아서 리턴한다.
|
||||
*
|
||||
* @param voList
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Map<String, List<CmmnDetailCode>> selectCmmCodeDetails(List<?> voList) throws Exception {
|
||||
ComDefaultCodeVO vo;
|
||||
Map<String, List<CmmnDetailCode>> map = new HashMap<String, List<CmmnDetailCode>>();
|
||||
|
||||
Iterator<?> iter = voList.iterator();
|
||||
while (iter.hasNext()) {
|
||||
vo = (ComDefaultCodeVO)iter.next();
|
||||
map.put(vo.getCodeId(), cmmUseDAO.selectCmmCodeDetail(vo));
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 조직정보를 코드형태로 리턴한다.
|
||||
*
|
||||
* @param 조회조건정보 vo
|
||||
* @return 조직정보 List
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<CmmnDetailCode> selectOgrnztIdDetail(ComDefaultCodeVO vo) throws Exception {
|
||||
return cmmUseDAO.selectOgrnztIdDetail(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 그룹정보를 코드형태로 리턴한다.
|
||||
*
|
||||
* @param 조회조건정보 vo
|
||||
* @return 그룹정보 List
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<CmmnDetailCode> selectGroupIdDetail(ComDefaultCodeVO vo) throws Exception {
|
||||
return cmmUseDAO.selectGroupIdDetail(vo);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,306 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package egovframework.com.cmm.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import org.apache.ibatis.session.ResultHandler;
|
||||
import org.apache.ibatis.session.RowBounds;
|
||||
import org.apache.ibatis.session.SqlSessionFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.EgovAbstractMapper;
|
||||
/**
|
||||
* EgovComAbstractDAO.java 클래스
|
||||
*
|
||||
* @author 서준식
|
||||
* @since 2011. 9. 23.
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------------- ----------------------
|
||||
* 2011. 9. 23. 서준식 최초 생성
|
||||
* 2016. 5. 11. 장동한 myBatis 방식 적용
|
||||
* </pre>
|
||||
*/
|
||||
public abstract class EgovComAbstractDAO extends EgovAbstractMapper{
|
||||
|
||||
private final Logger LOGGER = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
@Resource(name="egov.sqlSession")
|
||||
public void setSqlSessionFactory(SqlSessionFactory sqlSession) {
|
||||
super.setSqlSessionFactory(sqlSession);
|
||||
}
|
||||
|
||||
/**
|
||||
* 입력 처리 SQL mapping 을 실행한다.
|
||||
*
|
||||
* @param queryId - 입력 처리 SQL mapping 쿼리 ID
|
||||
*
|
||||
* @return DBMS가 지원하는 경우 insert 적용 결과 count
|
||||
*/
|
||||
@Override
|
||||
public int insert(String queryId) {
|
||||
LOGGER.debug("queryId = "+queryId);
|
||||
return getSqlSession().insert(queryId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 입력 처리 SQL mapping 을 실행한다.
|
||||
*
|
||||
* @param queryId - 입력 처리 SQL mapping 쿼리 ID
|
||||
* @param parameterObject - 입력 처리 SQL mapping 입력 데이터를 세팅한 파라메터 객체(보통 VO 또는 Map)
|
||||
*
|
||||
* @return DBMS가 지원하는 경우 insert 적용 결과 count
|
||||
*/
|
||||
@Override
|
||||
public int insert(String queryId, Object parameterObject) {
|
||||
LOGGER.debug("queryId = "+queryId);
|
||||
return getSqlSession().insert(queryId, parameterObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 수정 처리 SQL mapping 을 실행한다.
|
||||
*
|
||||
* @param queryId - 수정 처리 SQL mapping 쿼리 ID
|
||||
*
|
||||
* @return DBMS가 지원하는 경우 update 적용 결과 count
|
||||
*/
|
||||
@Override
|
||||
public int update(String queryId) {
|
||||
LOGGER.debug("queryId = "+queryId);
|
||||
return getSqlSession().update(queryId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 수정 처리 SQL mapping 을 실행한다.
|
||||
*
|
||||
* @param queryId - 수정 처리 SQL mapping 쿼리 ID
|
||||
* @param parameterObject - 수정 처리 SQL mapping 입력 데이터(key 조건 및 변경 데이터)를 세팅한 파라메터 객체(보통 VO 또는 Map)
|
||||
*
|
||||
* @return DBMS가 지원하는 경우 update 적용 결과 count
|
||||
*/
|
||||
@Override
|
||||
public int update(String queryId, Object parameterObject) {
|
||||
LOGGER.debug("queryId = "+queryId);
|
||||
return getSqlSession().update(queryId, parameterObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 삭제 처리 SQL mapping 을 실행한다.
|
||||
*
|
||||
* @param queryId - 삭제 처리 SQL mapping 쿼리 ID
|
||||
*
|
||||
* @return DBMS가 지원하는 경우 delete 적용 결과 count
|
||||
*/
|
||||
@Override
|
||||
public int delete(String queryId) {
|
||||
LOGGER.debug("queryId = "+queryId);
|
||||
return getSqlSession().delete(queryId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 삭제 처리 SQL mapping 을 실행한다.
|
||||
*
|
||||
* @param queryId - 삭제 처리 SQL mapping 쿼리 ID
|
||||
* @param parameterObject - 삭제 처리 SQL mapping 입력 데이터(일반적으로 key 조건)를 세팅한 파라메터 객체(보통 VO 또는 Map)
|
||||
*
|
||||
* @return DBMS가 지원하는 경우 delete 적용 결과 count
|
||||
*/
|
||||
@Override
|
||||
public int delete(String queryId, Object parameterObject) {
|
||||
LOGGER.debug("queryId = "+queryId);
|
||||
return getSqlSession().delete(queryId, parameterObject);
|
||||
}
|
||||
|
||||
//CHECKSTYLE:OFF
|
||||
/**
|
||||
* 명명규칙에 맞춰 selectOne()로 변경한다.
|
||||
* @deprecated select() 메소드로 대체
|
||||
*
|
||||
* @see EgovAbstractMapper.selectOne()
|
||||
*/
|
||||
//CHECKSTYLE:ON
|
||||
@Deprecated
|
||||
public Object selectByPk(String queryId, Object parameterObject) {
|
||||
LOGGER.debug("queryId = "+queryId);
|
||||
return getSqlSession().selectOne(queryId, parameterObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 단건조회 처리 SQL mapping 을 실행한다.
|
||||
*
|
||||
* @param queryId - 단건 조회 처리 SQL mapping 쿼리 ID
|
||||
*
|
||||
* @return 결과 객체 - SQL mapping 파일에서 지정한 resultType/resultMap 에 의한 단일 결과 객체(보통 VO 또는 Map)
|
||||
*/
|
||||
@Override
|
||||
public <T> T selectOne(String queryId) {
|
||||
LOGGER.debug("queryId = "+queryId);
|
||||
return getSqlSession().selectOne(queryId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 단건조회 처리 SQL mapping 을 실행한다.
|
||||
*
|
||||
* @param queryId - 단건 조회 처리 SQL mapping 쿼리 ID
|
||||
* @param parameterObject - 단건 조회 처리 SQL mapping 입력 데이터(key)를 세팅한 파라메터 객체(보통 VO 또는 Map)
|
||||
*
|
||||
* @return 결과 객체 - SQL mapping 파일에서 지정한 resultType/resultMap 에 의한 단일 결과 객체(보통 VO 또는 Map)
|
||||
*/
|
||||
@Override
|
||||
public <T> T selectOne(String queryId, Object parameterObject) {
|
||||
LOGGER.debug("queryId = "+queryId);
|
||||
return getSqlSession().selectOne(queryId, parameterObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 결과 목록을 Map 을 변환한다.
|
||||
* 모든 구문이 파라미터를 필요로 하지는 않기 때문에, 파라미터 객체를 요구하지 않는 형태로 오버로드되었다.
|
||||
*
|
||||
* @param queryId - 단건 조회 처리 SQL mapping 쿼리 ID
|
||||
* @param mapKey - 결과 객체의 프로퍼티 중 하나를 키로 사용
|
||||
*
|
||||
* @return 결과 객체 - SQL mapping 파일에서 지정한 resultType/resultMap 에 의한 단일 결과 객체(보통 VO 또는 Map)의 Map
|
||||
*/
|
||||
@Override
|
||||
public <K, V> Map<K, V> selectMap(String queryId, String mapKey) {
|
||||
LOGGER.debug("queryId = "+queryId);
|
||||
return getSqlSession().selectMap(queryId, mapKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* 결과 목록을 Map 을 변환한다.
|
||||
* 모든 구문이 파라미터를 필요로 하지는 않기 때문에, 파라미터 객체를 요구하지 않는 형태로 오버로드되었다.
|
||||
*
|
||||
* @param queryId - 단건 조회 처리 SQL mapping 쿼리 ID
|
||||
* @param parameterObject - 맵 조회 처리 SQL mapping 입력 데이터(조회 조건)를 세팅한 파라메터 객체(보통 VO 또는 Map)
|
||||
* @param mapKey - 결과 객체의 프로퍼티 중 하나를 키로 사용
|
||||
*
|
||||
* @return 결과 객체 - SQL mapping 파일에서 지정한 resultType/resultMap 에 의한 단일 결과 객체(보통 VO 또는 Map)의 Map
|
||||
*/
|
||||
@Override
|
||||
public <K, V> Map<K, V> selectMap(String queryId, Object parameterObject, String mapKey) {
|
||||
LOGGER.debug("queryId = "+queryId);
|
||||
return getSqlSession().selectMap(queryId, parameterObject, mapKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* 결과 목록을 Map 을 변환한다.
|
||||
* 모든 구문이 파라미터를 필요로 하지는 않기 때문에, 파라미터 객체를 요구하지 않는 형태로 오버로드되었다.
|
||||
*
|
||||
* @param queryId - 단건 조회 처리 SQL mapping 쿼리 ID
|
||||
* @param parameterObject - 맵 조회 처리 SQL mapping 입력 데이터(조회 조건)를 세팅한 파라메터 객체(보통 VO 또는 Map)
|
||||
* @param mapKey - 결과 객체의 프로퍼티 중 하나를 키로 사용
|
||||
* @param rowBounds - 특정 개수 만큼의 레코드를 건너띄게 함
|
||||
*
|
||||
* @return 결과 객체 - SQL mapping 파일에서 지정한 resultType/resultMap 에 의한 단일 결과 객체(보통 VO 또는 Map)의 Map
|
||||
*/
|
||||
@Override
|
||||
public <K, V> Map<K, V> selectMap(String queryId, Object parameterObject, String mapKey, RowBounds rowBounds) {
|
||||
LOGGER.debug("queryId = "+queryId);
|
||||
return getSqlSession().selectMap(queryId, parameterObject, mapKey, rowBounds);
|
||||
}
|
||||
|
||||
//CHECKSTYLE:OFF
|
||||
/**
|
||||
* 명명규칙에 맞춰 selectList()로 변경한다.
|
||||
*
|
||||
* @see EgovAbstractMapper.selectList()
|
||||
* @deprecated List<?> 메소드로 대체
|
||||
*/
|
||||
//CHECKSTYLE:ON
|
||||
@Deprecated
|
||||
public List<?> list(String queryId, Object parameterObject) {
|
||||
LOGGER.debug("queryId = "+queryId);
|
||||
return getSqlSession().selectList(queryId, parameterObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 리스트 조회 처리 SQL mapping 을 실행한다.
|
||||
*
|
||||
* @param queryId - 리스트 조회 처리 SQL mapping 쿼리 ID
|
||||
*
|
||||
* @return 결과 List 객체 - SQL mapping 파일에서 지정한 resultType/resultMap 에 의한 결과 객체(보통 VO 또는 Map)의 List
|
||||
*/
|
||||
@Override
|
||||
public <E> List<E> selectList(String queryId) {
|
||||
LOGGER.debug("queryId = "+queryId);
|
||||
return getSqlSession().selectList(queryId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 리스트 조회 처리 SQL mapping 을 실행한다.
|
||||
*
|
||||
* @param queryId - 리스트 조회 처리 SQL mapping 쿼리 ID
|
||||
* @param parameterObject - 리스트 조회 처리 SQL mapping 입력 데이터(조회 조건)를 세팅한 파라메터 객체(보통 VO 또는 Map)
|
||||
*
|
||||
* @return 결과 List 객체 - SQL mapping 파일에서 지정한 resultType/resultMap 에 의한 결과 객체(보통 VO 또는 Map)의 List
|
||||
*/
|
||||
@Override
|
||||
public <E> List<E> selectList(String queryId, Object parameterObject) {
|
||||
LOGGER.debug("queryId = "+queryId);
|
||||
return getSqlSession().selectList(queryId, parameterObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 리스트 조회 처리 SQL mapping 을 실행한다.
|
||||
*
|
||||
* @param queryId - 리스트 조회 처리 SQL mapping 쿼리 ID
|
||||
* @param parameterObject - 리스트 조회 처리 SQL mapping 입력 데이터(조회 조건)를 세팅한 파라메터 객체(보통 VO 또는 Map)
|
||||
* @param rowBounds - 특정 개수 만큼의 레코드를 건너띄게 함
|
||||
*
|
||||
* @return 결과 List 객체 - SQL mapping 파일에서 지정한 resultType/resultMap 에 의한 결과 객체(보통 VO 또는 Map)의 List
|
||||
*/
|
||||
@Override
|
||||
public <E> List<E> selectList(String queryId, Object parameterObject, RowBounds rowBounds) {
|
||||
LOGGER.debug("queryId = "+queryId);
|
||||
return getSqlSession().selectList(queryId, parameterObject, rowBounds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 부분 범위 리스트 조회 처리 SQL mapping 을 실행한다.
|
||||
* (부분 범위 - pageIndex 와 pageSize 기반으로 현재 부분 범위 조회를 위한 skipResults, maxResults 를 계산하여 ibatis 호출)
|
||||
*
|
||||
* @param queryId - 리스트 조회 처리 SQL mapping 쿼리 ID
|
||||
* @param parameterObject - 리스트 조회 처리 SQL mapping 입력 데이터(조회 조건)를 세팅한 파라메터 객체(보통 VO 또는 Map)
|
||||
* @param pageIndex - 현재 페이지 번호
|
||||
* @param pageSize - 한 페이지 조회 수(pageSize)
|
||||
*
|
||||
* @return 부분 범위 결과 List 객체 - SQL mapping 파일에서 지정한 resultType/resultMap 에 의한 부분 범위 결과 객체(보통 VO 또는 Map) List
|
||||
*/
|
||||
@Override
|
||||
public List<?> listWithPaging(String queryId, Object parameterObject, int pageIndex, int pageSize) {
|
||||
LOGGER.debug("queryId = "+queryId);
|
||||
int skipResults = pageIndex * pageSize;
|
||||
//int maxResults = (pageIndex * pageSize) + pageSize;
|
||||
|
||||
RowBounds rowBounds = new RowBounds(skipResults, pageSize);
|
||||
|
||||
return getSqlSession().selectList(queryId, parameterObject, rowBounds);
|
||||
}
|
||||
|
||||
/**
|
||||
* SQL 조회 결과를 ResultHandler를 이용해서 출력한다.
|
||||
* ResultHandler를 상속해 구현한 커스텀 핸들러의 handleResult() 메서드에 따라 실행된다.
|
||||
*
|
||||
* @param queryId - 리스트 조회 처리 SQL mapping 쿼리 ID
|
||||
* @param handler - 조회 결과를 제어하기 위해 구현한 ResultHandler
|
||||
* @return
|
||||
*
|
||||
* @return 결과 List 객체 - SQL mapping 파일에서 지정한 resultType/resultMap 에 의한 결과 객체(보통 VO 또는 Map)의 List
|
||||
*/
|
||||
@Override
|
||||
public void listToOutUsingResultHandler(String queryId, ResultHandler handler) {
|
||||
LOGGER.debug("queryId = "+queryId);
|
||||
getSqlSession().select(queryId, handler);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,156 @@
|
||||
package egovframework.com.cmm.service.impl;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import egovframework.com.cmm.service.EgovFileMngService;
|
||||
import egovframework.com.cmm.service.FileVO;
|
||||
|
||||
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @Class Name : EgovFileMngServiceImpl.java
|
||||
* @Description : 파일정보의 관리를 위한 구현 클래스
|
||||
* @Modification Information
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------- -------------------
|
||||
* 2009. 3. 25. 이삼섭 최초생성
|
||||
*
|
||||
* @author 공통 서비스 개발팀 이삼섭
|
||||
* @since 2009. 3. 25.
|
||||
* @version
|
||||
* @see
|
||||
*
|
||||
*/
|
||||
@Service("EgovFileMngService")
|
||||
public class EgovFileMngServiceImpl extends EgovAbstractServiceImpl implements EgovFileMngService {
|
||||
|
||||
@Resource(name = "FileManageDAO")
|
||||
private FileManageDAO fileMngDAO;
|
||||
|
||||
/**
|
||||
* 여러 개의 파일을 삭제한다.
|
||||
*
|
||||
* @see egovframework.com.cmm.service.EgovFileMngService#deleteFileInfs(java.util.List)
|
||||
*/
|
||||
public void deleteFileInfs(List<?> fvoList) throws Exception {
|
||||
fileMngDAO.deleteFileInfs(fvoList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 하나의 파일에 대한 정보(속성 및 상세)를 등록한다.
|
||||
*
|
||||
* @see egovframework.com.cmm.service.EgovFileMngService#insertFileInf(egovframework.com.cmm.service.FileVO)
|
||||
*/
|
||||
public String insertFileInf(FileVO fvo) throws Exception {
|
||||
String atchFileId = fvo.getAtchFileId();
|
||||
|
||||
fileMngDAO.insertFileInf(fvo);
|
||||
|
||||
return atchFileId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 여러 개의 파일에 대한 정보(속성 및 상세)를 등록한다.
|
||||
*
|
||||
* @see egovframework.com.cmm.service.EgovFileMngService#insertFileInfs(java.util.List)
|
||||
*/
|
||||
public String insertFileInfs(List<?> fvoList) throws Exception {
|
||||
String atchFileId = "";
|
||||
|
||||
if (fvoList.size() != 0) {
|
||||
atchFileId = fileMngDAO.insertFileInfs(fvoList);
|
||||
}
|
||||
if (atchFileId == "") {
|
||||
atchFileId = null;
|
||||
}
|
||||
return atchFileId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 파일에 대한 목록을 조회한다.
|
||||
*
|
||||
* @see egovframework.com.cmm.service.EgovFileMngService#selectFileInfs(egovframework.com.cmm.service.FileVO)
|
||||
*/
|
||||
public List<FileVO> selectFileInfs(FileVO fvo) throws Exception {
|
||||
return fileMngDAO.selectFileInfs(fvo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 여러 개의 파일에 대한 정보(속성 및 상세)를 수정한다.
|
||||
*
|
||||
* @see egovframework.com.cmm.service.EgovFileMngService#updateFileInfs(java.util.List)
|
||||
*/
|
||||
public void updateFileInfs(List<?> fvoList) throws Exception {
|
||||
//Delete & Insert
|
||||
fileMngDAO.updateFileInfs(fvoList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 하나의 파일을 삭제한다.
|
||||
*
|
||||
* @see egovframework.com.cmm.service.EgovFileMngService#deleteFileInf(egovframework.com.cmm.service.FileVO)
|
||||
*/
|
||||
public void deleteFileInf(FileVO fvo) throws Exception {
|
||||
fileMngDAO.deleteFileInf(fvo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 파일에 대한 상세정보를 조회한다.
|
||||
*
|
||||
* @see egovframework.com.cmm.service.EgovFileMngService#selectFileInf(egovframework.com.cmm.service.FileVO)
|
||||
*/
|
||||
public FileVO selectFileInf(FileVO fvo) throws Exception {
|
||||
return fileMngDAO.selectFileInf(fvo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 파일 구분자에 대한 최대값을 구한다.
|
||||
*
|
||||
* @see egovframework.com.cmm.service.EgovFileMngService#getMaxFileSN(egovframework.com.cmm.service.FileVO)
|
||||
*/
|
||||
public int getMaxFileSN(FileVO fvo) throws Exception {
|
||||
return fileMngDAO.getMaxFileSN(fvo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 전체 파일을 삭제한다.
|
||||
*
|
||||
* @see egovframework.com.cmm.service.EgovFileMngService#deleteAllFileInf(egovframework.com.cmm.service.FileVO)
|
||||
*/
|
||||
public void deleteAllFileInf(FileVO fvo) throws Exception {
|
||||
fileMngDAO.deleteAllFileInf(fvo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 파일명 검색에 대한 목록을 조회한다.
|
||||
*
|
||||
* @see egovframework.com.cmm.service.EgovFileMngService#selectFileListByFileNm(egovframework.com.cmm.service.FileVO)
|
||||
*/
|
||||
public Map<String, Object> selectFileListByFileNm(FileVO fvo) throws Exception {
|
||||
List<FileVO> result = fileMngDAO.selectFileListByFileNm(fvo);
|
||||
int cnt = fileMngDAO.selectFileListCntByFileNm(fvo);
|
||||
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
map.put("resultList", result);
|
||||
map.put("resultCnt", Integer.toString(cnt));
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 이미지 파일에 대한 목록을 조회한다.
|
||||
*
|
||||
* @see egovframework.com.cmm.service.EgovFileMngService#selectImageFileList(egovframework.com.cmm.service.FileVO)
|
||||
*/
|
||||
public List<FileVO> selectImageFileList(FileVO vo) throws Exception {
|
||||
return fileMngDAO.selectImageFileList(vo);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,65 @@
|
||||
package egovframework.com.cmm.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.com.cmm.service.EgovUserDetailsService;
|
||||
|
||||
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||
|
||||
import org.springframework.web.context.request.RequestAttributes;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author 공통서비스 개발팀 서준식
|
||||
* @since 2011. 6. 25.
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* 개정이력(Modification Information)
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2011. 8. 12. 서준식 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
public class EgovUserDetailsSessionServiceImpl extends EgovAbstractServiceImpl implements EgovUserDetailsService {
|
||||
|
||||
public Object getAuthenticatedUser() {
|
||||
if (RequestContextHolder.getRequestAttributes() == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return RequestContextHolder.getRequestAttributes().getAttribute("loginVO", RequestAttributes.SCOPE_SESSION);
|
||||
|
||||
}
|
||||
|
||||
public List<String> getAuthorities() {
|
||||
|
||||
// 권한 설정을 리턴한다.
|
||||
List<String> listAuth = new ArrayList<String>();
|
||||
|
||||
return listAuth;
|
||||
}
|
||||
|
||||
public Boolean isAuthenticated() {
|
||||
// 인증된 유저인지 확인한다.
|
||||
|
||||
if (RequestContextHolder.getRequestAttributes() == null) {
|
||||
return false;
|
||||
} else {
|
||||
|
||||
if (RequestContextHolder.getRequestAttributes().getAttribute("loginVO", RequestAttributes.SCOPE_SESSION) == null) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,181 @@
|
||||
package egovframework.com.cmm.service.impl;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.com.cmm.service.FileVO;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @Class Name : EgovFileMngDAO.java
|
||||
* @Description : 파일정보 관리를 위한 데이터 처리 클래스
|
||||
* @Modification Information
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------- -------------------
|
||||
* 2009. 3. 25. 이삼섭 최초생성
|
||||
*
|
||||
* @author 공통 서비스 개발팀 이삼섭
|
||||
* @since 2009. 3. 25.
|
||||
* @version
|
||||
* @see
|
||||
*
|
||||
*/
|
||||
@Repository("FileManageDAO")
|
||||
public class FileManageDAO extends EgovComAbstractDAO {
|
||||
|
||||
/**
|
||||
* 여러 개의 파일에 대한 정보(속성 및 상세)를 등록한다.
|
||||
*
|
||||
* @param fileList
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public String insertFileInfs(List<?> fileList) throws Exception {
|
||||
FileVO vo = (FileVO) fileList.get(0);
|
||||
String atchFileId = vo.getAtchFileId();
|
||||
|
||||
insert("FileManageDAO.insertFileMaster", vo);
|
||||
|
||||
Iterator<?> iter = fileList.iterator();
|
||||
while (iter.hasNext()) {
|
||||
vo = (FileVO) iter.next();
|
||||
|
||||
insert("FileManageDAO.insertFileDetail", vo);
|
||||
}
|
||||
|
||||
return atchFileId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 하나의 파일에 대한 정보(속성 및 상세)를 등록한다.
|
||||
*
|
||||
* @param vo
|
||||
* @throws Exception
|
||||
*/
|
||||
public void insertFileInf(FileVO vo) throws Exception {
|
||||
insert("FileManageDAO.insertFileMaster", vo);
|
||||
insert("FileManageDAO.insertFileDetail", vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 여러 개의 파일에 대한 정보(속성 및 상세)를 수정한다.
|
||||
*
|
||||
* @param fileList
|
||||
* @throws Exception
|
||||
*/
|
||||
public void updateFileInfs(List<?> fileList) throws Exception {
|
||||
FileVO vo;
|
||||
Iterator<?> iter = fileList.iterator();
|
||||
while (iter.hasNext()) {
|
||||
vo = (FileVO) iter.next();
|
||||
insert("FileManageDAO.insertFileDetail", vo);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 여러 개의 파일을 삭제한다.
|
||||
*
|
||||
* @param fileList
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteFileInfs(List<?> fileList) throws Exception {
|
||||
Iterator<?> iter = fileList.iterator();
|
||||
FileVO vo;
|
||||
while (iter.hasNext()) {
|
||||
vo = (FileVO) iter.next();
|
||||
|
||||
delete("FileManageDAO.deleteFileDetail", vo);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 하나의 파일을 삭제한다.
|
||||
*
|
||||
* @param fvo
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteFileInf(FileVO fvo) throws Exception {
|
||||
delete("FileManageDAO.deleteFileDetail", fvo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 파일에 대한 목록을 조회한다.
|
||||
*
|
||||
* @param vo
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<FileVO> selectFileInfs(FileVO vo) throws Exception {
|
||||
return (List<FileVO>) list("FileManageDAO.selectFileList", vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 파일 구분자에 대한 최대값을 구한다.
|
||||
*
|
||||
* @param fvo
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public int getMaxFileSN(FileVO fvo) throws Exception {
|
||||
return (Integer) selectOne("FileManageDAO.getMaxFileSN", fvo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 파일에 대한 상세정보를 조회한다.
|
||||
*
|
||||
* @param fvo
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public FileVO selectFileInf(FileVO fvo) throws Exception {
|
||||
return (FileVO) selectOne("FileManageDAO.selectFileInf", fvo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 전체 파일을 삭제한다.
|
||||
*
|
||||
* @param fvo
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAllFileInf(FileVO fvo) throws Exception {
|
||||
update("FileManageDAO.deleteCOMTNFILE", fvo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 파일명 검색에 대한 목록을 조회한다.
|
||||
*
|
||||
* @param vo
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<FileVO> selectFileListByFileNm(FileVO fvo) throws Exception {
|
||||
return (List<FileVO>) list("FileManageDAO.selectFileListByFileNm", fvo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 파일명 검색에 대한 목록 전체 건수를 조회한다.
|
||||
*
|
||||
* @param fvo
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public int selectFileListCntByFileNm(FileVO fvo) throws Exception {
|
||||
return (Integer) selectOne("FileManageDAO.selectFileListCntByFileNm", fvo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 이미지 파일에 대한 목록을 조회한다.
|
||||
*
|
||||
* @param vo
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<FileVO> selectImageFileList(FileVO vo) throws Exception {
|
||||
return (List<FileVO>) list("FileManageDAO.selectImageFileList", vo);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,88 @@
|
||||
package egovframework.com.cmm.taglibs;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import egovframework.com.cmm.util.EgovDoubleSubmitHelper;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import javax.servlet.jsp.JspException;
|
||||
import javax.servlet.jsp.JspTagException;
|
||||
import javax.servlet.jsp.tagext.TagSupport;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* TagSupport to support to double submit preventer
|
||||
* @author Vincent Han
|
||||
* @since 2014.08.07
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2014.08.07 표준프레임워크센터 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
public class DoubleSubmitTag extends TagSupport {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(DoubleSubmitTag.class);
|
||||
|
||||
/**
|
||||
* Generated Serial Version UID
|
||||
*/
|
||||
private static final long serialVersionUID = 5242217605452312594L;
|
||||
|
||||
private String tokenKey = EgovDoubleSubmitHelper.DEFAULT_TOKEN_KEY;
|
||||
|
||||
public String getTokenKey() {
|
||||
return tokenKey;
|
||||
}
|
||||
|
||||
public void setTokenKey(String tokenKey) {
|
||||
this.tokenKey = tokenKey;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public int doStartTag() throws JspException {
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
|
||||
HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
|
||||
HttpSession session = request.getSession();
|
||||
|
||||
Map<String, String> map = null;
|
||||
|
||||
if (session.getAttribute(EgovDoubleSubmitHelper.SESSION_TOKEN_KEY) == null) {
|
||||
map = new HashMap<String, String>();
|
||||
|
||||
session.setAttribute(EgovDoubleSubmitHelper.SESSION_TOKEN_KEY, map);
|
||||
} else {
|
||||
map = (Map<String, String>) session.getAttribute(EgovDoubleSubmitHelper.SESSION_TOKEN_KEY);
|
||||
}
|
||||
|
||||
// First call (check session)
|
||||
if (map.get(tokenKey) == null) {
|
||||
|
||||
map.put(tokenKey, EgovDoubleSubmitHelper.getNewUUID());
|
||||
|
||||
LOGGER.debug("[Double Submit] session token created({}) : {}", tokenKey, map.get(tokenKey));
|
||||
}
|
||||
|
||||
buffer.append("<input type='hidden' name='").append(EgovDoubleSubmitHelper.PARAMETER_NAME).append("' value='").append(map.get(tokenKey)).append("'/>");
|
||||
|
||||
try {
|
||||
pageContext.getOut().print(buffer.toString());
|
||||
} catch (IOException e) {
|
||||
throw new JspTagException("Error: IOException while writing to the user");
|
||||
}
|
||||
|
||||
return SKIP_BODY;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,83 @@
|
||||
package egovframework.com.cmm.util;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* Utility class to support to logging information
|
||||
* @author Vincent Han
|
||||
* @since 2014.09.18
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2014.09.18 표준프레임워크센터 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
public class EgovBasicLogger {
|
||||
private static final Level IGNORE_INFO_LEVEL = Level.OFF;
|
||||
private static final Level DEBUG_INFO_LEVEL = Level.FINEST;
|
||||
private static final Level INFO_INFO_LEVEL = Level.INFO;
|
||||
|
||||
private static final Logger ignoreLogger = Logger.getLogger("ignore");
|
||||
private static final Logger debugLogger = Logger.getLogger("debug");
|
||||
private static final Logger infoLogger = Logger.getLogger("info");
|
||||
|
||||
/**
|
||||
* 기록이나 처리가 불필요한 경우 사용.
|
||||
* @param message
|
||||
* @param exception
|
||||
*/
|
||||
public static void ignore(String message, Exception exception) {
|
||||
if (exception == null) {
|
||||
ignoreLogger.log(IGNORE_INFO_LEVEL, message);
|
||||
} else {
|
||||
ignoreLogger.log(IGNORE_INFO_LEVEL, message, exception);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 기록이나 처리가 불필요한 경우 사용.
|
||||
* @param message
|
||||
* @param exception
|
||||
*/
|
||||
public static void ignore(String message) {
|
||||
ignore(message, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 디버그 정보를 기록하는 경우 사용.
|
||||
* @param message
|
||||
* @param exception
|
||||
*/
|
||||
public static void debug(String message, Exception exception) {
|
||||
if (exception == null) {
|
||||
debugLogger.log(DEBUG_INFO_LEVEL, message);
|
||||
} else {
|
||||
debugLogger.log(DEBUG_INFO_LEVEL, message, exception);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 디버그 정보를 기록하는 경우 사용.
|
||||
* @param message
|
||||
* @param exception
|
||||
*/
|
||||
public static void debug(String message) {
|
||||
debug(message, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 일반적이 정보를 기록하는 경우 사용.
|
||||
* @param message
|
||||
* @param exception
|
||||
*/
|
||||
public static void info(String message) {
|
||||
infoLogger.log(INFO_INFO_LEVEL, message);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,80 @@
|
||||
package egovframework.com.cmm.util;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
/**
|
||||
* Utility class to support to double submit preventer
|
||||
* @author Vincent Han
|
||||
* @since 2014.08.07
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2014.08.07 표준프레임워크센터 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
public class EgovDoubleSubmitHelper {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(EgovDoubleSubmitHelper.class);
|
||||
|
||||
public final static String SESSION_TOKEN_KEY = "egovframework.double.submit.preventer.session.key";
|
||||
|
||||
public final static String PARAMETER_NAME = "egovframework.double.submit.preventer.parameter.name";
|
||||
|
||||
public final static String DEFAULT_TOKEN_KEY = "DEFAULT";
|
||||
|
||||
public static String getNewUUID() {
|
||||
return UUID.randomUUID().toString().toUpperCase();
|
||||
}
|
||||
|
||||
public static boolean checkAndSaveToken() {
|
||||
return checkAndSaveToken(DEFAULT_TOKEN_KEY);
|
||||
}
|
||||
|
||||
public static boolean checkAndSaveToken(String tokenKey) {
|
||||
|
||||
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
|
||||
HttpSession session = request.getSession();
|
||||
|
||||
// check session...
|
||||
if (session.getAttribute(EgovDoubleSubmitHelper.SESSION_TOKEN_KEY) == null) {
|
||||
throw new RuntimeException("Double Submit Preventer TagLig isn't set. Check JSP.");
|
||||
}
|
||||
|
||||
String parameter = request.getParameter(EgovDoubleSubmitHelper.PARAMETER_NAME);
|
||||
|
||||
// check parameter
|
||||
if (parameter == null) {
|
||||
throw new RuntimeException("Double Submit Preventer parameter isn't set. Check JSP.");
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, String> map = (Map<String, String>) session.getAttribute(EgovDoubleSubmitHelper.SESSION_TOKEN_KEY);
|
||||
|
||||
if (parameter.equals(map.get(tokenKey))) {
|
||||
|
||||
LOGGER.debug("[Double Submit] session token ({}) equals to parameter token.", tokenKey);
|
||||
|
||||
map.put(tokenKey, getNewUUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
LOGGER.debug("[Double Submit] session token ({}) isn't equal to parameter token.", tokenKey);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
package egovframework.com.cmm.util;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
/**
|
||||
* @Class Name : EgovHttpRequestHelper.java
|
||||
* @Description : HTTP Request 정보 취득 Helper 클래스
|
||||
* @Modification Information
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------- -------------------
|
||||
* 2014.09.11 표준프레임워크 최초생성
|
||||
* @author Vincent Han
|
||||
* @since 2014.09.11
|
||||
* @version 3.5
|
||||
* @see <pre>
|
||||
* web.xml 상에 다음과 같은 Listener 등록 필요
|
||||
* <listener>
|
||||
* <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
|
||||
* </listener>
|
||||
* </pre>
|
||||
*/
|
||||
public class EgovHttpRequestHelper {
|
||||
|
||||
public static boolean isInHttpRequest() {
|
||||
try {
|
||||
getCurrentRequest();
|
||||
} catch (IllegalStateException ise) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static HttpServletRequest getCurrentRequest() {
|
||||
ServletRequestAttributes sra = (ServletRequestAttributes) RequestContextHolder.currentRequestAttributes();
|
||||
|
||||
return sra.getRequest();
|
||||
}
|
||||
|
||||
public static String getRequestIp() {
|
||||
return getCurrentRequest().getRemoteAddr();
|
||||
}
|
||||
|
||||
public static String getRequestURI() {
|
||||
return getCurrentRequest().getRequestURI();
|
||||
}
|
||||
|
||||
public static HttpSession getCurrentSession() {
|
||||
return getCurrentRequest().getSession();
|
||||
}
|
||||
}
|
||||
135
src/main/java/egovframework/com/cmm/util/EgovMybaitsUtil.java
Normal file
135
src/main/java/egovframework/com/cmm/util/EgovMybaitsUtil.java
Normal file
@ -0,0 +1,135 @@
|
||||
package egovframework.com.cmm.util;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* EgovMybaitsUtil 클래스
|
||||
*
|
||||
* @author 장동한
|
||||
* @since 2016.06.07
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------------- ----------------------
|
||||
* 2016.06.07 장동한 최초 생성
|
||||
* 2017.03.03 조성원 시큐어코딩(ES)-오류 메시지를 통한 정보노출[CWE-209]
|
||||
* 2017.07.21 장동한 isEquals에서 String Character 비교 가능하도록
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
|
||||
public class EgovMybaitsUtil {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(EgovMybaitsUtil.class);
|
||||
|
||||
/**
|
||||
* Empty 여부를 확인한다.
|
||||
* @param o Object
|
||||
* @return boolean
|
||||
* @exception IllegalArgumentException
|
||||
*/
|
||||
public static boolean isEmpty(Object o) throws IllegalArgumentException {
|
||||
try {
|
||||
if(o == null) return true;
|
||||
|
||||
if(o instanceof String) {
|
||||
if(((String)o).length() == 0){
|
||||
return true;
|
||||
}
|
||||
} else if(o instanceof Collection) {
|
||||
if(((Collection)o).isEmpty()){
|
||||
return true;
|
||||
}
|
||||
} else if(o.getClass().isArray()) {
|
||||
if(Array.getLength(o) == 0){
|
||||
return true;
|
||||
}
|
||||
} else if(o instanceof Map) {
|
||||
if(((Map)o).isEmpty()){
|
||||
return true;
|
||||
}
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
//2017.03.03 조성원 시큐어코딩(ES)-오류 메시지를 통한 정보노출[CWE-209]
|
||||
} catch(IllegalArgumentException e) {
|
||||
logger.error("[IllegalArgumentException] Try/Catch...usingParameters Runing : "+ e.getMessage());
|
||||
} catch(Exception e) {
|
||||
logger.error("["+e.getClass()+"] Try/Catch...Exception : " + e.getMessage());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Not Empty 여부를 확인한다.
|
||||
* @param o Object
|
||||
* @return boolean
|
||||
* @exception IllegalArgumentException
|
||||
*/
|
||||
public static boolean isNotEmpty(Object o) {
|
||||
return !isEmpty(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* Equal 여부를 확인한다.
|
||||
* @param obj Object, obj Object
|
||||
* @return boolean
|
||||
*/
|
||||
|
||||
public static boolean isEquals(Object obj, Object obj2){
|
||||
if(isEmpty(obj)) return false;
|
||||
|
||||
if(obj instanceof String && obj2 instanceof String) {
|
||||
if( (String.valueOf(obj)).equals( String.valueOf(obj2) )){
|
||||
return true;
|
||||
}
|
||||
}else if(obj instanceof String && obj2 instanceof Character) {
|
||||
if( (String.valueOf(obj) ).equals( String.valueOf(obj2) )){
|
||||
return true;
|
||||
}
|
||||
}else if(obj instanceof String && obj2 instanceof Integer) {
|
||||
if( (String.valueOf(obj)).equals( String.valueOf((Integer)obj2) )){
|
||||
return true;
|
||||
}
|
||||
|
||||
}else if(obj instanceof Integer && obj2 instanceof String) {
|
||||
if( (String.valueOf(obj2)).equals( String.valueOf((Integer)obj) )){
|
||||
return true;
|
||||
}
|
||||
} else if(obj instanceof Integer && obj instanceof Integer) {
|
||||
if((Integer)obj == (Integer)obj2){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* String의 Equal 여부를 확인한다.
|
||||
* @param obj Object, obj Object
|
||||
* @return boolean
|
||||
*/
|
||||
public static boolean isEqualsStr(Object obj, String s){
|
||||
if(isEmpty(obj)) return false;
|
||||
|
||||
if(s.equals(String.valueOf(obj))){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,146 @@
|
||||
package egovframework.com.cmm.util;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.io.IOException;
|
||||
import java.net.ServerSocket;
|
||||
import java.net.Socket;
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.sql.Wrapper;
|
||||
|
||||
/**
|
||||
* Utility class to support to close resources
|
||||
* @author Vincent Han
|
||||
* @since 2014.09.18
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2014.09.18 표준프레임워크센터 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
public class EgovResourceCloseHelper {
|
||||
/**
|
||||
* Resource close 처리.
|
||||
* @param resources
|
||||
*/
|
||||
public static void close(Closeable ... resources) {
|
||||
for (Closeable resource : resources) {
|
||||
if (resource != null) {
|
||||
try {
|
||||
resource.close();
|
||||
} catch (IOException ignore) {//KISA 보안약점 조치 (2018-10-29, 윤창원)
|
||||
EgovBasicLogger.ignore("Occurred IOException to close resource is ingored!!");
|
||||
} catch (Exception ignore) {
|
||||
EgovBasicLogger.ignore("Occurred Exception to close resource is ingored!!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* JDBC 관련 resource 객체 close 처리
|
||||
* @param objects
|
||||
*/
|
||||
public static void closeDBObjects(Wrapper ... objects) {
|
||||
for (Object object : objects) {
|
||||
if (object != null) {
|
||||
if (object instanceof ResultSet) {
|
||||
try {
|
||||
((ResultSet)object).close();
|
||||
} catch (SQLException ignore) {//KISA 보안약점 조치 (2018-10-29, 윤창원)
|
||||
EgovBasicLogger.ignore("Occurred SQLException to close resource is ingored!!");
|
||||
} catch (Exception ignore) {
|
||||
EgovBasicLogger.ignore("Occurred Exception to close resource is ingored!!");
|
||||
}
|
||||
} else if (object instanceof Statement) {
|
||||
try {
|
||||
((Statement)object).close();
|
||||
} catch (SQLException ignore) {//KISA 보안약점 조치 (2018-10-29, 윤창원)
|
||||
EgovBasicLogger.ignore("Occurred SQLException to close resource is ingored!!");
|
||||
} catch (Exception ignore) {
|
||||
EgovBasicLogger.ignore("Occurred Exception to close resource is ingored!!");
|
||||
}
|
||||
} else if (object instanceof Connection) {
|
||||
try {
|
||||
((Connection)object).close();
|
||||
} catch (SQLException ignore) {
|
||||
EgovBasicLogger.ignore("Occurred SQLException to close resource is ingored!!");
|
||||
} catch (Exception ignore) {
|
||||
EgovBasicLogger.ignore("Occurred Exception to close resource is ingored!!");
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("Wrapper type is not found : " + object.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Socket 관련 resource 객체 close 처리
|
||||
* @param objects
|
||||
*/
|
||||
public static void closeSocketObjects(Socket socket, ServerSocket server) {
|
||||
if (socket != null) {
|
||||
try {
|
||||
socket.shutdownOutput();
|
||||
} catch (IOException ignore) {
|
||||
EgovBasicLogger.ignore("Occurred IOException to close resource is ingored!!");
|
||||
} catch (Exception ignore) {
|
||||
EgovBasicLogger.ignore("Occurred Exception to shutdown ouput is ignored!!");
|
||||
}
|
||||
|
||||
try {
|
||||
socket.close();
|
||||
} catch (IOException ignore) {
|
||||
EgovBasicLogger.ignore("Occurred IOException to close resource is ingored!!");
|
||||
} catch (Exception ignore) {
|
||||
EgovBasicLogger.ignore("Occurred Exception to close resource is ignored!!");
|
||||
}
|
||||
}
|
||||
|
||||
if (server != null) {
|
||||
try {
|
||||
server.close();
|
||||
} catch (IOException ignore) {
|
||||
EgovBasicLogger.ignore("Occurred IOException to close resource is ingored!!");
|
||||
} catch (Exception ignore) {
|
||||
EgovBasicLogger.ignore("Occurred Exception to close resource is ignored!!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Socket 관련 resource 객체 close 처리
|
||||
*
|
||||
* @param sockets
|
||||
*/
|
||||
public static void closeSockets(Socket ... sockets) {
|
||||
for (Socket socket : sockets) {
|
||||
if (socket != null) {
|
||||
try {
|
||||
socket.shutdownOutput();
|
||||
} catch (IOException ignore) {
|
||||
EgovBasicLogger.ignore("Occurred IOException to close resource is ingored!!");
|
||||
} catch (Exception ignore) {
|
||||
EgovBasicLogger.ignore("Occurred Exception to shutdown ouput is ignored!!");
|
||||
}
|
||||
|
||||
try {
|
||||
socket.close();
|
||||
} catch (IOException ignore) {
|
||||
EgovBasicLogger.ignore("Occurred IOException to close resource is ingored!!");
|
||||
} catch (Exception ignore) {
|
||||
EgovBasicLogger.ignore("Occurred Exception to close resource is ignored!!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,109 @@
|
||||
package egovframework.com.cmm.util;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.FilterConfig;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.util.AntPathMatcher;
|
||||
|
||||
/**
|
||||
* @Class Name : UrlRewriteFilter.java
|
||||
* @Description : UrlRewriteFilter Class
|
||||
* @Modification Information
|
||||
* @
|
||||
* @ 수정일 수정자 수정내용
|
||||
* @ --------- --------- -------------------------------
|
||||
* @ 2014.09.30 최초생성
|
||||
*
|
||||
* @author 전자정부 표준프레임워크 유지보수
|
||||
* @since 2014. 09.30
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* Copyright (C) by MOPAS All right reserved.
|
||||
*/
|
||||
public class EgovUrlRewriteFilter implements Filter {
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private FilterConfig config;
|
||||
|
||||
private String targetURI;
|
||||
private String httpsPort;
|
||||
private String httpPort;
|
||||
|
||||
private String[] uriPatterns;
|
||||
|
||||
@Override
|
||||
public void init(FilterConfig config) throws ServletException {
|
||||
|
||||
String delimiter = ",";
|
||||
this.config = config;
|
||||
|
||||
this.targetURI = config.getInitParameter("targetURI");
|
||||
this.httpsPort = config.getInitParameter("httpsPort");
|
||||
this.httpPort = config.getInitParameter("httpPort");
|
||||
|
||||
this.uriPatterns = targetURI.split(delimiter);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws ServletException, IOException {
|
||||
|
||||
HttpServletRequest req = (HttpServletRequest) request;
|
||||
HttpServletResponse res = (HttpServletResponse) response;
|
||||
|
||||
String uri = req.getRequestURI();
|
||||
String getProtocol = req.getScheme();
|
||||
String getDomain = req.getServerName();
|
||||
|
||||
AntPathMatcher pm = new AntPathMatcher();
|
||||
|
||||
for (String uriPattern : uriPatterns) {
|
||||
|
||||
if (pm.match(uriPattern.trim(), uri)) {
|
||||
|
||||
if (getProtocol.toLowerCase().equals("http")) {
|
||||
|
||||
response.setContentType("text/html");
|
||||
|
||||
String httpsPath = "https" + "://" + getDomain + ":" + httpsPort + uri;
|
||||
String site = new String(httpsPath);
|
||||
res.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);
|
||||
res.setHeader("Location", site);
|
||||
|
||||
}
|
||||
|
||||
}else if(getProtocol.toLowerCase().equals("https")){
|
||||
|
||||
response.setContentType("text/html");
|
||||
|
||||
String httpPath = "http" + "://" + getDomain + ":" + httpPort + uri;
|
||||
|
||||
String site = new String(httpPath);
|
||||
res.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);
|
||||
res.setHeader("Location", site);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
chain.doFilter(req, res);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
this.targetURI = null;
|
||||
this.httpsPort = null;
|
||||
this.httpPort = null;
|
||||
this.uriPatterns = null;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package egovframework.com.cmm.util;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.com.cmm.service.EgovUserDetailsService;
|
||||
|
||||
/**
|
||||
* EgovUserDetails Helper 클래스
|
||||
*
|
||||
* @author sjyoon
|
||||
* @since 2009.06.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------------- ----------------------
|
||||
* 2009.03.10 sjyoon 최초 생성
|
||||
* 2011.07.01 서준식 interface 생성후 상세 로직의 분리
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
public class EgovUserDetailsHelper {
|
||||
|
||||
static EgovUserDetailsService egovUserDetailsService;
|
||||
|
||||
public EgovUserDetailsService getEgovUserDetailsService() {
|
||||
return egovUserDetailsService;
|
||||
}
|
||||
|
||||
public void setEgovUserDetailsService(EgovUserDetailsService egovUserDetailsService) {
|
||||
EgovUserDetailsHelper.egovUserDetailsService = egovUserDetailsService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 인증된 사용자객체를 VO형식으로 가져온다.
|
||||
* @return Object - 사용자 ValueObject
|
||||
*/
|
||||
public static Object getAuthenticatedUser() {
|
||||
return egovUserDetailsService.getAuthenticatedUser();
|
||||
}
|
||||
|
||||
/**
|
||||
* 인증된 사용자의 권한 정보를 가져온다.
|
||||
*
|
||||
* @return List - 사용자 권한정보 목록
|
||||
*/
|
||||
public static List<String> getAuthorities() {
|
||||
return egovUserDetailsService.getAuthorities();
|
||||
}
|
||||
|
||||
/**
|
||||
* 인증된 사용자 여부를 체크한다.
|
||||
* @return Boolean - 인증된 사용자 여부(TRUE / FALSE)
|
||||
*/
|
||||
public static Boolean isAuthenticated() {
|
||||
return egovUserDetailsService.isAuthenticated();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package egovframework.com.cmm.util;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.core.io.FileSystemResource;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.UrlResource;
|
||||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
||||
import org.springframework.core.io.support.ResourcePatternResolver;
|
||||
|
||||
/**
|
||||
* @Class Name : EgovWildcardReloadableResourceBundleMessageSource
|
||||
* @Description : 다국어 properties 파일을 팩키지 구조의 폴더로 읽어드리는 MessageSource
|
||||
* @Modification Information
|
||||
* @
|
||||
* @ 수정일 수정자 수정내용
|
||||
* @ ------- -------- ---------------------------
|
||||
* @ 2016.06.10 장동한 최초 생성
|
||||
*
|
||||
* @author 2016 표준프레임워크 유지보수 장동한
|
||||
* @since 2016.06.10
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
*/
|
||||
|
||||
public class EgovWildcardReloadableResourceBundleMessageSource extends
|
||||
org.springframework.context.support.ReloadableResourceBundleMessageSource {
|
||||
private ResourcePatternResolver resourcePatternResolver = new PathMatchingResourcePatternResolver();
|
||||
|
||||
public void setEgovBasenames(String... basenames) {
|
||||
if (basenames != null) {
|
||||
List<String> baseNames = new ArrayList<String>();
|
||||
for (int i = 0; i < basenames.length; i++) {
|
||||
|
||||
String basename = StringUtils.trimToEmpty(basenames[i]);
|
||||
if(basename.indexOf("classpath:/") > -1 ){
|
||||
baseNames.add(basename);
|
||||
}else if(StringUtils.isNotBlank(basename)) {
|
||||
try {
|
||||
|
||||
Resource[] resources = resourcePatternResolver.getResources(basename);
|
||||
|
||||
for (int j = 0; j < resources.length; j++) {
|
||||
Resource resource = resources[j];
|
||||
String uri = resource.getURI().toString();
|
||||
String baseName = null;
|
||||
|
||||
if(uri.indexOf(".properties") == -1){continue;}
|
||||
|
||||
if (resource instanceof FileSystemResource) {
|
||||
baseName = "classpath:" + StringUtils.substringBetween(uri, "/classes/", ".properties");
|
||||
baseName = baseName.substring(0,baseName.indexOf("_"));
|
||||
baseName = baseName.replaceAll("classpath:", "classpath:/");
|
||||
if(baseNames.indexOf(baseName) > -1){continue;};
|
||||
|
||||
} else if (resource instanceof ClassPathResource) {
|
||||
baseName = StringUtils.substringBefore(uri, ".properties");
|
||||
baseName = baseName.substring(0,baseName.indexOf("_"));
|
||||
baseName = baseName.replaceAll("classpath:", "classpath:/");
|
||||
} else if (resource instanceof UrlResource) {
|
||||
baseName = "classpath:" + StringUtils.substringBetween(uri, ".jar!/", ".properties");
|
||||
baseName = baseName.substring(0,baseName.indexOf("_"));
|
||||
baseName = baseName.replaceAll("classpath:", "classpath:/");
|
||||
}
|
||||
if (baseName != null) {
|
||||
String fullName = processBasename(baseName);
|
||||
baseNames.add(fullName);
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
logger.debug("No message source files found for basename " + basename + ".");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
logger.debug("EgovWildcardReloadableResourceBundleMessageSource>>basenames>["+baseNames+"}");
|
||||
setBasenames(baseNames.toArray(new String[baseNames.size()]));
|
||||
}
|
||||
}
|
||||
|
||||
String processBasename(String baseName) {
|
||||
String prefix = StringUtils.substringBeforeLast(baseName, "/");
|
||||
String name = StringUtils.substringAfterLast(baseName, "/");
|
||||
do {
|
||||
name = StringUtils.substringBeforeLast(name, "_");
|
||||
} while (name.contains("_"));
|
||||
return prefix + "/" + name;
|
||||
}
|
||||
}
|
||||
77
src/main/java/egovframework/com/cmm/util/EgovXssChecker.java
Normal file
77
src/main/java/egovframework/com/cmm/util/EgovXssChecker.java
Normal file
@ -0,0 +1,77 @@
|
||||
package egovframework.com.cmm.util;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import egovframework.com.cmm.LoginVO;
|
||||
import egovframework.com.cmm.exception.EgovXssException;
|
||||
|
||||
/**
|
||||
* EgovXssChecker 클래스
|
||||
*
|
||||
* @author 장동한
|
||||
* @since 2016.10.27
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------------- ----------------------
|
||||
* 2016.10.17 장동한 최초 생성
|
||||
* 2017.03.03 조성원 시큐어코딩(ES)-오류 메시지를 통한 정보노출[CWE-209]
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
|
||||
public class EgovXssChecker {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(EgovXssChecker.class);
|
||||
|
||||
/**
|
||||
* 사용자에 대한 크로스사이트스크립트(Xss) 확인한다.
|
||||
* 수정, 상세조회, 삭제시 사용
|
||||
* @param uniqId Stirng
|
||||
* @return boolean
|
||||
* @exception IllegalArgumentException
|
||||
*/
|
||||
public static boolean checkerUserXss(HttpServletRequest request, String sUniqId) throws Exception {
|
||||
|
||||
boolean bLog = false;
|
||||
|
||||
try {
|
||||
//@ 공통모듈을 이용한 권한체크
|
||||
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
|
||||
|
||||
if(bLog){
|
||||
LOGGER.debug("@Step1. XSS Check uniqId : {}", sUniqId);
|
||||
LOGGER.debug("Step2. XSS Session uniqId : {}", loginVO.getId());
|
||||
LOGGER.debug("Step3. XSS Session getUniqId : {}", loginVO.getUniqId());
|
||||
LOGGER.debug("Step4. XSS Session getAuthorities : {}", EgovUserDetailsHelper.getAuthorities());
|
||||
}
|
||||
|
||||
//체크 값에 대한 무결성 체크
|
||||
if(sUniqId == null || loginVO.getUniqId() == null){
|
||||
throw new EgovXssException("XSS00001", "errors.xss.checkerUser");
|
||||
} else if (loginVO.getUniqId().equals("")) { // KISA 보안약점 조치 (2018-12-11, 신용호)
|
||||
throw new EgovXssException("XSS00001", "errors.xss.checkerUser");
|
||||
}
|
||||
|
||||
//사용자에에 대한 Xss 체크
|
||||
if(!sUniqId.equals(loginVO.getUniqId())){
|
||||
throw new EgovXssException("XSS00002", "errors.xss.checkerUser");
|
||||
}
|
||||
//2017.03.03 조성원 시큐어코딩(ES)-오류 메시지를 통한 정보노출[CWE-209]
|
||||
} catch(IllegalArgumentException e) {
|
||||
LOGGER.error("[IllegalArgumentException] Try/Catch...usingParameters Runing : "+ e.getMessage());
|
||||
} catch(Exception e) {
|
||||
LOGGER.error("["+e.getClass()+"] Try/Catch...Exception : " + e.getMessage());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package egovframework.com.cmm.web;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.beans.propertyeditors.CustomDateEditor;
|
||||
import org.springframework.beans.propertyeditors.StringTrimmerEditor;
|
||||
import org.springframework.web.bind.WebDataBinder;
|
||||
import org.springframework.web.bind.support.WebBindingInitializer;
|
||||
import org.springframework.web.context.request.WebRequest;
|
||||
|
||||
public class EgovBindingInitializer implements WebBindingInitializer {
|
||||
|
||||
|
||||
public void initBinder(WebDataBinder binder, WebRequest request) {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
dateFormat.setLenient(false);
|
||||
binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, false));
|
||||
binder.registerCustomEditor(String.class, new StringTrimmerEditor(false));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,169 @@
|
||||
package egovframework.com.cmm.web;
|
||||
|
||||
/**
|
||||
* 컴포넌트 설치 후 설치된 컴포넌트들을 IncludedInfo annotation을 통해 찾아낸 후
|
||||
* 화면에 표시할 정보를 처리하는 Controller 클래스
|
||||
* <Notice>
|
||||
* 개발시 메뉴 구조가 잡히기 전에 배포파일들에 포함된 공통 컴포넌트들의 목록성 화면에
|
||||
* URL을 제공하여 개발자가 편하게 활용하도록 하기 위해 작성된 것으로,
|
||||
* 실제 운영되는 시스템에서는 적용해서는 안 됨
|
||||
* 실 운영 시에는 삭제해서 배포해도 좋음
|
||||
* <Disclaimer>
|
||||
* 운영시에 본 컨트롤을 사용하여 메뉴를 구성하는 경우 성능 문제를 일으키거나
|
||||
* 사용자별 메뉴 구성에 오류를 발생할 수 있음
|
||||
* @author 공통컴포넌트 정진오
|
||||
* @since 2011.08.26
|
||||
* @version 2.0.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2011.08.26 정진오 최초 생성
|
||||
* 2011.09.16 서준식 컨텐츠 페이지 생성
|
||||
* 2011.09.26 이기하 header, footer 페이지 생성
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import egovframework.com.cmm.IncludedCompInfoVO;
|
||||
import egovframework.com.cmm.LoginVO;
|
||||
import egovframework.com.cmm.annotation.IncludedInfo;
|
||||
import egovframework.com.cmm.util.EgovUserDetailsHelper;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@Controller
|
||||
public class EgovComIndexController implements ApplicationContextAware, InitializingBean {
|
||||
|
||||
private ApplicationContext applicationContext;
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(EgovComIndexController.class);
|
||||
|
||||
private Map<Integer, IncludedCompInfoVO> map;
|
||||
|
||||
public void afterPropertiesSet() throws Exception {}
|
||||
|
||||
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
||||
this.applicationContext = applicationContext;
|
||||
|
||||
LOGGER.info("EgovComIndexController setApplicationContext method has called!");
|
||||
}
|
||||
|
||||
@RequestMapping("/egovIndex.do")
|
||||
public String index(ModelMap model) {
|
||||
return "egovframework/com/cmm/EgovUnitMain";
|
||||
}
|
||||
|
||||
@RequestMapping("/EgovTop.do")
|
||||
public String top() {
|
||||
return "egovframework/com/cmm/EgovUnitTop";
|
||||
}
|
||||
|
||||
@RequestMapping("/EgovBottom.do")
|
||||
public String bottom() {
|
||||
return "egovframework/com/cmm/EgovUnitBottom";
|
||||
}
|
||||
|
||||
@RequestMapping("/EgovContent.do")
|
||||
public String setContent(ModelMap model) {
|
||||
|
||||
LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
|
||||
model.addAttribute("loginVO", loginVO);
|
||||
|
||||
return "egovframework/com/cmm/EgovUnitContent";
|
||||
}
|
||||
|
||||
@RequestMapping("/EgovLeft.do")
|
||||
public String setLeftMenu(ModelMap model) {
|
||||
|
||||
/* 최초 한 번만 실행하여 map에 저장해 놓는다. */
|
||||
if (map == null) {
|
||||
map = new TreeMap<Integer, IncludedCompInfoVO>();
|
||||
RequestMapping rmAnnotation;
|
||||
IncludedInfo annotation;
|
||||
IncludedCompInfoVO zooVO;
|
||||
|
||||
/*
|
||||
* EgovLoginController가 AOP Proxy되는 바람에 클래스를 reflection으로 가져올 수 없음
|
||||
*/
|
||||
try {
|
||||
Class<?> loginController = Class.forName("egovframework.com.uat.uia.web.EgovLoginController");
|
||||
Method[] methods = loginController.getMethods();
|
||||
for (int i = 0; i < methods.length; i++) {
|
||||
annotation = methods[i].getAnnotation(IncludedInfo.class);
|
||||
|
||||
if (annotation != null) {
|
||||
LOGGER.debug("Found @IncludedInfo Method : {}", methods[i]);
|
||||
zooVO = new IncludedCompInfoVO();
|
||||
zooVO.setName(annotation.name());
|
||||
zooVO.setOrder(annotation.order());
|
||||
zooVO.setGid(annotation.gid());
|
||||
|
||||
rmAnnotation = methods[i].getAnnotation(RequestMapping.class);
|
||||
if ("".equals(annotation.listUrl()) && rmAnnotation != null) {
|
||||
zooVO.setListUrl(rmAnnotation.value()[0]);
|
||||
} else {
|
||||
zooVO.setListUrl(annotation.listUrl());
|
||||
}
|
||||
map.put(zooVO.getOrder(), zooVO);
|
||||
}
|
||||
}
|
||||
} catch (ClassNotFoundException e) {
|
||||
LOGGER.error("No egovframework.com.uat.uia.web.EgovLoginController!!");
|
||||
}
|
||||
/* 여기까지 AOP Proxy로 인한 코드 */
|
||||
|
||||
/*@Controller Annotation 처리된 클래스를 모두 찾는다.*/
|
||||
Map<String, Object> myZoos = applicationContext.getBeansWithAnnotation(Controller.class);
|
||||
LOGGER.debug("How many Controllers : ", myZoos.size());
|
||||
for (final Object myZoo : myZoos.values()) {
|
||||
Class<? extends Object> zooClass = myZoo.getClass();
|
||||
|
||||
Method[] methods = zooClass.getMethods();
|
||||
LOGGER.debug("Controller Detected {}", zooClass);
|
||||
for (int i = 0; i < methods.length; i++) {
|
||||
annotation = methods[i].getAnnotation(IncludedInfo.class);
|
||||
|
||||
if (annotation != null) {
|
||||
//LOG.debug("Found @IncludedInfo Method : " + methods[i] );
|
||||
zooVO = new IncludedCompInfoVO();
|
||||
zooVO.setName(annotation.name());
|
||||
zooVO.setOrder(annotation.order());
|
||||
zooVO.setGid(annotation.gid());
|
||||
/*
|
||||
* 목록형 조회를 위한 url 매핑은 @IncludedInfo나 @RequestMapping에서 가져온다
|
||||
*/
|
||||
rmAnnotation = methods[i].getAnnotation(RequestMapping.class);
|
||||
if ("".equals(annotation.listUrl())) {
|
||||
zooVO.setListUrl(rmAnnotation.value()[0]);
|
||||
} else {
|
||||
zooVO.setListUrl(annotation.listUrl());
|
||||
}
|
||||
|
||||
map.put(zooVO.getOrder(), zooVO);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
model.addAttribute("resultList", map.values());
|
||||
|
||||
LOGGER.debug("EgovComIndexController index is called ");
|
||||
|
||||
return "egovframework/com/cmm/EgovUnitLeft";
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
package egovframework.com.cmm.web;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import egovframework.com.cmm.EgovWebUtil;
|
||||
import egovframework.rte.fdl.property.EgovPropertyService;
|
||||
|
||||
/**
|
||||
* @Class Name : EgovComUtlController.java
|
||||
* @Description : 공통유틸리티성 작업을 위한 Controller
|
||||
* @Modification Information
|
||||
* @
|
||||
* @ 수정일 수정자 수정내용
|
||||
* @ ---------- -------- ---------------------------
|
||||
* 2009.03.02 조재영 최초 생성
|
||||
* 2011.10.07 이기하 .action -> .do로 변경하면서 동일 매핑이 되어 삭제처리
|
||||
* 2015.11.12 김연호 한국인터넷진흥원 웹 취약점 개선
|
||||
* 2019.04.25 신용호 moveToPage() 화이트리스트 처리
|
||||
*
|
||||
* @author 공통서비스 개발팀 조재영
|
||||
* @since 2009.03.02
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
*/
|
||||
@Controller
|
||||
public class EgovComUtlController {
|
||||
|
||||
//@Resource(name = "egovUserManageService")
|
||||
//private EgovUserManageService egovUserManageService;
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(EgovComUtlController.class);
|
||||
|
||||
@Resource(name = "egovPageLinkWhitelist")
|
||||
protected List<String> egovWhitelist;
|
||||
|
||||
/** EgovPropertyService */
|
||||
@Resource(name = "propertiesService")
|
||||
protected EgovPropertyService propertiesService;
|
||||
|
||||
/**
|
||||
* JSP 호출작업만 처리하는 공통 함수
|
||||
*/
|
||||
@RequestMapping(value="/EgovPageLink.do")
|
||||
public String moveToPage(@RequestParam("link") String linkPage){
|
||||
String link = linkPage;
|
||||
link = link.replace(";", "");
|
||||
link = link.replace(".", "");
|
||||
|
||||
// service 사용하여 리턴할 결과값 처리하는 부분은 생략하고 단순 페이지 링크만 처리함
|
||||
if (linkPage==null || linkPage.equals("")){
|
||||
link="egovframework/com/cmm/egovError";
|
||||
}
|
||||
|
||||
// 화이트 리스트 처리
|
||||
// whitelist목록에 있는 경우 결과가 true, 결과가 false인경우 FAIL처리
|
||||
if (egovWhitelist.contains(linkPage) == false) {
|
||||
LOGGER.debug("Page Link WhiteList Error! Please check whitelist!");
|
||||
link="egovframework/com/cmm/egovError";
|
||||
}
|
||||
|
||||
// 안전한 경로 문자열로 조치
|
||||
link = EgovWebUtil.filePathBlackList(link);
|
||||
|
||||
return link;
|
||||
}
|
||||
|
||||
/**
|
||||
* 모달조회
|
||||
* @return String
|
||||
* @exception Exception
|
||||
*/
|
||||
@RequestMapping(value="/EgovModal.do")
|
||||
public String selectUtlJsonInquire() throws Exception {
|
||||
return "egovframework/com/cmm/EgovModal";
|
||||
}
|
||||
|
||||
/**
|
||||
* validato rule dynamic Javascript
|
||||
*/
|
||||
@RequestMapping("/validator.do")
|
||||
public String validate(){
|
||||
return "egovframework/com/cmm/validator";
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,154 @@
|
||||
package egovframework.com.cmm.web;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import egovframework.com.cmm.EgovBrowserUtil;
|
||||
import egovframework.com.cmm.service.EgovFileMngService;
|
||||
import egovframework.com.cmm.service.FileVO;
|
||||
import egovframework.com.cmm.util.EgovBasicLogger;
|
||||
import egovframework.com.cmm.util.EgovResourceCloseHelper;
|
||||
import egovframework.com.cmm.util.EgovUserDetailsHelper;
|
||||
|
||||
/**
|
||||
* 파일 다운로드를 위한 컨트롤러 클래스
|
||||
* @author 공통서비스개발팀 이삼섭
|
||||
* @since 2009.06.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------------ -------- ---------------------------
|
||||
* 2009.03.25 이삼섭 최초 생성
|
||||
* 2014.02.24 이기하 IE11 브라우저 한글 파일 다운로드시 에러 수정
|
||||
* 2018.08.28 신용호 Safari, Chrome, Firefox, Opera 한글파일 다운로드 처리 수정 (macOS에서 확장자 exe붙는 문제 처리)
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
@Controller
|
||||
public class EgovFileDownloadController {
|
||||
|
||||
@Resource(name = "EgovFileMngService")
|
||||
private EgovFileMngService fileService;
|
||||
|
||||
/**
|
||||
* 브라우저 구분 얻기.
|
||||
*
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
private String getBrowser(HttpServletRequest request) {
|
||||
String header = request.getHeader("User-Agent");
|
||||
if (header.indexOf("MSIE") > -1) {
|
||||
return "MSIE";
|
||||
} else if (header.indexOf("Trident") > -1) { // IE11 문자열 깨짐 방지
|
||||
return "Trident";
|
||||
} else if (header.indexOf("Chrome") > -1) {
|
||||
return "Chrome";
|
||||
} else if (header.indexOf("Opera") > -1) {
|
||||
return "Opera";
|
||||
}
|
||||
return "Firefox";
|
||||
}
|
||||
|
||||
/**
|
||||
* 첨부파일로 등록된 파일에 대하여 다운로드를 제공한다.
|
||||
*
|
||||
* @param commandMap
|
||||
* @param response
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/cmm/fms/FileDown.do")
|
||||
public void cvplFileDownload(@RequestParam Map<String, Object> commandMap, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
|
||||
String atchFileId = (String) commandMap.get("atchFileId");
|
||||
String fileSn = (String) commandMap.get("fileSn");
|
||||
|
||||
Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
|
||||
|
||||
if (isAuthenticated) {
|
||||
|
||||
FileVO fileVO = new FileVO();
|
||||
fileVO.setAtchFileId(atchFileId);
|
||||
fileVO.setFileSn(fileSn);
|
||||
FileVO fvo = fileService.selectFileInf(fileVO);
|
||||
|
||||
File uFile = new File(fvo.getFileStreCours(), fvo.getStreFileNm());
|
||||
long fSize = uFile.length();
|
||||
|
||||
if (fSize > 0) {
|
||||
String mimetype = "application/x-msdownload";
|
||||
|
||||
String userAgent = request.getHeader("User-Agent");
|
||||
HashMap<String,String> result = EgovBrowserUtil.getBrowser(userAgent);
|
||||
if ( !EgovBrowserUtil.MSIE.equals(result.get(EgovBrowserUtil.TYPEKEY)) ) {
|
||||
mimetype = "application/x-stuff";
|
||||
}
|
||||
|
||||
String contentDisposition = EgovBrowserUtil.getDisposition(fvo.getOrignlFileNm(),userAgent,"UTF-8");
|
||||
//response.setBufferSize(fSize); // OutOfMemeory 발생
|
||||
response.setContentType(mimetype);
|
||||
//response.setHeader("Content-Disposition", "attachment; filename=\"" + contentDisposition + "\"");
|
||||
response.setHeader("Content-Disposition", contentDisposition);
|
||||
response.setContentLengthLong(fSize);
|
||||
|
||||
/*
|
||||
* FileCopyUtils.copy(in, response.getOutputStream());
|
||||
* in.close();
|
||||
* response.getOutputStream().flush();
|
||||
* response.getOutputStream().close();
|
||||
*/
|
||||
BufferedInputStream in = null;
|
||||
BufferedOutputStream out = null;
|
||||
|
||||
try {
|
||||
in = new BufferedInputStream(new FileInputStream(uFile));
|
||||
out = new BufferedOutputStream(response.getOutputStream());
|
||||
|
||||
FileCopyUtils.copy(in, out);
|
||||
out.flush();
|
||||
} catch (IOException ex) {
|
||||
// 다음 Exception 무시 처리
|
||||
// Connection reset by peer: socket write error
|
||||
EgovBasicLogger.ignore("IO Exception", ex);
|
||||
} finally {
|
||||
EgovResourceCloseHelper.close(in, out);
|
||||
}
|
||||
|
||||
} else {
|
||||
response.setContentType("application/x-msdownload");
|
||||
|
||||
PrintWriter printwriter = response.getWriter();
|
||||
|
||||
printwriter.println("<html>");
|
||||
printwriter.println("<br><br><br><h2>Could not get file name:<br>" + fvo.getOrignlFileNm() + "</h2>");
|
||||
printwriter.println("<br><br><br><center><h3><a href='javascript: history.go(-1)'>Back</a></h3></center>");
|
||||
printwriter.println("<br><br><br>© webAccess");
|
||||
printwriter.println("</html>");
|
||||
|
||||
printwriter.flush();
|
||||
printwriter.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,165 @@
|
||||
package egovframework.com.cmm.web;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import egovframework.com.cmm.service.EgovFileMngService;
|
||||
import egovframework.com.cmm.service.FileVO;
|
||||
import egovframework.com.cmm.util.EgovUserDetailsHelper;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
/**
|
||||
* 파일 조회, 삭제, 다운로드 처리를 위한 컨트롤러 클래스
|
||||
* @author 공통서비스개발팀 이삼섭
|
||||
* @since 2009.06.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.3.25 이삼섭 최초 생성
|
||||
* 2016.10.13 장동한 deleteFileInf 메소드 return 방식 수정
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Controller
|
||||
public class EgovFileMngController {
|
||||
|
||||
@Resource(name = "EgovFileMngService")
|
||||
private EgovFileMngService fileService;
|
||||
|
||||
/**
|
||||
* 첨부파일에 대한 목록을 조회한다.
|
||||
*
|
||||
* @param fileVO
|
||||
* @param atchFileId
|
||||
* @param sessionVO
|
||||
* @param model
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping("/cmm/fms/selectFileInfs.do")
|
||||
public String selectFileInfs(@ModelAttribute("searchVO") FileVO fileVO, @RequestParam Map<String, Object> commandMap, ModelMap model) throws Exception {
|
||||
String atchFileId = (String)commandMap.get("param_atchFileId");
|
||||
|
||||
fileVO.setAtchFileId(atchFileId);
|
||||
List<FileVO> result = fileService.selectFileInfs(fileVO);
|
||||
|
||||
model.addAttribute("fileList", result);
|
||||
model.addAttribute("updateFlag", "N");
|
||||
model.addAttribute("fileListCnt", result.size());
|
||||
model.addAttribute("atchFileId", atchFileId);
|
||||
|
||||
return "egovframework/com/cmm/fms/EgovFileList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 첨부파일 변경을 위한 수정페이지로 이동한다.
|
||||
*
|
||||
* @param fileVO
|
||||
* @param atchFileId
|
||||
* @param sessionVO
|
||||
* @param model
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping("/cmm/fms/selectFileInfsForUpdate.do")
|
||||
public String selectFileInfsForUpdate(@ModelAttribute("searchVO") FileVO fileVO, @RequestParam Map<String, Object> commandMap,
|
||||
//SessionVO sessionVO,
|
||||
ModelMap model) throws Exception {
|
||||
|
||||
String atchFileId = (String)commandMap.get("param_atchFileId");
|
||||
|
||||
fileVO.setAtchFileId(atchFileId);
|
||||
|
||||
List<FileVO> result = fileService.selectFileInfs(fileVO);
|
||||
|
||||
model.addAttribute("fileList", result);
|
||||
model.addAttribute("updateFlag", "Y");
|
||||
model.addAttribute("fileListCnt", result.size());
|
||||
model.addAttribute("atchFileId", atchFileId);
|
||||
|
||||
return "egovframework/com/cmm/fms/EgovFileList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 첨부파일에 대한 삭제를 처리한다.
|
||||
*
|
||||
* @param fileVO
|
||||
* @param returnUrl
|
||||
* @param sessionVO
|
||||
* @param model
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping("/cmm/fms/deleteFileInfs.do")
|
||||
public String deleteFileInf(@ModelAttribute("searchVO") FileVO fileVO,
|
||||
//SessionVO sessionVO,
|
||||
HttpServletRequest request,
|
||||
ModelMap model) throws Exception {
|
||||
|
||||
Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
|
||||
|
||||
if (isAuthenticated) {
|
||||
fileService.deleteFileInf(fileVO);
|
||||
}
|
||||
|
||||
return "blank";
|
||||
|
||||
//--------------------------------------------
|
||||
// contextRoot가 있는 경우 제외 시켜야 함
|
||||
//--------------------------------------------
|
||||
////return "forward:/cmm/fms/selectFileInfs.do";
|
||||
//return "forward:" + returnUrl;
|
||||
/* *******************************************************
|
||||
* modify by jdh
|
||||
*******************************************************
|
||||
if ("".equals(request.getContextPath()) || "/".equals(request.getContextPath())) {
|
||||
return "forward:" + returnUrl;
|
||||
}
|
||||
|
||||
if (returnUrl.startsWith(request.getContextPath())) {
|
||||
return "forward:" + returnUrl.substring(returnUrl.indexOf("/", 1));
|
||||
} else {
|
||||
return "forward:" + returnUrl;
|
||||
}
|
||||
*/
|
||||
////------------------------------------------
|
||||
}
|
||||
|
||||
/**
|
||||
* 이미지 첨부파일에 대한 목록을 조회한다.
|
||||
*
|
||||
* @param fileVO
|
||||
* @param atchFileId
|
||||
* @param sessionVO
|
||||
* @param model
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping("/cmm/fms/selectImageFileInfs.do")
|
||||
public String selectImageFileInfs(@ModelAttribute("searchVO") FileVO fileVO, @RequestParam Map<String, Object> commandMap,
|
||||
//SessionVO sessionVO,
|
||||
ModelMap model) throws Exception {
|
||||
|
||||
String atchFileId = (String)commandMap.get("atchFileId");
|
||||
|
||||
fileVO.setAtchFileId(atchFileId);
|
||||
List<FileVO> result = fileService.selectImageFileList(fileVO);
|
||||
|
||||
model.addAttribute("fileList", result);
|
||||
|
||||
return "egovframework/com/cmm/fms/EgovImgFileList";
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,132 @@
|
||||
package egovframework.com.cmm.web;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.util.Map;
|
||||
|
||||
import egovframework.com.cmm.SessionVO;
|
||||
import egovframework.com.cmm.service.EgovFileMngService;
|
||||
import egovframework.com.cmm.service.FileVO;
|
||||
import egovframework.com.cmm.util.EgovResourceCloseHelper;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
|
||||
/**
|
||||
* @Class Name : EgovImageProcessController.java
|
||||
* @Description :
|
||||
* @Modification Information
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- --------- -------------------
|
||||
* 2009.04.02 이삼섭 최초생성
|
||||
* 2014.03.31 유지보수 fileSn 오류수정
|
||||
* 2018.08.31 이정은 MimeType 중복설정 제거
|
||||
*
|
||||
* @author 공통 서비스 개발팀 이삼섭
|
||||
* @since 2009. 4. 2.
|
||||
* @version
|
||||
* @see
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
@Controller
|
||||
public class EgovImageProcessController extends HttpServlet {
|
||||
|
||||
@Resource(name = "EgovFileMngService")
|
||||
private EgovFileMngService fileService;
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(EgovImageProcessController.class);
|
||||
|
||||
/**
|
||||
* 첨부된 이미지에 대한 미리보기 기능을 제공한다.
|
||||
*
|
||||
* @param atchFileId
|
||||
* @param fileSn
|
||||
* @param sessionVO
|
||||
* @param model
|
||||
* @param response
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping("/cmm/fms/getImage.do")
|
||||
public void getImageInf(SessionVO sessionVO, ModelMap model, @RequestParam Map<String, Object> commandMap, HttpServletResponse response) throws Exception {
|
||||
|
||||
//@RequestParam("atchFileId") String atchFileId,
|
||||
//@RequestParam("fileSn") String fileSn,
|
||||
String atchFileId = (String)commandMap.get("atchFileId");
|
||||
String fileSn = (String)commandMap.get("fileSn");
|
||||
|
||||
FileVO vo = new FileVO();
|
||||
|
||||
vo.setAtchFileId(atchFileId);
|
||||
vo.setFileSn(fileSn);
|
||||
|
||||
//------------------------------------------------------------
|
||||
// fileSn이 없는 경우 마지막 파일 참조
|
||||
//------------------------------------------------------------
|
||||
if (fileSn == null || fileSn.equals("")) {
|
||||
int newMaxFileSN = fileService.getMaxFileSN(vo);
|
||||
vo.setFileSn(Integer.toString(newMaxFileSN - 1));
|
||||
}
|
||||
//------------------------------------------------------------
|
||||
|
||||
FileVO fvo = fileService.selectFileInf(vo);
|
||||
|
||||
//String fileLoaction = fvo.getFileStreCours() + fvo.getStreFileNm();
|
||||
|
||||
File file = null;
|
||||
FileInputStream fis = null;
|
||||
|
||||
BufferedInputStream in = null;
|
||||
ByteArrayOutputStream bStream = null;
|
||||
|
||||
try {
|
||||
file = new File(fvo.getFileStreCours(), fvo.getStreFileNm());
|
||||
fis = new FileInputStream(file);
|
||||
|
||||
in = new BufferedInputStream(fis);
|
||||
bStream = new ByteArrayOutputStream();
|
||||
|
||||
int imgByte;
|
||||
while ((imgByte = in.read()) != -1) {
|
||||
bStream.write(imgByte);
|
||||
}
|
||||
|
||||
String type = "";
|
||||
|
||||
if (fvo.getFileExtsn() != null && !"".equals(fvo.getFileExtsn())) {
|
||||
if ("jpg".equals(fvo.getFileExtsn().toLowerCase())) {
|
||||
type = "image/jpeg";
|
||||
} else {
|
||||
type = "image/" + fvo.getFileExtsn().toLowerCase();
|
||||
}
|
||||
/*type = "image/" + fvo.getFileExtsn().toLowerCase();*/
|
||||
|
||||
} else {
|
||||
LOGGER.debug("Image fileType is null.");
|
||||
}
|
||||
|
||||
response.setHeader("Content-Type", type);
|
||||
response.setContentLength(bStream.size());
|
||||
|
||||
bStream.writeTo(response.getOutputStream());
|
||||
|
||||
response.getOutputStream().flush();
|
||||
response.getOutputStream().close();
|
||||
|
||||
} finally {
|
||||
EgovResourceCloseHelper.close(bStream, in, fis);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,130 @@
|
||||
package egovframework.com.cmm.web;
|
||||
|
||||
/*
|
||||
* Copyright 2001-2006 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the ";License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS"; BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
|
||||
import org.apache.commons.fileupload.FileItem;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.util.LinkedMultiValueMap;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.multipart.MultipartException;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.commons.CommonsMultipartFile;
|
||||
import org.springframework.web.multipart.commons.CommonsMultipartResolver;
|
||||
|
||||
/**
|
||||
* 실행환경의 파일업로드 처리를 위한 기능 클래스
|
||||
* @author 공통서비스개발팀 이삼섭
|
||||
* @since 2009.06.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.3.25 이삼섭 최초 생성
|
||||
* 2011.06.11 서준식 스프링 3.0 업그레이드 API변경으로인한 수정
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
public class EgovMultipartResolver extends CommonsMultipartResolver {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(EgovMultipartResolver.class);
|
||||
|
||||
public EgovMultipartResolver() {}
|
||||
|
||||
/**
|
||||
* 첨부파일 처리를 위한 multipart resolver를 생성한다.
|
||||
*
|
||||
* @param servletContext
|
||||
*/
|
||||
public EgovMultipartResolver(ServletContext servletContext) {
|
||||
super(servletContext);
|
||||
}
|
||||
|
||||
/**
|
||||
* multipart에 대한 parsing을 처리한다.
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
protected MultipartParsingResult parseFileItems(List fileItems, String encoding) {
|
||||
|
||||
//스프링 3.0변경으로 수정한 부분
|
||||
MultiValueMap<String, MultipartFile> multipartFiles = new LinkedMultiValueMap<String, MultipartFile>();
|
||||
Map<String, String[]> multipartParameters = new HashMap<String, String[]>();
|
||||
|
||||
// Extract multipart files and multipart parameters.
|
||||
for (Iterator<?> it = fileItems.iterator(); it.hasNext();) {
|
||||
FileItem fileItem = (FileItem)it.next();
|
||||
|
||||
if (fileItem.isFormField()) {
|
||||
|
||||
String value = null;
|
||||
if (encoding != null) {
|
||||
try {
|
||||
value = fileItem.getString(encoding);
|
||||
} catch (UnsupportedEncodingException ex) {
|
||||
LOGGER.warn("Could not decode multipart item '{}' with encoding '{}': using platform default"
|
||||
, fileItem.getFieldName(), encoding);
|
||||
value = fileItem.getString();
|
||||
}
|
||||
} else {
|
||||
value = fileItem.getString();
|
||||
}
|
||||
String[] curParam = (String[])multipartParameters.get(fileItem.getFieldName());
|
||||
if (curParam == null) {
|
||||
// simple form field
|
||||
multipartParameters.put(fileItem.getFieldName(), new String[] { value });
|
||||
} else {
|
||||
// array of simple form fields
|
||||
String[] newParam = StringUtils.addStringToArray(curParam, value);
|
||||
multipartParameters.put(fileItem.getFieldName(), newParam);
|
||||
}
|
||||
} else {
|
||||
|
||||
if (fileItem.getSize() > 0) {
|
||||
// multipart file field
|
||||
CommonsMultipartFile file = new CommonsMultipartFile(fileItem);
|
||||
|
||||
//스프링 3.0 업그레이드 API변경으로인한 수정
|
||||
List<MultipartFile> fileList = new ArrayList<MultipartFile>();
|
||||
fileList.add(file);
|
||||
|
||||
if (multipartFiles.put(fileItem.getName(), fileList) != null) { // CHANGED!!
|
||||
throw new MultipartException("Multiple files for field name [" + file.getName() + "] found - not supported by MultipartResolver");
|
||||
}
|
||||
LOGGER.debug("Found multipart file [{"+file.getName()+"}] of size {"+file.getSize()+"} bytes with original filename [{"+ file.getOriginalFilename()+"}], stored {"+file.getStorageDescription()+"}");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return new MultipartParsingResult(multipartFiles, multipartParameters, null);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,147 @@
|
||||
package egovframework.com.cop.ems.service;
|
||||
|
||||
/**
|
||||
* 발송메일에 첨부되는 파일 VO 클래스
|
||||
* @author 공통서비스 개발팀 박지욱
|
||||
* @since 2009.03.12
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.12 박지욱 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
public class AtchmnFileVO {
|
||||
|
||||
/** 첨부파일ID */
|
||||
private String atchFileId;
|
||||
/** 파일연번 */
|
||||
private String fileSn;
|
||||
/** 원파일명 */
|
||||
private String orignlFileNm;
|
||||
/** 저장파일명 */
|
||||
private String streFileNm;
|
||||
/** 파일저장경로 */
|
||||
private String fileStreCours;
|
||||
/** 파일확장자 */
|
||||
private String fileExtsn;
|
||||
/** 파일크기 */
|
||||
private int fileMg;
|
||||
|
||||
/**
|
||||
* atchFileId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getAtchFileId() {
|
||||
return atchFileId;
|
||||
}
|
||||
|
||||
/**
|
||||
* atchFileId attribute 값을 설정한다.
|
||||
* @param atchFileId String
|
||||
*/
|
||||
public void setAtchFileId(String atchFileId) {
|
||||
this.atchFileId = atchFileId;
|
||||
}
|
||||
|
||||
/**
|
||||
* fileSn attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getFileSn() {
|
||||
return fileSn;
|
||||
}
|
||||
|
||||
/**
|
||||
* fileSn attribute 값을 설정한다.
|
||||
* @param fileSn String
|
||||
*/
|
||||
public void setFileSn(String fileSn) {
|
||||
this.fileSn = fileSn;
|
||||
}
|
||||
|
||||
/**
|
||||
* orignlFileNm attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getOrignlFileNm() {
|
||||
return orignlFileNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* orignlFileNm attribute 값을 설정한다.
|
||||
* @param orignlFileNm String
|
||||
*/
|
||||
public void setOrignlFileNm(String orignlFileNm) {
|
||||
this.orignlFileNm = orignlFileNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* streFileNm attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getStreFileNm() {
|
||||
return streFileNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* streFileNm attribute 값을 설정한다.
|
||||
* @param streFileNm String
|
||||
*/
|
||||
public void setStreFileNm(String streFileNm) {
|
||||
this.streFileNm = streFileNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* fileStreCours attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getFileStreCours() {
|
||||
return fileStreCours;
|
||||
}
|
||||
|
||||
/**
|
||||
* fileStreCours attribute 값을 설정한다.
|
||||
* @param fileStreCours String
|
||||
*/
|
||||
public void setFileStreCours(String fileStreCours) {
|
||||
this.fileStreCours = fileStreCours;
|
||||
}
|
||||
|
||||
/**
|
||||
* fileExtsn attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getFileExtsn() {
|
||||
return fileExtsn;
|
||||
}
|
||||
|
||||
/**
|
||||
* fileExtsn attribute 값을 설정한다.
|
||||
* @param fileExtsn String
|
||||
*/
|
||||
public void setFileExtsn(String fileExtsn) {
|
||||
this.fileExtsn = fileExtsn;
|
||||
}
|
||||
|
||||
/**
|
||||
* fileMg attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getFileMg() {
|
||||
return fileMg;
|
||||
}
|
||||
|
||||
/**
|
||||
* fileMg attribute 값을 설정한다.
|
||||
* @param fileMg int
|
||||
*/
|
||||
public void setFileMg(int fileMg) {
|
||||
this.fileMg = fileMg;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,129 @@
|
||||
package egovframework.com.cop.ems.service;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.apache.commons.mail.DefaultAuthenticator;
|
||||
import org.apache.commons.mail.EmailAttachment;
|
||||
import org.apache.commons.mail.EmailException;
|
||||
import org.apache.commons.mail.MultiPartEmail;
|
||||
|
||||
/**
|
||||
* 발송메일에 첨부파일용으로 사용되는 VO 클래스
|
||||
* @author 공통서비스 개발팀 이기하
|
||||
* @since 2011.12.06
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2011.12.06 이기하 최초 생성
|
||||
* 2013.05.23 이기하 thread-safe 하게 변경
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
public class EgovMultiPartEmail implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -4322006921324597283L;
|
||||
private String id;
|
||||
private String password;
|
||||
private int port;
|
||||
private String host;
|
||||
private String emailAddress;
|
||||
private String senderName;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public int getPort() {
|
||||
return port;
|
||||
}
|
||||
|
||||
public void setPort(int port) {
|
||||
this.port = port;
|
||||
}
|
||||
|
||||
public String getHost() {
|
||||
return host;
|
||||
}
|
||||
|
||||
public void setHost(String host) {
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
public String getEmailAddress() {
|
||||
return emailAddress;
|
||||
}
|
||||
|
||||
public void setEmailAddress(String emailAddress) {
|
||||
this.emailAddress = emailAddress;
|
||||
}
|
||||
|
||||
public String getSenderName() {
|
||||
return senderName;
|
||||
}
|
||||
|
||||
public void setSenderName(String senderName) {
|
||||
this.senderName = senderName;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public String send() throws EmailException {
|
||||
MultiPartEmail email = new MultiPartEmail();
|
||||
|
||||
email.setCharset("UTF-8");
|
||||
email.setHostName(this.host);
|
||||
email.setSmtpPort(this.port);
|
||||
email.setStartTLSEnabled(true);
|
||||
email.setAuthenticator(new DefaultAuthenticator(this.id, this.password));
|
||||
email.setSocketConnectionTimeout(60000);
|
||||
email.setSocketTimeout(60000);
|
||||
email.setFrom(this.emailAddress, this.senderName);
|
||||
|
||||
return email.send();
|
||||
}
|
||||
|
||||
public String send(String addTo, String subject, String msg) throws EmailException {
|
||||
return send(addTo, subject, msg, null);
|
||||
}
|
||||
|
||||
public String send(String addTo, String subject, String msg, EmailAttachment attachment) throws EmailException {
|
||||
MultiPartEmail email = new MultiPartEmail();
|
||||
|
||||
email.setCharset("UTF-8");
|
||||
email.setHostName(this.host);
|
||||
email.setSmtpPort(this.port);
|
||||
email.setStartTLSEnabled(true);
|
||||
email.setAuthenticator(new DefaultAuthenticator(this.id, this.password));
|
||||
email.setSocketConnectionTimeout(60000);
|
||||
email.setSocketTimeout(60000);
|
||||
email.setFrom(this.emailAddress, this.senderName);
|
||||
email.addTo(addTo);
|
||||
email.setSubject(subject);
|
||||
email.setMsg(msg);
|
||||
|
||||
if (attachment != null) {
|
||||
email.attach(attachment);
|
||||
}
|
||||
|
||||
return email.send();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
package egovframework.com.cop.ems.service;
|
||||
|
||||
/**
|
||||
* 발송메일을 상세 조회하는 비즈니스 인터페이스 클래스
|
||||
* @author 공통서비스 개발팀 박지욱
|
||||
* @since 2009.03.12
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.12 박지욱 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
public interface EgovSndngMailDetailService {
|
||||
|
||||
/**
|
||||
* 발송메일을 상세 조회한다.
|
||||
* @param vo SndngMailVO
|
||||
* @return SndngMailVO
|
||||
* @exception Exception
|
||||
*/
|
||||
SndngMailVO selectSndngMail(SndngMailVO vo) throws Exception;
|
||||
|
||||
/**
|
||||
* 발송메일을 삭제한다.
|
||||
* @param vo SndngMailVO
|
||||
* @exception
|
||||
*/
|
||||
void deleteSndngMail(SndngMailVO vo) throws Exception;
|
||||
|
||||
/**
|
||||
* 첨부파일을 삭제한다.
|
||||
* @param vo SndngMailVO
|
||||
* @exception
|
||||
*/
|
||||
void deleteAtchmnFile(SndngMailVO vo) throws Exception;
|
||||
}
|
||||
@ -0,0 +1,47 @@
|
||||
package egovframework.com.cop.ems.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.com.cmm.ComDefaultVO;
|
||||
|
||||
/**
|
||||
* 발송메일 내역을 조회하는 비즈니스 인터페이스 클래스
|
||||
* @author 공통서비스 개발팀 박지욱
|
||||
* @since 2009.03.12
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.12 박지욱 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
public interface EgovSndngMailDtlsService {
|
||||
|
||||
/**
|
||||
* 발송메일 목록을 조회한다.
|
||||
* @param vo ComDefaultVO
|
||||
* @return List
|
||||
* @exception Exception
|
||||
*/
|
||||
List<?> selectSndngMailList(ComDefaultVO vo) throws Exception;
|
||||
|
||||
/**
|
||||
* 발송메일 총건수를 조회한다.
|
||||
* @param vo ComDefaultVO
|
||||
* @return int
|
||||
* @exception
|
||||
*/
|
||||
int selectSndngMailListTotCnt(ComDefaultVO vo) throws Exception;
|
||||
|
||||
/**
|
||||
* 발송메일을 삭제한다.
|
||||
* @param vo SndngMailVO
|
||||
* @exception
|
||||
*/
|
||||
void deleteSndngMailList(SndngMailVO vo) throws Exception;
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
package egovframework.com.cop.ems.service;
|
||||
|
||||
/**
|
||||
* 발송메일등록, 발송요청XML파일 생성하는 비즈니스 인터페이스 클래스
|
||||
* @author 공통서비스 개발팀 박지욱
|
||||
* @since 2009.03.12
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.12 박지욱 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
public interface EgovSndngMailRegistService {
|
||||
|
||||
/**
|
||||
* 발송할 메일을 등록한다
|
||||
* @param vo SndngMailVO
|
||||
* @return boolean
|
||||
* @exception Exception
|
||||
*/
|
||||
boolean insertSndngMail(SndngMailVO vo) throws Exception;
|
||||
|
||||
/**
|
||||
* 발송할 메일을 XML파일로 만들어 저장한다.
|
||||
* @param vo SndngMailVO
|
||||
* @return boolean
|
||||
* @exception Exception
|
||||
*/
|
||||
public boolean trnsmitXmlData(SndngMailVO vo) throws Exception;
|
||||
|
||||
/**
|
||||
* 발송메일 발송결과 XML파일을 읽어 발송결과코드에 수정한다.
|
||||
* @param xml String
|
||||
* @return boolean
|
||||
* @exception Exception
|
||||
*/
|
||||
public boolean recptnXmlData(String xml) throws Exception;
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package egovframework.com.cop.ems.service;
|
||||
|
||||
/**
|
||||
* 메일 솔루션과 연동해서 이용해서 메일을 보내는 서비스 클래스
|
||||
* @since 2011.09.09
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2011.09.09 서준식 최초 작성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
public interface EgovSndngMailService {
|
||||
|
||||
/**
|
||||
* 메일을 발송한다
|
||||
* @param vo SndngMailVO
|
||||
* @return boolean
|
||||
* @exception Exception
|
||||
*/
|
||||
boolean sndngMail(SndngMailVO vo) throws Exception;
|
||||
}
|
||||
147
src/main/java/egovframework/com/cop/ems/service/SndngMail.java
Normal file
147
src/main/java/egovframework/com/cop/ems/service/SndngMail.java
Normal file
@ -0,0 +1,147 @@
|
||||
package egovframework.com.cop.ems.service;
|
||||
|
||||
/**
|
||||
* 발송메일 모델 클래스
|
||||
* @author 공통서비스 개발팀 박지욱
|
||||
* @since 2009.03.12
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.12 박지욱 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
public class SndngMail {
|
||||
|
||||
/** 발신자 */
|
||||
public String dsptchPerson;
|
||||
/** 내용 */
|
||||
public String emailCn;
|
||||
/** 메시지ID */
|
||||
public String mssageId;
|
||||
/** 수신자 */
|
||||
public String recptnPerson;
|
||||
/** 제목 */
|
||||
public String sj;
|
||||
/** 발송결과코드 */
|
||||
public String sndngResultCode;
|
||||
/** 발신일자 */
|
||||
private String sndngDe;
|
||||
|
||||
/**
|
||||
* dsptchPerson attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getDsptchPerson() {
|
||||
return dsptchPerson;
|
||||
}
|
||||
|
||||
/**
|
||||
* dsptchPerson attribute 값을 설정한다.
|
||||
* @param dsptchPerson String
|
||||
*/
|
||||
public void setDsptchPerson(String dsptchPerson) {
|
||||
this.dsptchPerson = dsptchPerson;
|
||||
}
|
||||
|
||||
/**
|
||||
* emailCn attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getEmailCn() {
|
||||
return emailCn;
|
||||
}
|
||||
|
||||
/**
|
||||
* emailCn attribute 값을 설정한다.
|
||||
* @param emailCn String
|
||||
*/
|
||||
public void setEmailCn(String emailCn) {
|
||||
this.emailCn = emailCn;
|
||||
}
|
||||
|
||||
/**
|
||||
* mssageId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getMssageId() {
|
||||
return mssageId;
|
||||
}
|
||||
|
||||
/**
|
||||
* mssageId attribute 값을 설정한다.
|
||||
* @param mssageId String
|
||||
*/
|
||||
public void setMssageId(String mssageId) {
|
||||
this.mssageId = mssageId;
|
||||
}
|
||||
|
||||
/**
|
||||
* recptnPerson attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getRecptnPerson() {
|
||||
return recptnPerson;
|
||||
}
|
||||
|
||||
/**
|
||||
* recptnPerson attribute 값을 설정한다.
|
||||
* @param recptnPerson String
|
||||
*/
|
||||
public void setRecptnPerson(String recptnPerson) {
|
||||
this.recptnPerson = recptnPerson;
|
||||
}
|
||||
|
||||
/**
|
||||
* sj attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSj() {
|
||||
return sj;
|
||||
}
|
||||
|
||||
/**
|
||||
* sj attribute 값을 설정한다.
|
||||
* @param sj String
|
||||
*/
|
||||
public void setSj(String sj) {
|
||||
this.sj = sj;
|
||||
}
|
||||
|
||||
/**
|
||||
* sndngResultCode attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSndngResultCode() {
|
||||
return sndngResultCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* sndngResultCode attribute 값을 설정한다.
|
||||
* @param sndngResultCode String
|
||||
*/
|
||||
public void setSndngResultCode(String sndngResultCode) {
|
||||
this.sndngResultCode = sndngResultCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* sndngDe attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSndngDe() {
|
||||
return sndngDe;
|
||||
}
|
||||
|
||||
/**
|
||||
* sndngDe attribute 값을 설정한다.
|
||||
* @param sndngDe String
|
||||
*/
|
||||
public void setSndngDe(String sndngDe) {
|
||||
this.sndngDe = sndngDe;
|
||||
}
|
||||
}
|
||||
240
src/main/java/egovframework/com/cop/ems/service/SndngMailVO.java
Normal file
240
src/main/java/egovframework/com/cop/ems/service/SndngMailVO.java
Normal file
@ -0,0 +1,240 @@
|
||||
package egovframework.com.cop.ems.service;
|
||||
|
||||
/**
|
||||
* 발송메일 VO 클래스
|
||||
* @author 공통서비스 개발팀 박지욱
|
||||
* @since 2009.03.12
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.12 박지욱 최초 생성
|
||||
* 2011.12.06 이기하 첨부파일경로(fileStreCours), 첨부파일이름(orignlFileNm) 추가
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
public class SndngMailVO {
|
||||
|
||||
/** 메세지ID */
|
||||
private String mssageId;
|
||||
/** 발신자 */
|
||||
private String dsptchPerson;
|
||||
/** 수신자 */
|
||||
private String recptnPerson;
|
||||
/** 제목 */
|
||||
private String sj;
|
||||
/** 발송결과코드 */
|
||||
private String sndngResultCode;
|
||||
/** 메일내용 */
|
||||
private String emailCn;
|
||||
/** 첨부파일ID */
|
||||
private String atchFileId;
|
||||
/** 첨부파일경로 */
|
||||
private String fileStreCours;
|
||||
/** 첨부파일이름 */
|
||||
private String orignlFileNm;
|
||||
/** 발신일자 */
|
||||
private String sndngDe;
|
||||
/** 첨부파일ID 리스트 */
|
||||
private String atchFileIdList;
|
||||
/** 발송요청XML내용 */
|
||||
private String xmlContent;
|
||||
/** 팝업링크여부(Y/N) */
|
||||
private String link;
|
||||
|
||||
/**
|
||||
* mssageId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getMssageId() {
|
||||
return mssageId;
|
||||
}
|
||||
|
||||
/**
|
||||
* mssageId attribute 값을 설정한다.
|
||||
* @param mssageId String
|
||||
*/
|
||||
public void setMssageId(String mssageId) {
|
||||
this.mssageId = mssageId;
|
||||
}
|
||||
|
||||
/**
|
||||
* dsptchPerson attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getDsptchPerson() {
|
||||
return dsptchPerson;
|
||||
}
|
||||
|
||||
/**
|
||||
* dsptchPerson attribute 값을 설정한다.
|
||||
* @param dsptchPerson String
|
||||
*/
|
||||
public void setDsptchPerson(String dsptchPerson) {
|
||||
this.dsptchPerson = dsptchPerson;
|
||||
}
|
||||
|
||||
/**
|
||||
* recptnPerson attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getRecptnPerson() {
|
||||
return recptnPerson;
|
||||
}
|
||||
|
||||
/**
|
||||
* recptnPerson attribute 값을 설정한다.
|
||||
* @param recptnPerson String
|
||||
*/
|
||||
public void setRecptnPerson(String recptnPerson) {
|
||||
this.recptnPerson = recptnPerson;
|
||||
}
|
||||
|
||||
/**
|
||||
* sj attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSj() {
|
||||
return sj;
|
||||
}
|
||||
|
||||
/**
|
||||
* sj attribute 값을 설정한다.
|
||||
* @param sj String
|
||||
*/
|
||||
public void setSj(String sj) {
|
||||
this.sj = sj;
|
||||
}
|
||||
|
||||
/**
|
||||
* sndngResultCode attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSndngResultCode() {
|
||||
return sndngResultCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* sndngResultCode attribute 값을 설정한다.
|
||||
* @param sndngResultCode String
|
||||
*/
|
||||
public void setSndngResultCode(String sndngResultCode) {
|
||||
this.sndngResultCode = sndngResultCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* emailCn attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getEmailCn() {
|
||||
return emailCn;
|
||||
}
|
||||
|
||||
/**
|
||||
* emailCn attribute 값을 설정한다.
|
||||
* @param emailCn String
|
||||
*/
|
||||
public void setEmailCn(String emailCn) {
|
||||
this.emailCn = emailCn;
|
||||
}
|
||||
|
||||
/**
|
||||
* atchFileId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getAtchFileId() {
|
||||
return atchFileId;
|
||||
}
|
||||
|
||||
/**
|
||||
* atchFileId attribute 값을 설정한다.
|
||||
* @param atchFileId String
|
||||
*/
|
||||
public void setAtchFileId(String atchFileId) {
|
||||
this.atchFileId = atchFileId;
|
||||
}
|
||||
|
||||
public String getFileStreCours() {
|
||||
return fileStreCours;
|
||||
}
|
||||
|
||||
public void setFileStreCours(String fileStreCours) {
|
||||
this.fileStreCours = fileStreCours;
|
||||
}
|
||||
|
||||
public String getOrignlFileNm() {
|
||||
return orignlFileNm;
|
||||
}
|
||||
|
||||
public void setOrignlFileNm(String orignlFileNm) {
|
||||
this.orignlFileNm = orignlFileNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* sndngDe attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSndngDe() {
|
||||
return sndngDe;
|
||||
}
|
||||
|
||||
/**
|
||||
* sndngDe attribute 값을 설정한다.
|
||||
* @param sndngDe String
|
||||
*/
|
||||
public void setSndngDe(String sndngDe) {
|
||||
this.sndngDe = sndngDe;
|
||||
}
|
||||
|
||||
/**
|
||||
* atchFileIdList attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getAtchFileIdList() {
|
||||
return atchFileIdList;
|
||||
}
|
||||
|
||||
/**
|
||||
* atchFileIdList attribute 값을 설정한다.
|
||||
* @param atchFileIdList String
|
||||
*/
|
||||
public void setAtchFileIdList(String atchFileIdList) {
|
||||
this.atchFileIdList = atchFileIdList;
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlContent attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getXmlContent() {
|
||||
return xmlContent;
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlContent attribute 값을 설정한다.
|
||||
* @param xmlContent String
|
||||
*/
|
||||
public void setXmlContent(String xmlContent) {
|
||||
this.xmlContent = xmlContent;
|
||||
}
|
||||
|
||||
/**
|
||||
* link attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getLink() {
|
||||
return link;
|
||||
}
|
||||
|
||||
/**
|
||||
* link attribute 값을 설정한다.
|
||||
* @param link String
|
||||
*/
|
||||
public void setLink(String link) {
|
||||
this.link = link;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,90 @@
|
||||
package egovframework.com.cop.ems.service.impl;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import egovframework.com.cmm.service.EgovFileMngService;
|
||||
import egovframework.com.cmm.service.FileVO;
|
||||
import egovframework.com.cmm.service.Globals;
|
||||
import egovframework.com.cop.ems.service.EgovSndngMailDetailService;
|
||||
import egovframework.com.cop.ems.service.SndngMailVO;
|
||||
import egovframework.com.utl.sim.service.EgovFileTool;
|
||||
|
||||
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 발송메일을 상세 조회하는 비즈니스 구현 클래스
|
||||
* @author 공통서비스 개발팀 박지욱
|
||||
* @since 2009.03.12
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.12 박지욱 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Service("sndngMailDetailService")
|
||||
public class EgovSndngMailDetailServiceImpl extends EgovAbstractServiceImpl implements EgovSndngMailDetailService {
|
||||
|
||||
// 파일구분자
|
||||
static final char FILE_SEPARATOR = File.separatorChar;
|
||||
|
||||
@Resource(name = "sndngMailDetailDAO")
|
||||
private SndngMailDetailDAO sndngMailDetailDAO;
|
||||
|
||||
@Resource(name = "EgovFileMngService")
|
||||
private EgovFileMngService egovFileMngService;
|
||||
|
||||
/**
|
||||
* 발송메일을 상세 조회한다.
|
||||
* @param vo SndngMailVO
|
||||
* @return SndngMailVO
|
||||
* @exception Exception
|
||||
*/
|
||||
@Override
|
||||
public SndngMailVO selectSndngMail(SndngMailVO vo) throws Exception {
|
||||
|
||||
// 1. 발송메일 정보를 조회한다.
|
||||
SndngMailVO resultMailVO = sndngMailDetailDAO.selectSndngMail(vo);
|
||||
|
||||
return resultMailVO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 발송메일을 삭제한다.
|
||||
* @param vo SndngMailVO
|
||||
* @exception
|
||||
*/
|
||||
@Override
|
||||
public void deleteSndngMail(SndngMailVO vo) throws Exception {
|
||||
|
||||
// 1. 발송메일을 삭제한다.
|
||||
sndngMailDetailDAO.deleteSndngMail(vo);
|
||||
|
||||
// 2. 발송요청XML파일을 삭제한다.
|
||||
String xmlFile = Globals.MAIL_REQUEST_PATH + vo.getMssageId() + ".xml";
|
||||
EgovFileTool.deleteFile(xmlFile);
|
||||
}
|
||||
|
||||
/**
|
||||
* 첨부파일을 삭제한다.
|
||||
* @param vo SndngMailVO
|
||||
* @exception
|
||||
*/
|
||||
@Override
|
||||
public void deleteAtchmnFile(SndngMailVO vo) throws Exception {
|
||||
|
||||
// 1. 첨부파일 목록을 삭제한다. (이삼섭 책임 제공)
|
||||
FileVO fileVO = new FileVO();
|
||||
fileVO.setAtchFileId(vo.getAtchFileId());
|
||||
egovFileMngService.deleteAllFileInf(fileVO);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,90 @@
|
||||
package egovframework.com.cop.ems.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.com.cmm.ComDefaultVO;
|
||||
import egovframework.com.cop.ems.service.EgovSndngMailDetailService;
|
||||
import egovframework.com.cop.ems.service.EgovSndngMailDtlsService;
|
||||
import egovframework.com.cop.ems.service.SndngMailVO;
|
||||
import egovframework.com.utl.fcc.service.EgovStringUtil;
|
||||
|
||||
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 발송메일 내역을 조회하는 비즈니스 구현 클래스
|
||||
* @author 공통서비스 개발팀 박지욱
|
||||
* @since 2009.03.12
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.12 박지욱 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Service("sndngMailDtlsService")
|
||||
public class EgovSndngMailDtlsServiceImpl extends EgovAbstractServiceImpl implements EgovSndngMailDtlsService {
|
||||
|
||||
@Resource(name = "sndngMailDtlsDAO")
|
||||
private SndngMailDtlsDAO sndngMailDtlsDAO;
|
||||
|
||||
@Resource(name = "sndngMailDetailService")
|
||||
private EgovSndngMailDetailService sndngMailDetailService;
|
||||
|
||||
/**
|
||||
* 발송메일 목록을 조회한다.
|
||||
* @param vo ComDefaultVO
|
||||
* @return List
|
||||
* @exception Exception
|
||||
*/
|
||||
@Override
|
||||
public List<?> selectSndngMailList(ComDefaultVO vo) throws Exception {
|
||||
return sndngMailDtlsDAO.selectSndngMailList(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 발송메일 총건수를 조회한다.
|
||||
* @param vo ComDefaultVO
|
||||
* @return int
|
||||
* @exception
|
||||
*/
|
||||
@Override
|
||||
public int selectSndngMailListTotCnt(ComDefaultVO vo) throws Exception {
|
||||
return sndngMailDtlsDAO.selectSndngMailListTotCnt(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 발송메일을 삭제한다.
|
||||
* @param vo SndngMailVO
|
||||
* @exception
|
||||
*/
|
||||
@Override
|
||||
public void deleteSndngMailList(SndngMailVO vo) throws Exception {
|
||||
|
||||
// 1. 발송메일을 삭제한다.
|
||||
String[] sbuf = EgovStringUtil.split(vo.getMssageId(), ",");
|
||||
for (int i = 0; i < sbuf.length; i++) {
|
||||
SndngMailVO sndngMailVO = new SndngMailVO();
|
||||
sndngMailVO.setMssageId(sbuf[i]);
|
||||
sndngMailDetailService.deleteSndngMail(sndngMailVO);
|
||||
}
|
||||
|
||||
// 2. 첨부파일을 삭제한다.
|
||||
if (vo.getAtchFileIdList() != null) {//KISA 보안약점 조치 (2018-10-29, 윤창원)
|
||||
String[] fbuf = EgovStringUtil.split(vo.getAtchFileIdList(), ",");
|
||||
for (int i = 0; i < fbuf.length; i++) {
|
||||
SndngMailVO sndngMailVO = new SndngMailVO();
|
||||
sndngMailVO.setAtchFileId(fbuf[i]);
|
||||
sndngMailDetailService.deleteAtchmnFile(sndngMailVO);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,187 @@
|
||||
package egovframework.com.cop.ems.service.impl;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.com.cmm.service.EgovFileMngService;
|
||||
import egovframework.com.cmm.service.FileVO;
|
||||
import egovframework.com.cmm.service.Globals;
|
||||
import egovframework.com.cop.ems.service.AtchmnFileVO;
|
||||
import egovframework.com.cop.ems.service.EgovSndngMailRegistService;
|
||||
import egovframework.com.cop.ems.service.EgovSndngMailService;
|
||||
import egovframework.com.cop.ems.service.SndngMailVO;
|
||||
import egovframework.com.utl.fcc.service.EgovStringUtil;
|
||||
import egovframework.com.utl.sim.service.EgovXMLDoc;
|
||||
|
||||
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import noNamespace.SndngMailDocument;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 발송메일등록, 발송요청XML파일 생성하는 비즈니스 구현 클래스
|
||||
* @author 공통서비스 개발팀 박지욱
|
||||
* @since 2009.03.12
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.12 박지욱 최초 생성
|
||||
* 2011.07.27 서준식 메일 발송내역 DB 저장시 첨부파일이 없으면 NULL로 변경
|
||||
* 2011.12.06 이기하 메일 첨부파일이 기능 추가
|
||||
* 2015.02.02 표준프레임워크 메일 첨부파일 오류 수정
|
||||
* </pre>
|
||||
*/
|
||||
@Service("sndngMailRegistService")
|
||||
public class EgovSndngMailRegistServiceImpl extends EgovAbstractServiceImpl implements EgovSndngMailRegistService {
|
||||
|
||||
/** SndngMailRegistDAO */
|
||||
@Resource(name = "sndngMailRegistDAO")
|
||||
private SndngMailRegistDAO sndngMailRegistDAO;
|
||||
|
||||
/** Message ID Generation */
|
||||
@Resource(name = "egovMailMsgIdGnrService")
|
||||
private EgovIdGnrService egovMailMsgIdGnrService;
|
||||
|
||||
@Resource(name = "egovSndngMailService")
|
||||
private EgovSndngMailService egovSndngMailService;
|
||||
|
||||
@Resource(name = "EgovFileMngService")
|
||||
private EgovFileMngService fileService;
|
||||
|
||||
/**
|
||||
* 발송할 메일을 등록한다
|
||||
* @param vo SndngMailVO
|
||||
* @return boolean
|
||||
* @exception Exception
|
||||
*/
|
||||
@Override
|
||||
public boolean insertSndngMail(SndngMailVO vo) throws Exception {
|
||||
//KISA 보안약점 조치 (2018-10-29, 윤창원)
|
||||
String recptnPersons = EgovStringUtil.isNullToString(vo.getRecptnPerson()).replaceAll(" ", "");
|
||||
String[] recptnPersonList = recptnPersons.split(";");
|
||||
|
||||
for (int j = 0; j < recptnPersonList.length; j++) {
|
||||
|
||||
// 1-0.메세지ID를 생성한다.
|
||||
String mssageId = egovMailMsgIdGnrService.getNextStringId();
|
||||
|
||||
// 1-1.발송메일 데이터를 만든다.
|
||||
SndngMailVO mailVO = new SndngMailVO();
|
||||
mailVO.setMssageId(mssageId);
|
||||
mailVO.setDsptchPerson(vo.getDsptchPerson());
|
||||
mailVO.setRecptnPerson(recptnPersonList[j]);
|
||||
mailVO.setSj(vo.getSj());
|
||||
//mailVO.setEmailCn(EgovStringUtil.checkHtmlView(vo.getEmailCn()));
|
||||
mailVO.setEmailCn(vo.getEmailCn());
|
||||
mailVO.setSndngResultCode("R"); // 발송결과 요청
|
||||
|
||||
if (vo.getAtchFileId() == null || vo.getAtchFileId().equals("")) {
|
||||
mailVO.setAtchFileId(null);
|
||||
mailVO.setFileStreCours(null);
|
||||
mailVO.setOrignlFileNm(null);
|
||||
} else {
|
||||
FileVO fileVO = new FileVO();
|
||||
fileVO.setAtchFileId(vo.getAtchFileId());
|
||||
fileVO.setFileSn("0");
|
||||
FileVO fvo = fileService.selectFileInf(fileVO);
|
||||
|
||||
File uFile = new File(fvo.getFileStreCours(), fvo.getStreFileNm());
|
||||
|
||||
mailVO.setAtchFileId(vo.getAtchFileId());
|
||||
mailVO.setFileStreCours(uFile.getPath());
|
||||
mailVO.setOrignlFileNm(vo.getOrignlFileNm());
|
||||
}
|
||||
|
||||
// 1-3.발송메일을 등록한다.
|
||||
sndngMailRegistDAO.insertSndngMail(mailVO);
|
||||
|
||||
// 1-4.메일을 발송한다.
|
||||
boolean sendingMailResult = egovSndngMailService.sndngMail(mailVO);
|
||||
|
||||
if (!sendingMailResult) {
|
||||
mailVO.setSndngResultCode("F"); // 발송결과 실패
|
||||
sndngMailRegistDAO.updateSndngMail(mailVO); // 발송상태를 DB에 업데이트 한다.
|
||||
return false;
|
||||
}
|
||||
|
||||
// 1-5.발송메일 요청XML 파일을 생성한다.
|
||||
trnsmitXmlData(mailVO);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 발송할 메일을 XML파일로 만들어 저장한다.
|
||||
* @param vo SndngMailVO
|
||||
* @return boolean
|
||||
* @exception Exception
|
||||
*/
|
||||
@Override
|
||||
public boolean trnsmitXmlData(SndngMailVO vo) throws Exception {
|
||||
|
||||
// 1. 첨부파일 목록 (원파일명, 저장파일명)
|
||||
String orignlFileList = "";
|
||||
String streFileList = "";
|
||||
List<?> atchmnFileList = sndngMailRegistDAO.selectAtchmnFileList(vo);
|
||||
for (int i = 0; i < atchmnFileList.size(); i++) {
|
||||
AtchmnFileVO fileVO = (AtchmnFileVO) atchmnFileList.get(i);
|
||||
String orignlFile = fileVO.getOrignlFileNm();
|
||||
String streFile = fileVO.getFileStreCours() + fileVO.getStreFileNm();
|
||||
orignlFileList += orignlFile + ";";
|
||||
streFileList += streFile + ";";
|
||||
}
|
||||
|
||||
// 2. XML데이터를 만든다.
|
||||
SndngMailDocument mailDoc;
|
||||
SndngMailDocument.SndngMail mailElement;
|
||||
mailDoc = SndngMailDocument.Factory.newInstance();
|
||||
mailElement = mailDoc.addNewSndngMail();
|
||||
mailElement.setMssageId(vo.getMssageId());
|
||||
mailElement.setDsptchPerson(vo.getDsptchPerson());
|
||||
mailElement.setRecptnPerson(vo.getRecptnPerson());
|
||||
mailElement.setSj(vo.getSj());
|
||||
mailElement.setEmailCn(vo.getEmailCn());
|
||||
mailElement.setSndngResultCode(vo.getSndngResultCode());
|
||||
mailElement.setOrignlFileList(orignlFileList);
|
||||
mailElement.setStreFileList(streFileList);
|
||||
|
||||
// 2. XML파일로 저장한다.
|
||||
String xmlFile = Globals.MAIL_REQUEST_PATH + vo.getMssageId() + ".xml";
|
||||
boolean result = EgovXMLDoc.getClassToXML(mailDoc, xmlFile);
|
||||
if (result == true) {
|
||||
recptnXmlData(xmlFile);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 발송메일 발송결과 XML파일을 읽어 발송결과코드에 수정한다.
|
||||
* @param xml String
|
||||
* @return boolean
|
||||
* @exception Exception
|
||||
*/
|
||||
@Override
|
||||
public boolean recptnXmlData(String xmlFile) throws Exception {
|
||||
|
||||
// 1. XML파일에서 발송결과코드를 가져온다.
|
||||
SndngMailDocument mailDoc = EgovXMLDoc.getXMLToClass(xmlFile);
|
||||
SndngMailDocument.SndngMail mailElement = mailDoc.getSndngMail();
|
||||
SndngMailVO sndngMailVO = new SndngMailVO();
|
||||
sndngMailVO.setMssageId(mailElement.getMssageId());
|
||||
sndngMailVO.setSndngResultCode("C"); // 발송결과 완료
|
||||
|
||||
// 2. DB에 업데이트 한다.
|
||||
sndngMailRegistDAO.updateSndngMail(sndngMailVO);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,112 @@
|
||||
package egovframework.com.cop.ems.service.impl;
|
||||
|
||||
import egovframework.com.cop.ems.service.EgovMultiPartEmail;
|
||||
import egovframework.com.cop.ems.service.EgovSndngMailService;
|
||||
import egovframework.com.cop.ems.service.SndngMailVO;
|
||||
|
||||
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.apache.commons.mail.EmailAttachment;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.mail.MailAuthenticationException;
|
||||
import org.springframework.mail.MailParseException;
|
||||
import org.springframework.mail.MailSendException;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 메일 솔루션과 연동해서 이용해서 메일을 보내는 서비스 구현 클래스
|
||||
* @since 2011.09.09
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2011.09.09 서준식 최초 작성
|
||||
* 2011.12.06 이기하 메일 첨부파일이 기능 추가
|
||||
* 2013.05.23 이기하 메일 첨부파일이 없을 때 로직 추가
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Service("egovSndngMailService")
|
||||
public class EgovSndngMailServiceImpl extends EgovAbstractServiceImpl implements EgovSndngMailService {
|
||||
|
||||
@Resource(name = "egovMultiPartEmail")
|
||||
private EgovMultiPartEmail egovMultiPartEmail;
|
||||
|
||||
/** SndngMailRegistDAO */
|
||||
@Resource(name = "sndngMailRegistDAO")
|
||||
private SndngMailRegistDAO sndngMailRegistDAO;
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(EgovSndngMailServiceImpl.class);
|
||||
|
||||
/**
|
||||
* 메일을 발송한다
|
||||
* @param vo SndngMailVO
|
||||
* @return boolean
|
||||
* @exception Exception
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("unused")
|
||||
public boolean sndngMail(SndngMailVO sndngMailVO) throws Exception {
|
||||
|
||||
String recptnPerson = (sndngMailVO.getRecptnPerson() == null) ? "" : sndngMailVO.getRecptnPerson(); // 수신자
|
||||
String subject = (sndngMailVO.getSj() == null) ? "" : sndngMailVO.getSj(); // 메일제목
|
||||
String emailCn = (sndngMailVO.getEmailCn() == null) ? "" : sndngMailVO.getEmailCn(); // 메일내용
|
||||
String atchmnFileNm = (sndngMailVO.getOrignlFileNm() == null) ? "" : sndngMailVO.getOrignlFileNm(); // 첨부파일이름
|
||||
String atchmnFilePath = (sndngMailVO.getFileStreCours() == null) ? "" : sndngMailVO.getFileStreCours(); // 첨부파일경로
|
||||
|
||||
try {
|
||||
EmailAttachment attachment = new EmailAttachment();
|
||||
// 첨부파일이 있을 때
|
||||
if (atchmnFileNm != "" && atchmnFileNm != null && atchmnFilePath != "" && atchmnFilePath != null) {
|
||||
// 첨부할 attachment 정보를 생성합니다
|
||||
attachment.setPath(atchmnFilePath);
|
||||
attachment.setDisposition(EmailAttachment.ATTACHMENT);
|
||||
attachment.setDescription("첨부파일입니다");
|
||||
//attachment.setName(new String(atchmnFileNm.getBytes("UTF-8"),"latin1")); // 구버전의 경우 필요
|
||||
attachment.setName(atchmnFileNm);
|
||||
|
||||
// 2015.05.08 주석수정 - 첨부파일 정보를 포함한 메일을 전송합니다
|
||||
egovMultiPartEmail.send(recptnPerson, subject, emailCn, attachment);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 메일을 전송합니다
|
||||
egovMultiPartEmail.send(recptnPerson, subject, emailCn);
|
||||
}
|
||||
|
||||
Throwable t = new Throwable();
|
||||
|
||||
} catch (MailParseException ex) {
|
||||
sndngMailVO.setSndngResultCode("F"); // 발송결과 실패
|
||||
sndngMailRegistDAO.updateSndngMail(sndngMailVO); // 발송상태를 DB에 업데이트 한다.
|
||||
LOGGER.error("Sending Mail Exception : {} [failure when parsing the message]", ex.getCause());
|
||||
return false;
|
||||
} catch (MailAuthenticationException ex) {
|
||||
sndngMailVO.setSndngResultCode("F"); // 발송결과 실패
|
||||
sndngMailRegistDAO.updateSndngMail(sndngMailVO); // 발송상태를 DB에 업데이트 한다.
|
||||
LOGGER.error("Sending Mail Exception : {} [authentication failure]", ex.getCause());
|
||||
return false;
|
||||
} catch (MailSendException ex) {
|
||||
sndngMailVO.setSndngResultCode("F"); // 발송결과 실패
|
||||
sndngMailRegistDAO.updateSndngMail(sndngMailVO); // 발송상태를 DB에 업데이트 한다.
|
||||
LOGGER.error("Sending Mail Exception : {} [failure when sending the message]", ex.getCause());
|
||||
return false;
|
||||
} catch (Exception ex) {
|
||||
sndngMailVO.setSndngResultCode("F"); // 발송결과 실패
|
||||
sndngMailRegistDAO.updateSndngMail(sndngMailVO); // 발송상태를 DB에 업데이트 한다.
|
||||
LOGGER.error("Sending Mail Exception : {} [unknown Exception]", ex.getCause());
|
||||
LOGGER.debug(ex.getMessage());
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
package egovframework.com.cop.ems.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
|
||||
import egovframework.com.cop.ems.service.SndngMailVO;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 발송메일을 상세 조회하는 DAO 클래스
|
||||
* @author 공통서비스 개발팀 박지욱
|
||||
* @since 2009.03.12
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.12 박지욱 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Repository("sndngMailDetailDAO")
|
||||
public class SndngMailDetailDAO extends EgovComAbstractDAO {
|
||||
|
||||
/**
|
||||
* 발송메일을 상세 조회한다.
|
||||
* @param vo SndngMailVO
|
||||
* @return SndngMailVO
|
||||
* @exception Exception
|
||||
*/
|
||||
public SndngMailVO selectSndngMail(SndngMailVO vo) throws Exception {
|
||||
return (SndngMailVO) selectOne("sndngMailDetailDAO.selectSndngMail", vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 발송메일에 첨부된 파일목록을 조회한다.
|
||||
* @param vo SndngMailVO
|
||||
* @return List
|
||||
* @exception
|
||||
*/
|
||||
public List<?> selectAtchmnFileList(SndngMailVO vo) {
|
||||
return list("sndngMailDetailDAO.selectAtchmnFileList", vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 발송메일을 삭제한다.
|
||||
* @param vo SndngMailVO
|
||||
* @exception
|
||||
*/
|
||||
public void deleteSndngMail(SndngMailVO vo) throws Exception {
|
||||
delete("sndngMailDetailDAO.deleteSndngMail", vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 첨부파일 목록을 삭제한다.
|
||||
* @param vo SndngMailVO
|
||||
* @exception
|
||||
*/
|
||||
public void deleteAtchmnFileList(SndngMailVO vo) throws Exception {
|
||||
delete("sndngMailDetailDAO.deleteAtchmnFileList", vo);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
package egovframework.com.cop.ems.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.com.cmm.ComDefaultVO;
|
||||
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 발송메일 내역을 조회하는 DAO 클래스
|
||||
* @author 공통서비스 개발팀 박지욱
|
||||
* @since 2009.03.12
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.12 박지욱 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Repository("sndngMailDtlsDAO")
|
||||
public class SndngMailDtlsDAO extends EgovComAbstractDAO {
|
||||
|
||||
/**
|
||||
* 발송메일 목록을 조회한다.
|
||||
* @param vo ComDefaultVO
|
||||
* @return List
|
||||
* @exception Exception
|
||||
*/
|
||||
public List<?> selectSndngMailList(ComDefaultVO vo) throws Exception {
|
||||
return list("SndngMailDtlsDAO.selectSndngMailList_D", vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 발송메일 총건수를 조회한다.
|
||||
* @param vo ComDefaultVO
|
||||
* @return int
|
||||
* @exception
|
||||
*/
|
||||
public int selectSndngMailListTotCnt(ComDefaultVO vo) {
|
||||
return (Integer) selectOne("SndngMailDtlsDAO.selectSndngMailListTotCnt_S", vo);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,60 @@
|
||||
package egovframework.com.cop.ems.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
|
||||
import egovframework.com.cop.ems.service.SndngMailVO;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 발송메일을 등록하는 DAO 클래스
|
||||
* @author 공통서비스 개발팀 박지욱
|
||||
* @since 2009.03.12
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.12 박지욱 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Repository("sndngMailRegistDAO")
|
||||
public class SndngMailRegistDAO extends EgovComAbstractDAO {
|
||||
|
||||
/**
|
||||
* 발송할 메일을 등록한다
|
||||
* @param vo SndngMailVO
|
||||
* @return SndngMailVO
|
||||
* @exception Exception
|
||||
*/
|
||||
public SndngMailVO insertSndngMail(SndngMailVO vo) throws Exception {
|
||||
insert("sndngMailRegistDAO.insertSndngMail", vo);
|
||||
return new SndngMailVO() ;
|
||||
}
|
||||
|
||||
/**
|
||||
* 발송할 메일에 있는 첨부파일 목록을 조회한다.
|
||||
* @param vo SndngMailVO
|
||||
* @return List
|
||||
* @exception Exception
|
||||
*/
|
||||
public List<?> selectAtchmnFileList(SndngMailVO vo) throws Exception {
|
||||
return selectList("sndngMailRegistDAO.selectAtchmnFileList", vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 발송결과를 수정한다.
|
||||
* @param vo SndngMailVO
|
||||
* @return SndngMailVO
|
||||
* @exception Exception
|
||||
*/
|
||||
public SndngMailVO updateSndngMail(SndngMailVO vo) throws Exception {
|
||||
update("sndngMailRegistDAO.updateSndngMail", vo);
|
||||
return new SndngMailVO();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,163 @@
|
||||
package egovframework.com.cop.ems.web;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
import egovframework.com.cmm.EgovWebUtil;
|
||||
import egovframework.com.cmm.service.Globals;
|
||||
import egovframework.com.cop.ems.service.EgovSndngMailDetailService;
|
||||
import egovframework.com.cop.ems.service.SndngMailVO;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
/**
|
||||
* 발송메일을 상세 조회하는 컨트롤러 클래스
|
||||
* @author 공통서비스 개발팀 박지욱
|
||||
* @since 2009.03.12
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.12 박지욱 최초 생성
|
||||
* 2011.10.10 이기하 보안점검 후속조치(교차접속 스크립트 공격 취약성 방지(파라미터 문자열 교체),
|
||||
* HTTP 응답분할 방지)
|
||||
* 2017.03.03 조성원 시큐어코딩(ES)-부적절한 예외 처리[CWE-253, CWE-440, CWE-754]
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Controller
|
||||
public class EgovSndngMailDetailController {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(EgovSndngMailDetailController.class);
|
||||
|
||||
/** EgovSndngMailDetailService */
|
||||
@Resource(name = "sndngMailDetailService")
|
||||
private EgovSndngMailDetailService sndngMailDetailService;
|
||||
|
||||
/**
|
||||
* 발송메일을 상세 조회한다.
|
||||
* @param sndngMailVO SndngMailVO
|
||||
* @return String
|
||||
* @exception Exception
|
||||
*/
|
||||
@RequestMapping(value = "/cop/ems/selectSndngMailDetail.do")
|
||||
public String selectSndngMail(@ModelAttribute("sndngMailVO") SndngMailVO sndngMailVO, ModelMap model) throws Exception {
|
||||
|
||||
if (sndngMailVO == null || sndngMailVO.getMssageId() == null || sndngMailVO.getMssageId().equals("")) {
|
||||
return "egovframework/com/cmm/egovError";
|
||||
}
|
||||
|
||||
// 1. 발송메일을 상세 조회한다.
|
||||
SndngMailVO resultMailVO = sndngMailDetailService.selectSndngMail(sndngMailVO);
|
||||
|
||||
// 2. 결과 리턴
|
||||
model.addAttribute("resultInfo", resultMailVO);
|
||||
if (!resultMailVO.getMssageId().equals("")) {
|
||||
// 발송메일 상세조회 화면 이동
|
||||
return "egovframework/com/cop/ems/EgovMailDetail";
|
||||
} else {
|
||||
// 오류 페이지 이동
|
||||
return "egovframework/com/cmm/egovError";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 발송메일을 삭제한다.
|
||||
* @param sndngMailVO SndngMailVO
|
||||
* @return String
|
||||
* @exception Exception
|
||||
*/
|
||||
@RequestMapping(value = "/cop/ems/deleteSndngMail.do")
|
||||
public String deleteSndngMail(@ModelAttribute("sndngMailVO") SndngMailVO sndngMailVO, ModelMap model) throws Exception {
|
||||
|
||||
if (sndngMailVO == null || sndngMailVO.getMssageId() == null || sndngMailVO.getMssageId().equals("")) {
|
||||
return "egovframework/com/cmm/egovError";
|
||||
}
|
||||
|
||||
// 1. 발송메일을 삭제한다.
|
||||
sndngMailDetailService.deleteSndngMail(sndngMailVO);
|
||||
|
||||
// 2. 첨부파일을 삭제한다.
|
||||
sndngMailDetailService.deleteAtchmnFile(sndngMailVO);
|
||||
|
||||
// 3. 발송메일 목록 페이지 이동
|
||||
return "redirect:/cop/ems/selectSndngMailList.do";
|
||||
}
|
||||
|
||||
/**
|
||||
* 발송메일 내용조회로 돌아간다.
|
||||
* @param sndngMailVO SndngMailVO
|
||||
* @return String
|
||||
* @exception Exception
|
||||
*/
|
||||
@RequestMapping(value = "/cop/ems/backSndngMailDetail.do")
|
||||
public String backSndngMailDtls(@ModelAttribute("sndngMailVO") SndngMailVO sndngMailVO, ModelMap model) throws Exception {
|
||||
|
||||
return "redirect:/cop/ems/selectSndngMailList.do";
|
||||
}
|
||||
|
||||
/**
|
||||
* XML형태의 발송요청메일을 조회한다.
|
||||
* @param sndngMailVO SndngMailVO
|
||||
* @exception Exception
|
||||
*/
|
||||
@RequestMapping(value = "/cop/ems/selectSndngMailXml.do")
|
||||
public void selectSndngMailXml(@ModelAttribute("sndngMailVO") SndngMailVO sndngMailVO, HttpServletResponse response, ModelMap model) throws Exception {
|
||||
String xmlFile = Globals.MAIL_REQUEST_PATH + sndngMailVO.getMssageId() + ".xml";
|
||||
File uFile = new File(EgovWebUtil.filePathBlackList(xmlFile));
|
||||
int fSize = (int) uFile.length();
|
||||
|
||||
if (fSize > 0) {
|
||||
String mimetype = "application/x-msdownload;charset=UTF-8";
|
||||
|
||||
response.setContentType(mimetype);
|
||||
response.setHeader("Content-Disposition", "attachment; filename=\"" + uFile.getName() + "\"");
|
||||
response.setContentLength(fSize);
|
||||
|
||||
BufferedInputStream in = null;
|
||||
try {
|
||||
in = new BufferedInputStream(new FileInputStream(uFile));
|
||||
FileCopyUtils.copy(in, response.getOutputStream());
|
||||
} finally {
|
||||
if (in != null) {
|
||||
try {
|
||||
in.close();
|
||||
//2017.03.03 조성원 시큐어코딩(ES)-부적절한 예외 처리[CWE-253, CWE-440, CWE-754]
|
||||
}catch (IOException ignore){
|
||||
LOGGER.error("[IOException] : Connection Close");
|
||||
} catch (Exception ignore) {
|
||||
LOGGER.error("["+ ignore.getClass() +"] : Connection Close ", ignore.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
response.getOutputStream().flush();
|
||||
response.getOutputStream().close();
|
||||
} else {
|
||||
response.setContentType("application/x-msdownload");
|
||||
PrintWriter printwriter = response.getWriter();
|
||||
printwriter.println("<html>");
|
||||
printwriter.println("<br><br><br><h2>Could not get file name:<br>" + EgovWebUtil.clearXSSMinimum(xmlFile) + "</h2>");
|
||||
printwriter.println("<br><br><br><center><h3><a href='javascript: history.go(-1)'>Back</a></h3></center>");
|
||||
printwriter.println("<br><br><br>© webAccess");
|
||||
printwriter.println("</html>");
|
||||
printwriter.flush();
|
||||
printwriter.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,107 @@
|
||||
package egovframework.com.cop.ems.web;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.com.cmm.ComDefaultVO;
|
||||
import egovframework.com.cmm.EgovMessageSource;
|
||||
import egovframework.com.cmm.annotation.IncludedInfo;
|
||||
import egovframework.com.cop.ems.service.EgovSndngMailDtlsService;
|
||||
import egovframework.com.cop.ems.service.SndngMailVO;
|
||||
|
||||
import egovframework.rte.fdl.property.EgovPropertyService;
|
||||
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
/**
|
||||
* 발송메일 내역을 조회하는 컨트롤러 클래스
|
||||
* @author 공통서비스 개발팀 박지욱
|
||||
* @since 2009.03.12
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.12 박지욱 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Controller
|
||||
public class EgovSndngMailDtlsController {
|
||||
|
||||
/** EgovSndngMailDtlsService */
|
||||
@Resource(name = "sndngMailDtlsService")
|
||||
private EgovSndngMailDtlsService sndngMailDtlsService;
|
||||
|
||||
/** EgovPropertyService */
|
||||
@Resource(name = "propertiesService")
|
||||
protected EgovPropertyService propertiesService;
|
||||
|
||||
/** EgovMessageSource */
|
||||
@Resource(name = "egovMessageSource")
|
||||
EgovMessageSource egovMessageSource;
|
||||
|
||||
/**
|
||||
* 발송메일 내역을 조회한다
|
||||
* @param searchVO ComDefaultVO
|
||||
* @return String
|
||||
* @exception Exception
|
||||
*/
|
||||
@IncludedInfo(name = "발송메일내역", order = 361, gid = 40)
|
||||
@RequestMapping(value = "/cop/ems/selectSndngMailList.do")
|
||||
public String selectSndngMailList(@ModelAttribute("searchVO") ComDefaultVO searchVO, ModelMap model) throws Exception {
|
||||
|
||||
// 발송메일 내역 조회
|
||||
/** EgovPropertyService.sample */
|
||||
searchVO.setPageUnit(propertiesService.getInt("pageUnit"));
|
||||
searchVO.setPageSize(propertiesService.getInt("pageSize"));
|
||||
|
||||
/** pageing */
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
|
||||
paginationInfo.setPageSize(searchVO.getPageSize());
|
||||
|
||||
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
List<?> sndngMailList = sndngMailDtlsService.selectSndngMailList(searchVO);
|
||||
model.addAttribute("resultList", sndngMailList);
|
||||
|
||||
int totCnt = sndngMailDtlsService.selectSndngMailListTotCnt(searchVO);
|
||||
paginationInfo.setTotalRecordCount(totCnt);
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
model.addAttribute("message", egovMessageSource.getMessage("success.common.select"));
|
||||
|
||||
return "egovframework/com/cop/ems/EgovMailDtls";
|
||||
}
|
||||
|
||||
/**
|
||||
* 발송메일을 삭제한다.
|
||||
* @param sndngMailVO SndngMailVO
|
||||
* @return String
|
||||
* @exception
|
||||
*/
|
||||
@RequestMapping(value = "/cop/ems/deleteSndngMailList.do")
|
||||
public String deleteSndngMailList(@ModelAttribute("sndngMailVO") SndngMailVO sndngMailVO, ModelMap model) throws Exception {
|
||||
|
||||
if (sndngMailVO == null || sndngMailVO.getMssageId() == null || sndngMailVO.getMssageId().equals("")) {
|
||||
return "egovframework/com/cmm/egovError";
|
||||
}
|
||||
|
||||
// 1. 발송메일을 삭제한다.
|
||||
sndngMailDtlsService.deleteSndngMailList(sndngMailVO);
|
||||
|
||||
// 2. 발송메일 목록 페이지 이동
|
||||
return "redirect:/cop/ems/selectSndngMailList.do";
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,148 @@
|
||||
package egovframework.com.cop.ems.web;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import egovframework.com.cmm.LoginVO;
|
||||
import egovframework.com.cmm.annotation.IncludedInfo;
|
||||
import egovframework.com.cmm.service.EgovFileMngService;
|
||||
import egovframework.com.cmm.service.EgovFileMngUtil;
|
||||
import egovframework.com.cmm.service.FileVO;
|
||||
import egovframework.com.cmm.util.EgovUserDetailsHelper;
|
||||
import egovframework.com.cop.ems.service.EgovSndngMailRegistService;
|
||||
import egovframework.com.cop.ems.service.SndngMailVO;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
|
||||
/**
|
||||
* 발송메일등록, 발송요청XML파일 생성하는 컨트롤러 클래스
|
||||
* @author 공통서비스 개발팀 박지욱
|
||||
* @since 2009.03.12
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2009.03.12 박지욱 최초 생성
|
||||
* 2011.12.06 이기하 메일 첨부파일이 기능 추가
|
||||
* 2015.05.08 조정국 오류페이지 표시 경로 수정 - insertSndngMail()
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Controller
|
||||
public class EgovSndngMailRegistController {
|
||||
|
||||
/** EgovSndngMailRegistService */
|
||||
@Resource(name = "sndngMailRegistService")
|
||||
private EgovSndngMailRegistService sndngMailRegistService;
|
||||
|
||||
/** EgovFileMngService */
|
||||
@Resource(name = "EgovFileMngService")
|
||||
private EgovFileMngService fileMngService;
|
||||
|
||||
/** EgovFileMngUtil */
|
||||
@Resource(name = "EgovFileMngUtil")
|
||||
private EgovFileMngUtil fileUtil;
|
||||
|
||||
/** 파일구분자 */
|
||||
static final char FILE_SEPARATOR = File.separatorChar;
|
||||
|
||||
/**
|
||||
* 발송메일 등록화면으로 들어간다
|
||||
* @param sndngMailVO SndngMailVO
|
||||
* @return String
|
||||
* @exception Exception
|
||||
*/
|
||||
@IncludedInfo(name = "메일발송", order = 360, gid = 40)
|
||||
@RequestMapping(value = "/cop/ems/insertSndngMailView.do")
|
||||
public String insertSndngMailView(@ModelAttribute("sndngMailVO") SndngMailVO sndngMailVO, ModelMap model) throws Exception {
|
||||
|
||||
model.addAttribute("resultInfo", sndngMailVO);
|
||||
return "egovframework/com/cop/ems/EgovMailRegist";
|
||||
}
|
||||
|
||||
/**
|
||||
* 발송메일을 등록한다
|
||||
* @param multiRequest MultipartHttpServletRequest
|
||||
* @param sndngMailVO SndngMailVO
|
||||
* @return String
|
||||
* @exception Exception
|
||||
*/
|
||||
@RequestMapping(value = "/cop/ems/insertSndngMail.do")
|
||||
public String insertSndngMail(final MultipartHttpServletRequest multiRequest, @ModelAttribute("sndngMailVO") SndngMailVO sndngMailVO, ModelMap model, HttpServletRequest request)
|
||||
throws Exception {
|
||||
|
||||
String link = "N";
|
||||
if (sndngMailVO != null && sndngMailVO.getLink() != null && !sndngMailVO.getLink().equals("")) {
|
||||
link = sndngMailVO.getLink();
|
||||
}
|
||||
|
||||
LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
|
||||
// KISA 보안취약점 조치 (2018-12-10, 신용호)
|
||||
Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
|
||||
|
||||
if(!isAuthenticated) {
|
||||
return "egovframework/com/uat/uia/EgovLoginUsr";
|
||||
}
|
||||
|
||||
List<FileVO> _result = new ArrayList<FileVO>();
|
||||
String _atchFileId = "";
|
||||
final Map<String, MultipartFile> files = multiRequest.getFileMap();
|
||||
if (!files.isEmpty()) {
|
||||
_result = fileUtil.parseFileInf(files, "MSG_", 0, "", "");
|
||||
_atchFileId = fileMngService.insertFileInfs(_result); //파일이 생성되고나면 생성된 첨부파일 ID를 리턴한다.
|
||||
|
||||
}
|
||||
|
||||
String orignlFileList = "";
|
||||
|
||||
for (int i = 0; i < _result.size(); i++) {
|
||||
FileVO fileVO = _result.get(i);
|
||||
orignlFileList = fileVO.getOrignlFileNm();
|
||||
}
|
||||
|
||||
if (sndngMailVO != null) {
|
||||
sndngMailVO.setAtchFileId(_atchFileId);
|
||||
sndngMailVO.setDsptchPerson(user.getId());
|
||||
sndngMailVO.setOrignlFileNm(orignlFileList);
|
||||
}
|
||||
|
||||
// 발송메일을 등록한다.
|
||||
boolean result = sndngMailRegistService.insertSndngMail(sndngMailVO);
|
||||
if (result) {
|
||||
if (link.equals("N")) {
|
||||
return "redirect:/cop/ems/selectSndngMailList.do";
|
||||
} else {
|
||||
model.addAttribute("closeYn", "Y");
|
||||
return "egovframework/com/cop/ems/EgovMailRegist";
|
||||
}
|
||||
} else {
|
||||
return "egovframework/com/cmm/error/egovError";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 발송메일 내용조회로 돌아간다.
|
||||
* @param sndngMailVO SndngMailVO
|
||||
* @return String
|
||||
* @exception Exception
|
||||
*/
|
||||
@RequestMapping(value = "/cop/ems/backSndngMailRegist.do")
|
||||
public String backSndngMailRegist(@ModelAttribute("sndngMailVO") SndngMailVO sndngMailVO, ModelMap model) throws Exception {
|
||||
|
||||
return "redirect:/cop/ems/selectSndngMailList.do";
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,124 @@
|
||||
package egovframework.com.sec.ram.service;
|
||||
|
||||
import egovframework.com.cmm.ComDefaultVO;
|
||||
|
||||
/**
|
||||
* 권한관리에 대한 model 클래스를 정의한다.
|
||||
* @author 공통서비스 개발팀 이문준
|
||||
* @since 2009.06.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.20 이문준 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
public class AuthorManage extends ComDefaultVO {
|
||||
|
||||
/**
|
||||
* serialVersionUID
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 권한관리
|
||||
*/
|
||||
private AuthorManage authorManage;
|
||||
/**
|
||||
* 권한코드
|
||||
*/
|
||||
private String authorCode;
|
||||
/**
|
||||
* 권한등록일자
|
||||
*/
|
||||
private String authorCreatDe;
|
||||
/**
|
||||
* 권한코드설명
|
||||
*/
|
||||
private String authorDc;
|
||||
/**
|
||||
* 권한 명
|
||||
*/
|
||||
private String authorNm;
|
||||
|
||||
/**
|
||||
* authorManage attribute 를 리턴한다.
|
||||
* @return AuthorManage
|
||||
*/
|
||||
public AuthorManage getAuthorManage() {
|
||||
return authorManage;
|
||||
}
|
||||
/**
|
||||
* authorManage attribute 값을 설정한다.
|
||||
* @param authorManage AuthorManage
|
||||
*/
|
||||
public void setAuthorManage(AuthorManage authorManage) {
|
||||
this.authorManage = authorManage;
|
||||
}
|
||||
/**
|
||||
* authorCode attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getAuthorCode() {
|
||||
return authorCode;
|
||||
}
|
||||
/**
|
||||
* authorCode attribute 값을 설정한다.
|
||||
* @param authorCode String
|
||||
*/
|
||||
public void setAuthorCode(String authorCode) {
|
||||
this.authorCode = authorCode;
|
||||
}
|
||||
/**
|
||||
* authorCreatDe attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getAuthorCreatDe() {
|
||||
return authorCreatDe;
|
||||
}
|
||||
/**
|
||||
* authorCreatDe attribute 값을 설정한다.
|
||||
* @param authorCreatDe String
|
||||
*/
|
||||
public void setAuthorCreatDe(String authorCreatDe) {
|
||||
this.authorCreatDe = authorCreatDe;
|
||||
}
|
||||
/**
|
||||
* authorDc attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getAuthorDc() {
|
||||
return authorDc;
|
||||
}
|
||||
/**
|
||||
* authorDc attribute 값을 설정한다.
|
||||
* @param authorDc String
|
||||
*/
|
||||
public void setAuthorDc(String authorDc) {
|
||||
this.authorDc = authorDc;
|
||||
}
|
||||
/**
|
||||
* authorNm attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getAuthorNm() {
|
||||
return authorNm;
|
||||
}
|
||||
/**
|
||||
* authorNm attribute 값을 설정한다.
|
||||
* @param authorNm String
|
||||
*/
|
||||
public void setAuthorNm(String authorNm) {
|
||||
this.authorNm = authorNm;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,47 @@
|
||||
package egovframework.com.sec.ram.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 권한관리에 대한 Vo 클래스를 정의한다.
|
||||
* @author 공통서비스 개발팀 이문준
|
||||
* @since 2009.06.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.20 이문준 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
public class AuthorManageVO extends AuthorManage {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
List <AuthorManageVO> authorManageList;
|
||||
|
||||
|
||||
/**
|
||||
* authorManageList attribute 를 리턴한다.
|
||||
* @return List<AuthorManageVO>
|
||||
*/
|
||||
public List<AuthorManageVO> getAuthorManageList() {
|
||||
return authorManageList;
|
||||
}
|
||||
|
||||
/**
|
||||
* authorManageList attribute 값을 설정한다.
|
||||
* @param authorManageList List<AuthorManageVO>
|
||||
*/
|
||||
public void setAuthorManageList(List<AuthorManageVO> authorManageList) {
|
||||
this.authorManageList = authorManageList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,210 @@
|
||||
package egovframework.com.sec.ram.service;
|
||||
|
||||
import egovframework.com.cmm.ComDefaultVO;
|
||||
|
||||
/**
|
||||
* 권한별 롤 관리에 대한 model 클래스를 정의한다.
|
||||
* @author 공통서비스 개발팀 이문준
|
||||
* @since 2009.06.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.20 이문준 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
public class AuthorRoleManage extends ComDefaultVO {
|
||||
|
||||
/**
|
||||
* serialVersionUID
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 권한 롤 관리
|
||||
*/
|
||||
private AuthorRoleManage authorRole;
|
||||
/**
|
||||
* 권한코드
|
||||
*/
|
||||
private String authorCode;
|
||||
/**
|
||||
* 롤코드
|
||||
*/
|
||||
private String roleCode;
|
||||
/**
|
||||
* 롤명
|
||||
*/
|
||||
private String roleNm;
|
||||
/**
|
||||
* 롤 패턴
|
||||
*/
|
||||
private String rolePtn;
|
||||
/**
|
||||
* 롤 설명
|
||||
*/
|
||||
private String roleDc;
|
||||
/**
|
||||
* 롤 타입
|
||||
*/
|
||||
private String roleTyp;
|
||||
/**
|
||||
* 롤 순서정렬
|
||||
*/
|
||||
private String roleSort;
|
||||
/**
|
||||
* 롤 등록여부
|
||||
*/
|
||||
private String regYn;
|
||||
/**
|
||||
* 등록일자
|
||||
*/
|
||||
private String creatDt;
|
||||
/**
|
||||
* authorRole attribute 를 리턴한다.
|
||||
* @return AuthorRoleManage
|
||||
*/
|
||||
public AuthorRoleManage getAuthorRole() {
|
||||
return authorRole;
|
||||
}
|
||||
/**
|
||||
* authorRole attribute 값을 설정한다.
|
||||
* @param authorRole AuthorRoleManage
|
||||
*/
|
||||
public void setAuthorRole(AuthorRoleManage authorRole) {
|
||||
this.authorRole = authorRole;
|
||||
}
|
||||
/**
|
||||
* authorCode attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getAuthorCode() {
|
||||
return authorCode;
|
||||
}
|
||||
/**
|
||||
* authorCode attribute 값을 설정한다.
|
||||
* @param authorCode String
|
||||
*/
|
||||
public void setAuthorCode(String authorCode) {
|
||||
this.authorCode = authorCode;
|
||||
}
|
||||
/**
|
||||
* roleCode attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getRoleCode() {
|
||||
return roleCode;
|
||||
}
|
||||
/**
|
||||
* roleCode attribute 값을 설정한다.
|
||||
* @param roleCode String
|
||||
*/
|
||||
public void setRoleCode(String roleCode) {
|
||||
this.roleCode = roleCode;
|
||||
}
|
||||
/**
|
||||
* roleNm attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getRoleNm() {
|
||||
return roleNm;
|
||||
}
|
||||
/**
|
||||
* roleNm attribute 값을 설정한다.
|
||||
* @param roleNm String
|
||||
*/
|
||||
public void setRoleNm(String roleNm) {
|
||||
this.roleNm = roleNm;
|
||||
}
|
||||
/**
|
||||
* rolePtn attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getRolePtn() {
|
||||
return rolePtn;
|
||||
}
|
||||
/**
|
||||
* rolePtn attribute 값을 설정한다.
|
||||
* @param rolePtn String
|
||||
*/
|
||||
public void setRolePtn(String rolePtn) {
|
||||
this.rolePtn = rolePtn;
|
||||
}
|
||||
/**
|
||||
* roleDc attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getRoleDc() {
|
||||
return roleDc;
|
||||
}
|
||||
/**
|
||||
* roleDc attribute 값을 설정한다.
|
||||
* @param roleDc String
|
||||
*/
|
||||
public void setRoleDc(String roleDc) {
|
||||
this.roleDc = roleDc;
|
||||
}
|
||||
/**
|
||||
* roleTyp attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getRoleTyp() {
|
||||
return roleTyp;
|
||||
}
|
||||
/**
|
||||
* roleTyp attribute 값을 설정한다.
|
||||
* @param roleTyp String
|
||||
*/
|
||||
public void setRoleTyp(String roleTyp) {
|
||||
this.roleTyp = roleTyp;
|
||||
}
|
||||
/**
|
||||
* roleSort attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getRoleSort() {
|
||||
return roleSort;
|
||||
}
|
||||
/**
|
||||
* roleSort attribute 값을 설정한다.
|
||||
* @param roleSort String
|
||||
*/
|
||||
public void setRoleSort(String roleSort) {
|
||||
this.roleSort = roleSort;
|
||||
}
|
||||
/**
|
||||
* regYn attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getRegYn() {
|
||||
return regYn;
|
||||
}
|
||||
/**
|
||||
* regYn attribute 값을 설정한다.
|
||||
* @param regYn String
|
||||
*/
|
||||
public void setRegYn(String regYn) {
|
||||
this.regYn = regYn;
|
||||
}
|
||||
/**
|
||||
* creatDt attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getCreatDt() {
|
||||
return creatDt;
|
||||
}
|
||||
/**
|
||||
* creatDt attribute 값을 설정한다.
|
||||
* @param creatDt String
|
||||
*/
|
||||
public void setCreatDt(String creatDt) {
|
||||
this.creatDt = creatDt;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package egovframework.com.sec.ram.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 권한별 롤 관리에 대한 Vo 클래스를 정의한다.
|
||||
* @author 공통서비스 개발팀 이문준
|
||||
* @since 2009.06.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.20 이문준 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
public class AuthorRoleManageVO extends AuthorRoleManage {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
List <AuthorRoleManageVO> authorRoleList;
|
||||
|
||||
/**
|
||||
* authorRoleList attribute 를 리턴한다.
|
||||
* @return List<AuthorRoleManageVO>
|
||||
*/
|
||||
public List<AuthorRoleManageVO> getAuthorRoleList() {
|
||||
return authorRoleList;
|
||||
}
|
||||
|
||||
/**
|
||||
* authorRoleList attribute 값을 설정한다.
|
||||
* @param authorRoleList List<AuthorRoleManageVO>
|
||||
*/
|
||||
public void setAuthorRoleList(List<AuthorRoleManageVO> authorRoleList) {
|
||||
this.authorRoleList = authorRoleList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,75 @@
|
||||
package egovframework.com.sec.ram.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 권한관리에 관한 서비스 인터페이스 클래스를 정의한다.
|
||||
* @author 공통서비스 개발팀 이문준
|
||||
* @since 2009.06.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.20 이문준 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
public interface EgovAuthorManageService {
|
||||
/**
|
||||
* 모든 권한목록을 조회한다.
|
||||
* @param authorManageVO AuthorManageVO
|
||||
* @return List<AuthorManageVO>
|
||||
* @exception Exception
|
||||
*/
|
||||
public List<AuthorManageVO> selectAuthorAllList(AuthorManageVO authorManageVO) throws Exception;
|
||||
|
||||
/**
|
||||
* 시스템 사용자중 불필요한 시스템권한정보를 화면에 조회하여 데이터베이스에서 삭제
|
||||
* @param authorManage AuthorManage
|
||||
* @exception Exception
|
||||
*/
|
||||
public void deleteAuthor(AuthorManage authorManage) throws Exception;
|
||||
|
||||
/**
|
||||
* 사용자의 시스테접근권한를 화면에서 입력하여 입력항목의 정합성을 체크하고 데이터베이스에 저장
|
||||
* @param authorManage AuthorManage
|
||||
* @exception Exception
|
||||
*/
|
||||
public void insertAuthor(AuthorManage authorManage) throws Exception;
|
||||
|
||||
/**
|
||||
* 개별사용자에게 할당된 권한 조회
|
||||
* @param authorManageVO AuthorManageVO
|
||||
* @exception Exception
|
||||
*/
|
||||
public AuthorManageVO selectAuthor(AuthorManageVO authorManageVO) throws Exception;
|
||||
|
||||
/**
|
||||
* 개별사용자에게 할당된 권한리스트 조회
|
||||
* @param authorManageVO AuthorManageVO
|
||||
* @return List<AuthorManageVO>
|
||||
* @exception Exception
|
||||
*/
|
||||
public List<AuthorManageVO> selectAuthorList(AuthorManageVO authorManageVO) throws Exception;
|
||||
|
||||
/**
|
||||
* 화면에 조회된 사용자권한정보를 수정하여 항목의 정합성을 체크하고 수정된 데이터를 데이터베이스에 반영
|
||||
* @param authorManage AuthorManage
|
||||
* @exception Exception
|
||||
*/
|
||||
public void updateAuthor(AuthorManage authorManage) throws Exception;
|
||||
|
||||
/**
|
||||
* 목록조회 카운트를 반환한다
|
||||
* @param authorManageVO AuthorManageVO
|
||||
* @return int
|
||||
* @exception Exception
|
||||
*/
|
||||
public int selectAuthorListTotCnt(AuthorManageVO authorManageVO) throws Exception;
|
||||
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
package egovframework.com.sec.ram.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 권한별 롤 관리에 관한 서비스 인터페이스 클래스를 정의한다.
|
||||
* @author 공통서비스 개발팀 이문준
|
||||
* @since 2009.06.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.20 이문준 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
public interface EgovAuthorRoleManageService {
|
||||
|
||||
/**
|
||||
* 권한 롤 관계정보를 조회
|
||||
* @param authorRoleManageVO AuthorRoleManageVO
|
||||
* @exception Exception
|
||||
*/
|
||||
public AuthorRoleManageVO selectAuthorRole(AuthorRoleManageVO authorRoleManageVO) throws Exception;
|
||||
|
||||
/**
|
||||
* 권한 롤 관계정보 목록 조회
|
||||
* @param authorRoleManageVO AuthorRoleManageVO
|
||||
* @return List<AuthorRoleManageVO>
|
||||
* @exception Exception
|
||||
*/
|
||||
public List<AuthorRoleManageVO> selectAuthorRoleList(AuthorRoleManageVO authorRoleManageVO) throws Exception;
|
||||
|
||||
/**
|
||||
* 권한 롤 관계정보를 화면에서 입력하여 입력항목의 정합성을 체크하고 데이터베이스에 저장
|
||||
* @param authorRoleManage AuthorRoleManage
|
||||
* @exception Exception
|
||||
*/
|
||||
public void insertAuthorRole(AuthorRoleManage authorRoleManage) throws Exception;
|
||||
|
||||
/**
|
||||
* 수정된 권한 롤 관계정보를 데이터베이스에 반영
|
||||
* @param authorRoleManage AuthorRoleManage
|
||||
* @exception Exception
|
||||
*/
|
||||
public void updateAuthorRole(AuthorRoleManage authorRoleManage) throws Exception;
|
||||
|
||||
/**
|
||||
* 권한 롤 관계정보를 화면에 조회하여 데이터베이스에서 삭제
|
||||
* @param authorRoleManage AuthorRoleManage
|
||||
* @exception Exception
|
||||
*/
|
||||
public void deleteAuthorRole(AuthorRoleManage authorRoleManage) throws Exception;
|
||||
|
||||
/**
|
||||
* 목록조회 카운트를 반환한다
|
||||
* @param authorRoleManageVO AuthorRoleManageVO
|
||||
* @return int
|
||||
* @exception Exception
|
||||
*/
|
||||
public int selectAuthorRoleListTotCnt(AuthorRoleManageVO authorRoleManageVO) throws Exception;
|
||||
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
package egovframework.com.sec.ram.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
|
||||
import egovframework.com.sec.ram.service.AuthorManage;
|
||||
import egovframework.com.sec.ram.service.AuthorManageVO;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 권한관리에 대한 DAO 클래스를 정의한다.
|
||||
* @author 공통서비스 개발팀 이문준
|
||||
* @since 2009.06.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.11 이문준 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
@Repository("authorManageDAO")
|
||||
public class AuthorManageDAO extends EgovComAbstractDAO {
|
||||
|
||||
/**
|
||||
* 권한목록을 조회한다.
|
||||
* @param authorManageVO AuthorManageVO
|
||||
* @return List<AuthorManageVO>
|
||||
* @exception Exception
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<AuthorManageVO> selectAuthorList(AuthorManageVO authorManageVO) throws Exception {
|
||||
return (List<AuthorManageVO>) list("authorManageDAO.selectAuthorList", authorManageVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 권한을 등록한다.
|
||||
* @param authorManage AuthorManage
|
||||
* @exception Exception
|
||||
*/
|
||||
public void insertAuthor(AuthorManage authorManage) throws Exception {
|
||||
insert("authorManageDAO.insertAuthor", authorManage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 권한을 수정한다.
|
||||
* @param authorManage AuthorManage
|
||||
* @exception Exception
|
||||
*/
|
||||
public void updateAuthor(AuthorManage authorManage) throws Exception {
|
||||
update("authorManageDAO.updateAuthor", authorManage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 권한을 삭제한다.
|
||||
* @param authorManage AuthorManage
|
||||
* @exception Exception
|
||||
*/
|
||||
public void deleteAuthor(AuthorManage authorManage) throws Exception {
|
||||
delete("authorManageDAO.deleteAuthor", authorManage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 권한을 조회한다.
|
||||
* @param authorManageVO AuthorManageVO
|
||||
* @return AuthorManageVO
|
||||
* @exception Exception
|
||||
*/
|
||||
public AuthorManageVO selectAuthor(AuthorManageVO authorManageVO) throws Exception {
|
||||
return (AuthorManageVO) selectOne("authorManageDAO.selectAuthor", authorManageVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 권한목록 총 갯수를 조회한다.
|
||||
* @param authorManageVO AuthorManageVO
|
||||
* @return int
|
||||
* @exception Exception
|
||||
*/
|
||||
public int selectAuthorListTotCnt(AuthorManageVO authorManageVO) throws Exception {
|
||||
return (Integer)selectOne("authorManageDAO.selectAuthorListTotCnt", authorManageVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 모든 권한목록을 조회한다.
|
||||
* @param authorManageVO AuthorManageVO
|
||||
* @return List<AuthorManageVO>
|
||||
* @exception Exception
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<AuthorManageVO> selectAuthorAllList(AuthorManageVO authorManageVO) throws Exception {
|
||||
return (List<AuthorManageVO>) list("authorManageDAO.selectAuthorAllList", authorManageVO);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,89 @@
|
||||
package egovframework.com.sec.ram.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
|
||||
import egovframework.com.sec.ram.service.AuthorRoleManage;
|
||||
import egovframework.com.sec.ram.service.AuthorRoleManageVO;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 권한별 롤관리에 대한 DAO 클래스를 정의한다.
|
||||
* @author 공통서비스 개발팀 이문준
|
||||
* @since 2009.06.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.11 이문준 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
@Repository("authorRoleManageDAO")
|
||||
public class AuthorRoleManageDAO extends EgovComAbstractDAO {
|
||||
|
||||
/**
|
||||
* 권한 롤 관계정보를 조회
|
||||
* @param authorRoleManageVO AuthorRoleManageVO
|
||||
* @return AuthorRoleManageVO
|
||||
* @exception Exception
|
||||
*/
|
||||
public AuthorRoleManageVO selectAuthorRole(AuthorRoleManageVO authorRoleManageVO) throws Exception {
|
||||
return (AuthorRoleManageVO) selectOne("authorRoleManageDAO.selectAuthorRole", authorRoleManageVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 권한 롤 관계정보 목록 조회
|
||||
* @param authorRoleManageVO AuthorRoleManageVO
|
||||
* @return List<AuthorRoleManageVO>
|
||||
* @exception Exception
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<AuthorRoleManageVO> selectAuthorRoleList(AuthorRoleManageVO authorRoleManageVO) throws Exception {
|
||||
return (List<AuthorRoleManageVO>) list("authorRoleManageDAO.selectAuthorRoleList", authorRoleManageVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 권한 롤 관계정보를 화면에서 입력하여 입력항목의 정합성을 체크하고 데이터베이스에 저장
|
||||
* @param authorRoleManage AuthorRoleManage
|
||||
* @exception Exception
|
||||
*/
|
||||
public void insertAuthorRole(AuthorRoleManage authorRoleManage) throws Exception {
|
||||
insert("authorRoleManageDAO.insertAuthorRole", authorRoleManage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 수정된 권한 롤 관계정보를 데이터베이스에 반영
|
||||
* @param authorRoleManage AuthorRoleManage
|
||||
* @exception Exception
|
||||
*/
|
||||
public void updateAuthorRole(AuthorRoleManage authorRoleManage) throws Exception {
|
||||
update("authorRoleManageDAO.updateAuthorRole", authorRoleManage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 권한 롤 관계정보를 화면에 조회하여 데이터베이스에서 삭제
|
||||
* @param authorRoleManage AuthorRoleManage
|
||||
* @exception Exception
|
||||
*/
|
||||
public void deleteAuthorRole(AuthorRoleManage authorRoleManage) throws Exception {
|
||||
delete("authorRoleManageDAO.deleteAuthorRole", authorRoleManage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 목록조회 카운트를 반환한다
|
||||
* @param authorRoleManageVO AuthorRoleManageVO
|
||||
* @return int
|
||||
* @exception Exception
|
||||
*/
|
||||
public int selectAuthorRoleListTotCnt(AuthorRoleManageVO authorRoleManageVO) throws Exception {
|
||||
return (Integer)selectOne("authorRoleManageDAO.selectAuthorRoleListTotCnt", authorRoleManageVO);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,107 @@
|
||||
package egovframework.com.sec.ram.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.com.sec.ram.service.AuthorManage;
|
||||
import egovframework.com.sec.ram.service.AuthorManageVO;
|
||||
import egovframework.com.sec.ram.service.EgovAuthorManageService;
|
||||
|
||||
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 권한관리에 관한 ServiceImpl 클래스를 정의한다.
|
||||
* @author 공통서비스 개발팀 이문준
|
||||
* @since 2009.06.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.11 이문준 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
@Service("egovAuthorManageService")
|
||||
public class EgovAuthorManageServiceImpl extends EgovAbstractServiceImpl implements EgovAuthorManageService {
|
||||
|
||||
@Resource(name="authorManageDAO")
|
||||
private AuthorManageDAO authorManageDAO;
|
||||
|
||||
/**
|
||||
* 권한 목록을 조회한다.
|
||||
* @param authorManageVO AuthorManageVO
|
||||
* @return List<AuthorManageVO>
|
||||
* @exception Exception
|
||||
*/
|
||||
public List<AuthorManageVO> selectAuthorList(AuthorManageVO authorManageVO) throws Exception {
|
||||
return authorManageDAO.selectAuthorList(authorManageVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 권한을 등록한다.
|
||||
* @param authorManage AuthorManage
|
||||
* @exception Exception
|
||||
*/
|
||||
public void insertAuthor(AuthorManage authorManage) throws Exception {
|
||||
authorManageDAO.insertAuthor(authorManage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 권한을 수정한다.
|
||||
* @param authorManage AuthorManage
|
||||
* @exception Exception
|
||||
*/
|
||||
public void updateAuthor(AuthorManage authorManage) throws Exception {
|
||||
authorManageDAO.updateAuthor(authorManage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 권한을 삭제한다.
|
||||
* @param authorManage AuthorManage
|
||||
* @exception Exception
|
||||
*/
|
||||
public void deleteAuthor(AuthorManage authorManage) throws Exception {
|
||||
authorManageDAO.deleteAuthor(authorManage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 권한을 조회한다.
|
||||
* @param authorManageVO AuthorManageVO
|
||||
* @return AuthorManageVO
|
||||
* @exception Exception
|
||||
*/
|
||||
public AuthorManageVO selectAuthor(AuthorManageVO authorManageVO) throws Exception {
|
||||
AuthorManageVO resultVO = authorManageDAO.selectAuthor(authorManageVO);
|
||||
if (resultVO == null)
|
||||
throw processException("info.nodata.msg");
|
||||
return resultVO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 권한 목록 카운트를 조회한다.
|
||||
* @param authorManageVO AuthorManageVO
|
||||
* @return int
|
||||
* @exception Exception
|
||||
*/
|
||||
public int selectAuthorListTotCnt(AuthorManageVO authorManageVO) throws Exception {
|
||||
return authorManageDAO.selectAuthorListTotCnt(authorManageVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 모든 권한목록을 조회한다.
|
||||
* @param authorManageVO AuthorManageVO
|
||||
* @return List<AuthorManageVO>
|
||||
* @exception Exception
|
||||
*/
|
||||
public List<AuthorManageVO> selectAuthorAllList(AuthorManageVO authorManageVO) throws Exception {
|
||||
return authorManageDAO.selectAuthorAllList(authorManageVO);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,94 @@
|
||||
package egovframework.com.sec.ram.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.com.sec.ram.service.AuthorRoleManage;
|
||||
import egovframework.com.sec.ram.service.AuthorRoleManageVO;
|
||||
import egovframework.com.sec.ram.service.EgovAuthorRoleManageService;
|
||||
|
||||
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 권한별 롤관리에 대한 DAO 클래스를 정의한다.
|
||||
* @author 공통서비스 개발팀 이문준
|
||||
* @since 2009.06.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.11 이문준 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
@Service("egovAuthorRoleManageService")
|
||||
public class EgovAuthorRoleManageServiceImpl extends EgovAbstractServiceImpl implements EgovAuthorRoleManageService {
|
||||
|
||||
@Resource(name="authorRoleManageDAO")
|
||||
private AuthorRoleManageDAO authorRoleManageDAO;
|
||||
|
||||
/**
|
||||
* 권한 롤 관계정보를 조회
|
||||
* @param authorRoleManageVO AuthorRoleManageVO
|
||||
* @return AuthorRoleManageVO
|
||||
* @exception Exception
|
||||
*/
|
||||
public AuthorRoleManageVO selectAuthorRole(AuthorRoleManageVO authorRoleManageVO) throws Exception {
|
||||
return authorRoleManageDAO.selectAuthorRole(authorRoleManageVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 권한 롤 관계정보 목록 조회
|
||||
* @param authorRoleManageVO AuthorRoleManageVO
|
||||
* @return List<AuthorRoleManageVO>
|
||||
* @exception Exception
|
||||
*/
|
||||
public List<AuthorRoleManageVO> selectAuthorRoleList(AuthorRoleManageVO authorRoleManageVO) throws Exception {
|
||||
return authorRoleManageDAO.selectAuthorRoleList(authorRoleManageVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 권한 롤 관계정보를 화면에서 입력하여 입력항목의 정합성을 체크하고 데이터베이스에 저장
|
||||
* @param authorRoleManage AuthorRoleManage
|
||||
* @exception Exception
|
||||
*/
|
||||
public void insertAuthorRole(AuthorRoleManage authorRoleManage) throws Exception {
|
||||
authorRoleManageDAO.insertAuthorRole(authorRoleManage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 수정된 권한 롤 관계정보를 데이터베이스에 반영
|
||||
* @param authorRoleManage AuthorRoleManage
|
||||
* @exception Exception
|
||||
*/
|
||||
public void updateAuthorRole(AuthorRoleManage authorRoleManage) throws Exception {
|
||||
authorRoleManageDAO.updateAuthorRole(authorRoleManage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 권한 롤 관계정보를 화면에 조회하여 데이터베이스에서 삭제
|
||||
* @param authorRoleManage AuthorRoleManage
|
||||
* @exception Exception
|
||||
*/
|
||||
public void deleteAuthorRole(AuthorRoleManage authorRoleManage) throws Exception {
|
||||
authorRoleManageDAO.deleteAuthorRole(authorRoleManage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 목록조회 카운트를 반환한다
|
||||
* @param authorRoleManageVO AuthorRoleManageVO
|
||||
* @return int
|
||||
* @exception Exception
|
||||
*/
|
||||
public int selectAuthorRoleListTotCnt(AuthorRoleManageVO authorRoleManageVO) throws Exception {
|
||||
return authorRoleManageDAO.selectAuthorRoleListTotCnt(authorRoleManageVO);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,65 @@
|
||||
package egovframework.com.sec.ram.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.com.cmm.service.EgovUserDetailsService;
|
||||
|
||||
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
|
||||
|
||||
/**
|
||||
*권한관리 인증에 대한 ServiceImpl 클래스를 정의한다.
|
||||
* @author 공통서비스 개발팀 이문준
|
||||
* @since 2009.06.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.11 이문준 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
public class EgovUserDetailsSecurityServiceImpl extends EgovAbstractServiceImpl implements EgovUserDetailsService {
|
||||
|
||||
|
||||
/**
|
||||
* 인증된 사용자객체를 VO형식으로 가져온다.
|
||||
* @return Object - 사용자 ValueObject
|
||||
*/
|
||||
public Object getAuthenticatedUser() {
|
||||
|
||||
// 이 메소드의 경우 인증이 되지 않더라고 null을 리턴하지 않기 때문에
|
||||
// 명시적으로 인증되지 않은 경우 null을 리턴하도록 수정함
|
||||
|
||||
if (EgovUserDetailsHelper.isAuthenticated()) {
|
||||
return EgovUserDetailsHelper.getAuthenticatedUser();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 인증된 사용자의 권한 정보를 가져온다.
|
||||
* 예) [ROLE_ADMIN, ROLE_USER, ROLE_A, ROLE_B, ROLE_RESTRICTED, IS_AUTHENTICATED_FULLY, IS_AUTHENTICATED_REMEMBERED, IS_AUTHENTICATED_ANONYMOUSLY]
|
||||
* @return List - 사용자 권한정보 목록
|
||||
*/
|
||||
public List<String> getAuthorities() {
|
||||
return EgovUserDetailsHelper.getAuthorities();
|
||||
}
|
||||
|
||||
/**
|
||||
* 인증된 사용자 여부를 체크한다.
|
||||
* @return Boolean - 인증된 사용자 여부(TRUE / FALSE)
|
||||
*/
|
||||
|
||||
public Boolean isAuthenticated() {
|
||||
return EgovUserDetailsHelper.isAuthenticated();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,232 @@
|
||||
package egovframework.com.sec.ram.web;
|
||||
|
||||
import egovframework.com.cmm.EgovMessageSource;
|
||||
import egovframework.com.cmm.SessionVO;
|
||||
import egovframework.com.cmm.annotation.IncludedInfo;
|
||||
import egovframework.com.sec.ram.service.AuthorManage;
|
||||
import egovframework.com.sec.ram.service.AuthorManageVO;
|
||||
import egovframework.com.sec.ram.service.EgovAuthorManageService;
|
||||
|
||||
import egovframework.rte.fdl.property.EgovPropertyService;
|
||||
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.SessionAttributes;
|
||||
import org.springmodules.validation.commons.DefaultBeanValidator;
|
||||
|
||||
/**
|
||||
* 권한관리에 관한 controller 클래스를 정의한다.
|
||||
* @author 공통서비스 개발팀 이문준
|
||||
* @since 2009.06.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.11 이문준 최초 생성
|
||||
* 2011.8.26 정진오 IncludedInfo annotation 추가s
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
|
||||
@Controller
|
||||
@SessionAttributes(types=SessionVO.class)
|
||||
public class EgovAuthorManageController {
|
||||
|
||||
@Resource(name="egovMessageSource")
|
||||
EgovMessageSource egovMessageSource;
|
||||
|
||||
@Resource(name = "egovAuthorManageService")
|
||||
private EgovAuthorManageService egovAuthorManageService;
|
||||
|
||||
/** EgovPropertyService */
|
||||
@Resource(name = "propertiesService")
|
||||
protected EgovPropertyService propertiesService;
|
||||
|
||||
@Autowired
|
||||
private DefaultBeanValidator beanValidator;
|
||||
|
||||
/**
|
||||
* 권한 목록화면 이동
|
||||
* @return String
|
||||
* @exception Exception
|
||||
*/
|
||||
@RequestMapping("/sec/ram/EgovAuthorListView.do")
|
||||
public String selectAuthorListView()
|
||||
throws Exception {
|
||||
return "egovframework/com/sec/ram/EgovAuthorManage";
|
||||
}
|
||||
|
||||
/**
|
||||
* 권한 목록을 조회한다
|
||||
* @param authorManageVO AuthorManageVO
|
||||
* @return String
|
||||
* @exception Exception
|
||||
*/
|
||||
@IncludedInfo(name="권한관리", listUrl="/sec/ram/EgovAuthorList.do", order = 60,gid = 20)
|
||||
@RequestMapping(value="/sec/ram/EgovAuthorList.do")
|
||||
public String selectAuthorList(@ModelAttribute("authorManageVO") AuthorManageVO authorManageVO,
|
||||
ModelMap model)
|
||||
throws Exception {
|
||||
|
||||
/** EgovPropertyService.sample */
|
||||
//authorManageVO.setPageUnit(propertiesService.getInt("pageUnit"));
|
||||
//authorManageVO.setPageSize(propertiesService.getInt("pageSize"));
|
||||
|
||||
/** paging */
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(authorManageVO.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(authorManageVO.getPageUnit());
|
||||
paginationInfo.setPageSize(authorManageVO.getPageSize());
|
||||
|
||||
authorManageVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
authorManageVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
authorManageVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
authorManageVO.setAuthorManageList(egovAuthorManageService.selectAuthorList(authorManageVO));
|
||||
model.addAttribute("authorList", authorManageVO.getAuthorManageList());
|
||||
|
||||
int totCnt = egovAuthorManageService.selectAuthorListTotCnt(authorManageVO);
|
||||
paginationInfo.setTotalRecordCount(totCnt);
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
model.addAttribute("message", egovMessageSource.getMessage("success.common.select"));
|
||||
|
||||
return "egovframework/com/sec/ram/EgovAuthorManage";
|
||||
}
|
||||
|
||||
/**
|
||||
* 권한 세부정보를 조회한다.
|
||||
* @param authorCode String
|
||||
* @param authorManageVO AuthorManageVO
|
||||
* @return String
|
||||
* @exception Exception
|
||||
*/
|
||||
@RequestMapping(value="/sec/ram/EgovAuthor.do")
|
||||
public String selectAuthor(@RequestParam("authorCode") String authorCode,
|
||||
@ModelAttribute("authorManageVO") AuthorManageVO authorManageVO,
|
||||
ModelMap model) throws Exception {
|
||||
|
||||
authorManageVO.setAuthorCode(authorCode);
|
||||
|
||||
model.addAttribute("authorManage", egovAuthorManageService.selectAuthor(authorManageVO));
|
||||
model.addAttribute("message", egovMessageSource.getMessage("success.common.select"));
|
||||
return "egovframework/com/sec/ram/EgovAuthorUpdate";
|
||||
}
|
||||
|
||||
/**
|
||||
* 권한 등록화면 이동
|
||||
* @return String
|
||||
* @exception Exception
|
||||
*/
|
||||
@RequestMapping("/sec/ram/EgovAuthorInsertView.do")
|
||||
public String insertAuthorView(@ModelAttribute("authorManage") AuthorManage authorManage)
|
||||
throws Exception {
|
||||
return "egovframework/com/sec/ram/EgovAuthorInsert";
|
||||
}
|
||||
|
||||
/**
|
||||
* 권한 세부정보를 등록한다.
|
||||
* @param authorManage AuthorManage
|
||||
* @param bindingResult BindingResult
|
||||
* @return String
|
||||
* @exception Exception
|
||||
*/
|
||||
@RequestMapping(value="/sec/ram/EgovAuthorInsert.do")
|
||||
public String insertAuthor(@ModelAttribute("authorManage") AuthorManage authorManage,
|
||||
BindingResult bindingResult,
|
||||
ModelMap model) throws Exception {
|
||||
|
||||
beanValidator.validate(authorManage, bindingResult); //validation 수행
|
||||
|
||||
if (bindingResult.hasErrors()) {
|
||||
return "egovframework/com/sec/ram/EgovAuthorInsert";
|
||||
} else {
|
||||
egovAuthorManageService.insertAuthor(authorManage);
|
||||
model.addAttribute("message", egovMessageSource.getMessage("success.common.insert"));
|
||||
return "forward:/sec/ram/EgovAuthorList.do";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 권한 세부정보를 수정한다.
|
||||
* @param authorManage AuthorManage
|
||||
* @param bindingResult BindingResult
|
||||
* @return String
|
||||
* @exception Exception
|
||||
*/
|
||||
@RequestMapping(value="/sec/ram/EgovAuthorUpdate.do")
|
||||
public String updateAuthor(@ModelAttribute("authorManage") AuthorManage authorManage,
|
||||
BindingResult bindingResult,
|
||||
Model model) throws Exception {
|
||||
|
||||
beanValidator.validate(authorManage, bindingResult); //validation 수행
|
||||
|
||||
if (bindingResult.hasErrors()) {
|
||||
return "egovframework/com/sec/ram/EgovAuthorUpdate";
|
||||
} else {
|
||||
egovAuthorManageService.updateAuthor(authorManage);
|
||||
model.addAttribute("message", egovMessageSource.getMessage("success.common.update"));
|
||||
return "forward:/sec/ram/EgovAuthorList.do";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 권한 세부정보를 삭제한다.
|
||||
* @param authorManage AuthorManage
|
||||
* @return String
|
||||
* @exception Exception
|
||||
*/
|
||||
@RequestMapping(value="/sec/ram/EgovAuthorDelete.do")
|
||||
public String deleteAuthor(@ModelAttribute("authorManage") AuthorManage authorManage,
|
||||
Model model) throws Exception {
|
||||
|
||||
egovAuthorManageService.deleteAuthor(authorManage);
|
||||
model.addAttribute("message", egovMessageSource.getMessage("success.common.delete"));
|
||||
return "forward:/sec/ram/EgovAuthorList.do";
|
||||
}
|
||||
|
||||
/**
|
||||
* 권한목록을 삭제한다.
|
||||
* @param authorCodes String
|
||||
* @param authorManage AuthorManage
|
||||
* @return String
|
||||
* @exception Exception
|
||||
*/
|
||||
@RequestMapping(value="/sec/ram/EgovAuthorListDelete.do")
|
||||
public String deleteAuthorList(@RequestParam("authorCodes") String authorCodes,
|
||||
@ModelAttribute("authorManage") AuthorManage authorManage,
|
||||
Model model) throws Exception {
|
||||
|
||||
String [] strAuthorCodes = authorCodes.split(";");
|
||||
for(int i=0; i<strAuthorCodes.length;i++) {
|
||||
authorManage.setAuthorCode(strAuthorCodes[i]);
|
||||
egovAuthorManageService.deleteAuthor(authorManage);
|
||||
}
|
||||
model.addAttribute("message", egovMessageSource.getMessage("success.common.delete"));
|
||||
return "forward:/sec/ram/EgovAuthorList.do";
|
||||
}
|
||||
|
||||
/**
|
||||
* 권한제한 화면 이동
|
||||
* @return String
|
||||
* @exception Exception
|
||||
*/
|
||||
@RequestMapping("/sec/ram/accessDenied.do")
|
||||
public String accessDenied()
|
||||
throws Exception {
|
||||
return "egovframework/com/sec/accessDenied";
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,134 @@
|
||||
package egovframework.com.sec.ram.web;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import egovframework.com.cmm.EgovMessageSource;
|
||||
import egovframework.com.sec.ram.service.AuthorRoleManage;
|
||||
import egovframework.com.sec.ram.service.AuthorRoleManageVO;
|
||||
import egovframework.com.sec.ram.service.EgovAuthorRoleManageService;
|
||||
import egovframework.rte.fdl.property.EgovPropertyService;
|
||||
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
|
||||
|
||||
/**
|
||||
* 권한별 롤관리에 관한 controller 클래스를 정의한다.
|
||||
* @author 공통서비스 개발팀 이문준
|
||||
* @since 2009.06.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.11 이문준 최초 생성
|
||||
* 2011.09.07 서준식 롤 등록시 이미 등록된 경우 데이터 중복 에러 발생 문제 수정
|
||||
* </pre>
|
||||
*/
|
||||
@Controller
|
||||
public class EgovAuthorRoleController {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(EgovAuthorRoleController.class);
|
||||
|
||||
@Resource(name="egovMessageSource")
|
||||
EgovMessageSource egovMessageSource;
|
||||
|
||||
@Resource(name = "egovAuthorRoleManageService")
|
||||
private EgovAuthorRoleManageService egovAuthorRoleManageService;
|
||||
|
||||
/** EgovPropertyService */
|
||||
@Resource(name = "propertiesService")
|
||||
protected EgovPropertyService propertiesService;
|
||||
|
||||
/**
|
||||
* 권한 롤 관계 화면 이동
|
||||
* @return "egovframework/com/sec/ram/EgovDeptAuthorList"
|
||||
* @exception Exception
|
||||
*/
|
||||
@RequestMapping("/sec/ram/EgovAuthorRoleListView.do")
|
||||
public String selectAuthorRoleListView() throws Exception {
|
||||
|
||||
return "egovframework/com/sec/ram/EgovAuthorRoleManage";
|
||||
}
|
||||
|
||||
/**
|
||||
* 권한별 할당된 롤 목록 조회
|
||||
*
|
||||
* @param authorRoleManageVO AuthorRoleManageVO
|
||||
* @return String
|
||||
* @exception Exception
|
||||
*/
|
||||
@RequestMapping(value="/sec/ram/EgovAuthorRoleList.do")
|
||||
public String selectAuthorRoleList(@ModelAttribute("authorRoleManageVO") AuthorRoleManageVO authorRoleManageVO,
|
||||
ModelMap model) throws Exception {
|
||||
|
||||
/** paging */
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(authorRoleManageVO.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(authorRoleManageVO.getPageUnit());
|
||||
paginationInfo.setPageSize(authorRoleManageVO.getPageSize());
|
||||
|
||||
authorRoleManageVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
authorRoleManageVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
authorRoleManageVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
authorRoleManageVO.setAuthorRoleList(egovAuthorRoleManageService.selectAuthorRoleList(authorRoleManageVO));
|
||||
model.addAttribute("authorRoleList", authorRoleManageVO.getAuthorRoleList());
|
||||
model.addAttribute("searchVO", authorRoleManageVO);
|
||||
|
||||
int totCnt = egovAuthorRoleManageService.selectAuthorRoleListTotCnt(authorRoleManageVO);
|
||||
paginationInfo.setTotalRecordCount(totCnt);
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
|
||||
model.addAttribute("message", egovMessageSource.getMessage("success.common.select"));
|
||||
|
||||
return "egovframework/com/sec/ram/EgovAuthorRoleManage";
|
||||
}
|
||||
|
||||
/**
|
||||
* 권한정보에 롤을 할당하여 데이터베이스에 등록
|
||||
* @param authorCode String
|
||||
* @param roleCodes String
|
||||
* @param regYns String
|
||||
* @param authorRoleManage AuthorRoleManage
|
||||
* @return String
|
||||
* @exception Exception
|
||||
*/
|
||||
@RequestMapping(value="/sec/ram/EgovAuthorRoleInsert.do")
|
||||
public String insertAuthorRole(@RequestParam("authorCode") String authorCode,
|
||||
@RequestParam("roleCodes") String roleCodes,
|
||||
@RequestParam("regYns") String regYns,
|
||||
@RequestParam Map<?, ?> commandMap,
|
||||
@ModelAttribute("authorRoleManage") AuthorRoleManage authorRoleManage,
|
||||
ModelMap model) throws Exception {
|
||||
|
||||
String [] strRoleCodes = roleCodes.split(";");
|
||||
String [] strRegYns = regYns.split(";");
|
||||
|
||||
authorRoleManage.setRoleCode(authorCode);
|
||||
|
||||
for(int i=0; i<strRoleCodes.length;i++) {
|
||||
|
||||
authorRoleManage.setRoleCode(strRoleCodes[i]);
|
||||
authorRoleManage.setRegYn(strRegYns[i]);
|
||||
if(strRegYns[i].equals("Y")){
|
||||
egovAuthorRoleManageService.deleteAuthorRole(authorRoleManage);//2011.09.07
|
||||
egovAuthorRoleManageService.insertAuthorRole(authorRoleManage);
|
||||
}else {
|
||||
egovAuthorRoleManageService.deleteAuthorRole(authorRoleManage);
|
||||
}
|
||||
}
|
||||
|
||||
return "redirect:/sec/ram/EgovAuthorRoleList.do?searchKeyword="+authorCode;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,82 @@
|
||||
package egovframework.com.sec.security.common;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import egovframework.com.cmm.LoginVO;
|
||||
|
||||
import egovframework.rte.fdl.security.userdetails.EgovUserDetails;
|
||||
import egovframework.rte.fdl.security.userdetails.jdbc.EgovUsersByUsernameMapping;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
/**
|
||||
* mapRow 결과를 사용자 EgovUserDetails Object 에 정의한다.
|
||||
*
|
||||
* @author ByungHun Woo
|
||||
* @since 2009.06.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------------- ----------------------
|
||||
* 2009.03.10 ByungHun Woo 최초 생성
|
||||
* 2009.03.20 이문준 UPDATE
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
public class EgovSessionMapping extends EgovUsersByUsernameMapping {
|
||||
|
||||
/**
|
||||
* 사용자정보를 테이블에서 조회하여 EgovUsersByUsernameMapping 에 매핑한다.
|
||||
* @param ds DataSource
|
||||
* @param usersByUsernameQuery String
|
||||
*/
|
||||
public EgovSessionMapping(DataSource ds, String usersByUsernameQuery) {
|
||||
super(ds, usersByUsernameQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* mapRow Override
|
||||
* @param rs ResultSet 결과
|
||||
* @param rownum row num
|
||||
* @return Object EgovUserDetails
|
||||
* @exception SQLException
|
||||
*/
|
||||
@Override
|
||||
protected EgovUserDetails mapRow(ResultSet rs, int rownum) throws SQLException {
|
||||
logger.debug("## EgovUsersByUsernameMapping mapRow ##");
|
||||
|
||||
String strUserId = rs.getString("user_id");
|
||||
String strPassWord = rs.getString("password");
|
||||
boolean strEnabled = rs.getBoolean("enabled");
|
||||
|
||||
String strUserNm = rs.getString("user_nm");
|
||||
String strUserSe = rs.getString("user_se");
|
||||
String strUserEmail = rs.getString("user_email");
|
||||
String strOrgnztId = rs.getString("orgnzt_id");
|
||||
String strUniqId = rs.getString("esntl_id");
|
||||
/**2010.06.30 *이용 *조직명 추가 */
|
||||
String strOrgnztNm = rs.getString("orgnzt_nm");
|
||||
|
||||
|
||||
|
||||
// 세션 항목 설정
|
||||
LoginVO loginVO = new LoginVO();
|
||||
loginVO.setId(strUserId);
|
||||
loginVO.setPassword(strPassWord);
|
||||
loginVO.setName(strUserNm);
|
||||
loginVO.setUserSe(strUserSe);
|
||||
loginVO.setEmail(strUserEmail);
|
||||
loginVO.setOrgnztId(strOrgnztId);
|
||||
loginVO.setUniqId(strUniqId);
|
||||
/**2010.06.30 *이용 *조직명 추가 */
|
||||
loginVO.setOrgnztNm(strOrgnztNm);
|
||||
|
||||
return new EgovUserDetails(strUserId, strPassWord, strEnabled, loginVO);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user