View Javadoc

1   /*
2    * Copyright 2012-2013 smartics, Kronseder & Reiner GmbH
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 de.smartics.properties.impl.config.domain.key.envapp;
17  
18  import java.util.Set;
19  
20  import javax.annotation.concurrent.ThreadSafe;
21  
22  import de.smartics.properties.spi.config.domain.key.PropertyResourceMatchers;
23  
24  /**
25   * Contains information from the <code>definition.xml</code> that is contained
26   * in archives providing property information.
27   */
28  @ThreadSafe
29  public final class EnvAppPropertiesDefinitionContext extends
30      AbstractPropertiesDefinitionContext
31  {
32    // ********************************* Fields *********************************
33  
34    // --- constants ------------------------------------------------------------
35  
36    /**
37     * The class version identifier.
38     */
39    private static final long serialVersionUID = 1L;
40  
41    // --- members --------------------------------------------------------------
42  
43    // ****************************** Initializer *******************************
44  
45    // ****************************** Constructors ******************************
46  
47    /**
48     * Convenience constructor using the default TLDs and not registering any
49     * environments, nodes or groups.
50     */
51    public EnvAppPropertiesDefinitionContext()
52    {
53      this(DEFAULT_TLDS, null, null, null, null);
54    }
55  
56    /**
57     * Convenience constructor using the default TLDs and no explicit files.
58     *
59     * @param environments the collection of registered environment names.
60     * @param nodes the collection of registered node names.
61     * @param groups the collection of registered group names.
62     */
63    public EnvAppPropertiesDefinitionContext(final Set<String> environments,
64        final Set<String> nodes, final Set<String> groups)
65    {
66      this(DEFAULT_TLDS, environments, nodes, groups);
67    }
68  
69    /**
70     * Convenience constructor without an explicit path to configuration key
71     * mapping.
72     *
73     * @param tlds the collection of top-level-domains (tlds).
74     * @param environments the collection of registered environment names.
75     * @param nodes the collection of registered node names.
76     * @param groups the collection of registered group names.
77     */
78    public EnvAppPropertiesDefinitionContext(final Set<String> tlds,
79        final Set<String> environments, final Set<String> nodes,
80        final Set<String> groups)
81    {
82      this(tlds, environments, nodes, groups, null);
83    }
84  
85    /**
86     * Convenience constructor using the default TLDs.
87     *
88     * @param environments the collection of registered environment names.
89     * @param nodes the collection of registered node names.
90     * @param groups the collection of registered group names.
91     * @param matchers the mapping of properties file path names to a associated
92     *          configuration key.
93     */
94    public EnvAppPropertiesDefinitionContext(final Set<String> environments,
95        final Set<String> nodes, final Set<String> groups,
96        final PropertyResourceMatchers matchers)
97    {
98      this(DEFAULT_TLDS, environments, nodes, groups, matchers);
99    }
100 
101   /**
102    * Default constructor.
103    *
104    * @param tlds the collection of top-level-domains (tlds).
105    * @param environments the collection of registered environment names.
106    * @param nodes the collection of registered node names.
107    * @param groups the collection of registered group names.
108    * @param matchers the mapping of properties file path names to a associated
109    *          configuration key.
110    */
111   public EnvAppPropertiesDefinitionContext(final Set<String> tlds,
112       final Set<String> environments, final Set<String> nodes,
113       final Set<String> groups, final PropertyResourceMatchers matchers)
114   {
115     super(tlds, environments, nodes, groups, matchers);
116   }
117 
118   // ****************************** Inner Classes *****************************
119 
120   // ********************************* Methods ********************************
121 
122   // --- init -----------------------------------------------------------------
123 
124   // --- get&set --------------------------------------------------------------
125 
126   // --- business -------------------------------------------------------------
127 
128   // --- object basics --------------------------------------------------------
129 
130 }