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

org.ow2.bonita.facade.exception.ProcessNotFoundException Maven / Gradle / Ivy

/**
 * Copyright (C) 2007  Bull S. A. S.
 * Bull, Rue Jean Jaures, B.P.68, 78340, Les Clayes-sous-Bois
 * This library is free software; you can redistribute it and/or modify it under the terms
 * of the GNU Lesser General Public License as published by the Free Software Foundation
 * version 2.1 of the License.
 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Lesser General Public License for more details.
 * You should have received a copy of the GNU Lesser General Public License along with this
 * program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
 * Floor, Boston, MA  02110-1301, USA.
 **/
package org.ow2.bonita.facade.exception;

import org.ow2.bonita.facade.uuid.PackageDefinitionUUID;
import org.ow2.bonita.facade.uuid.ProcessDefinitionUUID;
import org.ow2.bonita.util.BonitaException;

/**
 * Thrown by methods of RuntimeAPI or QueryDefinitionAPI if the recorded runtime information
 * of the process has not been found.
 *
 * @author Marc Blachon, Guillaume Porcher, Charles Souillard, Miguel Valdes, Pierre Vigneras
 *
 */
public class ProcessNotFoundException extends BonitaException {

  /**
   * 
   */
  private static final long serialVersionUID = -264146472484882763L;
  private final String processId;
  private final String version;
  private final ProcessDefinitionUUID processUUID;
  private final PackageDefinitionUUID packageUUID;

  public ProcessNotFoundException(final String processId) {
    super("Can't find a process with id " + processId);
    this.processId = processId;
    this.processUUID = null;
    this.packageUUID = null;
    this.version = null;
  }

  public ProcessNotFoundException(final String processId, final String version) {
    super("Can't find a process with id " + processId);
    this.processId = processId;
    this.version = version;
    this.processUUID = null;
    this.packageUUID = null;
  }

  public ProcessNotFoundException(final String processId, final PackageDefinitionUUID packageDefinitionUUID) {
    super("Can't find a process with id " + processId + " in package " + packageDefinitionUUID);
    this.processId = processId;
    this.processUUID = null;
    this.packageUUID = packageDefinitionUUID;
    this.version = null;
  }

  public ProcessNotFoundException(final ProcessDefinitionUUID processUUID) {
    super("Can't find a process with uuid " + processUUID);
    this.processUUID = processUUID;
    this.processId = null;
    this.packageUUID = null;
    this.version = null;
  }

  public String getProcessId() {
    return this.processId;
  }
  public ProcessDefinitionUUID getProcessUUID() {
    return processUUID;
  }
  public PackageDefinitionUUID getPackageUUID() {
    return packageUUID;
  }
  public String getVersion() {
    return version;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy