Package org.appng.api.model
Interface FeatureProvider
-
- All Known Implementing Classes:
FeatureProviderImpl
,TestBase.SimpleFeatureProvider
public interface FeatureProvider
AApplication
can make use of several features provided by appNG. To enable a feature, a certainProperty
needs to be set for theApplication
. This can be done in the application'sapplication-info.xml
or via the administration-tool.- Author:
- Matthias Herlitzius
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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
-
getImageProcessor
ImageProcessor getImageProcessor(File sourceFile, String targetFile)
Returns anImageProcessor
for the given sourceFile.
To enable this feature, set theApplication
'sProperty
featureImageProcessing
totrue
.- 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
File getImageCache()
Returns the folder to use for caching images, only available iffeatureImageProcessing
is enabled.- Returns:
- the cache folder for images
- See Also:
getImageProcessor(File, String)
-
getIndexer
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
.- Returns:
- a
Consumer
consumingDocumentEvent
s produced by aDocumentProducer
-
-