1 package org.codehaus.mojo.webstart.pack200; 2 3 /* 4 * Licensed to the Apache Software Foundation (ASF) under one 5 * or more contributor license agreements. See the NOTICE file 6 * distributed with this work for additional information 7 * regarding copyright ownership. The ASF licenses this file 8 * to you under the Apache License, Version 2.0 (the 9 * "License"); you may not use this file except in compliance 10 * with the License. You may obtain a copy of the License at 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * Unless required by applicable law or agreed to in writing, 15 * software distributed under the License is distributed on an 16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 * KIND, either express or implied. See the License for the 18 * specific language governing permissions and limitations 19 * under the License. 20 */ 21 22 import java.util.List; 23 24 /** 25 * Bean that represents the Pack200 configuration. 26 * 27 * @author Peter Butkovic butkovic@gmail.com 28 * @author $LastChangedBy$ 29 * @version $Revision$ 30 * @since 1.0-beta-4 31 */ 32 public class Pack200Config 33 { 34 35 /** 36 * Whether pack200 is enabled at all or not. 37 * 38 * @see #isEnabled() 39 */ 40 private boolean enabled; 41 42 /** 43 * The files to be passed without compression. 44 * 45 * @see #getPassFiles() 46 */ 47 private List<String> passFiles; 48 49 /** 50 * Gets the pack200 enabled configuration value. <br /> 51 * Please note: Setting this value to true requires SDK 5.0 or greater. 52 * 53 * @return {@code true} if pack200 compression of jar resources is enabled, {@code false} otherwise. 54 */ 55 public boolean isEnabled() 56 { 57 return enabled; 58 } 59 60 /** 61 * Gets the files within jar archive to be passed without pack200 compression. <br /> 62 * If file ends with a /, all files in the directory are passed through without packing. <br /> 63 * The same functionality as achievable by: 64 * <pre> 65 * pack200 --pass-file= file, -P file 66 * </pre> 67 * 68 * @return the files to be passed without pack200 compression. 69 */ 70 public List<String> getPassFiles() 71 { 72 return passFiles; 73 } 74 75 public void setEnabled( boolean enabled ) 76 { 77 this.enabled = enabled; 78 79 } 80 81 public void setPassFiles( List<String> passFiles ) 82 { 83 this.passFiles = passFiles; 84 } 85 86 }