Class ManifestSection

java.lang.Object
org.apache.maven.shared.archiver.ManifestSection

public class ManifestSection extends Object
ManifestSection class.
  • Constructor Details

    • ManifestSection

      public ManifestSection()
  • Method Details

    • addManifestEntry

      public void addManifestEntry(String key, String value)
      Adds a single manifest entry.

      A null value is accepted and produces an empty-string attribute in the manifest. This is intentional: it allows callers to explicitly request an empty manifest entry. Be careful not to pass null unintentionally (e.g., from an unguarded map lookup), as the resulting empty attribute will not indicate any error.

      Parameters:
      key - the manifest attribute name
      value - the manifest attribute value; null is treated as an empty string
    • getManifestEntries

      public Map<String,String> getManifestEntries()
      Returns the manifest entries map.

      Values in the returned map may be null. Such entries are treated as empty strings when written to the manifest.

      Returns:
      the entries
    • getName

      public String getName()

      Getter for the field name.

      Returns:
      the name
    • setName

      public void setName(String name)

      Setter for the field name.

      Parameters:
      name - the name
    • addManifestEntries

      public void addManifestEntries(Map<String,String> map)
      Adds all entries from the given map as manifest attributes.

      A null value in the map is accepted and produces an empty-string attribute in the manifest. This is intentional: it allows callers to explicitly request an empty manifest entry. Be careful not to pass null values unintentionally, as they will not indicate any error.

      Parameters:
      map - the manifest entries to add. Map values may be null, which are treated as empty strings
    • isManifestEntriesEmpty

      public boolean isManifestEntriesEmpty()

      isManifestEntriesEmpty.

      Returns:
      true if empty false otherwise