All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.netgrif.application.engine.history.service.HistoryService Maven / Gradle / Ivy

Go to download

System provides workflow management functions including user, role and data management.

There is a newer version: 6.4.0
Show newest version
package com.netgrif.application.engine.history.service;

import com.netgrif.application.engine.history.domain.baseevent.EventLog;
import com.netgrif.application.engine.history.domain.baseevent.repository.EventLogRepository;
import com.netgrif.application.engine.history.domain.caseevents.CreateCaseEventLog;
import com.netgrif.application.engine.history.domain.caseevents.DeleteCaseEventLog;
import com.netgrif.application.engine.history.domain.caseevents.repository.CreateCaseEventLogRepository;
import com.netgrif.application.engine.history.domain.caseevents.repository.DeleteCaseEventLogRepository;
import com.netgrif.application.engine.history.domain.dataevents.GetDataEventLog;
import com.netgrif.application.engine.history.domain.dataevents.SetDataEventLog;
import com.netgrif.application.engine.history.domain.dataevents.repository.GetDataEventLogRepository;
import com.netgrif.application.engine.history.domain.dataevents.repository.SetDataEventLogRepository;
import com.netgrif.application.engine.history.domain.petrinetevents.DeletePetriNetEventLog;
import com.netgrif.application.engine.history.domain.petrinetevents.ImportPetriNetEventLog;
import com.netgrif.application.engine.history.domain.petrinetevents.repository.DeletePetriNetEventLogRepository;
import com.netgrif.application.engine.history.domain.petrinetevents.repository.ImportPetriNetEventLogRepository;
import com.netgrif.application.engine.history.domain.taskevents.AssignTaskEventLog;
import com.netgrif.application.engine.history.domain.taskevents.CancelTaskEventLog;
import com.netgrif.application.engine.history.domain.taskevents.FinishTaskEventLog;
import com.netgrif.application.engine.history.domain.taskevents.repository.AssignTaskEventLogRepository;
import com.netgrif.application.engine.history.domain.taskevents.repository.CancelTaskEventLogRepository;
import com.netgrif.application.engine.history.domain.taskevents.repository.FinishTaskEventLogRepository;
import com.netgrif.application.engine.history.domain.userevents.UserEventLogRepository;
import org.bson.types.ObjectId;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HistoryService implements IHistoryService {

    @Autowired
    private UserEventLogRepository userEventLogRepository;

    @Autowired
    private EventLogRepository eventLogRepository;

    @Autowired
    private CreateCaseEventLogRepository createCaseEventLogRepository;

    @Autowired
    private DeleteCaseEventLogRepository deleteCaseEventLogRepository;

    @Autowired
    private SetDataEventLogRepository setDataEventLogRepository;

    @Autowired
    private GetDataEventLogRepository getDataEventLogRepository;

    @Autowired
    private ImportPetriNetEventLogRepository importPetriNetEventLogRepository;

    @Autowired
    private DeletePetriNetEventLogRepository deletePetriNetEventLogRepository;

    @Autowired
    private AssignTaskEventLogRepository assignTaskEventLogRepository;

    @Autowired
    private CancelTaskEventLogRepository cancelTaskEventLogRepository;

    @Autowired
    private FinishTaskEventLogRepository finishTaskEventLogRepository;

    @Override
    public void save(EventLog eventLog) {
        eventLogRepository.save(eventLog);
    }

    @Override
    public List findAllByIds(List eventIds) {
        return eventLogRepository.findAllById(eventIds);
    }

    @Override
    public List findAllCreateCaseEventLogsByCaseId(ObjectId caseId) {
        return createCaseEventLogRepository.findAllByCaseId(caseId);
    }

    @Override
    public List findAllDeleteCaseEventLogsByCaseId(ObjectId caseId) {
        return deleteCaseEventLogRepository.findAllByCaseId(caseId);
    }

    @Override
    public List findAllGetDataEventLogsByCaseId(ObjectId caseId) {
        return getDataEventLogRepository.findAllByCaseId(caseId);
    }

    @Override
    public List findAllGetDataEventLogsByTaskId(ObjectId taskId) {
        return getDataEventLogRepository.findAllByTaskId(taskId);
    }

    @Override
    public List findAllSetDataEventLogsByCaseId(ObjectId caseId) {
        return setDataEventLogRepository.findAllByCaseId(caseId);
    }

    @Override
    public List findAllSetDataEventLogsByTaskId(ObjectId taskId) {
        return setDataEventLogRepository.findAllByTaskId(taskId);
    }

    @Override
    public List findAllDeletePetriNetEventLogsByNetId(ObjectId netId) {
        return deletePetriNetEventLogRepository.findAllByNetId(netId);
    }

    @Override
    public List findAllImportPetriNetEventLogsByNetId(ObjectId netId) {
        return importPetriNetEventLogRepository.findAllByNetId(netId);
    }

    @Override
    public List findAllAssignTaskEventLogsByTaskId(ObjectId taskId) {
        return assignTaskEventLogRepository.findAllByTaskId(taskId);
    }

    @Override
    public List findAllAssignTaskEventLogsByUserId(String userId) {
        return assignTaskEventLogRepository.findAllByUserId(userId);
    }

    @Override
    public List findAllCancelTaskEventLogsByTaskId(ObjectId taskId) {
        return cancelTaskEventLogRepository.findAllByTaskId(taskId);
    }

    @Override
    public List findAllCancelTaskEventLogsByUserId(String userId) {
        return cancelTaskEventLogRepository.findAllByUserId(userId);
    }

    @Override
    public List findAllFinishTaskEventLogsByTaskId(ObjectId taskId) {
        return finishTaskEventLogRepository.findAllByTaskId(taskId);
    }

    @Override
    public List findAllFinishTaskEventLogsByUserId(String userId) {
        return finishTaskEventLogRepository.findAllByUserId(userId);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy