01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.cocoon.forms.formmodel.tree;
18:
19: import java.util.List;
20:
21: import org.apache.excalibur.source.SourceResolver;
22:
23: /**
24: * Definition for {@link SourceTreeModel}
25: *
26: * @version $Id: SourceTreeModelDefinition.java 449149 2006-09-23 03:58:05Z crossley $
27: */
28: public class SourceTreeModelDefinition implements TreeModelDefinition {
29:
30: private String url;
31: private List fileIncludePatterns;
32: private List fileExcludePatterns;
33: private List dirIncludePatterns;
34: private List dirExcludePatterns;
35: private SourceResolver resolver;
36:
37: public void setURL(String url) {
38: this .url = url;
39: }
40:
41: public void setFilePatterns(List includes, List excludes) {
42: this .fileIncludePatterns = includes;
43: this .fileExcludePatterns = excludes;
44: }
45:
46: public void setDirectoryPatterns(List includes, List excludes) {
47: this .dirIncludePatterns = includes;
48: this .dirExcludePatterns = excludes;
49: }
50:
51: public TreeModel createInstance() {
52: return new SourceTreeModel(this );
53: }
54:
55: public List getDirectoryExcludePatterns() {
56: return dirExcludePatterns;
57: }
58:
59: public List getDirectoryIncludePatterns() {
60: return dirIncludePatterns;
61: }
62:
63: public List getFileExcludePatterns() {
64: return fileExcludePatterns;
65: }
66:
67: public List getFileIncludePatterns() {
68: return fileIncludePatterns;
69: }
70:
71: public void setSourceResolver(SourceResolver resolver) {
72: this .resolver = resolver;
73: }
74:
75: public String getRootURL() {
76: return this .url;
77: }
78:
79: public SourceResolver getResolver() {
80: return this.resolver;
81: }
82: }
|