diff options
author | Liam Fallon <liam.fallon@est.tech> | 2019-03-06 13:54:57 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-03-06 13:54:57 +0000 |
commit | c4f4624a310a567b20a3d8900ae90fa7cbfa23f7 (patch) | |
tree | fbe011ddcd462d8359df3f39b11f6c97bd845423 /feature-distributed-locking | |
parent | 3f2526b26f24f5954dbc2818385137c28a3eb5ba (diff) | |
parent | e254c5812c6a859df7625e8df684f65db1af91b3 (diff) |
Merge "Replace PropertyConfiguration"
Diffstat (limited to 'feature-distributed-locking')
-rw-r--r-- | feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/DistributedLockingProperties.java | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/DistributedLockingProperties.java b/feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/DistributedLockingProperties.java index 00db5733..0ed5930d 100644 --- a/feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/DistributedLockingProperties.java +++ b/feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/DistributedLockingProperties.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -21,11 +21,12 @@ package org.onap.policy.distributed.locking; import java.util.Properties; -import org.onap.policy.common.utils.properties.PropertyConfiguration; +import org.onap.policy.common.utils.properties.BeanConfigurator; +import org.onap.policy.common.utils.properties.Property; import org.onap.policy.common.utils.properties.exception.PropertyException; -public class DistributedLockingProperties extends PropertyConfiguration { +public class DistributedLockingProperties { /** * Feature properties all begin with this prefix. @@ -40,7 +41,7 @@ public class DistributedLockingProperties extends PropertyConfiguration { /** * Properties from which this was constructed. */ - private Properties source; + private final Properties source; /** * Database driver. @@ -66,9 +67,16 @@ public class DistributedLockingProperties extends PropertyConfiguration { @Property(name = DB_PWD) private String dbPwd; + /** + * Constructs the object, populating fields from the properties. + * + * @param props properties from which to configure this + * @throws PropertyException if an error occurs + */ public DistributedLockingProperties(Properties props) throws PropertyException { - super(props); source = props; + + new BeanConfigurator().configureFromProperties(this, props); } |