diff options
Diffstat (limited to 'intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllassuranceIntentmgt/cllassurancemodule/CLLAssuranceKnowledgeModule.java')
-rw-r--r-- | intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllassuranceIntentmgt/cllassurancemodule/CLLAssuranceKnowledgeModule.java | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllassuranceIntentmgt/cllassurancemodule/CLLAssuranceKnowledgeModule.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllassuranceIntentmgt/cllassurancemodule/CLLAssuranceKnowledgeModule.java index 44fb9f8..899eef9 100644 --- a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllassuranceIntentmgt/cllassurancemodule/CLLAssuranceKnowledgeModule.java +++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllassuranceIntentmgt/cllassurancemodule/CLLAssuranceKnowledgeModule.java @@ -15,41 +15,15 @@ */ package org.onap.usecaseui.intentanalysis.cllassuranceIntentmgt.cllassurancemodule; -import com.alibaba.fastjson.JSONObject; import lombok.extern.log4j.Log4j2; -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.lang.StringUtils; -import org.onap.usecaseui.intentanalysis.adapters.aai.apicall.AAIAPICall; -import org.onap.usecaseui.intentanalysis.adapters.aai.apicall.AAIAuthConfig; 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.util.RestfulServices; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import retrofit2.Response; - -import java.io.IOException; @Log4j2 @Component public class CLLAssuranceKnowledgeModule extends KnowledgeModule { - private AAIAPICall aaiapiCall; - @Autowired - AAIAuthConfig aaiAuthConfig; - - public AAIAPICall getAaiApiCall() { - if (null == aaiapiCall) { - this.aaiapiCall = RestfulServices.create(AAIAPICall.class, - aaiAuthConfig.getUserName(), aaiAuthConfig.getPassword()); - } - return this.aaiapiCall; - } - - public void setAAIApiCall(AAIAPICall aaiApiCall) { - this.aaiapiCall = aaiApiCall; - } - @Override public IntentGoalBean intentCognition(Intent intent) { return null; @@ -69,29 +43,4 @@ public class CLLAssuranceKnowledgeModule extends KnowledgeModule { public boolean recieveDeleteIntent() { return true; } - - /** - * healthy check - */ - int getSystemStatus(Intent intent) { - try { - if (CollectionUtils.isEmpty(intent.getIntentExpectations())) { - return -1; - } - String objectInstance = intent.getIntentExpectations().get(0).getExpectationObject().getObjectInstance(); - if (StringUtils.isEmpty(objectInstance)){ - return -1; - } - Response<JSONObject> response = getAaiApiCall().getInstanceInfo(objectInstance).execute(); - log.debug(response.toString()); - if (response.isSuccessful()) { - // TODO: 2022/9/20 judge by the return result - } - log.error("getIntentInstance Create Statue Error:" + response.toString()); - return -1; - } catch (Exception ex) { - log.error("Details:" + ex.getMessage()); - return 0; - } - } } |