@Singleton @Named public class DefaultChecksumAlgorithmFactorySelector extends java.lang.Object implements ChecksumAlgorithmFactorySelector
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<java.lang.String,ChecksumAlgorithmFactory> |
factories |
| Constructor and Description |
|---|
DefaultChecksumAlgorithmFactorySelector()
Deprecated.
|
DefaultChecksumAlgorithmFactorySelector(java.util.Map<java.lang.String,ChecksumAlgorithmFactory> factories) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<ChecksumAlgorithmFactory> |
getChecksumAlgorithmFactories()
Returns immutable collection of all supported algorithms.
|
boolean |
isChecksumExtension(java.lang.String extension)
Returns
true if passed in extension matches any known checksum extension. |
ChecksumAlgorithmFactory |
select(java.lang.String algorithmName)
Returns factory for given algorithm name, or throws if algorithm not supported.
|
java.util.List<ChecksumAlgorithmFactory> |
selectList(java.util.Collection<java.lang.String> algorithmNames)
Returns a list of factories in same order as algorithm names are ordered, or throws if any of the
algorithm name is not supported.
|
private final java.util.Map<java.lang.String,ChecksumAlgorithmFactory> factories
@Deprecated public DefaultChecksumAlgorithmFactorySelector()
@Inject public DefaultChecksumAlgorithmFactorySelector(java.util.Map<java.lang.String,ChecksumAlgorithmFactory> factories)
public ChecksumAlgorithmFactory select(java.lang.String algorithmName)
ChecksumAlgorithmFactorySelectorselect in interface ChecksumAlgorithmFactorySelectorpublic java.util.List<ChecksumAlgorithmFactory> selectList(java.util.Collection<java.lang.String> algorithmNames)
ChecksumAlgorithmFactorySelectorselectList in interface ChecksumAlgorithmFactorySelectorpublic java.util.Collection<ChecksumAlgorithmFactory> getChecksumAlgorithmFactories()
ChecksumAlgorithmFactorySelectorRepositoryLayout.getChecksumAlgorithmFactories() (in fact, is super set
of it).getChecksumAlgorithmFactories in interface ChecksumAlgorithmFactorySelectorpublic boolean isChecksumExtension(java.lang.String extension)
ChecksumAlgorithmFactorySelectortrue if passed in extension matches any known checksum extension. The extension string may
start or contain dot ("."), but does not have to. In former case "ends with" is checked
(i.e. "jar.sha1" -> true; ".sha1" -> true) while in latter equality (i.e. "sha1" -> true).isChecksumExtension in interface ChecksumAlgorithmFactorySelector