2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2018 Ericsson. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.onap.policy.so;
23 import java.util.Collection;
24 import java.util.Iterator;
27 import org.drools.core.WorkingMemory;
28 import org.drools.core.WorkingMemoryEntryPoint;
29 import org.drools.core.common.InternalFactHandle;
30 import org.drools.core.impl.InternalKnowledgeBase;
31 import org.drools.core.spi.AsyncExceptionHandler;
32 import org.drools.core.spi.GlobalResolver;
33 import org.kie.api.event.kiebase.KieBaseEventListener;
34 import org.kie.api.event.rule.AgendaEventListener;
35 import org.kie.api.event.rule.RuleRuntimeEventListener;
36 import org.kie.api.runtime.Environment;
37 import org.kie.api.runtime.ObjectFilter;
38 import org.kie.api.runtime.process.ProcessInstance;
39 import org.kie.api.runtime.process.WorkItemManager;
40 import org.kie.api.runtime.rule.Agenda;
41 import org.kie.api.runtime.rule.AgendaFilter;
42 import org.kie.api.runtime.rule.FactHandle;
43 import org.kie.api.runtime.rule.FactHandle.State;
44 import org.kie.api.runtime.rule.QueryResults;
45 import org.kie.api.time.SessionClock;
47 public class DummyWorkingMemory implements WorkingMemory {
50 public void addEventListener(RuleRuntimeEventListener listener) {
54 public void addEventListener(AgendaEventListener listener) {
58 public void addEventListener(KieBaseEventListener listener) {
62 public void removeEventListener(RuleRuntimeEventListener listener) {
66 public void removeEventListener(AgendaEventListener listener) {
70 public void removeEventListener(KieBaseEventListener listener) {
74 public Collection<RuleRuntimeEventListener> getRuleRuntimeEventListeners() {
79 public Collection<AgendaEventListener> getAgendaEventListeners() {
84 public Collection<KieBaseEventListener> getKieBaseEventListeners() {
89 public FactHandle insert(Object object, boolean dynamic) {
94 public FactHandle insert(Object object) {
99 public void dispose() {
103 public String getEntryPointId() {
108 public void retract(FactHandle handle) {
112 public void delete(FactHandle handle) {
116 public void delete(FactHandle handle, State fhState) {
122 public void update(FactHandle handle, Object object) {
126 public void update(FactHandle handle, Object object, String... modifiedProperties) {
130 public Collection<? extends Object> getObjects() {
135 public Collection<? extends Object> getObjects(ObjectFilter filter) {
140 public <T extends FactHandle> Collection<T> getFactHandles() {
145 public <T extends FactHandle> Collection<T> getFactHandles(ObjectFilter filter) {
150 public long getFactCount() {
155 public Agenda getAgenda() {
160 public void setGlobal(String identifier, Object value) {
164 public Object getGlobal(String identifier) {
169 public Environment getEnvironment() {
174 public void setGlobalResolver(GlobalResolver globalResolver) {
178 public GlobalResolver getGlobalResolver() {
183 public InternalKnowledgeBase getKnowledgeBase() {
188 public int fireAllRules() {
193 public int fireAllRules(AgendaFilter agendaFilter) {
198 public int fireAllRules(int fireLimit) {
203 public int fireAllRules(AgendaFilter agendaFilter, int fireLimit) {
208 public Object getObject(FactHandle handle) {
213 public FactHandle getFactHandle(Object object) {
218 public FactHandle getFactHandleByIdentity(Object object) {
223 public Iterator<?> iterateObjects() {
228 public Iterator<?> iterateObjects(ObjectFilter filter) {
233 public Iterator<InternalFactHandle> iterateFactHandles() {
238 public Iterator<InternalFactHandle> iterateFactHandles(ObjectFilter filter) {
243 public void setFocus(String focus) {
247 public QueryResults getQueryResults(String query, Object... arguments) {
252 public void setAsyncExceptionHandler(AsyncExceptionHandler handler) {
256 public void clearAgenda() {
260 public void clearAgendaGroup(String group) {
264 public void clearActivationGroup(String group) {
268 public void clearRuleFlowGroup(String group) {
272 public ProcessInstance startProcess(String processId) {
277 public ProcessInstance startProcess(String processId, Map<String, Object> parameters) {
282 public Collection<ProcessInstance> getProcessInstances() {
287 public ProcessInstance getProcessInstance(long id) {
292 public ProcessInstance getProcessInstance(long id, boolean readOnly) {
297 public WorkItemManager getWorkItemManager() {
306 public WorkingMemoryEntryPoint getWorkingMemoryEntryPoint(String id) {
311 public SessionClock getSessionClock() {