Package org.nuiton.eugene.writer
Interface ChainedWriterEngine
-
- All Known Implementing Classes:
DefaultChainedWriterEngine
public interface ChainedWriterEngineContract of the chained writer engine. You can register inputs via the methodregisterInclude(String). And later obtain of the selected writers for your inputs via the methodgetSelectedWriters(). Created: 17 déc. 2009- Since:
- 2.0.0
- Author:
- Tony Chemit - dev@tchemit.fr
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()clean all internal statesbooleancontainsWriter(String inputProtocol)Tests if there is a selected writer using the given input protocol.Set<ChainedFileWriter>filterWriterForModelType(Map<String,ChainedFileWriter> universe, String modelType)Filter the givenuniverseof writers which accept the givenmodelType.Set<ChainedFileWriter>getAvailableWriters()ChainedFileWriterDatagetData(ChainedFileWriter writer)Obtain the universe of files to react by the givenwriterassociated with each (distinct).List<ChainedFileWriter>getSelectedWriters()ChainedFileWritergetWriterForInclude(Set<ChainedFileWriter> universe, String include, String modelType)Filter the givenuniverseof writers which accept the givenmodelTypeandinclude.ChainedFileWritergetWriterForInputProtocol(Set<ChainedFileWriter> universe, String inputProtocol, String modelType)Filter the givenuniverseof writers which accept the givenmodelTypeandinputProtocol.voidinit(ChainedFileWriterConfiguration configuration)voidregisterInclude(String include)Register in engine a new input source.
-
-
-
Method Detail
-
init
void init(ChainedFileWriterConfiguration configuration)
-
registerInclude
void registerInclude(String include)
Register in engine a new input source. this method will detects writers to register and chain them if necessary.- Parameters:
include- the new include to digest
-
getAvailableWriters
Set<ChainedFileWriter> getAvailableWriters()
- Returns:
- the set of all available writers discovered at runtime
-
getSelectedWriters
List<ChainedFileWriter> getSelectedWriters()
- Returns:
- the list of selected writers after having registred some inputs.
-
containsWriter
boolean containsWriter(String inputProtocol)
Tests if there is a selected writer using the given input protocol.- Parameters:
inputProtocol- the inputProtocol to test- Returns:
trueif there is a selected writer using this input protocol- See Also:
ChainedFileWriter.getInputProtocol(),getSelectedWriters()
-
filterWriterForModelType
Set<ChainedFileWriter> filterWriterForModelType(Map<String,ChainedFileWriter> universe, String modelType)
Filter the givenuniverseof writers which accept the givenmodelType.- Parameters:
universe- the list of writers to filtermodelType- the accepted model type- Returns:
- the set of filtered writers
- See Also:
ChainedFileWriter.acceptModel(String)
-
getWriterForInputProtocol
ChainedFileWriter getWriterForInputProtocol(Set<ChainedFileWriter> universe, String inputProtocol, String modelType)
Filter the givenuniverseof writers which accept the givenmodelTypeandinputProtocol.- Parameters:
universe- the list of writers to filterinputProtocol- the accepted input protocolmodelType- the accepted model type- Returns:
- the set of filtered writers
- See Also:
ChainedFileWriter.acceptModel(String),ChainedFileWriter.getInputProtocol(),ChainedFileWriter.getInputProtocol(String)
-
getWriterForInclude
ChainedFileWriter getWriterForInclude(Set<ChainedFileWriter> universe, String include, String modelType)
Filter the givenuniverseof writers which accept the givenmodelTypeandinclude. The include can have several forms :- Parameters:
universe- the list of writers to filterinclude- the include configurationmodelType- the accepted model type- Returns:
- the set of filtered writers
- See Also:
ChainedFileWriter.acceptModel(String),ChainedFileWriter.getInputProtocol(),ChainedFileWriter.getInputProtocol(String)
-
getData
ChainedFileWriterData getData(ChainedFileWriter writer) throws IOException
Obtain the universe of files to react by the givenwriterassociated with each (distinct). Note: If some files are in class-path (using the classpath: prefix) then they will be extracted to theChainedFileWriterConfiguration.getExtractDirectory().- Parameters:
writer- the writer to inspect- Returns:
- the universe of files to react for the given writer
- Throws:
IOException- for any IO pb- Since:
- 2.1.3
-
clear
void clear()
clean all internal states
-
-