Index: pom.xml =================================================================== diff -u -rb0de5dc79b2d9748a0db6dbda80266685bd6ebda -rcaba1883073fbfc06e4f8b54885df32c6b218741 --- pom.xml (.../pom.xml) (revision b0de5dc79b2d9748a0db6dbda80266685bd6ebda) +++ pom.xml (.../pom.xml) (revision caba1883073fbfc06e4f8b54885df32c6b218741) @@ -10,7 +10,7 @@ 4.0.0 313devgrp java-service-tree-framework-backend-server - 22.06.19 + 22.06.20 pom java-service-tree-framework Index: web-module/pom.xml =================================================================== diff -u -rb0de5dc79b2d9748a0db6dbda80266685bd6ebda -rcaba1883073fbfc06e4f8b54885df32c6b218741 --- web-module/pom.xml (.../pom.xml) (revision b0de5dc79b2d9748a0db6dbda80266685bd6ebda) +++ web-module/pom.xml (.../pom.xml) (revision caba1883073fbfc06e4f8b54885df32c6b218741) @@ -7,7 +7,7 @@ 313devgrp java-service-tree-framework-backend-server - 22.06.19 + 22.06.20 ../pom.xml Index: web-module/src/main/java/egovframework/api/arms/module_pdmapper/controller/AdminPdMapperController.java =================================================================== diff -u --- web-module/src/main/java/egovframework/api/arms/module_pdmapper/controller/AdminPdMapperController.java (revision 0) +++ web-module/src/main/java/egovframework/api/arms/module_pdmapper/controller/AdminPdMapperController.java (revision caba1883073fbfc06e4f8b54885df32c6b218741) @@ -0,0 +1,51 @@ +/* + * @author Dongmin.lee + * @since 2022-06-19 + * @version 22.06.19 + * @see
+ *  Copyright (C) 2007 by 313 DEV GRP, Inc - All Rights Reserved
+ *  Unauthorized copying of this file, via any medium is strictly prohibited
+ *  Proprietary and confidential
+ *  Written by 313 developer group <313@313.co.kr>, December 2010
+ * 
+ */ +package egovframework.api.arms.module_pdmapper.controller; + +import lombok.extern.slf4j.Slf4j; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.ModelAndView; +import javax.annotation.PostConstruct; +import javax.servlet.http.HttpServletRequest; +import java.util.Comparator; +import java.util.List; +import java.util.NoSuchElementException; + +import egovframework.com.ext.jstree.springHibernate.core.controller.SHVAbstractController; + +import egovframework.api.arms.module_pdmapper.model.PdMapperDTO; +import egovframework.api.arms.module_pdmapper.service.PdMapper; + +@Slf4j +@Controller +@RequestMapping(value = {"/auth-admin/api/arms/pdmapper"}) +public class AdminPdMapperController extends SHVAbstractController { + + @Autowired + @Qualifier("pdMapper") + private PdMapper pdMapper; + + @PostConstruct + public void initialize() { + setJsTreeHibernateService(pdMapper); + } + +} Index: web-module/src/main/java/egovframework/api/arms/module_pdmapper/controller/AnonPdMapperController.java =================================================================== diff -u --- web-module/src/main/java/egovframework/api/arms/module_pdmapper/controller/AnonPdMapperController.java (revision 0) +++ web-module/src/main/java/egovframework/api/arms/module_pdmapper/controller/AnonPdMapperController.java (revision caba1883073fbfc06e4f8b54885df32c6b218741) @@ -0,0 +1,51 @@ +/* + * @author Dongmin.lee + * @since 2022-06-19 + * @version 22.06.19 + * @see
+ *  Copyright (C) 2007 by 313 DEV GRP, Inc - All Rights Reserved
+ *  Unauthorized copying of this file, via any medium is strictly prohibited
+ *  Proprietary and confidential
+ *  Written by 313 developer group <313@313.co.kr>, December 2010
+ * 
+ */ +package egovframework.api.arms.module_pdmapper.controller; + +import lombok.extern.slf4j.Slf4j; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.ModelAndView; +import javax.annotation.PostConstruct; +import javax.servlet.http.HttpServletRequest; +import java.util.Comparator; +import java.util.List; +import java.util.NoSuchElementException; + +import egovframework.com.ext.jstree.springHibernate.core.controller.SHVAbstractController; + +import egovframework.api.arms.module_pdmapper.model.PdMapperDTO; +import egovframework.api.arms.module_pdmapper.service.PdMapper; + +@Slf4j +@Controller +@RequestMapping(value = {"/auth-anon/api/arms/pdmapper"}) +public class AnonPdMapperController extends SHVAbstractController { + + @Autowired + @Qualifier("pdMapper") + private PdMapper pdMapper; + + @PostConstruct + public void initialize() { + setJsTreeHibernateService(pdMapper); + } + +} Index: web-module/src/main/java/egovframework/api/arms/module_pdmapper/controller/UserPdMapperController.java =================================================================== diff -u --- web-module/src/main/java/egovframework/api/arms/module_pdmapper/controller/UserPdMapperController.java (revision 0) +++ web-module/src/main/java/egovframework/api/arms/module_pdmapper/controller/UserPdMapperController.java (revision caba1883073fbfc06e4f8b54885df32c6b218741) @@ -0,0 +1,53 @@ +/* + * @author Dongmin.lee + * @since 2022-06-19 + * @version 22.06.19 + * @see
+ *  Copyright (C) 2007 by 313 DEV GRP, Inc - All Rights Reserved
+ *  Unauthorized copying of this file, via any medium is strictly prohibited
+ *  Proprietary and confidential
+ *  Written by 313 developer group <313@313.co.kr>, December 2010
+ * 
+ */ +package egovframework.api.arms.module_pdmapper.controller; + +import lombok.extern.slf4j.Slf4j; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.ModelAndView; +import javax.annotation.PostConstruct; +import javax.servlet.http.HttpServletRequest; +import java.util.Comparator; +import java.util.List; +import java.util.NoSuchElementException; + +import egovframework.com.ext.jstree.springHibernate.core.controller.SHVAbstractController; + +import egovframework.api.arms.module_pdmapper.model.PdMapperDTO; +import egovframework.api.arms.module_pdmapper.service.PdMapper; + +@Slf4j +@Controller +@RequestMapping(value = {"/auth-user/api/arms/pdmapper"}) +public class UserPdMapperController extends SHVAbstractController { + + @Autowired + @Qualifier("pdMapper") + private PdMapper pdMapper; + + @PostConstruct + public void initialize() { + setJsTreeHibernateService(pdMapper); + } + + private final Logger logger = LoggerFactory.getLogger(this.getClass()); + +} Index: web-module/src/main/java/egovframework/api/arms/module_pdmapper/model/PdMapperDTO.java =================================================================== diff -u --- web-module/src/main/java/egovframework/api/arms/module_pdmapper/model/PdMapperDTO.java (revision 0) +++ web-module/src/main/java/egovframework/api/arms/module_pdmapper/model/PdMapperDTO.java (revision caba1883073fbfc06e4f8b54885df32c6b218741) @@ -0,0 +1,103 @@ +/* + * @author Dongmin.lee + * @since 2022-06-19 + * @version 22.06.19 + * @see
+ *  Copyright (C) 2007 by 313 DEV GRP, Inc - All Rights Reserved
+ *  Unauthorized copying of this file, via any medium is strictly prohibited
+ *  Proprietary and confidential
+ *  Written by 313 developer group <313@313.co.kr>, December 2010
+ * 
+ */ +package egovframework.api.arms.module_pdmapper.model; + +import org.hibernate.annotations.*; +import org.hibernate.annotations.Cache; +import javax.persistence.*; +import javax.persistence.Entity; +import javax.persistence.Table; +import java.io.Serializable; +import egovframework.com.ext.jstree.springHibernate.core.vo.JsTreeHibernateDTO; +import egovframework.com.ext.jstree.springHibernate.core.vo.JsTreeHibernateSearchDTO; + +@Entity +@Table(name = "T_ARMS_PDMAPPER") +@SelectBeforeUpdate(value=true) +@DynamicInsert(value=true) +@DynamicUpdate(value=true) +@Cache(usage = CacheConcurrencyStrategy.READ_WRITE) +@SequenceGenerator(name = "JsTreeSequence", sequenceName = "S_ARMS_PDMAPPER", allocationSize = 1) +public class PdMapperDTO extends JsTreeHibernateSearchDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + public PdMapperDTO() { + super(); + } + + public PdMapperDTO(Boolean copyBooleanValue) { + super(); + this.copyBooleanValue = copyBooleanValue; + } + + //@Getter @Setter + @Column(name = "c_pdname") + String c_pdname; + @Column(name = "c_pdversion") + String c_pdversion; + @Column(name = "c_pdjira") + String c_pdjira; + + public String getC_pdname() { + return c_pdname; + } + + public void setC_pdname(String c_pdname) { + this.c_pdname = c_pdname; + } + + public String getC_pdversion() { + return c_pdversion; + } + + public void setC_pdversion(String c_pdversion) { + this.c_pdversion = c_pdversion; + } + + public String getC_pdjira() { + return c_pdjira; + } + + public void setC_pdjira(String c_pdjira) { + this.c_pdjira = c_pdjira; + } + + /* + * Extend Bean Field + */ + private Boolean copyBooleanValue; + + @Transient + public Boolean getCopyBooleanValue() { + copyBooleanValue = false; + if (this.getCopy() == 0) { + copyBooleanValue = false; + } else { + copyBooleanValue = true; + } + return copyBooleanValue; + } + + public void setCopyBooleanValue(Boolean copyBooleanValue) { + this.copyBooleanValue = copyBooleanValue; + } + + @Override + public void setFieldFromNewInstance(T paramInstance) { + if( paramInstance instanceof JsTreeHibernateDTO){ + if(paramInstance.isCopied()) { + this.setC_title("copy_" + this.getC_title()); + } + } + } +} Index: web-module/src/main/java/egovframework/api/arms/module_pdmapper/service/PdMapper.java =================================================================== diff -u --- web-module/src/main/java/egovframework/api/arms/module_pdmapper/service/PdMapper.java (revision 0) +++ web-module/src/main/java/egovframework/api/arms/module_pdmapper/service/PdMapper.java (revision caba1883073fbfc06e4f8b54885df32c6b218741) @@ -0,0 +1,20 @@ +/* + * @author Dongmin.lee + * @since 2022-06-19 + * @version 22.06.19 + * @see
+ *  Copyright (C) 2007 by 313 DEV GRP, Inc - All Rights Reserved
+ *  Unauthorized copying of this file, via any medium is strictly prohibited
+ *  Proprietary and confidential
+ *  Written by 313 developer group <313@313.co.kr>, December 2010
+ * 
+ */ +package egovframework.api.arms.module_pdmapper.service; + +import egovframework.com.ext.jstree.springHibernate.core.service.JsTreeHibernateService; + +public interface PdMapper extends JsTreeHibernateService { + + + +} \ No newline at end of file Index: web-module/src/main/java/egovframework/api/arms/module_pdmapper/service/PdMapperImpl.java =================================================================== diff -u --- web-module/src/main/java/egovframework/api/arms/module_pdmapper/service/PdMapperImpl.java (revision 0) +++ web-module/src/main/java/egovframework/api/arms/module_pdmapper/service/PdMapperImpl.java (revision caba1883073fbfc06e4f8b54885df32c6b218741) @@ -0,0 +1,22 @@ +/* + * @author Dongmin.lee + * @since 2022-06-19 + * @version 22.06.19 + * @see
+ *  Copyright (C) 2007 by 313 DEV GRP, Inc - All Rights Reserved
+ *  Unauthorized copying of this file, via any medium is strictly prohibited
+ *  Proprietary and confidential
+ *  Written by 313 developer group <313@313.co.kr>, December 2010
+ * 
+ */ +package egovframework.api.arms.module_pdmapper.service; + +import egovframework.com.ext.jstree.springHibernate.core.service.JsTreeHibernateServiceImpl; +import org.springframework.stereotype.Service; + +@Service("pdMapper") +public class PdMapperImpl extends JsTreeHibernateServiceImpl implements PdMapper{ + + + +} \ No newline at end of file Index: web-module/src/main/resources/script/ddl/oracle/arms/PdMapper_Oracle_DDL.sql =================================================================== diff -u --- web-module/src/main/resources/script/ddl/oracle/arms/PdMapper_Oracle_DDL.sql (revision 0) +++ web-module/src/main/resources/script/ddl/oracle/arms/PdMapper_Oracle_DDL.sql (revision caba1883073fbfc06e4f8b54885df32c6b218741) @@ -0,0 +1,126 @@ + +CREATE TABLE T_ARMS_PDMAPPER_LOG +( + C_ID NUMBER NOT NULL, + C_PARENTID NUMBER NOT NULL, + C_POSITION NUMBER NOT NULL, + C_LEFT NUMBER NOT NULL, + C_RIGHT NUMBER NOT NULL, + C_LEVEL NUMBER NOT NULL, + C_TITLE VARCHAR2(4000 BYTE), + C_TYPE VARCHAR2(4000 BYTE), + C_METHOD VARCHAR2(4000 BYTE), + C_STATE VARCHAR2(4000 BYTE), + C_DATE DATE NOT NULL +); + +COMMENT ON TABLE T_ARMS_PDMAPPER_LOG IS '기본 트리 스키마 트리거 로그'; +COMMENT ON COLUMN T_ARMS_PDMAPPER_LOG.C_ID IS '노드 아이디'; +COMMENT ON COLUMN T_ARMS_PDMAPPER_LOG.C_PARENTID IS '부모 노드 아이디'; +COMMENT ON COLUMN T_ARMS_PDMAPPER_LOG.C_POSITION IS '노드 포지션'; +COMMENT ON COLUMN T_ARMS_PDMAPPER_LOG.C_LEFT IS '노드 좌측 끝 포인트'; +COMMENT ON COLUMN T_ARMS_PDMAPPER_LOG.C_RIGHT IS '노드 우측 끝 포인트'; +COMMENT ON COLUMN T_ARMS_PDMAPPER_LOG.C_LEVEL IS '노드 DEPTH '; +COMMENT ON COLUMN T_ARMS_PDMAPPER_LOG.C_TITLE IS '노드 명'; +COMMENT ON COLUMN T_ARMS_PDMAPPER_LOG.C_TYPE IS '노드 타입'; +COMMENT ON COLUMN T_ARMS_PDMAPPER_LOG.C_METHOD IS '노드 변경 행위'; +COMMENT ON COLUMN T_ARMS_PDMAPPER_LOG.C_STATE IS '노드 상태값 ( 이전인지. 이후인지)'; +COMMENT ON COLUMN T_ARMS_PDMAPPER_LOG.C_DATE IS '노드 변경 시'; + +/* + * JsTree + */ +CREATE TABLE T_ARMS_PDMAPPER +( + C_ID NUMBER NOT NULL, + C_PARENTID NUMBER NOT NULL, + C_POSITION NUMBER NOT NULL, + C_LEFT NUMBER NOT NULL, + C_RIGHT NUMBER NOT NULL, + C_LEVEL NUMBER NOT NULL, + C_TITLE VARCHAR2(4000 BYTE), + C_TYPE VARCHAR2(4000 BYTE), + CONSTRAINT T_ARMS_PDMAPPER_PK PRIMARY KEY (C_ID) + /* + * CONSTRAINT T_ARMS_PDMAPPER_FK1 FOREIGN KEY (OTHER_ID) REFERENCES OTHER T_ARMS_PDMAPPER(C_ID) ON DELETE CASCADE + */ +); + +COMMENT ON TABLE T_ARMS_PDMAPPER IS '기본 트리 스키마'; +COMMENT ON COLUMN T_ARMS_PDMAPPER.C_ID IS '노드 아이디'; +COMMENT ON COLUMN T_ARMS_PDMAPPER.C_PARENTID IS '부모 노드 아이디'; +COMMENT ON COLUMN T_ARMS_PDMAPPER.C_POSITION IS '노드 포지션'; +COMMENT ON COLUMN T_ARMS_PDMAPPER.C_LEFT IS '노드 좌측 끝 포인트'; +COMMENT ON COLUMN T_ARMS_PDMAPPER.C_RIGHT IS '노드 우측 끝 포인트'; +COMMENT ON COLUMN T_ARMS_PDMAPPER.C_LEVEL IS '노드 DEPTH '; +COMMENT ON COLUMN T_ARMS_PDMAPPER.C_TITLE IS '노드 명'; +COMMENT ON COLUMN T_ARMS_PDMAPPER.C_TYPE IS '노드 타입'; + +/* + * 인덱스는 되도록 걸지 말것. + * CREATE UNIQUE INDEX I_COMPREHENSIVETREE ON T_ARMS_PDMAPPER + * ("C_ID" ASC) + */ + /* +*DROP SEQUENCE S_ARMS_PDMAPPER; + */ +CREATE SEQUENCE S_ARMS_PDMAPPER + START WITH 10 + MAXVALUE 999999999999999999999999999 + MINVALUE 0 + NOCYCLE + CACHE 20 + NOORDER; + +/* + * JsTree 트리거 + */ +CREATE OR REPLACE TRIGGER "TRIG_PDMAPPER" +BEFORE DELETE OR INSERT OR UPDATE +ON T_ARMS_PDMAPPER +REFERENCING NEW AS NEW OLD AS OLD +FOR EACH ROW +DECLARE +tmpVar NUMBER; +/****************************************************************************** + NAME: TRIGGER_COMPREHENSIVETREE + PURPOSE: + + REVISIONS: + Ver Date Author Description + --------- ---------- --------------- ------------------------------------ + 1.0 2012-08-29 1. Created this trigger. + + NOTES: + + Automatically available Auto Replace Keywords: + Object Name: TRIGGER_COMPREHENSIVETREE + Sysdate: 2012-08-29 + Date and Time: 2012-08-29, 오후 5:26:44, and 2012-08-29 오후 5:26:44 + Username: (set in TOAD Options, Proc Templates) + Table Name: T_ARMS_PDMAPPER (set in the "New PL/SQL Object" dialog) + Trigger Options: (set in the "New PL/SQL Object" dialog) +******************************************************************************/ +BEGIN + tmpVar := 0; + IF UPDATING THEN + insert into T_ARMS_PDMAPPER_LOG + values (:old.C_ID,:old.C_PARENTID,:old.C_POSITION,:old.C_LEFT,:old.C_RIGHT,:old.C_LEVEL,:old.C_TITLE,:old.C_TYPE,'update','변경이전데이터',sysdate); + insert into T_ARMS_PDMAPPER_LOG + values (:new.C_ID,:new.C_PARENTID,:new.C_POSITION,:new.C_LEFT,:new.C_RIGHT,:new.C_LEVEL,:new.C_TITLE,:new.C_TYPE,'update','변경이후데이터',sysdate); + END IF; + IF DELETING THEN + insert into T_ARMS_PDMAPPER_LOG + values (:old.C_ID,:old.C_PARENTID,:old.C_POSITION,:old.C_LEFT,:old.C_RIGHT,:old.C_LEVEL,:old.C_TITLE,:old.C_TYPE,'delete','삭제된데이터',sysdate); + END IF; + IF INSERTING THEN + insert into T_ARMS_PDMAPPER_LOG + values (:new.C_ID,:new.C_PARENTID,:new.C_POSITION,:new.C_LEFT,:new.C_RIGHT,:new.C_LEVEL,:new.C_TITLE,:new.C_TYPE,'insert','삽입된데이터',sysdate); + END IF; + + EXCEPTION + WHEN OTHERS THEN + -- Consider logging the error and then re-raise + RAISE; +END TRIG_PDMAPPER; +/ \ No newline at end of file Index: web-module/src/main/resources/script/dml/oracle/arms/PdMapper_Oracle_DML.sql =================================================================== diff -u --- web-module/src/main/resources/script/dml/oracle/arms/PdMapper_Oracle_DML.sql (revision 0) +++ web-module/src/main/resources/script/dml/oracle/arms/PdMapper_Oracle_DML.sql (revision caba1883073fbfc06e4f8b54885df32c6b218741) @@ -0,0 +1,26 @@ + +Insert into T_ARMS_PDMAPPER + (C_ID, C_PARENTID, C_POSITION, C_LEFT, C_RIGHT, + C_LEVEL, C_TITLE, C_TYPE) +Values + (1, 0, 0, 1, 8, + 0, 'Root Node', 'root'); +Insert into T_ARMS_PDMAPPER + (C_ID, C_PARENTID, C_POSITION, C_LEFT, C_RIGHT, + C_LEVEL, C_TITLE, C_TYPE) +Values + (2, 1, 0, 2, 7, + 1, 'First Child', 'drive'); +Insert into T_ARMS_PDMAPPER + (C_ID, C_PARENTID, C_POSITION, C_LEFT, C_RIGHT, + C_LEVEL, C_TITLE, C_TYPE) +Values + (3, 2, 0, 3, 4, + 2, 'Leaf Node', 'default'); +Insert into T_ARMS_PDMAPPER + (C_ID, C_PARENTID, C_POSITION, C_LEFT, C_RIGHT, + C_LEVEL, C_TITLE, C_TYPE) +Values + (4, 2, 1, 5, 6, + 2, 'Branch Node', 'folder'); +COMMIT; \ No newline at end of file