public class DatasinkServiceImpl extends java.lang.Object implements DatasinkService
Constructor and Description |
---|
DatasinkServiceImpl(<any> configServiceProvider,
DtoService dtoService,
ZipUtilsService zipUtilsService,
<any> authenticatorServiceProvider,
<any> hookHandlerServiceProvider) |
Modifier and Type | Method and Description |
---|---|
void |
exportFileIntoDatasink(AbstractFileServerNodeDto fileDto,
DatasinkDefinitionDto datasinkDto,
java.lang.String filename,
java.lang.String folder,
boolean compressed) |
void |
exportIntoDatasink(CompiledReport cReport,
java.lang.String name,
boolean compress,
DatasinkDefinition datasink,
DatasinkConfiguration config) |
void |
exportIntoDatasink(java.lang.Object data,
DatasinkDefinition datasinkDefinition,
DatasinkConfiguration config)
Sends a data to the specified datasink, defined in a given
DatasinkDefinition datasink. |
void |
exportIntoDatasink(java.lang.Object data,
DatasinkDefinition datasinkDefinition,
java.lang.String fileEnding)
Sends a data to the specified datasink, defined in a given
DatasinkDefinition datasink. |
void |
exportIntoDatasink(java.lang.Object data,
User user,
DatasinkDefinition datasinkDefinition,
DatasinkConfiguration config)
Sends a data to the specified datasink, defined in a given
DatasinkDefinition datasink. |
void |
exportIntoDatasink(ReportExecuteJob rJob,
boolean compress,
DatasinkDefinition datasink,
DatasinkConfiguration config) |
java.util.Optional<? extends DatasinkDefinition> |
getDefaultDatasink(BasicDatasinkService basicDatasinkService) |
java.lang.String |
getDefaultFolder(FolderedDatasink datasink) |
java.util.Map<StorageType,java.lang.Boolean> |
getEnabledConfigs(BasicDatasinkService datasinkService)
Summarizes
#isEnabled(DatasinkDefinition)) and
#isSchedulingEnabled(DatasinkDefinition)) in a map. |
java.lang.String |
getFilenameForDatasink(ReportExecuteJob rJob,
boolean compress,
java.lang.String filename) |
java.lang.String |
getFilenameForDatasink(java.lang.String name,
CompiledReport cReport,
boolean compress) |
boolean |
isEnabled(BasicDatasinkService datasinkService)
Returns the current configuration value of datasink enabling.
|
boolean |
isSchedulingEnabled(BasicDatasinkService datasinkService)
Returns the current configuration value of scheduling enabling.
|
void |
testDatasink(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.
|
public DatasinkServiceImpl(<any> configServiceProvider, DtoService dtoService, ZipUtilsService zipUtilsService, <any> authenticatorServiceProvider, <any> hookHandlerServiceProvider)
public java.lang.String getDefaultFolder(FolderedDatasink datasink)
getDefaultFolder
in interface DatasinkService
public boolean isEnabled(BasicDatasinkService datasinkService)
DatasinkService
isEnabled
in interface DatasinkService
datasinkService
- the datasink servicepublic boolean isSchedulingEnabled(BasicDatasinkService datasinkService)
DatasinkService
isSchedulingEnabled
in interface DatasinkService
datasinkService
- the datasink servicepublic java.util.Map<StorageType,java.lang.Boolean> getEnabledConfigs(BasicDatasinkService datasinkService)
DatasinkService
#isEnabled(DatasinkDefinition))
and
#isSchedulingEnabled(DatasinkDefinition))
in a map.getEnabledConfigs
in interface DatasinkService
datasinkService
- the datasink service#isEnabled(DatasinkDefinition))
and
#isSchedulingEnabled(DatasinkDefinition))
public void testDatasink(DatasinkDefinition datasinkDefinition, DatasinkConfiguration config) throws DatasinkExportException
DatasinkService
testDatasink
in interface DatasinkService
datasinkDefinition
- the DatasinkDefinition
to testconfig
- the datasink export configurationDatasinkExportException
- if an error occurs during datasink exportpublic void exportIntoDatasink(java.lang.Object data, User user, DatasinkDefinition datasinkDefinition, DatasinkConfiguration config) throws DatasinkExportException
DatasinkService
DatasinkDefinition
datasink.exportIntoDatasink
in interface DatasinkService
data
- the data to send. May be a String, a byte array or a
TableDBDataSource
user
- the User
datasinkDefinition
- the DatasinkDefinition
to sendconfig
- configuration of the exportDatasinkExportException
- if an error occurs during datasink exportpublic void exportIntoDatasink(java.lang.Object data, DatasinkDefinition datasinkDefinition, DatasinkConfiguration config) throws DatasinkExportException
DatasinkService
DatasinkDefinition
datasink.exportIntoDatasink
in interface DatasinkService
data
- the data to send. May be a String, a byte array or a
TableDBDataSource
datasinkDefinition
- the DatasinkDefinition
to sendconfig
- configuration of the exportDatasinkExportException
- if an error occurs during datasink exportpublic void exportIntoDatasink(java.lang.Object data, DatasinkDefinition datasinkDefinition, java.lang.String fileEnding) throws DatasinkExportException
DatasinkService
DatasinkDefinition
datasink. Uses datasink default configuration.exportIntoDatasink
in interface DatasinkService
data
- the data to send. May be a String, a byte array or a
TableDBDataSource
datasinkDefinition
- the DatasinkDefinition
to sendfileEnding
- the ending of the file to export, e.g. ".txt" for text
filesDatasinkExportException
- if an error occurs during datasink exportpublic java.util.Optional<? extends DatasinkDefinition> getDefaultDatasink(BasicDatasinkService basicDatasinkService)
getDefaultDatasink
in interface DatasinkService
public void exportFileIntoDatasink(AbstractFileServerNodeDto fileDto, DatasinkDefinitionDto datasinkDto, java.lang.String filename, java.lang.String folder, boolean compressed) throws ServerCallFailedException
exportFileIntoDatasink
in interface DatasinkService
ServerCallFailedException
public void exportIntoDatasink(ReportExecuteJob rJob, boolean compress, DatasinkDefinition datasink, DatasinkConfiguration config) throws ActionExecutionException
exportIntoDatasink
in interface DatasinkService
ActionExecutionException
public void exportIntoDatasink(CompiledReport cReport, java.lang.String name, boolean compress, DatasinkDefinition datasink, DatasinkConfiguration config) throws DatasinkExportException
exportIntoDatasink
in interface DatasinkService
DatasinkExportException
public java.lang.String getFilenameForDatasink(ReportExecuteJob rJob, boolean compress, java.lang.String filename)
getFilenameForDatasink
in interface DatasinkService
public java.lang.String getFilenameForDatasink(java.lang.String name, CompiledReport cReport, boolean compress)
getFilenameForDatasink
in interface DatasinkService