|
@@ -0,0 +1,70 @@
|
|
|
+package com.persagy.adm.server.backstage.service.impl;
|
|
|
+
|
|
|
+import com.persagy.dmp.common.exception.BusinessException;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+
|
|
|
+import javax.annotation.PostConstruct;
|
|
|
+import javax.annotation.PreDestroy;
|
|
|
+
|
|
|
+/**
|
|
|
+ * revit模型解析基类
|
|
|
+ * @author : lijie
|
|
|
+ * Update By 2022/1/21 10:48
|
|
|
+ */
|
|
|
+@Slf4j
|
|
|
+public abstract class AdmRevitAnalysisBase {
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 初始化方法,用于准备环境
|
|
|
+ * return : void
|
|
|
+ * @author : lijie
|
|
|
+ * Update By 2022/1/21 10:59
|
|
|
+ */
|
|
|
+ @PostConstruct
|
|
|
+ public final synchronized void init() throws BusinessException {
|
|
|
+ // 1.是否需要打印日志
|
|
|
+ if (log.isDebugEnabled()) {
|
|
|
+ log.debug("AdmRevitAnalysisBase.init方法开始:{}", this);
|
|
|
+ }
|
|
|
+ // 调具体实现类的方法,完成自身的初始化
|
|
|
+ initInternal();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 销毁方法
|
|
|
+ * return : void
|
|
|
+ * @author : lijie
|
|
|
+ * Update By 2022/1/21 10:50
|
|
|
+ */
|
|
|
+ @PreDestroy
|
|
|
+ public final synchronized void destroy() throws BusinessException {
|
|
|
+ // 1.是否需要打印日志
|
|
|
+ if (log.isDebugEnabled()) {
|
|
|
+ log.debug("AdmRevitAnalysisBase.destroy() :{}", this);
|
|
|
+ }
|
|
|
+ // 调具体实现类的方法,完成自身的初始化
|
|
|
+ destroyInternal();
|
|
|
+ if (log.isDebugEnabled()) {
|
|
|
+ log.debug("AdmRevitAnalysisBase.destroy() end:{}", this);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 内部初始化方法,子类覆写即可
|
|
|
+ * return : void
|
|
|
+ * @author : lijie
|
|
|
+ * Update By 2022/1/21 12:03
|
|
|
+ */
|
|
|
+ protected void initInternal(){};
|
|
|
+ /**
|
|
|
+ * 内部销毁方法,子类覆写即可
|
|
|
+ * return : void
|
|
|
+ * @author : lijie
|
|
|
+ * Update By 2022/1/21 12:03
|
|
|
+ */
|
|
|
+ protected void destroyInternal(){};
|
|
|
+}
|