Config no longer implements Identifiable because this was in violation of the contrac...
[xmlrouter] / config / src / main / java / org / wamblee / xmlrouter / config / Configuration.java
1 /*
2  * Copyright 2005-2011 the original author or authors.
3  * 
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  * 
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  * 
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package org.wamblee.xmlrouter.config;
17
18 import java.util.Collection;
19
20 /**
21  * This class represents a particular configuration of the XML router as
22  * provided by one configuration provider. There can be multiple configuration
23  * providers, each providing it's own part of the configuration.
24  * 
25  * @author Erik Brakkee
26  */
27 public final class Configuration {
28
29     private Collection<DocumentType> documentTypes;
30     private Collection<Transformation> transformations;
31     private Collection<Filter> filters;
32
33     /**
34      * Constructs the configuration object. Null objects will be ignored.
35      * DocumentTypes must have unique content-based ids (see
36      * {@link Identifiable}), with the same for transformations and filters.
37      * Objects with the same id as another object processed earlier will be
38      * ignored.
39      * 
40      * @param aDocumentTypes
41      *            Document types.
42      * @param aTransformations
43      *            Transformations.
44      * @param aFilters
45      *            Filters.
46      */
47     public Configuration(Collection<DocumentType> aDocumentTypes,
48         Collection<Transformation> aTransformations, Collection<Filter> aFilters) {
49         documentTypes = aDocumentTypes;
50         transformations = aTransformations;
51     }
52
53     public Collection<DocumentType> getDocumentTypes() {
54         return documentTypes;
55     }
56
57     public Collection<Transformation> getTransformations() {
58         return transformations;
59     }
60
61     public Collection<Filter> getFilters() {
62         return filters;
63     }
64 }