Interface DatasinkService
- All Known Implementing Classes:
DatasinkServiceImpl
public interface DatasinkService
-
Method Summary
Modifier and TypeMethodDescriptionvoidexportFileIntoDatasink(AbstractFileServerNodeDto fileDto, DatasinkDefinitionDto datasinkDto, String filename, String folder, boolean compressed) voidexportIntoDatasink(Object report, DatasinkDefinition datasink, String fileEnding) Sends a data to the specified datasink, defined in a givenDatasinkDefinitiondatasink.voidexportIntoDatasink(Object report, DatasinkDefinition datasink, DatasinkConfiguration config) Sends a data to the specified datasink, defined in a givenDatasinkDefinitiondatasink.voidexportIntoDatasink(Object report, User user, DatasinkDefinition datasink, 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.
-
Method Details
-
getDefaultFolder
-
isEnabled
Returns the current configuration value of datasink enabling. Has to be true in order for reports to be sent to the specified datasink type.- Parameters:
datasinkService- the datasink service- Returns:
- true if the datasink type is enabled
-
isSchedulingEnabled
Returns 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.- Parameters:
datasinkService- the datasink service- Returns:
- true if datasink's scheduling is enabled
-
getEnabledConfigs
Summarizes} andinvalid @link
{@link #isEnabled(DatasinkDefinition))} in a map.invalid @link
{@link #isSchedulingEnabled(DatasinkDefinition))- 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
void testDatasink(DatasinkDefinition datasinkDefinition, DatasinkConfiguration config) throws DatasinkExportException Issues a datasink test request by creating a simple text file and sending it to the specified directory in the specified datasink.- Parameters:
datasinkDefinition- theDatasinkDefinitionto testconfig- the datasink export configuration- Throws:
DatasinkExportException- if an error occurs during datasink export
-
exportIntoDatasink
void exportIntoDatasink(Object report, User user, DatasinkDefinition datasink, DatasinkConfiguration config) throws DatasinkExportException Sends a data to the specified datasink, defined in a givenDatasinkDefinitiondatasink.- Parameters:
report- the data to send. May be a String, a byte array or aTableDBDataSourceuser- theUserdatasink- theDatasinkDefinitionto sendconfig- configuration of the export- Throws:
DatasinkExportException- if an error occurs during datasink export
-
exportIntoDatasink
void exportIntoDatasink(ReportExecuteJob rJob, boolean compress, DatasinkDefinition datasink, DatasinkConfiguration config) throws ActionExecutionException - Throws:
ActionExecutionException
-
getFilenameForDatasink
-
getFilenameForDatasink
-
exportIntoDatasink
void exportIntoDatasink(CompiledReport cReport, String name, boolean compress, DatasinkDefinition datasink, DatasinkConfiguration config) throws DatasinkExportException - Throws:
DatasinkExportException
-
exportIntoDatasink
void exportIntoDatasink(Object report, DatasinkDefinition datasink, DatasinkConfiguration config) throws DatasinkExportException Sends a data to the specified datasink, defined in a givenDatasinkDefinitiondatasink.- Parameters:
report- the data to send. May be a String, a byte array or aTableDBDataSourcedatasink- theDatasinkDefinitionto sendconfig- configuration of the export- Throws:
DatasinkExportException- if an error occurs during datasink export
-
exportIntoDatasink
void exportIntoDatasink(Object report, DatasinkDefinition datasink, String fileEnding) throws DatasinkExportException Sends a data to the specified datasink, defined in a givenDatasinkDefinitiondatasink. Uses datasink default configuration.- Parameters:
report- the data to send. May be a String, a byte array or aTableDBDataSourcedatasink- 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
Optional<? extends DatasinkDefinition> getDefaultDatasink(BasicDatasinkService basicDatasinkService) -
exportFileIntoDatasink
void exportFileIntoDatasink(AbstractFileServerNodeDto fileDto, DatasinkDefinitionDto datasinkDto, String filename, String folder, boolean compressed) throws ServerCallFailedException - Throws:
ServerCallFailedException
-