/* 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.compatibility.wrapper;

import java.util.Map;

import org.activiti.engine.runtime.ProcessInstance;

/**
 * Wraps an Activiti 5 process instance to an Activiti 6 {@link ProcessInstance}.
 * 
 * @author Joram Barrez
 */
public class Activiti5ProcessInstanceWrapper implements ProcessInstance {

  private org.activiti5.engine.runtime.ProcessInstance activiti5ProcessInstance;
  
  public Activiti5ProcessInstanceWrapper(org.activiti5.engine.runtime.ProcessInstance activiti5ProcessInstance) {
    this.activiti5ProcessInstance = activiti5ProcessInstance;
  }

  @Override
  public String getId() {
    return activiti5ProcessInstance.getId();
  }

  @Override
  public boolean isEnded() {
    return activiti5ProcessInstance.isEnded();
  }

  @Override
  public String getActivityId() {
    return activiti5ProcessInstance.getActivityId();
  }

  @Override
  public String getProcessInstanceId() {
    return activiti5ProcessInstance.getProcessInstanceId();
  }
  
  @Override
  public String getRootProcessInstanceId() {
    return null;
  }

  @Override
  public String getParentId() {
    return activiti5ProcessInstance.getParentId();
  }

  @Override
  public String getProcessDefinitionId() {
    return activiti5ProcessInstance.getProcessDefinitionId();
  }

  @Override
  public String getProcessDefinitionName() {
    return activiti5ProcessInstance.getProcessDefinitionName();
  }

  @Override
  public String getProcessDefinitionKey() {
    return activiti5ProcessInstance.getProcessDefinitionKey();
  }

  @Override
  public Integer getProcessDefinitionVersion() {
    return activiti5ProcessInstance.getProcessDefinitionVersion();
  }

  @Override
  public String getDeploymentId() {
    return activiti5ProcessInstance.getDeploymentId();
  }

  @Override
  public String getBusinessKey() {
    return activiti5ProcessInstance.getBusinessKey();
  }

  @Override
  public boolean isSuspended() {
    return activiti5ProcessInstance.isSuspended();
  }

  @Override
  public Map<String, Object> getProcessVariables() {
    return activiti5ProcessInstance.getProcessVariables();
  }

  @Override
  public String getTenantId() {
    return activiti5ProcessInstance.getTenantId();
  }

  @Override
  public String getName() {
    return activiti5ProcessInstance.getName();
  }
  
  @Override
  public String getDescription() {
    return activiti5ProcessInstance.getDescription();
  }

  @Override
  public String getLocalizedName() {
    return activiti5ProcessInstance.getLocalizedName();
  }

  @Override
  public String getLocalizedDescription() {
    return activiti5ProcessInstance.getLocalizedDescription();
  }

  public org.activiti5.engine.runtime.ProcessInstance getRawObject() {
    return activiti5ProcessInstance;
  }

}

@@ -601,16 +601,39 @@
 apper;%0A%0A
+import java.util.Date;%0A
 import j
@@ -3338,10 +3338,144 @@
 e;%0A  %7D%0A%0A
+  @Override%0A  public Date getStartTime() %7B%0A    return null;%0A  %7D%0A%0A  @Override%0A  public String getStartUserId() %7B%0A    return null;%0A  %7D%0A%0A
 %7D%0A

Fix wrapper compile error