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

com.xlrit.gears.base.execution.Execution Maven / Gradle / Ivy

There is a newer version: 1.17.5
Show newest version
package com.xlrit.gears.base.execution;

import java.util.List;
import java.util.Map;
import java.util.function.Consumer;

import com.xlrit.gears.base.collection.CollectionRef;
import com.xlrit.gears.base.form.Form;
import com.xlrit.gears.base.form.Line;
import com.xlrit.gears.base.meta.Relation;
import com.xlrit.gears.base.model.User;
import org.slf4j.Logger;

public interface Execution {
	Execution NONE = null;

	default  void setElement(String name, E value) { setElement(name, value, Integer.MAX_VALUE); }
	 void setElement(String name, E value, int visibility);
	void removeElement(String name);
	 E getElement(String name, Class type);
	 E getOptionalElement(String name, Class type);
	boolean hasElement(String name);

	default  void setCollection(String name, List elements) { setCollection(name, elements, Integer.MAX_VALUE); }
	 void setCollection(String name, List elements, int visibility);
	void removeCollection(String name);
	 List getCollection(String name, Class type);

	default void setCondition(String name, boolean value) { setCondition(name, value, Integer.MAX_VALUE);}
	void setCondition(String name, boolean value, int visibility);
	boolean getCondition(String name);

	void setForm(Form form);
	 F getForm(Class formClass);

	User getActor(String name);
	User getCurrentUser();

	void setSubject(String subject);
	String getSubject();

	ElementExecution createElementExecution(String elementName, List collection, int index);
	void forEach(String elementName, List elements, Consumer body);
	void forEachLinked(String elementName, List mainElements, List linkedElements, Consumer body);
	int getElementIndex(String name);
	 E getLinkedElement(String name, Class type);

	 void update(String elementName, CollectionRef collectionRef, List lines, Consumer body);

	Map getLocalVars();
	String getProcessInstanceId();
	String getProcessDefinitionId();
	void flush();

	Logger getLogger();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy