Package enterprises.iwakura.amber
Class Repository
java.lang.Object
enterprises.iwakura.amber.Repository
Represents a repository from which dependencies can be downloaded.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetChecksumDownloadPath(Dependency dependency, String versionOverride, ChecksumType checksumType) Generates the full download path for the checksum file of a given dependency's JAR file.getDownloadPathDirectory(Dependency dependency) Generates the download path directory for a given dependency.getJarDownloadPath(Dependency dependency, String versionOverride) Generates the full download path for the JAR file of a given dependency, including the filename.
-
Constructor Details
-
Repository
public Repository()
-
-
Method Details
-
getDownloadPathDirectory
Generates the download path directory for a given dependency. The path is constructed based on the repository URL, group ID, name, and version of the dependency. If you need the precise JAR file path, usegetJarDownloadPath(Dependency, String).- Parameters:
dependency- the dependency for which to generate the download path- Returns:
- the download path directory as a String
-
getJarDownloadPath
Generates the full download path for the JAR file of a given dependency, including the filename. This method allows for an optional version override, which can be useful for handling snapshot versions or other special cases. UsesgetDownloadPathDirectory(Dependency)to construct the directory part of the path.- Parameters:
dependency- the dependency for which to generate the JAR download pathversionOverride- an optional version to override the dependency's version; if null, the dependency's version is used- Returns:
- the full JAR download path as a String
-
getChecksumDownloadPath
public String getChecksumDownloadPath(Dependency dependency, String versionOverride, ChecksumType checksumType) Generates the full download path for the checksum file of a given dependency's JAR file. This method usesgetJarDownloadPath(Dependency, String)and appends the appropriate checksum file extension based on the specified checksum type.- Parameters:
dependency- the dependency for which to generate the checksum download pathversionOverride- an optional version to override the dependency's version; if null, the dependency's version is usedchecksumType- the type of checksum (e.g., MD5, SHA-1, SHA-256)- Returns:
- the full checksum download path as a String
-