package saker.nest.bundle
Builder class for ExternalAttachmentInformation.
public Builder | addEntry( Adds an entry wildcard. |
public Builder | addMetaData( Adda a meta-data entry. |
public Builder | addTargetEntry( Adds a target entry wildcard. |
public ExternalAttachmentInformation | build() Builds the external attachment information. |
public String | Gets the MD5 hash previously set using setMd5Hash( |
public String | Gets the SHA-1 hash previously set using setSha1Hash( |
public String | Gets the SHA-256 hash previously set using setSha256Hash( |
public boolean | hasMetaData( Checks if a meta-data with the given name is already present. |
public Builder | setIncludesMainArchive( Sets if the main archive is included or not. |
public Builder | setMd5Hash( Sets the MD5 hash. |
public Builder | setSha1Hash( Sets the SHA-1 hash. |
public Builder | setSha256Hash( Sets the SHA-256 hash. |
public Builder | setTargetsMainArchive( Sets if the main archive is targeted or not. |
public Builder addMetaData(String name, String content) throws NullPointerException, IllegalArgumentException
Adda a meta-data entry.
nameThe name of the meta-data.
contentThe value of the meta-data.
this
NullPointerExceptionIf any of the arguments are
null
.IllegalArgumentExceptionIf the format of the meta-data name is inappropriate. See
BundleDependency.isValidMetaDataName(String) .
Builds the external attachment information.
The builder can be reused after this call.
The constructed ExternalAttachmentInformation.
Gets the MD5 hash previously set using setMd5Hash(String) .
The hash or
null
if none.Gets the SHA-1 hash previously set using setSha1Hash(String) .
The hash or
null
if none.Gets the SHA-256 hash previously set using setSha256Hash(String) .
The hash or
null
if none.Checks if a meta-data with the given name is already present.
nameThe meta-data name.
true
if the meta-data with the given name is already set.Sets the MD5 hash.
The argument will be converted to lowercase hexa representation.
md5HashThe hash or
null
to unset.this
IllegalArgumentExceptionIf the argument is not a valid MD5 hash in hexa format.
Sets the SHA-1 hash.
The argument will be converted to lowercase hexa representation.
sha1HashThe hash or
null
to unset.this
IllegalArgumentExceptionIf the argument is not a valid SHA-1 hash in hexa format.
Sets the SHA-256 hash.
The argument will be converted to lowercase hexa representation.
sha256HashThe hash or
null
to unset.this
IllegalArgumentExceptionIf the argument is not a valid SHA-256 hash in hexa format.
Sets if the main archive is targeted or not.
Note that the actual value of this property in the built object will be set to
true
if there are no target
entries.
targetsMainArchive
true
to target the main archive.this