aboutsummaryrefslogtreecommitdiffstats
path: root/utils/src/main/java/org/onap/policy/common/utils/properties
AgeCommit message (Collapse)AuthorFilesLines
2019-03-11Address sonar issues in utilsJim Hahn1-2/+1
Fixed issues in BeanConfigurator. Fixed issues in NetworkUtil associated with newly added trust manager. Change-Id: I0777ff85131d22c92c0ede06335a5b2839a1c482 Issue-ID: POLICY-1519 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-03-07Remove PropertyConfiguration classJim Hahn1-498/+0
Removed PropertyConfiguration class, as it has been replaced by the BeanConfigurator class. Change-Id: If97a74fe81875d3eb85d7775ce78a7f2b1fb1f70 Issue-ID: POLICY-1444 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-03-04Add bean configuratorJim Hahn2-0/+626
Refactored PropertyConfiguration, but left the original class alone until references to it have been removed from other policy repos. Split the Property annotation out into its own file. Cloned the remaining code into BeanConfigurator, modifying its behavior so that, instead of operating on its own subclass, it operates on a provided bean. Also added an ability to copy the bean's fields to a Properties object. Updated license dates. Removed unneeded argument from functional interface. Added comment about always checking default values. Updated a few comments. Change-Id: Iff36fd0524032d7630f9ee08f0eef7b05de100d1 Issue-ID: POLICY-1444 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-02-14Sonar fixesJim Hahn1-33/+31
Added test for Serializer to increase junit coverage. Added tests for TestTimeMulti to increase junit coverage. Sonar fixes for PropertyConfiguration: - use equalsIgnoreCase - use the exception Updated license dates. Some fixes for LoggerFactoryWrapper to address sonar issue - utility classes should typically have a private constructor. Change-Id: I8957e9673fe8371ecca7abbb7ece87b0d6f46c1a Issue-ID: POLICY-1519 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-08-23Make checkstyle warnings failPamela Dragosh1-1/+1
For this repo, we add an suppression filter for some abbreviation names. It is far too cumbersome to rename these checkstyle issues at this time. We will do so post-Casablanca release. We copy the oparent checkstyle pom settings and set to fail on any warnings. Change-Id: Icfbd005819a3289acd30796693be85c2ea460212 Issue-ID: POLICY-881 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-08-13Fix checkstyle in utilsPamela Dragosh7-19/+45
Cleared all the checkstyle in these 2 submodules. Issue-ID: POLICY-881 Change-Id: I248e1894aebf549d5a4f8669a6466ec227d40b55 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-06-20Delete SpecPropertyConfiguration classJim Hahn1-233/+0
Change-Id: Ie97d2c396ec6df1e03287a7ecb866bc8acf6cfbc Issue-ID: POLICY-907 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-06-19Merge "Move SpecProperties from drools-pdp to common"Pamela Dragosh1-0/+117
2018-06-18Move SpecProperties from drools-pdp to commonJim Hahn1-0/+117
Change-Id: Ifa1785922b42f990d4d84c1410dd1d881b10647d Issue-ID: POLICY-907 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-06-18Use setXxx() methods for @Property fieldsJim Hahn1-14/+47
Fortify generates a security exception when PropertyConfiguration attempts to directly update private fields. PropertyConfiguration has been modified to invoke setXxx() methods, instead, to set the values for the fields. Add junit tests for new methods. Change-Id: Ic4420b6348724c5a384d3c2c8bf7b4c0c6350fa9 Issue-ID: POLICY-906 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-03-25Add PropertyConfiguration classJim Hahn7-0/+1087
Added PropertyConfiguration class, which provides for the loading of properties into the fields of a subclass. Annotations are used to identify the field to be loaded and the name of the property from which it is to be loaded. Changed attribute "useDefault" to "emptyOk" so that it only has to be specified when the default value is empty. Reformatted a couple of files. Added setAllFields() method. Added getRawPropertyValue() method so subclasses can change how values are extracted from the property set. Added SpecPropertyConfiguration so controller or session names may be embedded within property names. Fixed some typos. Refactored out generalizeType2(). Changed exception classes to take field name instead of Field object. Modified getValue() to take the field name and class type instead of Field object. Removed or fixed comments in junit tests. Added more junit tests. Changed emptyOk attribute to accept, to facilitate adding other options in the future. Corrected comments on the isEmptyOk() methods. Change-Id: I6b190fea687f87cf512fb3236bfcf40b7adc4566 Issue-ID: POLICY-577 Signed-off-by: Jim Hahn <jrh3@att.com>