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

io.camunda.webapps.schema.entities.operate.ProcessEntity Maven / Gradle / Ivy

There is a newer version: 8.7.0-alpha2-rc1
Show 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.webapps.schema.entities.operate;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

public class ProcessEntity extends OperateZeebeEntity {

  private String name;
  private int version;
  private String versionTag;
  private String bpmnProcessId;
  private String bpmnXml;
  private String resourceName;
  private List flowNodes = new ArrayList<>();
  private String formId;
  private Boolean isPublic;
  private String tenantId = DEFAULT_TENANT_ID;

  public String getName() {
    return name;
  }

  public ProcessEntity setName(final String name) {
    this.name = name;
    return this;
  }

  @Override
  public ProcessEntity setId(final String id) {
    super.setId(id);
    setKey(Long.valueOf(id));
    return this;
  }

  @Override
  public int hashCode() {
    return Objects.hash(
        super.hashCode(),
        name,
        version,
        versionTag,
        bpmnProcessId,
        bpmnXml,
        resourceName,
        flowNodes,
        tenantId,
        formId,
        isPublic);
  }

  @Override
  public boolean equals(final Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    if (!super.equals(o)) {
      return false;
    }
    final ProcessEntity that = (ProcessEntity) o;
    return version == that.version
        && Objects.equals(versionTag, that.versionTag)
        && Objects.equals(name, that.name)
        && Objects.equals(bpmnProcessId, that.bpmnProcessId)
        && Objects.equals(bpmnXml, that.bpmnXml)
        && Objects.equals(resourceName, that.resourceName)
        && Objects.equals(flowNodes, that.flowNodes)
        && Objects.equals(tenantId, that.tenantId)
        && Objects.equals(formId, that.formId)
        && Objects.equals(isPublic, that.isPublic);
  }

  @Override
  public String toString() {
    return "ProcessEntity{"
        + "name='"
        + name
        + '\''
        + ", version="
        + version
        + '\''
        + ", versionTag="
        + versionTag
        + ", bpmnProcessId='"
        + bpmnProcessId
        + '\''
        + ", bpmnXml='"
        + bpmnXml
        + '\''
        + ", resourceName='"
        + resourceName
        + '\''
        + ", flowNodes="
        + flowNodes
        + ", formId="
        + formId
        + ", isPublic="
        + isPublic
        + ", tenantId='"
        + tenantId
        + '\''
        + "} "
        + super.toString();
  }

  public int getVersion() {
    return version;
  }

  public ProcessEntity setVersion(final int version) {
    this.version = version;
    return this;
  }

  public String getVersionTag() {
    return versionTag;
  }

  public ProcessEntity setVersionTag(final String versionTag) {
    this.versionTag = versionTag;
    return this;
  }

  public String getBpmnProcessId() {
    return bpmnProcessId;
  }

  public ProcessEntity setBpmnProcessId(final String bpmnProcessId) {
    this.bpmnProcessId = bpmnProcessId;
    return this;
  }

  public String getBpmnXml() {
    return bpmnXml;
  }

  public ProcessEntity setBpmnXml(final String bpmnXml) {
    this.bpmnXml = bpmnXml;
    return this;
  }

  public String getResourceName() {
    return resourceName;
  }

  public ProcessEntity setResourceName(final String resourceName) {
    this.resourceName = resourceName;
    return this;
  }

  public List getFlowNodes() {
    if (flowNodes == null) {
      flowNodes = new ArrayList<>();
    }
    return flowNodes;
  }

  public ProcessEntity setFlowNodes(final List flowNodes) {
    this.flowNodes = flowNodes;
    return this;
  }

  public String getTenantId() {
    return tenantId;
  }

  public ProcessEntity setTenantId(final String tenantId) {
    this.tenantId = tenantId;
    return this;
  }

  public String getFormId() {
    return formId;
  }

  public ProcessEntity setFormId(final String formId) {
    this.formId = formId;
    return this;
  }

  public Boolean getIsPublic() {
    return isPublic;
  }

  public ProcessEntity setIsPublic(final Boolean isPublic) {
    this.isPublic = isPublic;
    return this;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy