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

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

The 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;

/**
 * @author Tijs Rademakers
 */
public class CallActivity extends Activity {

  protected String calledElement;
  protected List inParameters = new ArrayList();
  protected List outParameters = new ArrayList();

  public String getCalledElement() {
    return calledElement;
  }
  public void setCalledElement(String calledElement) {
    this.calledElement = calledElement;
  }
  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 CallActivity clone() {
    CallActivity clone = new CallActivity();
    clone.setValues(this);
    return clone;
  }
  
  public void setValues(CallActivity otherElement) {
    super.setValues(otherElement);
    setCalledElement(otherElement.getCalledElement());
    
    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