Package slash.navigation.download.tools
Class BaseDownloadTool
java.lang.Object
slash.navigation.download.tools.BaseDownloadTool
- Direct Known Subclasses:
ScanWebsite,SnapshotCatalog,UpdateCatalog
Base for the download tools.
- Author:
- Christian Pesch
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final intprotected static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Credentialsprotected StringgetId()protected FilegetUrl()protected booleanprotected DataSourceloadDataSource(String id) protected StringreadDataSourcesPasswordFile(File passwordFile) Reads a password from a file (e.g. a systemd credentials mount) instead of the command line, so it never appears in argv; trims a trailing newline so a plainecho password > fileworks.voidsetDataSourcesPassword(String dataSourcesPassword) voidsetDataSourcesServer(String dataSourcesServer) voidsetDataSourcesUserName(String dataSourcesUserName) voidvoid
-
Field Details
-
URL_ARGUMENT
- See Also:
-
ID_ARGUMENT
- See Also:
-
DATASOURCES_SERVER_ARGUMENT
- See Also:
-
DATASOURCES_USERNAME_ARGUMENT
- See Also:
-
DATASOURCES_PASSWORD_ARGUMENT
- See Also:
-
DATASOURCES_PASSWORD_FILE_ARGUMENT
- See Also:
-
DATASOURCES_USERNAME_ENVIRONMENT_VARIABLE
- See Also:
-
DATASOURCES_PASSWORD_ENVIRONMENT_VARIABLE
- See Also:
-
MAXIMUM_UPDATE_COUNT
protected static final int MAXIMUM_UPDATE_COUNT- See Also:
-
-
Constructor Details
-
BaseDownloadTool
public BaseDownloadTool()
-
-
Method Details
-
getUrl
-
setUrl
-
getId
-
setId
-
getDataSourcesServer
-
setDataSourcesServer
-
setDataSourcesUserName
-
setDataSourcesPassword
-
readDataSourcesPasswordFile
Reads a password from a file (e.g. a systemd credentials mount) instead of the command line, so it never appears in argv; trims a trailing newline so a plainecho password > fileworks.- Throws:
IOException
-
hasDataSourcesServer
protected boolean hasDataSourcesServer() -
getDataSourcesUrl
-
getCredentials
-
loadDataSource
- Throws:
IOExceptionjakarta.xml.bind.JAXBException
-
getSnapshotDirectory
-