1 package org.onap.aai.datarouter.policy;
3 import java.io.FileNotFoundException;
5 import org.onap.aai.datarouter.entity.DocumentStoreDataEntity;
6 import org.onap.aai.datarouter.policy.EntityEventPolicy;
7 import org.onap.aai.datarouter.policy.EntityEventPolicyConfig;
9 public class EntityEventPolicyStubbed extends EntityEventPolicy {
12 public EntityEventPolicyStubbed(EntityEventPolicyConfig config) throws FileNotFoundException {
17 protected void handleSearchServiceOperation(DocumentStoreDataEntity eventEntity, String action, String index) {
18 //Stub out the actual call to Search Data service and instead store/update documents in memory
20 switch (action.toLowerCase()) {
22 InMemorySearchDatastore.put(eventEntity.getId(), eventEntity.getAsJson()); // they are executed if variable == c1
25 InMemorySearchDatastore.put(eventEntity.getId(), eventEntity.getAsJson()); // they are executed if variable == c1
28 InMemorySearchDatastore.remove(eventEntity.getId()); // they are executed if variable == c1
33 } catch (Exception ex) {