Class DatasinkServiceImpl
java.lang.Object
net.datenwerke.rs.core.service.datasinkmanager.DatasinkServiceImpl
- All Implemented Interfaces:
DatasinkService
-
Constructor Summary
ConstructorsConstructorDescriptionDatasinkServiceImpl(<any> configServiceProvider, DtoService dtoService, ZipUtilsService zipUtilsService, <any> authenticatorServiceProvider, <any> hookHandlerServiceProvider) -
Method Summary
Modifier and TypeMethodDescriptionvoidexportFileIntoDatasink(AbstractFileServerNodeDto fileDto, DatasinkDefinitionDto datasinkDto, String filename, String folder, boolean compressed) voidexportIntoDatasink(Object data, DatasinkDefinition datasinkDefinition, String fileEnding) Sends a data to the specified datasink, defined in a givenDatasinkDefinitiondatasink.voidexportIntoDatasink(Object data, DatasinkDefinition datasinkDefinition, DatasinkConfiguration config) Sends a data to the specified datasink, defined in a givenDatasinkDefinitiondatasink.voidexportIntoDatasink(Object data, User user, DatasinkDefinition datasinkDefinition, DatasinkConfiguration config) Sends a data to the specified datasink, defined in a givenDatasinkDefinitiondatasink.voidexportIntoDatasink(CompiledReport cReport, String name, boolean compress, DatasinkDefinition datasink, DatasinkConfiguration config) voidexportIntoDatasink(ReportExecuteJob rJob, boolean compress, DatasinkDefinition datasink, DatasinkConfiguration config) Optional<? extends DatasinkDefinition> getDefaultDatasink(BasicDatasinkService basicDatasinkService) getDefaultFolder(FolderedDatasink datasink) getEnabledConfigs(BasicDatasinkService datasinkService) Summarizes} andinvalid @link
{@link #isEnabled(DatasinkDefinition))} in a map.invalid @link
{@link #isSchedulingEnabled(DatasinkDefinition))getFilenameForDatasink(String name, CompiledReport cReport, boolean compress) getFilenameForDatasink(ReportExecuteJob rJob, boolean compress, String filename) booleanisEnabled(BasicDatasinkService datasinkService) Returns the current configuration value of datasink enabling.booleanisSchedulingEnabled(BasicDatasinkService datasinkService) Returns the current configuration value of scheduling enabling.voidtestDatasink(DatasinkDefinition datasinkDefinition, DatasinkConfiguration config) Issues a datasink test request by creating a simple text file and sending it to the specified directory in the specified datasink.
-
Constructor Details
-
DatasinkServiceImpl
public DatasinkServiceImpl(<any> configServiceProvider, DtoService dtoService, ZipUtilsService zipUtilsService, <any> authenticatorServiceProvider, <any> hookHandlerServiceProvider)
-
-
Method Details
-
getDefaultFolder
- Specified by:
getDefaultFolderin interfaceDatasinkService
-
isEnabled
Description copied from interface:DatasinkServiceReturns the current configuration value of datasink enabling. Has to be true in order for reports to be sent to the specified datasink type.- Specified by:
isEnabledin interfaceDatasinkService- Parameters:
datasinkService- the datasink service- Returns:
- true if the datasink type is enabled
-
isSchedulingEnabled
Description copied from interface:DatasinkServiceReturns the current configuration value of scheduling enabling. Reports can only be sent to the specified datasink type inside a scheduling job if this is true.- Specified by:
isSchedulingEnabledin interfaceDatasinkService- Parameters:
datasinkService- the datasink service- Returns:
- true if datasink's scheduling is enabled
-
getEnabledConfigs
Description copied from interface:DatasinkServiceSummarizes} andinvalid @link
{@link #isEnabled(DatasinkDefinition))} in a map.invalid @link
{@link #isSchedulingEnabled(DatasinkDefinition))- Specified by:
getEnabledConfigsin interfaceDatasinkService- Parameters:
datasinkService- the datasink service- Returns:
- a map containing the enabling configuration for
} and
invalid @link
{@link #isEnabled(DatasinkDefinition))}invalid @link
{@link #isSchedulingEnabled(DatasinkDefinition))
-
testDatasink
public void testDatasink(DatasinkDefinition datasinkDefinition, DatasinkConfiguration config) throws DatasinkExportException Description copied from interface:DatasinkServiceIssues a datasink test request by creating a simple text file and sending it to the specified directory in the specified datasink.- Specified by:
testDatasinkin interfaceDatasinkService- Parameters:
datasinkDefinition- theDatasinkDefinitionto testconfig- the datasink export configuration- Throws:
DatasinkExportException- if an error occurs during datasink export
-
exportIntoDatasink
public void exportIntoDatasink(Object data, User user, DatasinkDefinition datasinkDefinition, DatasinkConfiguration config) throws DatasinkExportException Description copied from interface:DatasinkServiceSends a data to the specified datasink, defined in a givenDatasinkDefinitiondatasink.- Specified by:
exportIntoDatasinkin interfaceDatasinkService- Parameters:
data- the data to send. May be a String, a byte array or aTableDBDataSourceuser- theUserdatasinkDefinition- theDatasinkDefinitionto sendconfig- configuration of the export- Throws:
DatasinkExportException- if an error occurs during datasink export
-
exportIntoDatasink
public void exportIntoDatasink(Object data, DatasinkDefinition datasinkDefinition, DatasinkConfiguration config) throws DatasinkExportException Description copied from interface:DatasinkServiceSends a data to the specified datasink, defined in a givenDatasinkDefinitiondatasink.- Specified by:
exportIntoDatasinkin interfaceDatasinkService- Parameters:
data- the data to send. May be a String, a byte array or aTableDBDataSourcedatasinkDefinition- theDatasinkDefinitionto sendconfig- configuration of the export- Throws:
DatasinkExportException- if an error occurs during datasink export
-
exportIntoDatasink
public void exportIntoDatasink(Object data, DatasinkDefinition datasinkDefinition, String fileEnding) throws DatasinkExportException Description copied from interface:DatasinkServiceSends a data to the specified datasink, defined in a givenDatasinkDefinitiondatasink. Uses datasink default configuration.- Specified by:
exportIntoDatasinkin interfaceDatasinkService- Parameters:
data- the data to send. May be a String, a byte array or aTableDBDataSourcedatasinkDefinition- theDatasinkDefinitionto sendfileEnding- the ending of the file to export, e.g. ".txt" for text files- Throws:
DatasinkExportException- if an error occurs during datasink export
-
getDefaultDatasink
public Optional<? extends DatasinkDefinition> getDefaultDatasink(BasicDatasinkService basicDatasinkService) - Specified by:
getDefaultDatasinkin interfaceDatasinkService
-
exportFileIntoDatasink
public void exportFileIntoDatasink(AbstractFileServerNodeDto fileDto, DatasinkDefinitionDto datasinkDto, String filename, String folder, boolean compressed) throws ServerCallFailedException - Specified by:
exportFileIntoDatasinkin interfaceDatasinkService- Throws:
ServerCallFailedException
-
exportIntoDatasink
public void exportIntoDatasink(ReportExecuteJob rJob, boolean compress, DatasinkDefinition datasink, DatasinkConfiguration config) throws ActionExecutionException - Specified by:
exportIntoDatasinkin interfaceDatasinkService- Throws:
ActionExecutionException
-
exportIntoDatasink
public void exportIntoDatasink(CompiledReport cReport, String name, boolean compress, DatasinkDefinition datasink, DatasinkConfiguration config) throws DatasinkExportException - Specified by:
exportIntoDatasinkin interfaceDatasinkService- Throws:
DatasinkExportException
-
getFilenameForDatasink
- Specified by:
getFilenameForDatasinkin interfaceDatasinkService
-
getFilenameForDatasink
- Specified by:
getFilenameForDatasinkin interfaceDatasinkService
-