org.etlunit.feature.Feature Maven / Gradle / Ivy
package org.etlunit.feature;
import com.google.inject.Injector;
import org.etlunit.*;
import org.etlunit.parser.ETLTestValueObject;
import org.etlunit.util.NeedsTest;
import javax.inject.Inject;
import javax.inject.Named;
import java.util.List;
/**
* Feature types include lifecycle support (such as preparing a database environment),
* vm options such as new operations, etc, and features can provide a base
* for other features to build on, such as a database feature which is built
* upon by specific database implementations.
*/
public interface Feature
{
@Inject
void setConfiguration(Configuration conf);
void setFeatureConfiguration(ETLTestValueObject obj);
ETLTestValueObject getFeatureConfiguration();
FeatureMetaInfo getMetaInfo();
LogListener getLogListener();
/**
* Make any changes the feature needs to to the injector.
* If this method returns non-null, that injector will
* be used for further feature initialization. This allows features
* to add bindings to the guice injector to be made available to other downstream
* features.
*/
Injector preCreate(Injector nj);
/**
* Initialize this module with the dependency injector provided by the
* test vm.
*
* @param nj
* @return
*/
void initialize(Injector nj);
ClassDirector getDirector();
ClassListener getListener();
ClassLocator getLocator();
StatusReporter getStatusReporter();
String getFeatureName();
List getPrerequisites();
/**
* The priority of this feature. The lower the priority the earlier in the
* chain the feature will be, the higher priority means later in the chain.
* 0 is effectively no priority, <0 for high priority, and >0 for low priority.
*
* @return the priority level
*/
long getPriorityLevel();
/**
* Called when this feature is no longer needed for this test
*/
@NeedsTest
void dispose();
@Inject
void setApplicationLog(@Named("applicationLog") Log log);
@Inject
void setUserLog(@Named("userLog") Log log);
void setRuntimeOption(RuntimeOption option);
/**
* Returns a list of the folders created in the test hierarchy which support
* tests. This is used to locate feature resources, and to differentiate support
* folders from test packages.
*
* @return
*/
List getTestSupportFolderNames();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy