5b4548761f6db77b6a06a6749ad747c7cdb10c37
[usecase-ui/intent-analysis.git] /
1 package org.onap.usecaseui.intentanalysis.intentProcessService;
2
3
4 import org.onap.usecaseui.intentanalysis.intentModule.ActuationModule;
5 import org.springframework.beans.factory.annotation.Autowired;
6 import org.springframework.stereotype.Service;
7
8 @Service
9 public class IntentDistributionService {
10     @Autowired
11     private Function intentHandler;
12     private Function intentOwner;
13
14     public void setIntentRole(Function intentOwner,Function intentHandler){
15         if (intentOwner!= null){
16             this.intentOwner = intentOwner;
17         }
18         if (intentHandler!= null){
19             this.intentHandler= intentHandler;
20         }
21     }
22
23     public void distributionProcess() {
24         ActuationModule intentActuationModule = intentHandler.getActuationModule();
25
26         intentActuationModule.sendToIntentHandler(intentHandler);
27     }
28
29 }