2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2018 Ericsson. All rights reserved.
6 * Modifications Copyright (C) 2019 Nordix Foundation.
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END=========================================================
22 package org.onap.policy.so;
24 import java.util.Collection;
25 import java.util.Iterator;
28 import org.drools.core.WorkingMemory;
29 import org.drools.core.WorkingMemoryEntryPoint;
30 import org.drools.core.common.InternalFactHandle;
31 import org.drools.core.impl.InternalKnowledgeBase;
32 import org.drools.core.spi.AsyncExceptionHandler;
33 import org.drools.core.spi.GlobalResolver;
34 import org.kie.api.event.kiebase.KieBaseEventListener;
35 import org.kie.api.event.rule.AgendaEventListener;
36 import org.kie.api.event.rule.RuleRuntimeEventListener;
37 import org.kie.api.runtime.Environment;
38 import org.kie.api.runtime.ObjectFilter;
39 import org.kie.api.runtime.process.ProcessInstance;
40 import org.kie.api.runtime.process.WorkItemManager;
41 import org.kie.api.runtime.rule.Agenda;
42 import org.kie.api.runtime.rule.AgendaFilter;
43 import org.kie.api.runtime.rule.FactHandle;
44 import org.kie.api.runtime.rule.FactHandle.State;
45 import org.kie.api.runtime.rule.QueryResults;
46 import org.kie.api.time.SessionClock;
48 public class DummyWorkingMemory implements WorkingMemory {
51 public void addEventListener(RuleRuntimeEventListener listener) {
55 public void addEventListener(AgendaEventListener listener) {
59 public void addEventListener(KieBaseEventListener listener) {
63 public void removeEventListener(RuleRuntimeEventListener listener) {
67 public void removeEventListener(AgendaEventListener listener) {
71 public void removeEventListener(KieBaseEventListener listener) {
75 public Collection<RuleRuntimeEventListener> getRuleRuntimeEventListeners() {
80 public Collection<AgendaEventListener> getAgendaEventListeners() {
85 public Collection<KieBaseEventListener> getKieBaseEventListeners() {
90 public FactHandle insert(Object object, boolean dynamic) {
95 public FactHandle insert(Object object) {
100 public void dispose() {
104 public String getEntryPointId() {
109 public void retract(FactHandle handle) {
113 public void delete(FactHandle handle) {
117 public void delete(FactHandle handle, State fhState) {
123 public void update(FactHandle handle, Object object) {
127 public void update(FactHandle handle, Object object, String... modifiedProperties) {
131 public Collection<? extends Object> getObjects() {
136 public Collection<? extends Object> getObjects(ObjectFilter filter) {
141 public <T extends FactHandle> Collection<T> getFactHandles() {
146 public <T extends FactHandle> Collection<T> getFactHandles(ObjectFilter filter) {
151 public long getFactCount() {
156 public Agenda getAgenda() {
161 public void setGlobal(String identifier, Object value) {
165 public Object getGlobal(String identifier) {
170 public Environment getEnvironment() {
175 public void setGlobalResolver(GlobalResolver globalResolver) {
179 public GlobalResolver getGlobalResolver() {
184 public InternalKnowledgeBase getKnowledgeBase() {
189 public int fireAllRules() {
194 public int fireAllRules(AgendaFilter agendaFilter) {
199 public int fireAllRules(int fireLimit) {
204 public int fireAllRules(AgendaFilter agendaFilter, int fireLimit) {
209 public Object getObject(FactHandle handle) {
214 public FactHandle getFactHandle(Object object) {
219 public FactHandle getFactHandleByIdentity(Object object) {
224 public Iterator<?> iterateObjects() {
229 public Iterator<?> iterateObjects(ObjectFilter filter) {
234 public Iterator<InternalFactHandle> iterateFactHandles() {
239 public Iterator<InternalFactHandle> iterateFactHandles(ObjectFilter filter) {
244 public void setFocus(String focus) {
248 public QueryResults getQueryResults(String query, Object... arguments) {
253 public void setAsyncExceptionHandler(AsyncExceptionHandler handler) {
257 public void clearAgenda() {
261 public void clearAgendaGroup(String group) {
265 public void clearActivationGroup(String group) {
269 public void clearRuleFlowGroup(String group) {
273 public ProcessInstance startProcess(String processId) {
278 public ProcessInstance startProcess(String processId, Map<String, Object> parameters) {
283 public Collection<ProcessInstance> getProcessInstances() {
288 public ProcessInstance getProcessInstance(long id) {
293 public ProcessInstance getProcessInstance(long id, boolean readOnly) {
298 public WorkItemManager getWorkItemManager() {
307 public WorkingMemoryEntryPoint getWorkingMemoryEntryPoint(String id) {
312 public SessionClock getSessionClock() {