1 package org.apache.maven.archiver; 2 3 18 19 import java.io.File ; 20 import java.util.ArrayList ; 21 import java.util.HashMap ; 22 import java.util.List ; 23 import java.util.Map ; 24 25 32 public class MavenArchiveConfiguration 33 { 34 private boolean compress = true; 35 36 private boolean index; 37 38 private boolean addMavenDescriptor = true; 39 40 private File manifestFile; 41 42 private ManifestConfiguration manifest; 43 44 private Map manifestEntries = new HashMap (); 45 46 private List manifestSections = new ArrayList (); 47 48 public boolean isCompress() 49 { 50 return compress; 51 } 52 53 public boolean isIndex() 54 { 55 return index; 56 } 57 58 public boolean isAddMavenDescriptor() 59 { 60 return addMavenDescriptor; 61 } 62 63 public File getManifestFile() 64 { 65 return manifestFile; 66 } 67 68 public ManifestConfiguration getManifest() 69 { 70 if ( manifest == null ) 71 { 72 manifest = new ManifestConfiguration(); 73 } 74 return manifest; 75 } 76 77 public void setCompress( boolean compress ) 78 { 79 this.compress = compress; 80 } 81 82 public void setIndex( boolean index ) 83 { 84 this.index = index; 85 } 86 87 public void setAddMavenDescriptor( boolean addMavenDescriptor ) 88 { 89 this.addMavenDescriptor = addMavenDescriptor; 90 } 91 92 public void setManifestFile( File manifestFile ) 93 { 94 this.manifestFile = manifestFile; 95 } 96 97 public void setManifest( ManifestConfiguration manifest ) 98 { 99 this.manifest = manifest; 100 } 101 102 public void addManifestEntry( Object key, Object value ) 103 { 104 manifestEntries.put( key, value ); 105 } 106 107 public void addManifestEntries( Map map ) 108 { 109 manifestEntries.putAll( map ); 110 } 111 112 public boolean isManifestEntriesEmpty() 113 { 114 return manifestEntries.isEmpty(); 115 } 116 117 public Map getManifestEntries() 118 { 119 return manifestEntries; 120 } 121 122 public void addManifestSection( ManifestSection section ) { 123 manifestSections.add( section ); 124 } 125 126 public void addManifestSections( List list ) { 127 manifestSections.addAll( list ); 128 } 129 130 public boolean isManifestSectionsEmpty() { 131 return manifestSections.isEmpty(); 132 } 133 134 public List getManifestSections() { 135 return manifestSections; 136 } 137 } 138 | Popular Tags |