Coverage Report - de.smartics.properties.impl.config.properties.PropertiesConfigurationProperties
 
Classes in this File Line Coverage Branch Coverage Complexity
PropertiesConfigurationProperties
0%
0/6
N/A
N/A
1
 
 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.properties;
 17  
 
 18  
 import javax.annotation.concurrent.ThreadSafe;
 19  
 
 20  
 import de.smartics.properties.api.config.domain.SerializableConfigurationPropertiesManagement;
 21  
 import de.smartics.properties.api.config.domain.key.ConfigurationKey;
 22  
 import de.smartics.properties.api.core.domain.PropertyDescriptorRegistry;
 23  
 import de.smartics.properties.spi.config.support.AbstractInMemoryConfigurationProperties;
 24  
 import de.smartics.properties.spi.core.registry.InMemoryPropertyDescriptorRegistry;
 25  
 import de.smartics.util.lang.NullArgumentException;
 26  
 
 27  
 /**
 28  
  * Implementation based on {@link java.util.Properties}.
 29  
  * <p>
 30  
  * This implementation is <strong>not capable of tracking changes</strong> to
 31  
  * properties after they have been added to this configuration.
 32  
  * </p>
 33  
  */
 34  0
 @ThreadSafe
 35  
 public final class PropertiesConfigurationProperties extends
 36  
     AbstractInMemoryConfigurationProperties
 37  
 { // NOPMD
 38  
   // ********************************* Fields *********************************
 39  
 
 40  
   // --- constants ------------------------------------------------------------
 41  
 
 42  
   // --- members --------------------------------------------------------------
 43  
 
 44  
   /**
 45  
    * The class version identifier.
 46  
    */
 47  
   private static final long serialVersionUID = 1L;
 48  
 
 49  
   // ****************************** Initializer *******************************
 50  
 
 51  
   // ****************************** Constructors ******************************
 52  
 
 53  
   /**
 54  
    * Convenience constructor using its own registry.
 55  
    *
 56  
    * @param key the key that identifies the configuration.
 57  
    * @throws NullArgumentException if {@code key} is <code>null</code>.
 58  
    */
 59  
   public PropertiesConfigurationProperties(final ConfigurationKey key)
 60  
     throws NullArgumentException
 61  
   {
 62  0
     super(key, new InMemoryPropertyDescriptorRegistry());
 63  0
   }
 64  
 
 65  
   /**
 66  
    * Default constructor.
 67  
    *
 68  
    * @param key the key that identifies the configuration.
 69  
    * @param registry the registry to resolve property descriptors.
 70  
    * @throws NullArgumentException if {@code key} or {@code registry} is
 71  
    *           <code>null</code>.
 72  
    */
 73  
   public PropertiesConfigurationProperties(final ConfigurationKey key,
 74  
       final PropertyDescriptorRegistry registry) throws NullArgumentException
 75  
   {
 76  0
     super(key, registry);
 77  0
   }
 78  
 
 79  
   // ****************************** Inner Classes *****************************
 80  
 
 81  
   // ********************************* Methods ********************************
 82  
 
 83  
   // --- init -----------------------------------------------------------------
 84  
 
 85  
   @Override
 86  
   public SerializableConfigurationPropertiesManagement toSerializable()
 87  
   {
 88  0
     return this;
 89  
   }
 90  
 
 91  
   // --- get&set --------------------------------------------------------------
 92  
 
 93  
   // --- business -------------------------------------------------------------
 94  
 
 95  
   // --- object basics --------------------------------------------------------
 96  
 
 97  
 }