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

org.activiti.bpmn.model.CallActivity Maven / Gradle / Ivy

There is a newer version: 7.1.0.M6
Show 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.bpmn.model;

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

public class CallActivity extends Activity {

  protected String calledElement;
  protected boolean inheritVariables;
  protected List inParameters = new ArrayList();
  protected List outParameters = new ArrayList();
  protected String businessKey;
  protected boolean inheritBusinessKey;

  public String getCalledElement() {
    return calledElement;
  }

  public void setCalledElement(String calledElement) {
    this.calledElement = calledElement;
  }

  public boolean isInheritVariables() {
    return inheritVariables;
  }

  public void setInheritVariables(boolean inheritVariables) {
    this.inheritVariables = inheritVariables;
  }

  public List getInParameters() {
    return inParameters;
  }

  public void setInParameters(List inParameters) {
    this.inParameters = inParameters;
  }

  public List getOutParameters() {
    return outParameters;
  }

  public void setOutParameters(List outParameters) {
    this.outParameters = outParameters;
  }

  public String getBusinessKey() {
    return businessKey;
  }

  public void setBusinessKey(String businessKey) {
    this.businessKey = businessKey;
  }

  public boolean isInheritBusinessKey() {
    return inheritBusinessKey;
  }

  public void setInheritBusinessKey(boolean inheritBusinessKey) {
    this.inheritBusinessKey = inheritBusinessKey;
  }

  public CallActivity clone() {
    CallActivity clone = new CallActivity();
    clone.setValues(this);
    return clone;
  }

  public void setValues(CallActivity otherElement) {
    super.setValues(otherElement);
    setCalledElement(otherElement.getCalledElement());
    setBusinessKey(otherElement.getBusinessKey());
    setInheritBusinessKey(otherElement.isInheritBusinessKey());

    inParameters = new ArrayList();
    if (otherElement.getInParameters() != null && !otherElement.getInParameters().isEmpty()) {
      for (IOParameter parameter : otherElement.getInParameters()) {
        inParameters.add(parameter.clone());
      }
    }

    outParameters = new ArrayList();
    if (otherElement.getOutParameters() != null && !otherElement.getOutParameters().isEmpty()) {
      for (IOParameter parameter : otherElement.getOutParameters()) {
        outParameters.add(parameter.clone());
      }
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy