* ============LICENSE_START=======================================================
* org.onap.aai
* ================================================================================
* ============LICENSE_START=======================================================
* org.onap.aai
* ================================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
- * Copyright © 2017 Amdocs
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-2018 Amdocs
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
entitySearchIndex = config.getSearchEntitySearchIndex();
topographicalSearchIndex = config.getSearchTopographySearchIndex();
aggregateGenericVnfIndex = config.getSearchAggregationVnfIndex();
entitySearchIndex = config.getSearchEntitySearchIndex();
topographicalSearchIndex = config.getSearchTopographySearchIndex();
aggregateGenericVnfIndex = config.getSearchAggregationVnfIndex();
// Instantiate the agent that we will use for interacting with the Search Service.
searchAgent = new SearchServiceAgent(config.getSearchCertName(),
// Instantiate the agent that we will use for interacting with the Search Service.
searchAgent = new SearchServiceAgent(config.getSearchCertName(),
- logger.error(EntityEventPolicyMsgs.DISCARD_AAI_EVENT_NONVERBOSE, errorMsg);
- logger.debug(EntityEventPolicyMsgs.DISCARD_AAI_EVENT_VERBOSE, errorMsg, payload);
+ logger.error(EntityEventPolicyMsgs.DISCARD_EVENT_NONVERBOSE, errorMsg);
+ logger.debug(EntityEventPolicyMsgs.DISCARD_EVENT_VERBOSE, errorMsg, payload);
// Get src domain from header; discard event if not originated from same domain
String payloadSrcDomain = eventHeader.getDomain();
if (payloadSrcDomain == null || !payloadSrcDomain.equalsIgnoreCase(this.srcDomain)) {
// Get src domain from header; discard event if not originated from same domain
String payloadSrcDomain = eventHeader.getDomain();
if (payloadSrcDomain == null || !payloadSrcDomain.equalsIgnoreCase(this.srcDomain)) {
"Unrecognized source domain '" + payloadSrcDomain + "'");
setResponse(exchange, ResponseType.SUCCESS, additionalInfo);
"Unrecognized source domain '" + payloadSrcDomain + "'");
setResponse(exchange, ResponseType.SUCCESS, additionalInfo);
DynamicJAXBContext oxmJaxbContext = loadOxmContext(oxmVersion.toLowerCase());
if (oxmJaxbContext == null) {
logger.error(EntityEventPolicyMsgs.OXM_VERSION_NOT_SUPPORTED, oxmVersion);
DynamicJAXBContext oxmJaxbContext = loadOxmContext(oxmVersion.toLowerCase());
if (oxmJaxbContext == null) {
logger.error(EntityEventPolicyMsgs.OXM_VERSION_NOT_SUPPORTED, oxmVersion);
String action = eventHeader.getAction();
if (action == null || !SUPPORTED_ACTIONS.contains(action.toLowerCase())) {
String action = eventHeader.getAction();
if (action == null || !SUPPORTED_ACTIONS.contains(action.toLowerCase())) {
"Unrecognized action '" + action + "'");
setResponse(exchange, ResponseType.FAILURE, additionalInfo);
"Unrecognized action '" + action + "'");
setResponse(exchange, ResponseType.FAILURE, additionalInfo);
"Payload header missing entity type");
setResponse(exchange, ResponseType.FAILURE, additionalInfo);
"Payload header missing entity type");
setResponse(exchange, ResponseType.FAILURE, additionalInfo);
"Payload header top missing entity type");
setResponse(exchange, ResponseType.FAILURE, additionalInfo);
"Payload header top missing entity type");
setResponse(exchange, ResponseType.FAILURE, additionalInfo);
"Payload header missing entity link");
setResponse(exchange, ResponseType.FAILURE, additionalInfo);
"Payload header missing entity link");
setResponse(exchange, ResponseType.FAILURE, additionalInfo);
- logger.debug(EntityEventPolicyMsgs.PROCESS_AAI_ENTITY_EVENT_POLICY_VERBOSE, action, entityType,
+ logger.debug(EntityEventPolicyMsgs.PROCESS_ENTITY_EVENT_POLICY_VERBOSE, action, entityType,
List<String> searchableAttr =
getOxmAttributes(uebPayload, oxmJaxbContext, oxmEntityType, entityType, "searchable");
if (searchableAttr == null) {
List<String> searchableAttr =
getOxmAttributes(uebPayload, oxmJaxbContext, oxmEntityType, entityType, "searchable");
if (searchableAttr == null) {
getEntityPrimaryKeyFieldName(oxmJaxbContext, uebPayload, oxmEntityType, entityType);
String entityPrimaryKeyFieldValue = lookupValueUsingKey(uebPayload, entityPrimaryKeyFieldName);
if (entityPrimaryKeyFieldValue == null || entityPrimaryKeyFieldValue.isEmpty()) {
getEntityPrimaryKeyFieldName(oxmJaxbContext, uebPayload, oxmEntityType, entityType);
String entityPrimaryKeyFieldValue = lookupValueUsingKey(uebPayload, entityPrimaryKeyFieldName);
if (entityPrimaryKeyFieldValue == null || entityPrimaryKeyFieldValue.isEmpty()) {
"Payload missing primary key attribute", uebPayload);
setResponse(exchange, ResponseType.FAILURE, additionalInfo);
"Payload missing primary key attribute", uebPayload);
setResponse(exchange, ResponseType.FAILURE, additionalInfo);
aaiEventEntity.setLink(entityLink);
if (!getSearchTags(aaiEventEntity, searchableAttr, uebPayload, action)) {
aaiEventEntity.setLink(entityLink);
if (!getSearchTags(aaiEventEntity, searchableAttr, uebPayload, action)) {
"Payload missing searchable attribute for entity type '" + entityType + "'", uebPayload);
setResponse(exchange, ResponseType.FAILURE, additionalInfo);
"Payload missing searchable attribute for entity type '" + entityType + "'", uebPayload);
setResponse(exchange, ResponseType.FAILURE, additionalInfo);
"Cannot create unique SHA digest", uebPayload);
setResponse(exchange, ResponseType.FAILURE, additionalInfo);
"Cannot create unique SHA digest", uebPayload);
setResponse(exchange, ResponseType.FAILURE, additionalInfo);