diff --git a/so-devicecontrol/conf/logback-dc.xml b/so-devicecontrol/conf/logback-dc.xml deleted file mode 100644 index 3d530d7d..00000000 --- a/so-devicecontrol/conf/logback-dc.xml +++ /dev/null @@ -1,253 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - UTF-8 - %d %-4relative [%thread] %-5level %logger{36} - %msg%n - - - - - - - - ${LOG_FILE_PATH_DEFAULT}_${byDay}.log - true - - ${ENCODER_PATTERN_FILE} - - - - - - ${LOG_FILE_PATH_DEFAULT}.log - - - ${LOG_FILE_NAME_DEFAULT}_%d{yyyy-MM-dd}.%i.log - - - 100MB - - - - ${ENCODER_PATTERN_ROLLING_FILE} - - - - - - ${LOG_FILE_PATH_SPRING}.log - - - ${LOG_FILE_NAME_SPRING}_%d{yyyy-MM-dd}.%i.log - - - 100MB - - - - ${ENCODER_PATTERN_ROLLING_FILE} - - - - - - ${LOG_FILE_PATH_PROCESSOR_CONTEXT}.log - - - ${LOG_FILE_NAME_CONTEXT}_%d{yyyy-MM-dd}.%i.log - - - 100MB - - - - ${ENCODER_PATTERN_ROLLING_FILE} - - - - - - ${LOG_FILE_PATH_PROCESSOR_ORCHESTRATIONSERVICE}.log - - - ${LOG_FILE_NAME_ORCHESTRATIONSERVICE}_%d{yyyy-MM-dd}.%i.log - - - 100MB - - - - ${ENCODER_PATTERN_ROLLING_FILE} - - - - - - ${LOG_FILE_PATH_PROCESSOR_VIRTUALOBJECT}.log - - - ${LOG_FILE_NAME_VIRTUALOBJECT}_%d{yyyy-MM-dd}.%i.log - - - 100MB - - - - ${ENCODER_PATTERN_ROLLING_FILE} - - - - - - ${LOG_FILE_PATH_PROCESSOR_DEVICECONTROL}.log - - - ${LOG_FILE_NAME_DEVICECONTROL}_%d{yyyy-MM-dd}.%i.log - - - 100MB - - - - ${ENCODER_PATTERN_ROLLING_FILE} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/so-if-db/conf/logback-if-db.xml b/so-if-db/conf/logback-if-db.xml deleted file mode 100644 index 4fb7b91c..00000000 --- a/so-if-db/conf/logback-if-db.xml +++ /dev/null @@ -1,253 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - UTF-8 - %d %-4relative [%thread] %-5level %logger{36} - %msg%n - - - - - - - - ${LOG_FILE_PATH_DEFAULT}_${byDay}.log - true - - ${ENCODER_PATTERN_FILE} - - - - - - ${LOG_FILE_PATH_DEFAULT}.log - - - ${LOG_FILE_NAME_DEFAULT}_%d{yyyy-MM-dd}.%i.log - - - 100MB - - - - ${ENCODER_PATTERN_ROLLING_FILE} - - - - - - ${LOG_FILE_PATH_SPRING}.log - - - ${LOG_FILE_NAME_SPRING}_%d{yyyy-MM-dd}.%i.log - - - 100MB - - - - ${ENCODER_PATTERN_ROLLING_FILE} - - - - - - ${LOG_FILE_PATH_PROCESSOR_CONTEXT}.log - - - ${LOG_FILE_NAME_CONTEXT}_%d{yyyy-MM-dd}.%i.log - - - 100MB - - - - ${ENCODER_PATTERN_ROLLING_FILE} - - - - - - ${LOG_FILE_PATH_PROCESSOR_ORCHESTRATIONSERVICE}.log - - - ${LOG_FILE_NAME_ORCHESTRATIONSERVICE}_%d{yyyy-MM-dd}.%i.log - - - 100MB - - - - ${ENCODER_PATTERN_ROLLING_FILE} - - - - - - ${LOG_FILE_PATH_PROCESSOR_VIRTUALOBJECT}.log - - - ${LOG_FILE_NAME_VIRTUALOBJECT}_%d{yyyy-MM-dd}.%i.log - - - 100MB - - - - ${ENCODER_PATTERN_ROLLING_FILE} - - - - - - ${LOG_FILE_PATH_PROCESSOR_DEVICECONTROL}.log - - - ${LOG_FILE_NAME_DEVICECONTROL}_%d{yyyy-MM-dd}.%i.log - - - 100MB - - - - ${ENCODER_PATTERN_ROLLING_FILE} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/so-if-db/src/main/java/com/pineone/icbms/so/interfaces/database/controller/AspectController.java b/so-if-db/src/main/java/com/pineone/icbms/so/interfaces/database/controller/AspectController.java deleted file mode 100644 index 9811e2d5..00000000 --- a/so-if-db/src/main/java/com/pineone/icbms/so/interfaces/database/controller/AspectController.java +++ /dev/null @@ -1,91 +0,0 @@ -package com.pineone.icbms.so.interfaces.database.controller;//package com.pineone.icbms.so.interfaces.database.controller; -// -//import com.pineone.icbms.so.interfaces.database.controller.inputdata.AspectData; -//import com.pineone.icbms.so.interfaces.database.logic.itf.IAspectDAO; -//import com.pineone.icbms.so.interfaces.database.model.AspectForDB; -//import com.pineone.icbms.so.interfaces.database.ref.DataLossException; -//import com.pineone.icbms.so.interfaces.database.ref.DataValidation; -//import com.pineone.icbms.so.interfaces.database.ref.ResponseMessage; -//import org.springframework.beans.factory.annotation.Autowired; -//import org.springframework.stereotype.Controller; -//import org.springframework.web.bind.annotation.*; -// -//import java.util.List; -// -///** -// * Created by melvin on 2017. 3. 28.. -// */ -// -//// Aspect 관련 controller 기능 구현 -//@Controller -//@RequestMapping(value = "/aspect") -//public class AspectController { -// -// @Autowired -// private IAspectDAO aspectDAO; -// -// @Autowired -// private ResponseMessage responseMessage; -// -// @Autowired -// private DataValidation dataValidation; -// -// // Aspect Id 로 Aspect 내용 조회 -// @RequestMapping(value = "/{id}", method = RequestMethod.GET) -// @ResponseBody -// public AspectForDB retrieveAspect(@PathVariable long id) { -// AspectForDB aspect = aspectDAO.retrieveAspect(id); -// return aspect; -// } -// -// // SO에 등록되어 있는 전체 Aspect 내용 조회 -// @RequestMapping -// @ResponseBody -// public List retrieveAspectList() { -// List aspectList = aspectDAO.retrieveAspectList(); -// return aspectList; -// } -// -// // SO에 Aspect 데이터 등록 -// @RequestMapping(method = RequestMethod.POST) -// @ResponseBody -// public ResponseMessage createAspect(@RequestBody AspectData aspectData) { -// -// try { -// dataValidation.inspectAspectData(aspectData); -// } catch (DataLossException e) { -// responseMessage.setExceptionMessage(e.getMessage()); -// return responseMessage; -// } -// -// String createMessage = aspectDAO.createAspect(aspectData); -// responseMessage.setMessage(createMessage); -// return responseMessage; -// } -// -// // SO의 Aspect Data Update TODO Update 정책 반영필요 -// @RequestMapping(value = "{id}", method = RequestMethod.POST) -// @ResponseBody -// public ResponseMessage updateAspect(@PathVariable long id, @RequestBody AspectData aspectData) { -// -// try { -// dataValidation.inspectAspectData(aspectData); -// } catch (DataLossException e) { -// responseMessage.setExceptionMessage(e.getMessage()); -// return responseMessage; -// } -// -// String updateMessage = aspectDAO.updateAspect(id, aspectData); -// responseMessage.setMessage(updateMessage); -// return responseMessage; -// } -// -// // SO의 virtualObject Date Delete -// @RequestMapping(value = "/delete/{id}") -// @ResponseBody -// public ResponseMessage deleteAspect(@PathVariable long id) { -// String deleteMessage = aspectDAO.deleteAspect(id); -// responseMessage.setMessage(deleteMessage); -// return responseMessage; -// } -//} diff --git a/so-if-db/src/main/java/com/pineone/icbms/so/interfaces/database/controller/CompositeVirtualObjectController.java b/so-if-db/src/main/java/com/pineone/icbms/so/interfaces/database/controller/CompositeVirtualObjectController.java deleted file mode 100644 index 2d7c7b2a..00000000 --- a/so-if-db/src/main/java/com/pineone/icbms/so/interfaces/database/controller/CompositeVirtualObjectController.java +++ /dev/null @@ -1,40 +0,0 @@ -//package com.pineone.icbms.so.interfaces.database.controller; -// -//import com.pineone.icbms.so.interfaces.database.controller.inputdata.CompositeVirtualObjectData; -//import com.pineone.icbms.so.interfaces.database.controller.inputdata.VirtualObjectData; -//import com.pineone.icbms.so.interfaces.database.logic.itf.ICompositeVirtualObjectDAO; -//import com.pineone.icbms.so.interfaces.database.ref.DataLossException; -//import com.pineone.icbms.so.interfaces.database.ref.DataValidation; -//import com.pineone.icbms.so.interfaces.database.ref.ResponseMessage; -//import org.springframework.beans.factory.annotation.Autowired; -//import org.springframework.stereotype.Controller; -//import org.springframework.web.bind.annotation.*; -// -///** -// * Created by melvin on 2017. 4. 10.. -// */ -// -// -//@Controller -//@RequestMapping(value = "/cvo") -//public class CompositeVirtualObjectController { -// -// @Autowired -// private ICompositeVirtualObjectDAO compositeVirtualObjectDAO; -// -// @Autowired -// private ResponseMessage responseMessage; -// -// @Autowired -// private DataValidation dataValidation; -// -// @RequestMapping(value = "{id}", method = RequestMethod.POST) -// @ResponseBody -// public ResponseMessage updateVirtualObject(@PathVariable String id, @RequestBody CompositeVirtualObjectData compositeVirtualObjectData){ -// -// String updateMessage = (compositeVirtualObjectDAO.updateCompositeVirtualObject(id, compositeVirtualObjectData)).toString(); -// responseMessage.setMessage(updateMessage); -// return responseMessage; -// } -// -//} diff --git a/so-if-db/src/main/java/com/pineone/icbms/so/interfaces/database/controller/VirtualObjectController.java b/so-if-db/src/main/java/com/pineone/icbms/so/interfaces/database/controller/VirtualObjectController.java deleted file mode 100644 index 15bee2ec..00000000 --- a/so-if-db/src/main/java/com/pineone/icbms/so/interfaces/database/controller/VirtualObjectController.java +++ /dev/null @@ -1,91 +0,0 @@ -package com.pineone.icbms.so.interfaces.database.controller;//package com.pineone.icbms.so.interfaces.database.controller; -// -//import com.pineone.icbms.so.interfaces.database.logic.itf.IVirtualObjectDAO; -//import com.pineone.icbms.so.interfaces.database.model.VirtualObjectForDB; -//import com.pineone.icbms.so.interfaces.database.ref.DataLossException; -//import com.pineone.icbms.so.interfaces.database.ref.DataValidation; -//import com.pineone.icbms.so.interfaces.database.ref.ResponseMessage; -//import com.pineone.icbms.so.interfaces.database.controller.inputdata.VirtualObjectData; -//import org.springframework.beans.factory.annotation.Autowired; -//import org.springframework.stereotype.Controller; -//import org.springframework.web.bind.annotation.*; -// -//import java.util.List; -// -///** -// * Created by melvin on 2017. 3. 27.. -// */ -// -//// VirtualObject 관련 controller 기능 구현 -//@Controller -//@RequestMapping(value = "/virtualobject") -//public class VirtualObjectController { -// -// @Autowired -// private IVirtualObjectDAO virtualObjectDAO; -// -// @Autowired -// private ResponseMessage responseMessage; -// -// @Autowired -// private DataValidation dataValidation; -// -// // VirtualObject Id 로 VirtualObject 조회 -// @RequestMapping(value = "/{id}" , method = RequestMethod.GET) -// @ResponseBody -// public VirtualObjectForDB retrieveVirtualObject(@PathVariable long id){ -// VirtualObjectForDB virtualObject = virtualObjectDAO.retrieveVirtualObject(id); -// return virtualObject; -// } -// -// // SO에 등록되어 있는 전체 VirtualObject 내용 조회 -// @RequestMapping -// @ResponseBody -// public List retrieveVirtualObjectList(){ -// List virtualObjectList = virtualObjectDAO.retrieveVirtualObjectList(); -// return virtualObjectList; -// } -// -// // SO에 Virtual Object 데이터 등록 -// @RequestMapping(method = RequestMethod.POST) -// @ResponseBody -// public ResponseMessage createVirtualObject(@RequestBody VirtualObjectData virtualObjectData){ -// -// try{ -// dataValidation.inspectVirtualObjectData(virtualObjectData); -// } catch (DataLossException e) { -// responseMessage.setExceptionMessage(e.getMessage()); -// return responseMessage; -// } -// -// String createMessage = virtualObjectDAO.createVirtualObject(virtualObjectData); -// responseMessage.setMessage(createMessage); -// return responseMessage; -// } -// -// // SO의 virtualObject Data Update 정책 반영필요 -// @RequestMapping(value = "{id}", method = RequestMethod.POST) -// @ResponseBody -// public ResponseMessage updateVirtualObject(@PathVariable long id, @RequestBody VirtualObjectData virtualObjectData){ -// -// try{ -// dataValidation.inspectVirtualObjectData(virtualObjectData); -// } catch (DataLossException e) { -// responseMessage.setExceptionMessage(e.getMessage()); -// return responseMessage; -// } -// -// String updateMessage = virtualObjectDAO.updateVirtualObject(id, virtualObjectData); -// responseMessage.setMessage(updateMessage); -// return responseMessage; -// } -// -// // SO의 virtualObject Date Delete -// @RequestMapping(value = "/delete/{id}") -// @ResponseBody -// public ResponseMessage deleteVirtualObject(@PathVariable long id){ -// String deleteMessage = virtualObjectDAO.deleteVirtualObject(id); -// responseMessage.setMessage(deleteMessage); -// return responseMessage; -// } -//} diff --git a/so-if-db/src/main/java/com/pineone/icbms/so/interfaces/database/dao/VirtualObjectDao.java b/so-if-db/src/main/java/com/pineone/icbms/so/interfaces/database/dao/VirtualObjectDao.java index 9bafeacc..89f8c06e 100644 --- a/so-if-db/src/main/java/com/pineone/icbms/so/interfaces/database/dao/VirtualObjectDao.java +++ b/so-if-db/src/main/java/com/pineone/icbms/so/interfaces/database/dao/VirtualObjectDao.java @@ -1,8 +1,8 @@ package com.pineone.icbms.so.interfaces.database.dao; +import com.pineone.icbms.so.interfaces.database.model.MeasuringVoForDB; import com.pineone.icbms.so.interfaces.database.model.RuleItemForDB; import com.pineone.icbms.so.interfaces.database.model.VirtualObjectForDB; -import com.pineone.icbms.so.util.id.IdUtils; import org.springframework.stereotype.Component; import java.util.HashMap; @@ -87,6 +87,11 @@ public List retrieve() { return super.sqlSession.selectList("retrieveVirtualObjectByModel"); } + // retrieve list of Measuring Vo + public List getMeasuringVoList(String osId) { + return super.sqlSession.selectList("retrieveMeasuringRuleVirtualObjectListByOsId", osId); + } + // Aspect 저장 기능 구현 public VirtualObjectForDB create(VirtualObjectForDB model) { //String sessionId = IdUtils.createRandomUUID(); diff --git a/so-if-db/src/main/java/com/pineone/icbms/so/interfaces/database/model/MeasuringVoForDB.java b/so-if-db/src/main/java/com/pineone/icbms/so/interfaces/database/model/MeasuringVoForDB.java new file mode 100644 index 00000000..874915ee --- /dev/null +++ b/so-if-db/src/main/java/com/pineone/icbms/so/interfaces/database/model/MeasuringVoForDB.java @@ -0,0 +1,61 @@ +package com.pineone.icbms.so.interfaces.database.model; + +import lombok.*; + +@ToString +public class MeasuringVoForDB{ + + // rule_body + @Getter @Setter + private String id; //rule_body.id + + @Getter @Setter + private String cvoType; + + @Getter @Setter + private String baseCvoId; //rule_body.base_cvo_id + + @Getter @Setter + private String osId; + + @Getter @Setter + private String physicalDeviceTypeId; + + //@Getter @Setter + //private String physicalDeviceTypeUri; //physical_device_type.physical_device_type_uri + + @Getter @Setter + private String deviceId; // == deviceUri + + @Getter @Setter + private String locationId; //rule_body + + @Getter @Setter + private String locationUri; // location.uri + + // rule_item + @Getter @Setter + private String itemId; // rule_item.id + + @Getter @Setter + private String ruleBodyId; // rule_item.rule_body_id + + @Getter @Setter + private String voId; // rule_item.vo_id + + @Getter @Setter + private String aspectUri; // virtual_object.aspect_uri + + @Getter @Setter + private String functionalityId; //rule_item.funtionality_id + + @Getter @Setter + private String functionalityUri; //functionality.uri + + @Getter @Setter + private String voValueType; // rule_item.vo_value_type + + @Getter @Setter + private String voValue; // rule_item.vo_value + +} diff --git a/so-if-db/src/main/java/com/pineone/icbms/so/interfaces/database/model/RuleItemForDB.java b/so-if-db/src/main/java/com/pineone/icbms/so/interfaces/database/model/RuleItemForDB.java index 2adc9edb..67ab9745 100644 --- a/so-if-db/src/main/java/com/pineone/icbms/so/interfaces/database/model/RuleItemForDB.java +++ b/so-if-db/src/main/java/com/pineone/icbms/so/interfaces/database/model/RuleItemForDB.java @@ -18,10 +18,10 @@ public class RuleItemForDB { private String aspectUri; @Getter @Setter - private String funtionalityId; // rule_item.funtionality_id + private String functionalityId; // rule_item.funtionality_id @Getter @Setter - private String funtionalityUri; + private String functionalityUri; @Getter @Setter private String voValueType; // rule_item.vo_value_type diff --git a/so-if-db/src/main/java/com/pineone/icbms/so/interfaces/database/service/DataBaseStore.java b/so-if-db/src/main/java/com/pineone/icbms/so/interfaces/database/service/DataBaseStore.java index 4f93f72d..a6868d3f 100644 --- a/so-if-db/src/main/java/com/pineone/icbms/so/interfaces/database/service/DataBaseStore.java +++ b/so-if-db/src/main/java/com/pineone/icbms/so/interfaces/database/service/DataBaseStore.java @@ -82,8 +82,6 @@ public List getCompositeVirtualObjectListByOrchestr List compositeVirtualObjectForDBList = compositeVirtualObjectDao.retrieveCompositeVirtualObjectListByOrchestrationId(orchestrationServiceId); - List virtualObjectForDBList = null; - for(CompositeVirtualObjectForDB compositeVirtualObjectForDB : compositeVirtualObjectForDBList){ compositeVirtualObjectForDB.setVirtualObjectForDBList( getVirtualObjectListByCompositeVirtualObjectId(compositeVirtualObjectForDB.getId()) @@ -106,7 +104,17 @@ public List getRuleBodyListByOsId(String osId){ public CompositeVirtualObjectForDB getCvoById(String id) { return compositeVirtualObjectDao.retrieve(id); } - + + // retrieve list of Measuring Vo + @Override + public List getMeasuringVoList(String osId){ + log.debug("getMeasuringVoList : osId {}", osId); + + List RuleBodyForDBList = virtualObjectDao.getMeasuringVoList(osId); + + return RuleBodyForDBList; + } + /* * cvo Id로 부터 vo목록을 가져온다 */ diff --git a/so-if-db/src/main/java/com/pineone/icbms/so/interfaces/database/service/IDataBaseStore.java b/so-if-db/src/main/java/com/pineone/icbms/so/interfaces/database/service/IDataBaseStore.java index 1535c20d..2df6051b 100644 --- a/so-if-db/src/main/java/com/pineone/icbms/so/interfaces/database/service/IDataBaseStore.java +++ b/so-if-db/src/main/java/com/pineone/icbms/so/interfaces/database/service/IDataBaseStore.java @@ -54,4 +54,6 @@ public interface IDataBaseStore { List retrieveDeviceType(); DeviceTypeForDB retrieveDeviceTypeById(String id); + + List getMeasuringVoList(String osId); } diff --git a/so-if-db/src/main/resources/META-INF/mappers/virtualObjectMapper.xml b/so-if-db/src/main/resources/META-INF/mappers/virtualObjectMapper.xml index cd8bc34a..93b86cdd 100644 --- a/so-if-db/src/main/resources/META-INF/mappers/virtualObjectMapper.xml +++ b/so-if-db/src/main/resources/META-INF/mappers/virtualObjectMapper.xml @@ -89,16 +89,39 @@ SELECT ri.*, vo.aspect_uri, - f.uri funtionalityUri + f.uri functionalityUri FROM rule_item ri LEFT JOIN virtual_object vo ON vo.id = ri.vo_id - LEFT JOIN functionality f ON f.id = ri.funtionality_id + LEFT JOIN functionality f ON f.id = ri.functionality_id WHERE ri.rule_body_id = #{value} + + + +