package com.blueland.bpm.engine.util;

import java.util.Collection;
import java.util.Map;
import java.util.Set;

import org.activiti.engine.EngineServices;
import org.activiti.engine.delegate.DelegateExecution;

/**
 * 
 * 环节流转条件DelegateExecution
 * 
 * @author lw
 */
public class ActivityTranstionDelegateExecution implements DelegateExecution{
	Map<String, Object> activityTanstionMap=null;
	EngineServices engineServices;
	
	public ActivityTranstionDelegateExecution(Map<String, Object> activityTanstionMap,EngineServices engineServices){
		this.activityTanstionMap=activityTanstionMap;
				this.engineServices=engineServices;
		
	}
	@Override
	public Map<String, Object> getVariables() {
		// TODO Auto-generated method stub
		return activityTanstionMap;
	}

	@Override
	public Map<String, Object> getVariablesLocal() {
		// TODO Auto-generated method stub
		return activityTanstionMap;
	}

	@Override
	public Object getVariable(String variableName) {
		// TODO Auto-generated method stub
		return activityTanstionMap.get(variableName);
	}

	
	@Override
	public Set<String> getVariableNames() {
		// TODO Auto-generated method stub
		return activityTanstionMap.keySet();
	}

	@Override
	public Set<String> getVariableNamesLocal() {
		// TODO Auto-generated method stub
		return activityTanstionMap.keySet();
	}

	@Override
	public void setVariable(String variableName, Object value) {
		// TODO Auto-generated method stub
		activityTanstionMap.put(variableName, value);
	}

	@Override
	public Object setVariableLocal(String variableName, Object value) {
		// TODO Auto-generated method stub
		activityTanstionMap.put(variableName, value);
		return null;
	}

	@Override
	public void setVariables(Map<String, ? extends Object> variables) {
		// TODO Auto-generated method stub
		activityTanstionMap=(Map<String, Object>) variables;
	}

	@Override
	public void setVariablesLocal(Map<String, ? extends Object> variables) {
		// TODO Auto-generated method stub
		activityTanstionMap=(Map<String, Object>) variables;
	}

	@Override
	public boolean hasVariables() {
		// TODO Auto-generated method stub
		return activityTanstionMap!=null&&!activityTanstionMap.isEmpty();
	}

	@Override
	public boolean hasVariablesLocal() {
		// TODO Auto-generated method stub
		return activityTanstionMap!=null&&!activityTanstionMap.isEmpty();
	}

	@Override
	public boolean hasVariable(String variableName) {
		// TODO Auto-generated method stub
		return activityTanstionMap.containsKey(variableName);
	}

	@Override
	public boolean hasVariableLocal(String variableName) {
		// TODO Auto-generated method stub
		return activityTanstionMap.containsKey(variableName);
	}

	@Override
	public void createVariableLocal(String variableName, Object value) {
		// TODO Auto-generated method stub
		 activityTanstionMap.put(variableName, value);
	}

	@Override
	public void removeVariable(String variableName) {
		// TODO Auto-generated method stub
		 activityTanstionMap.remove(variableName);
	}

	@Override
	public void removeVariableLocal(String variableName) {
		// TODO Auto-generated method stub
		 activityTanstionMap.remove(variableName);
	}

	@Override
	public void removeVariables(Collection<String> variableNames) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void removeVariablesLocal(Collection<String> variableNames) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void removeVariables() {
		// TODO Auto-generated method stub
		 activityTanstionMap.clear();
	}

	@Override
	public void removeVariablesLocal() {
		// TODO Auto-generated method stub
		 activityTanstionMap.clear();
	}

	@Override
	public String getId() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getProcessInstanceId() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getEventName() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getBusinessKey() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getProcessBusinessKey() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getProcessDefinitionId() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getParentId() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getCurrentActivityId() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getCurrentActivityName() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public EngineServices getEngineServices() {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public Object getVariableLocal(String variableName) {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public <T> T getVariable(String variableName, Class<T> variableClass) {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public <T> T getVariableLocal(String variableName, Class<T> variableClass) {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public String getTenantId() {
		// TODO Auto-generated method stub
		return null;
	}

}
