1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package com.googlecode.t7mp.scanner;
17
18 import java.io.File;
19 import java.util.List;
20
21 import com.google.common.base.Splitter;
22 import com.google.common.collect.Lists;
23
24 public class ScannerConfiguration {
25
26 private static final String DEFAULT_ENDINGS = ".html,.xhtml,.css,.js,.jsp,.jspx,.properties,.txt,.jpg,.gif,.png";
27 private static final int DEFAULT_INTERVAL = 10;
28
29 private int interval = DEFAULT_INTERVAL;
30 private File rootDirectory;
31 private File webappDirectory;
32 private String endings = DEFAULT_ENDINGS;
33 private List<String> endingsList;
34
35 public int getInterval() {
36 return interval;
37 }
38
39 public void setInterval(int interval) {
40 this.interval = interval;
41 }
42
43 public File getRootDirectory() {
44 return rootDirectory;
45 }
46
47 public void setRootDirectory(File rootDirectory) {
48 this.rootDirectory = rootDirectory;
49 }
50
51 public File getWebappDirectory() {
52 return webappDirectory;
53 }
54
55 public void setWebappDirectory(File webappDirectory) {
56 this.webappDirectory = webappDirectory;
57 }
58
59 public String getEndings() {
60 return endings;
61 }
62
63 public void setEndings(String endings) {
64 if ("%".equals(endings)) {
65 endings = "";
66 }
67 this.endings = endings;
68 }
69
70 public List<String> getEndingsAsList() {
71 if (endingsList == null) {
72 endingsList = Lists.newArrayList(Splitter.on(",").split(endings));
73 }
74 return endingsList;
75 }
76 }