Index: pom.xml =================================================================== diff -u -r2fed13abb5c4dbb0b77b0d730dffcc6f69ead08f -red90ae3a2f77ed67d7d9a3d44b10aca21ded3e39 --- pom.xml (.../pom.xml) (revision 2fed13abb5c4dbb0b77b0d730dffcc6f69ead08f) +++ pom.xml (.../pom.xml) (revision ed90ae3a2f77ed67d7d9a3d44b10aca21ded3e39) @@ -10,7 +10,7 @@ 4.0.0 313devgrp java-service-tree-framework-backend-server - 22.06.09 + 22.06.12 pom java-service-tree-framework Index: web-module/pom.xml =================================================================== diff -u -r2fed13abb5c4dbb0b77b0d730dffcc6f69ead08f -red90ae3a2f77ed67d7d9a3d44b10aca21ded3e39 --- web-module/pom.xml (.../pom.xml) (revision 2fed13abb5c4dbb0b77b0d730dffcc6f69ead08f) +++ web-module/pom.xml (.../pom.xml) (revision ed90ae3a2f77ed67d7d9a3d44b10aca21ded3e39) @@ -7,7 +7,7 @@ 313devgrp java-service-tree-framework-backend-server - 22.06.09 + 22.06.12 ../pom.xml Index: web-module/script/ddl/oracle/egovframework/api/Arms_PdVersionService_DDL_Oracle.sql =================================================================== diff -u --- web-module/script/ddl/oracle/egovframework/api/Arms_PdVersionService_DDL_Oracle.sql (revision 0) +++ web-module/script/ddl/oracle/egovframework/api/Arms_PdVersionService_DDL_Oracle.sql (revision ed90ae3a2f77ed67d7d9a3d44b10aca21ded3e39) @@ -0,0 +1,130 @@ +/* + * JsTree 추적 로그 테이블 + * 트리거 Log를 저장합니다. + */ +CREATE TABLE T_ARMS_PDVERSIONSERVICE_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_PDVERSIONSERVICE_LOG IS '기본 트리 스키마 트리거 로그'; +COMMENT ON COLUMN T_ARMS_PDVERSIONSERVICE_LOG.C_ID IS '노드 아이디'; +COMMENT ON COLUMN T_ARMS_PDVERSIONSERVICE_LOG.C_PARENTID IS '부모 노드 아이디'; +COMMENT ON COLUMN T_ARMS_PDVERSIONSERVICE_LOG.C_POSITION IS '노드 포지션'; +COMMENT ON COLUMN T_ARMS_PDVERSIONSERVICE_LOG.C_LEFT IS '노드 좌측 끝 포인트'; +COMMENT ON COLUMN T_ARMS_PDVERSIONSERVICE_LOG.C_RIGHT IS '노드 우측 끝 포인트'; +COMMENT ON COLUMN T_ARMS_PDVERSIONSERVICE_LOG.C_LEVEL IS '노드 DEPTH '; +COMMENT ON COLUMN T_ARMS_PDVERSIONSERVICE_LOG.C_TITLE IS '노드 명'; +COMMENT ON COLUMN T_ARMS_PDVERSIONSERVICE_LOG.C_TYPE IS '노드 타입'; +COMMENT ON COLUMN T_ARMS_PDVERSIONSERVICE_LOG.C_METHOD IS '노드 변경 행위'; +COMMENT ON COLUMN T_ARMS_PDVERSIONSERVICE_LOG.C_STATE IS '노드 상태값 ( 이전인지. 이후인지)'; +COMMENT ON COLUMN T_ARMS_PDVERSIONSERVICE_LOG.C_DATE IS '노드 변경 시'; + +/* + * JsTree + */ +CREATE TABLE T_ARMS_PDVERSIONSERVICE +( + 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_PDSERVICE_LINK NUMBER, + CONSTRAINT T_ARMS_PDVERSIONSERVICE_PK PRIMARY KEY (C_ID) + /* + * CONSTRAINT T_ARMS_PDVERSIONSERVICE_FK1 FOREIGN KEY (OTHER_ID) REFERENCES OTHER T_ARMS_PDVERSIONSERVICE(C_ID) ON DELETE CASCADE + */ +); + +COMMENT ON TABLE T_ARMS_PDVERSIONSERVICE IS '기본 트리 스키마'; +COMMENT ON COLUMN T_ARMS_PDVERSIONSERVICE.C_ID IS '노드 아이디'; +COMMENT ON COLUMN T_ARMS_PDVERSIONSERVICE.C_PARENTID IS '부모 노드 아이디'; +COMMENT ON COLUMN T_ARMS_PDVERSIONSERVICE.C_POSITION IS '노드 포지션'; +COMMENT ON COLUMN T_ARMS_PDVERSIONSERVICE.C_LEFT IS '노드 좌측 끝 포인트'; +COMMENT ON COLUMN T_ARMS_PDVERSIONSERVICE.C_RIGHT IS '노드 우측 끝 포인트'; +COMMENT ON COLUMN T_ARMS_PDVERSIONSERVICE.C_LEVEL IS '노드 DEPTH '; +COMMENT ON COLUMN T_ARMS_PDVERSIONSERVICE.C_TITLE IS '노드 명'; +COMMENT ON COLUMN T_ARMS_PDVERSIONSERVICE.C_TYPE IS '노드 타입'; + +/* + * 인덱스는 되도록 걸지 말것. + * CREATE UNIQUE INDEX I_COMPREHENSIVETREE ON T_ARMS_PDVERSIONSERVICE + * ("C_ID" ASC) + */ + /* +*DROP SEQUENCE S_ARMS_PDVERSIONSERVICE; + */ +CREATE SEQUENCE S_ARMS_PDVERSIONSERVICE + START WITH 10 + MAXVALUE 999999999999999999999999999 + MINVALUE 0 + NOCYCLE + CACHE 20 + NOORDER; + +/* + * JsTree 트리거 + */ +CREATE OR REPLACE TRIGGER "TRIGGER_TREE_HIBER" +BEFORE DELETE OR INSERT OR UPDATE +ON T_ARMS_PDVERSIONSERVICE +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_PDVERSIONSERVICE (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_PDVERSIONSERVICE_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_PDVERSIONSERVICE_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_PDVERSIONSERVICE_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_PDVERSIONSERVICE_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 TRIGGER_TREE_HIBER; +/ \ No newline at end of file Index: web-module/script/dml/oracle/egovframework/api/Arms_PdVersionService_DML_Oracle.sql =================================================================== diff -u --- web-module/script/dml/oracle/egovframework/api/Arms_PdVersionService_DML_Oracle.sql (revision 0) +++ web-module/script/dml/oracle/egovframework/api/Arms_PdVersionService_DML_Oracle.sql (revision ed90ae3a2f77ed67d7d9a3d44b10aca21ded3e39) @@ -0,0 +1,25 @@ +Insert into T_ARMS_PDVERSIONSERVICE + (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_PDVERSIONSERVICE + (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_PDVERSIONSERVICE + (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_PDVERSIONSERVICE + (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 Index: web-module/src/main/java/egovframework/api/arms/pdVersionService/controller/AdminPdVersionServiceController.java =================================================================== diff -u --- web-module/src/main/java/egovframework/api/arms/pdVersionService/controller/AdminPdVersionServiceController.java (revision 0) +++ web-module/src/main/java/egovframework/api/arms/pdVersionService/controller/AdminPdVersionServiceController.java (revision ed90ae3a2f77ed67d7d9a3d44b10aca21ded3e39) @@ -0,0 +1,4 @@ +package egovframework.api.arms.pdVersionService.controller; + +public class AdminPdVersionServiceController { +} Index: web-module/src/main/java/egovframework/api/arms/pdVersionService/controller/AnonPdVersionServiceController.java =================================================================== diff -u --- web-module/src/main/java/egovframework/api/arms/pdVersionService/controller/AnonPdVersionServiceController.java (revision 0) +++ web-module/src/main/java/egovframework/api/arms/pdVersionService/controller/AnonPdVersionServiceController.java (revision ed90ae3a2f77ed67d7d9a3d44b10aca21ded3e39) @@ -0,0 +1,4 @@ +package egovframework.api.arms.pdVersionService.controller; + +public class AnonPdVersionServiceController { +} Index: web-module/src/main/java/egovframework/api/arms/pdVersionService/controller/UserPdVersionServiceController.java =================================================================== diff -u --- web-module/src/main/java/egovframework/api/arms/pdVersionService/controller/UserPdVersionServiceController.java (revision 0) +++ web-module/src/main/java/egovframework/api/arms/pdVersionService/controller/UserPdVersionServiceController.java (revision ed90ae3a2f77ed67d7d9a3d44b10aca21ded3e39) @@ -0,0 +1,34 @@ +package egovframework.api.arms.pdVersionService.controller; + +import egovframework.api.arms.pdService.model.PdServiceDTO; +import egovframework.api.arms.pdService.service.PdService; +import egovframework.api.arms.pdVersionService.model.PdVersionServiceVO; +import egovframework.api.arms.pdVersionService.service.PdVersionService; +import egovframework.com.ext.jstree.springHibernate.core.controller.SHVAbstractController; +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.web.bind.annotation.RequestMapping; + +import javax.annotation.PostConstruct; + +@Slf4j +@Controller +@RequestMapping(value = {"/auth-user/api/arms/pdVersionService"}) +public class UserPdVersionServiceController extends SHVAbstractController { + + @Autowired + @Qualifier("pdVersionService") + private PdVersionService pdVersionService; + + @PostConstruct + public void initialize() { + setJsTreeHibernateService(pdVersionService); + } + + private final Logger logger = LoggerFactory.getLogger(this.getClass()); + +} Index: web-module/src/main/java/egovframework/api/arms/pdVersionService/model/PdVersionServiceDTO.java =================================================================== diff -u --- web-module/src/main/java/egovframework/api/arms/pdVersionService/model/PdVersionServiceDTO.java (revision 0) +++ web-module/src/main/java/egovframework/api/arms/pdVersionService/model/PdVersionServiceDTO.java (revision ed90ae3a2f77ed67d7d9a3d44b10aca21ded3e39) @@ -0,0 +1,4 @@ +package egovframework.api.arms.pdVersionService.model; + +public class PdVersionServiceDTO { +} Index: web-module/src/main/java/egovframework/api/arms/pdVersionService/model/PdVersionServiceVO.java =================================================================== diff -u --- web-module/src/main/java/egovframework/api/arms/pdVersionService/model/PdVersionServiceVO.java (revision 0) +++ web-module/src/main/java/egovframework/api/arms/pdVersionService/model/PdVersionServiceVO.java (revision ed90ae3a2f77ed67d7d9a3d44b10aca21ded3e39) @@ -0,0 +1,73 @@ +package egovframework.api.arms.pdVersionService.model; + +import egovframework.com.ext.jstree.springHibernate.core.vo.JsTreeHibernateDTO; +import egovframework.com.ext.jstree.springHibernate.core.vo.JsTreeHibernateSearchDTO; +import org.hibernate.annotations.*; +import org.hibernate.annotations.Cache; + +import javax.persistence.*; +import javax.persistence.Entity; +import javax.persistence.Table; +import java.io.Serializable; + +@Entity +@Table(name = "T_ARMS_PDVERSIONSERVICE") +@SelectBeforeUpdate(value=true) +@DynamicInsert(value=true) +@DynamicUpdate(value=true) +@Cache(usage = CacheConcurrencyStrategy.READ_WRITE) +@SequenceGenerator(name = "JsTreeSequence", sequenceName = "S_ARMS_PDVERSIONSERVICE", allocationSize = 1) +public class PdVersionServiceVO extends JsTreeHibernateSearchDTO implements Serializable { + + private static final long serialVersionUID = -6859122566734590165L; + + public PdVersionServiceVO() { + super(); + } + + public PdVersionServiceVO(Boolean copyBooleanValue) { + super(); + this.copyBooleanValue = copyBooleanValue; + } + + //@Getter @Setter + @Column(name = "c_pdservice_link") + private Integer c_pdservice_link; + + public Integer getC_pdservice_link() { + return c_pdservice_link; + } + + public void setC_pdservice_link(Integer c_pdservice_link) { + this.c_pdservice_link = c_pdservice_link; + } + + /* + * 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/pdVersionService/service/PdVersionService.java =================================================================== diff -u --- web-module/src/main/java/egovframework/api/arms/pdVersionService/service/PdVersionService.java (revision 0) +++ web-module/src/main/java/egovframework/api/arms/pdVersionService/service/PdVersionService.java (revision ed90ae3a2f77ed67d7d9a3d44b10aca21ded3e39) @@ -0,0 +1,7 @@ +package egovframework.api.arms.pdVersionService.service; + +import egovframework.com.ext.jstree.springHibernate.core.service.JsTreeHibernateService; + +public interface PdVersionService extends JsTreeHibernateService { + +} Index: web-module/src/main/java/egovframework/api/arms/pdVersionService/service/PdVersionServiceImpl.java =================================================================== diff -u --- web-module/src/main/java/egovframework/api/arms/pdVersionService/service/PdVersionServiceImpl.java (revision 0) +++ web-module/src/main/java/egovframework/api/arms/pdVersionService/service/PdVersionServiceImpl.java (revision ed90ae3a2f77ed67d7d9a3d44b10aca21ded3e39) @@ -0,0 +1,12 @@ +package egovframework.api.arms.pdVersionService.service; + +import egovframework.api.arms.pdService.service.PdService; +import egovframework.com.ext.jstree.springHibernate.core.service.JsTreeHibernateServiceImpl; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +@Slf4j +@Service("pdVersionService") +public class PdVersionServiceImpl extends JsTreeHibernateServiceImpl implements PdVersionService { + +}