001/*
002 * IzPack - Copyright 2001-2005 Julien Ponge, All Rights Reserved.
003 * 
004 * http://www.izforge.com/izpack/
005 * http://developer.berlios.de/projects/izpack/
006 * 
007 * Copyright 2001 Johannes Lehtinen
008 * 
009 * Licensed under the Apache License, Version 2.0 (the "License");
010 * you may not use this file except in compliance with the License.
011 * You may obtain a copy of the License at
012 * 
013 *     http://www.apache.org/licenses/LICENSE-2.0
014 *     
015 * Unless required by applicable law or agreed to in writing, software
016 * distributed under the License is distributed on an "AS IS" BASIS,
017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
018 * See the License for the specific language governing permissions and
019 * limitations under the License.
020 */
021
022package com.izforge.izpack;
023
024import java.io.Serializable;
025import java.util.ArrayList;
026
027/**
028 * Encloses information about an update check.
029 * 
030 * @author Tino Schwarze <tino.schwarze@community4you.de>
031 */
032public class UpdateCheck implements Serializable
033{
034
035    static final long serialVersionUID = -3721254065037691999L;
036
037    /**
038     * ant-fileset-like list of include patterns, based on INSTALL_PATH if relative
039     */
040    public ArrayList includesList = null;
041
042    /**
043     * ant-fileset-like list of exclude patterns, based on INSTALL_PATH if relative
044     */
045    public ArrayList excludesList = null;
046
047    /** Whether pattern matching is performed case-sensitive */
048    boolean caseSensitive = true;
049
050    /** Constructs a new uninitialized instance. */
051    public UpdateCheck()
052    {
053    }
054
055    /**
056     * Constructs and initializes a new instance.
057     * 
058     * @param includes The patterns to include in the check.
059     * @param excludes The patterns to exclude from the check.
060     */
061    public UpdateCheck(ArrayList includes, ArrayList excludes)
062    {
063        this.includesList = includes;
064        this.excludesList = excludes;
065    }
066
067    /**
068     * Constructs and initializes a new instance.
069     * 
070     * @param includes The patterns to include in the check.
071     * @param excludes The patterns to exclude from the check.
072     * @param casesensitive If "yes", matches are performed case sensitive.
073     */
074    public UpdateCheck(ArrayList includes, ArrayList excludes, String casesensitive)
075    {
076        this.includesList = includes;
077        this.excludesList = excludes;
078        this.caseSensitive = ((casesensitive != null) && casesensitive.equalsIgnoreCase("yes"));
079    }
080
081}