org.activiti.engine.impl.HistoryServiceImpl Maven / Gradle / Ivy
The newest version!
/*
* 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.*;
import org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl;
import org.activiti.engine.impl.cmd.DeleteHistoricProcessInstanceCmd;
import org.activiti.engine.impl.cmd.DeleteHistoricTaskInstanceCmd;
import org.activiti.engine.impl.cmd.GetHistoricIdentityLinksForTaskCmd;
import java.util.List;
/**
*/
public class HistoryServiceImpl extends ServiceImpl implements HistoryService {
public HistoryServiceImpl() {
}
public HistoryServiceImpl(ProcessEngineConfigurationImpl processEngineConfiguration) {
super(processEngineConfiguration);
}
public HistoricProcessInstanceQuery createHistoricProcessInstanceQuery() {
return new HistoricProcessInstanceQueryImpl(commandExecutor);
}
public HistoricActivityInstanceQuery createHistoricActivityInstanceQuery() {
return new HistoricActivityInstanceQueryImpl(commandExecutor);
}
public HistoricTaskInstanceQuery createHistoricTaskInstanceQuery() {
return new HistoricTaskInstanceQueryImpl(commandExecutor, processEngineConfiguration.getDatabaseType());
}
public HistoricDetailQuery createHistoricDetailQuery() {
return new HistoricDetailQueryImpl(commandExecutor);
}
@Override
public NativeHistoricDetailQuery createNativeHistoricDetailQuery() {
return new NativeHistoricDetailQueryImpl(commandExecutor);
}
public HistoricVariableInstanceQuery createHistoricVariableInstanceQuery() {
return new HistoricVariableInstanceQueryImpl(commandExecutor);
}
@Override
public NativeHistoricVariableInstanceQuery createNativeHistoricVariableInstanceQuery() {
return new NativeHistoricVariableInstanceQueryImpl(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);
}
@Override
public List getHistoricIdentityLinksForProcessInstance(String processInstanceId) {
return commandExecutor.execute(new GetHistoricIdentityLinksForTaskCmd(null, processInstanceId));
}
@Override
public List getHistoricIdentityLinksForTask(String taskId) {
return commandExecutor.execute(new GetHistoricIdentityLinksForTaskCmd(taskId, null));
}
@Override
public ProcessInstanceHistoryLogQuery createProcessInstanceHistoryLogQuery(String processInstanceId) {
return new ProcessInstanceHistoryLogQueryImpl(commandExecutor, processInstanceId);
}
}