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