org.arquillian.spacelift.Spacelift Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of arquillian-spacelift-api Show documentation
Show all versions of arquillian-spacelift-api Show documentation
Arquillian Process and Package Manager
package org.arquillian.spacelift;
import java.io.File;
import java.io.IOException;
import java.text.MessageFormat;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.arquillian.spacelift.Invokable.InvocationException;
import org.arquillian.spacelift.execution.ExecutionService;
import org.arquillian.spacelift.task.InjectTask;
import org.arquillian.spacelift.task.InvalidTaskException;
import org.arquillian.spacelift.task.Task;
import org.arquillian.spacelift.task.TaskRegistry;
/**
* Arquillian Spacelift
*
* @author kpiwko
*/
public class Spacelift {
/**
* Creates a task based on task definition
*
* @param taskDef
* Task definition
*
* @return Instantiated task
*/
public static > TASK task(Class taskDef) {
return SpaceliftInstance.get().registry().find(taskDef);
}
/**
* Creates a task based on task definition stored under alias
*
* @param alias
* Task alias
*
* @return Instantiated task
*
* @throws InvalidTaskException
* if no such task exists
*/
public static Task, ?> task(String alias) throws InvalidTaskException {
return SpaceliftInstance.get().registry().find(alias);
}
/**
* Creates a task based on task definition and passes initial input to it
*
* @param input
* Input for the task
* @param taskDef
* Task definition
*
* @return Instantiated task
*/
public static > TASK task(IN input, Class taskDef) {
@SuppressWarnings("unchecked")
InjectTask task = SpaceliftInstance.get().registry().find(InjectTask.class);
return task.passToNext(input).then(taskDef);
}
/**
* Creates a task based on task definition stored under alias and passes initial input to it
*
* @param input
* input for the task
* @param alias
* Task alias
*
* @return Instantiated task
*
* @throws InvalidTaskException
* if no such task exists
*/
public static Task, ?> task(Object input, String alias) throws InvalidTaskException {
@SuppressWarnings("unchecked")
InjectTask
© 2015 - 2025 Weber Informatics LLC | Privacy Policy