import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.KnowledgeModule;
import org.springframework.stereotype.Component;
+import javax.annotation.Resource;
+
@Data
@Component("CLLBusinessIntentManagementFunction")
public class CLLBusinessIntentManagementFunction extends IntentManagementFunction {
- private ActuationModule actuationModule = new CLLBusinessActuationModule();
- private DecisionModule decisoinModule = new CLLBusinessDecisionModule();
- private KnowledgeModule knowledgeModule = new CLLBusinessKnowledgeModule();
+ @Resource(name= "CLLBusinessActuationModule")
+ public void setActuationModule(ActuationModule actuationModule) {
+ this.actuationModule=actuationModule;
+ }
+ @Resource(name= "CLLBusinessKnowledgeModule")
+ public void setKnowledgeModule(KnowledgeModule knowledgeModule) {
+ this.knowledgeModule=knowledgeModule;
+ }
+ @Resource(name= "CLLBusinessDecisionModule")
+ public void setDecisionModule(DecisionModule decisionModule) {
+ this.decisionModule=decisionModule;
+ }
}
package org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.cllBusinessModule;
-import org.apache.commons.lang.StringUtils;
-import org.onap.usecaseui.intentanalysis.bean.enums.IntentGoalType;
import org.onap.usecaseui.intentanalysis.bean.models.Intent;
import org.onap.usecaseui.intentanalysis.bean.models.IntentGoalBean;
import org.onap.usecaseui.intentanalysis.intentBaseService.IntentManagementFunction;
import org.onap.usecaseui.intentanalysis.intentBaseService.intentinterfaceservice.IntentInterfaceService;
import org.onap.usecaseui.intentanalysis.service.IntentService;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
+import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
-@Service
+@Component
public class CLLBusinessActuationModule extends ActuationModule {
@Autowired
IntentProcessService processService;
import org.onap.usecaseui.intentanalysis.util.CommonUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
-import org.springframework.stereotype.Service;
+import org.springframework.stereotype.Component;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
import java.util.stream.Collectors;
@Log4j2
-@Service
+@Component
public class CLLBusinessDecisionModule extends DecisionModule {
@Autowired
private ImfRegInfoService imfRegInfoService;
*/
package org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.cllBusinessModule;
-import org.apache.commons.collections.CollectionUtils;
import org.onap.usecaseui.intentanalysis.bean.enums.IntentGoalType;
-import org.onap.usecaseui.intentanalysis.bean.models.IntentGoalBean;
-import org.onap.usecaseui.intentanalysis.bean.models.Expectation;
-import org.onap.usecaseui.intentanalysis.bean.models.ExpectationTarget;
import org.onap.usecaseui.intentanalysis.bean.models.Intent;
+import org.onap.usecaseui.intentanalysis.bean.models.IntentGoalBean;
import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.KnowledgeModule;
import org.onap.usecaseui.intentanalysis.intentBaseService.intentProcessService.IntentDetectionService;
import org.onap.usecaseui.intentanalysis.service.IntentService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
+import org.springframework.stereotype.Component;
-import java.util.ArrayList;
import java.util.List;
-import java.util.stream.Collectors;
-@Service
+@Component
public class CLLBusinessKnowledgeModule extends KnowledgeModule {
private static Logger LOGGER = LoggerFactory.getLogger(CLLBusinessKnowledgeModule.class);
*/
package org.onap.usecaseui.intentanalysis.clldeliveryIntentmgt;
-import org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.cllBusinessModule.CLLBusinessActuationModule;
-import org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.cllBusinessModule.CLLBusinessDecisionModule;
-import org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.cllBusinessModule.CLLBusinessKnowledgeModule;
import org.onap.usecaseui.intentanalysis.intentBaseService.IntentManagementFunction;
-import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.ActuationModule;
-import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.DecisionModule;
-import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.KnowledgeModule;
public class CLLDeliveryManagementFunction extends IntentManagementFunction {
- private ActuationModule actuationModule = new CLLBusinessActuationModule();
- private DecisionModule decisoinModule = new CLLBusinessDecisionModule();
- private KnowledgeModule knowledgeModule = new CLLBusinessKnowledgeModule();
}
@Autowired
private IntentProcessService processService;
+ @Autowired
+ FormatIntentInputManagementFunction formatIntentInputManagementFunction;
@GetMapping(produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<List<Intent>> getIntentList() {
@PostMapping(value="/handleIntent",produces = MediaType.APPLICATION_JSON_VALUE)
public void handleIntent(@RequestBody Intent intent) {
- processService.setIntentRole(new FormatIntentInputManagementFunction(), null);
+ processService.setIntentRole(formatIntentInputManagementFunction, null);
processService.intentProcess(intent);
-
}
}
*/
package org.onap.usecaseui.intentanalysis.formatintentinputMgt;
+import lombok.Data;
+import org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.cllBusinessModule.CLLBusinessActuationModule;
+import org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.cllBusinessModule.CLLBusinessDecisionModule;
+import org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.cllBusinessModule.CLLBusinessKnowledgeModule;
import org.onap.usecaseui.intentanalysis.formatintentinputMgt.formatintentinputModule.FormatIntentInputActuationModule;
import org.onap.usecaseui.intentanalysis.formatintentinputMgt.formatintentinputModule.FormatIntentInputDecisionModule;
import org.onap.usecaseui.intentanalysis.formatintentinputMgt.formatintentinputModule.FormatIntentInputKnowledgeModule;
import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.ActuationModule;
import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.DecisionModule;
import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.KnowledgeModule;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import javax.annotation.Resource;
+
+@Data
+@Component("formatIntentInputManagementFunction")
public class FormatIntentInputManagementFunction extends IntentManagementFunction {
- private ActuationModule actuationModule = new FormatIntentInputActuationModule();
- private DecisionModule decisoinModule = new FormatIntentInputDecisionModule();
- private KnowledgeModule knowledgeModule = new FormatIntentInputKnowledgeModule();
+
+ @Resource(name= "formatIntentInputKnowledgeModule")
+ public void setKnowledgeModule(KnowledgeModule knowledgeModule) {
+ this.knowledgeModule=knowledgeModule;
+ }
+ @Resource(name= "formatIntentInputActuationModule")
+ public void setKnowledgeModule(ActuationModule actuationModule) {
+ this.actuationModule=actuationModule;
+ }
+ @Resource(name= "formatIntentInputDecisionModule")
+ public void setKnowledgeModule(DecisionModule decisionModule) {
+ this.decisionModule=decisionModule;
+ }
}
import org.onap.usecaseui.intentanalysis.bean.models.IntentGoalBean;
import org.onap.usecaseui.intentanalysis.intentBaseService.IntentManagementFunction;
import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.ActuationModule;
+import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Map;
-
+@Component
public class FormatIntentInputActuationModule extends ActuationModule {
@Override
public void sendToIntentHandler(IntentManagementFunction IntentHandler) {
import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.DecisionModule;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
+import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
-
+@Component
public class FormatIntentInputDecisionModule extends DecisionModule {
@Autowired
ApplicationContext applicationContext;
import org.onap.usecaseui.intentanalysis.bean.models.IntentGoalBean;
import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.KnowledgeModule;
import org.onap.usecaseui.intentanalysis.intentBaseService.intentProcessService.IntentDetectionService;
+import org.onap.usecaseui.intentanalysis.service.IntentService;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
import java.util.List;
+@Component
public class FormatIntentInputKnowledgeModule extends KnowledgeModule {
@Autowired
IntentDetectionService intentDetectionService;
+ @Autowired
+ IntentService intentService;
@Override
public IntentGoalBean intentCognition(Intent intent) {
import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.DecisionModule;
import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.KnowledgeModule;
import org.springframework.context.annotation.Configuration;
+import org.springframework.stereotype.Component;
@Data
@Configuration
+@Component
public class IntentManagementFunction {
- private ActuationModule actuationModule;
- private DecisionModule decisionModule;
- private KnowledgeModule knowledgeModule;
+ protected ActuationModule actuationModule;
+ protected DecisionModule decisionModule;
+ protected KnowledgeModule knowledgeModule;
}
import org.apache.commons.lang.StringUtils;
import org.onap.usecaseui.intentanalysis.bean.models.*;
import org.onap.usecaseui.intentanalysis.service.IntentService;
+import org.onap.usecaseui.intentanalysis.service.impl.IntentServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
public abstract class KnowledgeModule {
@Autowired
- IntentService intentService;
+ private IntentService intentService;
//Parse, decompose, orchestrate the original intent
public abstract IntentGoalBean intentCognition(Intent intent);
-
// in distribution, ask permission from imf
public abstract boolean recieveCreateIntent();
public abstract boolean recieveUpdateIntent();
*/
package org.onap.usecaseui.intentanalysis.intentBaseService.intentProcessService;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.lang.StringUtils;
-import org.onap.usecaseui.intentanalysis.bean.enums.OperatorType;
-import org.onap.usecaseui.intentanalysis.bean.models.*;
+import org.onap.usecaseui.intentanalysis.bean.models.Intent;
+import org.onap.usecaseui.intentanalysis.bean.models.IntentGoalBean;
import org.onap.usecaseui.intentanalysis.intentBaseService.IntentManagementFunction;
import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.KnowledgeModule;
-import org.onap.usecaseui.intentanalysis.service.IntentService;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-
@Service
public class IntentDetectionService {
private IntentManagementFunction intentHandler;
private IntentManagementFunction intentOwner;
- @Autowired
- IntentService intentService;
public void setIntentRole(IntentManagementFunction intentOwner, IntentManagementFunction intentHandler) {
if (intentOwner != null) {
import org.onap.usecaseui.intentanalysis.bean.models.Intent;
import org.onap.usecaseui.intentanalysis.bean.models.IntentGoalBean;
import org.onap.usecaseui.intentanalysis.intentBaseService.IntentManagementFunction;
+import org.onap.usecaseui.intentanalysis.service.IntentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
IntentDistributionService intentDistributionService;
@Autowired
IntentOperationService intentOperationService;
-
+@Autowired
+ IntentService intentService;
private IntentManagementFunction intentOwner;
private IntentManagementFunction intentHandler;