01: /*
02: * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
03: *
04: * http://izpack.org/
05: * http://izpack.codehaus.org/
06: *
07: * Copyright 2001 Johannes Lehtinen
08: *
09: * Licensed under the Apache License, Version 2.0 (the "License");
10: * you may not use this file except in compliance with the License.
11: * You may obtain a copy of the License at
12: *
13: * http://www.apache.org/licenses/LICENSE-2.0
14: *
15: * Unless required by applicable law or agreed to in writing, software
16: * distributed under the License is distributed on an "AS IS" BASIS,
17: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18: * See the License for the specific language governing permissions and
19: * limitations under the License.
20: */
21:
22: package com.izforge.izpack;
23:
24: import java.io.Serializable;
25: import java.util.ArrayList;
26:
27: /**
28: * Encloses information about an update check.
29: *
30: * @author Tino Schwarze <tino.schwarze@community4you.de>
31: */
32: public class UpdateCheck implements Serializable {
33:
34: static final long serialVersionUID = -3721254065037691999L;
35:
36: /**
37: * ant-fileset-like list of include patterns, based on INSTALL_PATH if relative
38: */
39: public ArrayList<String> includesList = null;
40:
41: /**
42: * ant-fileset-like list of exclude patterns, based on INSTALL_PATH if relative
43: */
44: public ArrayList<String> excludesList = null;
45:
46: /** Whether pattern matching is performed case-sensitive */
47: boolean caseSensitive = true;
48:
49: /** Constructs a new uninitialized instance. */
50: public UpdateCheck() {
51: }
52:
53: /**
54: * Constructs and initializes a new instance.
55: *
56: * @param includes The patterns to include in the check.
57: * @param excludes The patterns to exclude from the check.
58: */
59: public UpdateCheck(ArrayList<String> includes,
60: ArrayList<String> excludes) {
61: this .includesList = includes;
62: this .excludesList = excludes;
63: }
64:
65: /**
66: * Constructs and initializes a new instance.
67: *
68: * @param includes The patterns to include in the check.
69: * @param excludes The patterns to exclude from the check.
70: * @param casesensitive If "yes", matches are performed case sensitive.
71: */
72: public UpdateCheck(ArrayList<String> includes,
73: ArrayList<String> excludes, String casesensitive) {
74: this .includesList = includes;
75: this .excludesList = excludes;
76: this .caseSensitive = ((casesensitive != null) && "yes"
77: .equalsIgnoreCase(casesensitive));
78: }
79:
80: }
|