/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.activiti.engine.impl; import org.activiti.engine.HistoryService; import org.activiti.engine.history.HistoricActivityInstanceQuery; import org.activiti.engine.history.HistoricDetailQuery; import org.activiti.engine.history.HistoricProcessInstanceQuery; import org.activiti.engine.history.HistoricTaskInstanceQuery; import org.activiti.engine.history.HistoricVariableInstanceQuery; import org.activiti.engine.history.NativeHistoricActivityInstanceQuery; import org.activiti.engine.history.NativeHistoricProcessInstanceQuery; import org.activiti.engine.history.NativeHistoricTaskInstanceQuery; import org.activiti.engine.impl.cmd.DeleteHistoricProcessInstanceCmd; import org.activiti.engine.impl.cmd.DeleteHistoricTaskInstanceCmd; /** * @author Tom Baeyens * @author Bernd Ruecker (camunda) * @author Christian Stettler */ public class HistoryServiceImpl extends ServiceImpl implements HistoryService { public HistoricProcessInstanceQuery createHistoricProcessInstanceQuery() { return new HistoricProcessInstanceQueryImpl(commandExecutor); } public HistoricActivityInstanceQuery createHistoricActivityInstanceQuery() { return new HistoricActivityInstanceQueryImpl(commandExecutor); } public HistoricTaskInstanceQuery createHistoricTaskInstanceQuery() { return new HistoricTaskInstanceQueryImpl(commandExecutor); } public HistoricDetailQuery createHistoricDetailQuery() { return new HistoricDetailQueryImpl(commandExecutor); } public HistoricVariableInstanceQuery createHistoricVariableInstanceQuery() { return new HistoricVariableInstanceQueryImpl(commandExecutor); } public void deleteHistoricTaskInstance(String taskId) { commandExecutor.execute(new DeleteHistoricTaskInstanceCmd(taskId)); } public void deleteHistoricProcessInstance(String processInstanceId) { commandExecutor.execute(new DeleteHistoricProcessInstanceCmd(processInstanceId)); } public NativeHistoricProcessInstanceQuery createNativeHistoricProcessInstanceQuery() { return new NativeHistoricProcessInstanceQueryImpl(commandExecutor); } public NativeHistoricTaskInstanceQuery createNativeHistoricTaskInstanceQuery() { return new NativeHistoricTaskInstanceQueryImpl(commandExecutor); } public NativeHistoricActivityInstanceQuery createNativeHistoricActivityInstanceQuery() { return new NativeHistoricActivityInstanceQueryImpl(commandExecutor); } }