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

io.camunda.operate.zeebeimport.post.AdditionalData Maven / Gradle / Ivy

The newest version!
/*
 * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH under
 * one or more contributor license agreements. See the NOTICE file distributed
 * with this work for additional information regarding copyright ownership.
 * Licensed under the Camunda License 1.0. You may not use this file
 * except in compliance with the Camunda License 1.0.
 */
package io.camunda.operate.zeebeimport.post;

import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

public class AdditionalData {

  private Map incidentIndices = new ConcurrentHashMap<>();
  private Map> flowNodeInstanceIndices = new ConcurrentHashMap<>();
  private Map> flowNodeInstanceInListViewIndices = new ConcurrentHashMap<>();
  private Map processInstanceTreePaths = new ConcurrentHashMap<>();
  private Map incidentTreePaths = new ConcurrentHashMap<>();
  private Map processInstanceIndices = new ConcurrentHashMap<>();
  private Map> piIdsWithIncidentIds =
      new ConcurrentHashMap<>(); // piId <-> active incident ids
  private Map> fniIdsWithIncidentIds =
      new ConcurrentHashMap<>(); // flowNodeInstanceId <-> active incident ids

  public Map> getFlowNodeInstanceIndices() {
    return flowNodeInstanceIndices;
  }

  public AdditionalData setFlowNodeInstanceIndices(
      final Map> flowNodeInstanceIndices) {
    this.flowNodeInstanceIndices = flowNodeInstanceIndices;
    return this;
  }

  public Map> getFlowNodeInstanceInListViewIndices() {
    return flowNodeInstanceInListViewIndices;
  }

  public AdditionalData setFlowNodeInstanceInListViewIndices(
      final Map> flowNodeInstanceInListViewIndices) {
    this.flowNodeInstanceInListViewIndices = flowNodeInstanceInListViewIndices;
    return this;
  }

  public Map getProcessInstanceTreePaths() {
    return processInstanceTreePaths;
  }

  public AdditionalData setProcessInstanceTreePaths(
      final Map processInstanceTreePaths) {
    this.processInstanceTreePaths = processInstanceTreePaths;
    return this;
  }

  public Map getProcessInstanceIndices() {
    return processInstanceIndices;
  }

  public AdditionalData setProcessInstanceIndices(
      final Map processInstanceIndices) {
    this.processInstanceIndices = processInstanceIndices;
    return this;
  }

  public Map getIncidentIndices() {
    return incidentIndices;
  }

  public AdditionalData setIncidentIndices(final Map incidentIndices) {
    this.incidentIndices = incidentIndices;
    return this;
  }

  public Map> getPiIdsWithIncidentIds() {
    return piIdsWithIncidentIds;
  }

  public AdditionalData setPiIdsWithIncidentIds(
      final Map> piIdsWithIncidentIds) {
    this.piIdsWithIncidentIds = piIdsWithIncidentIds;
    return this;
  }

  public void addPiIdsWithIncidentIds(final String piId, final String incidentId) {
    if (piIdsWithIncidentIds.get(piId) == null) {
      piIdsWithIncidentIds.put(piId, new HashSet<>());
    }
    piIdsWithIncidentIds.get(piId).add(incidentId);
  }

  public void deleteIncidentIdByPiId(final String piId, final String incidentId) {
    if (piIdsWithIncidentIds.get(piId) != null) {
      piIdsWithIncidentIds.get(piId).remove(incidentId);
    }
  }

  public Map> getFniIdsWithIncidentIds() {
    return fniIdsWithIncidentIds;
  }

  public AdditionalData setFniIdsWithIncidentIds(
      final Map> fniIdsWithIncidentIds) {
    this.fniIdsWithIncidentIds = fniIdsWithIncidentIds;
    return this;
  }

  public void addFniIdsWithIncidentIds(final String fniId, final String incidentId) {
    if (fniIdsWithIncidentIds.get(fniId) == null) {
      fniIdsWithIncidentIds.put(fniId, new HashSet<>());
    }
    fniIdsWithIncidentIds.get(fniId).add(incidentId);
  }

  public void deleteIncidentIdByFniId(final String fniId, final String incidentId) {
    if (fniIdsWithIncidentIds.get(fniId) != null) {
      fniIdsWithIncidentIds.get(fniId).remove(incidentId);
    }
  }

  public Map getIncidentTreePaths() {
    return incidentTreePaths;
  }

  public AdditionalData setIncidentTreePaths(final Map incidentTreePaths) {
    this.incidentTreePaths = incidentTreePaths;
    return this;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy