Package org.appng.testsupport
Class TestBase.SimpleFeatureProvider
- java.lang.Object
-
- org.appng.testsupport.TestBase.SimpleFeatureProvider
-
- All Implemented Interfaces:
FeatureProvider
- Enclosing class:
- TestBase
protected class TestBase.SimpleFeatureProvider extends Object implements FeatureProvider
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Integer
getDocumentCount()
File
getImageCache()
Returns the folder to use for caching images, only available iffeatureImageProcessing
is enabled.ImageProcessor
getImageProcessor(File sourceFile, String targetFile)
Returns anImageProcessor
for the given sourceFile.
To enable this feature, set theApplication
'sProperty
featureImageProcessing
totrue
.Consumer<DocumentEvent,DocumentProducer>
getIndexer()
Returns aConsumer
which consumesDocumentEvent
s produced by aDocumentProducer
.The returnedConsumer
writes to the Lucene-powered
search-index of theSite
.
To enable this feature, set theApplication
'sProperty
featureIndexing
totrue
.
-
-
-
Method Detail
-
getIndexer
public Consumer<DocumentEvent,DocumentProducer> getIndexer()
Description copied from interface:FeatureProvider
Returns aConsumer
which consumesDocumentEvent
s produced by aDocumentProducer
.The returnedConsumer
writes to the Lucene-powered
search-index of theSite
.
To enable this feature, set theApplication
'sProperty
featureIndexing
totrue
.- Specified by:
getIndexer
in interfaceFeatureProvider
- Returns:
- a
Consumer
consumingDocumentEvent
s produced by aDocumentProducer
-
getDocumentCount
public Integer getDocumentCount()
-
getImageProcessor
public ImageProcessor getImageProcessor(File sourceFile, String targetFile)
Description copied from interface:FeatureProvider
Returns anImageProcessor
for the given sourceFile.
To enable this feature, set theApplication
'sProperty
featureImageProcessing
totrue
.- Specified by:
getImageProcessor
in interfaceFeatureProvider
- Parameters:
sourceFile
- the source image (should have an absolute path)targetFile
- the path to the target file to be created, relative toPlatform.Property.IMAGE_CACHE_FOLDER
.- Returns:
- an
ImageProcessor
for the given source file
-
getImageCache
public File getImageCache()
Description copied from interface:FeatureProvider
Returns the folder to use for caching images, only available iffeatureImageProcessing
is enabled.- Specified by:
getImageCache
in interfaceFeatureProvider
- Returns:
- the cache folder for images
- See Also:
FeatureProvider.getImageProcessor(File, String)
-
-