--- /dev/null
+package org.onap.usecaseui.intentanalysis.intentAnalysisService;
+
+
+import lombok.Data;
+import org.onap.usecaseui.intentanalysis.intentAnalysisService.intentModuleImpl.ActuationModuleImpl;
+import org.onap.usecaseui.intentanalysis.intentAnalysisService.intentModuleImpl.DecisoinModuleImpl;
+import org.onap.usecaseui.intentanalysis.intentAnalysisService.intentModuleImpl.KnownledgeModuleImpl;
+import org.onap.usecaseui.intentanalysis.intentModule.ActuationModule;
+import org.onap.usecaseui.intentanalysis.intentModule.DecisionModule;
+import org.onap.usecaseui.intentanalysis.intentModule.KnowledgeModule;
+import org.onap.usecaseui.intentanalysis.intentProcessService.Function;
+
+@Data
+public class IntentAnalysisManagementFunction extends Function {
+ private ActuationModule actuationModule = new ActuationModuleImpl();
+ private DecisionModule decisoinModule = new DecisoinModuleImpl();
+ private KnowledgeModule knowledgeModule = new KnownledgeModuleImpl();
+
+
+}
--- /dev/null
+package org.onap.usecaseui.intentanalysis.intentAnalysisService.intentModuleImpl;
+
+
+import org.onap.usecaseui.intentanalysis.intentModule.ActuationModule;
+import org.onap.usecaseui.intentanalysis.intentProcessService.Function;
+import org.onap.usecaseui.intentanalysis.intentProcessService.IntentProcessService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class ActuationModuleImpl implements ActuationModule {
+ @Autowired
+ IntentProcessService processService;
+
+ @Override
+ public void sendToIntentHandler(Function intentHandler) {
+ processService.setIntentRole(intentHandler, null);
+ processService.intentProcess();
+ }
+
+ @Override
+ public void sendToNonIntentHandler() {
+ }
+
+ @Override
+ public void interactWithIntentHandle() {
+
+ }
+
+ @Override
+ public void saveIntentToDb() {
+ }
+}
--- /dev/null
+package org.onap.usecaseui.intentanalysis.intentAnalysisService.intentModuleImpl;
+
+
+import org.onap.usecaseui.intentanalysis.intentModule.DecisionModule;
+import org.onap.usecaseui.intentanalysis.intentProcessService.Function;
+import org.springframework.stereotype.Service;
+
+@Service
+public class DecisoinModuleImpl implements DecisionModule {
+ @Override
+ public void determineUltimateGoal() {}
+
+ @Override
+ public Function exploreIntentHandlers() {
+
+ return null;
+
+ }
+
+ @Override
+ public void intentDefinition() {}
+
+ @Override
+ public void decideSuitableAction() {}
+
+ @Override
+ public boolean needDecompostion() {
+ return false;
+ }
+
+ @Override
+ public void intentDecomposition() {}
+
+ @Override
+ public void intentOrchestration() {}
+
+ @Override
+ public void interactWithTemplateDb() {}
+}
--- /dev/null
+package org.onap.usecaseui.intentanalysis.intentAnalysisService.intentModuleImpl;
+
+import org.onap.usecaseui.intentanalysis.intentModule.KnowledgeModule;
+import org.springframework.stereotype.Service;
+
+@Service
+public class KnownledgeModuleImpl implements KnowledgeModule {
+ @Override
+ public void intentResolution() {}
+
+ @Override
+ public void intentReportResolution() {}
+
+ @Override
+ public void getSystemStatus() {}
+
+ @Override
+ public void interactWithIntentOwner() {
+
+ }
+}
--- /dev/null
+package org.onap.usecaseui.intentanalysis.intentModule;
+
+import org.onap.usecaseui.intentanalysis.intentProcessService.Function;
+
+public interface ActuationModule {
+ //actuationModel & knownledgeModel interact
+ void sendToIntentHandler(Function IntentHandler);
+ void sendToNonIntentHandler();//直接操作
+ void interactWithIntentHandle();
+ //Save intent information to the intent instance database
+ void saveIntentToDb();
+
+}
--- /dev/null
+package org.onap.usecaseui.intentanalysis.intentModule;
+
+
+import org.onap.usecaseui.intentanalysis.intentProcessService.Function;
+
+public interface DecisionModule {
+ void determineUltimateGoal();//
+ Function exploreIntentHandlers();
+ void intentDefinition();
+ void decideSuitableAction();
+
+ //confirm whether the intent needs to be decomposed and orchestrated
+ public boolean needDecompostion();
+
+ //call decomposition module
+ public void intentDecomposition();
+
+ //call orchestration module
+ public void intentOrchestration();
+
+
+ public void interactWithTemplateDb();
+}
--- /dev/null
+package org.onap.usecaseui.intentanalysis.intentModule;
+
+public interface KnowledgeModule {
+ void intentResolution();
+ void intentReportResolution();
+ void getSystemStatus();
+ void interactWithIntentOwner();
+ //actuationModel & knownledgeModel interact
+}
--- /dev/null
+package org.onap.usecaseui.intentanalysis.intentProcessService;
+
+
+import lombok.Data;
+import org.onap.usecaseui.intentanalysis.intentModule.ActuationModule;
+import org.onap.usecaseui.intentanalysis.intentModule.DecisionModule;
+import org.onap.usecaseui.intentanalysis.intentModule.KnowledgeModule;
+
+@Data
+public class Function {
+ private ActuationModule actuationModule;
+ private DecisionModule decisionModule;
+ private KnowledgeModule knowledgeModule;
+}
--- /dev/null
+package org.onap.usecaseui.intentanalysis.intentProcessService;
+
+
+import org.onap.usecaseui.intentanalysis.intentModule.ActuationModule;
+import org.onap.usecaseui.intentanalysis.intentModule.DecisionModule;
+import org.springframework.stereotype.Service;
+
+@Service
+public class IntentDefinitionService {
+
+ private Function intentHandler;
+ private Function intentOwner;
+
+ public void setIntentRole(Function intentOwner, Function intentHandler) {
+ if (intentOwner != null) {
+ this.intentOwner = intentOwner;
+ }
+ if (intentHandler != null) {
+ this.intentHandler = intentHandler;
+ }
+ }
+
+ public void definitionPorcess() {
+ DecisionModule intentDecisionModule = intentOwner.getDecisionModule();
+ ActuationModule intentActuationModule = intentOwner.getActuationModule();
+ intentDecisionModule.intentDefinition();
+ intentActuationModule.saveIntentToDb();
+ }
+}
--- /dev/null
+package org.onap.usecaseui.intentanalysis.intentProcessService;
+
+import org.onap.usecaseui.intentanalysis.intentModule.KnowledgeModule;
+import org.springframework.stereotype.Service;
+
+@Service
+public class IntentDetectionService {
+
+ private Function intentHandler;
+ private Function intentOwner;
+
+ public void setIntentRole(Function intentOwner,Function intentHandler){
+ if (intentOwner!= null){
+ this.intentOwner = intentOwner;
+ }
+ if (intentHandler!= null){
+ this.intentHandler= intentHandler;
+ }
+ }
+
+ public void detectionProcess() {
+ KnowledgeModule ownerKnowledgeModule = intentOwner.getKnowledgeModule();
+ ownerKnowledgeModule.intentResolution();
+ ownerKnowledgeModule.intentReportResolution();
+ ownerKnowledgeModule.getSystemStatus();
+ ownerKnowledgeModule.interactWithIntentOwner();
+
+ }
+}
--- /dev/null
+package org.onap.usecaseui.intentanalysis.intentProcessService;
+
+
+import org.onap.usecaseui.intentanalysis.intentModule.ActuationModule;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class IntentDistributionService {
+ @Autowired
+ private Function intentHandler;
+ private Function intentOwner;
+
+ public void setIntentRole(Function intentOwner,Function intentHandler){
+ if (intentOwner!= null){
+ this.intentOwner = intentOwner;
+ }
+ if (intentHandler!= null){
+ this.intentHandler= intentHandler;
+ }
+ }
+
+ public void distributionProcess() {
+ ActuationModule intentActuationModule = intentHandler.getActuationModule();
+
+ intentActuationModule.sendToIntentHandler(intentHandler);
+ }
+
+}
--- /dev/null
+package org.onap.usecaseui.intentanalysis.intentProcessService;
+
+import org.onap.usecaseui.intentanalysis.intentModule.DecisionModule;
+import org.springframework.stereotype.Service;
+
+@Service
+public class IntentInvestigationService {
+ private Function intentHandler;
+ private Function intentOwner;
+
+ public void setIntentRole(Function intentOwner,Function intentHandler){
+ if (intentOwner!= null){
+ this.intentOwner = intentOwner;
+ }
+ if (intentHandler!= null){
+ this.intentHandler= intentHandler;
+ }
+ }
+
+ public void investigationProcess() {
+ DecisionModule intentDecisionModule = intentOwner.getDecisionModule();
+ intentDecisionModule.needDecompostion();
+ intentDecisionModule.intentDecomposition();
+ intentDecisionModule.intentOrchestration();
+ intentDecisionModule.decideSuitableAction();
+ intentDecisionModule.exploreIntentHandlers();//返回handler
+ }
+
+
+}
--- /dev/null
+package org.onap.usecaseui.intentanalysis.intentProcessService;
+
+
+import org.onap.usecaseui.intentanalysis.intentModule.ActuationModule;
+import org.onap.usecaseui.intentanalysis.intentModule.DecisionModule;
+import org.springframework.stereotype.Service;
+
+@Service
+public class IntentOperationService {
+
+ private Function intentHandler;
+ private Function intentOwner;
+
+ public void setIntentRole(Function intentOwner,Function intentHandler){
+ if (intentOwner!= null){
+ this.intentOwner = intentOwner;
+ }
+ if (intentHandler!= null){
+ this.intentHandler= intentHandler;
+ }
+ }
+
+ public void operationProcess() {
+ DecisionModule intentDecisionModule = intentOwner.getDecisionModule();
+ ActuationModule intentActuationModule = intentOwner.getActuationModule();
+
+ intentDecisionModule.interactWithTemplateDb();
+ intentActuationModule.interactWithIntentHandle();
+ intentActuationModule.sendToIntentHandler(intentHandler);
+
+ intentActuationModule.sendToNonIntentHandler();
+ }
+}
--- /dev/null
+package org.onap.usecaseui.intentanalysis.intentProcessService;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class IntentProcessService {
+ @Autowired
+ IntentDetectionService intentDetectionServiceImpl;
+ @Autowired
+ IntentInvestigationService intentInvestigationService;
+ @Autowired
+ IntentDefinitionService intentDefinitionService;
+ @Autowired
+ IntentDistributionService intentDistributionService;
+ @Autowired
+ IntentOperationService intentOperationService;
+
+ private Function intentOwner;
+ private Function intentHandler;
+
+
+ public void setIntentRole(Function intentOwner,Function intentHandler){
+ if (intentOwner!= null){
+ this.intentOwner = intentOwner;
+ }
+ if (intentHandler!= null){
+ this.intentHandler= intentHandler;
+ }
+ }
+ public void intentProcess() {
+ intentDetectionServiceImpl.setIntentRole(intentOwner,intentHandler);
+ intentDetectionServiceImpl.detectionProcess();
+
+ //investigation process
+ intentInvestigationService.setIntentRole(intentOwner,intentHandler);
+ intentInvestigationService.investigationProcess();//List<handler>?
+
+ //definition process
+ intentDefinitionService.setIntentRole(intentOwner,intentHandler);
+ intentDefinitionService.definitionPorcess();
+
+ //distribution process
+ intentDistributionService.setIntentRole(intentOwner,intentHandler);
+ intentDistributionService.distributionProcess();
+
+ //operation process
+ intentOperationService.setIntentRole(intentOwner,intentHandler);
+ intentOperationService.operationProcess();
+ }
+
+
+}