Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
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>
|
|
Added StandardCoderObject to hide GSON's JsonElement so that classes
are not dependent on the use of JsonElement, making it easier to switch
out serialization mechanisms in the future.
Added a test for field-not-found.
Converted tabs to spaces in json test file.
Simplified StandardCoderObject and added methods to Coder for
translating to and from StandardCoderObject.
Removed a test for a method that no longer exists.
Added more tests to a test case.
Change-Id: I5123dc3f17c940ded431ef7f9ccd8c4bff6b1c5f
Issue-ID: POLICY-1444
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Also:
Updated some comments and renamed a few parameters.
Removed a "throws" for a RuntimeException.
Short-circuit some calls.
Typo in comment.
Let gson create the JsonWriter.
Renamed a few more parameters.
Change-Id: I22e48c2191820c2a3d0743200edca79bd74353e7
Issue-ID: POLICY-1444
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
|
|
Added coder classes as a common utility that can be used to encode
and decode json data. Currently, it uses gson, but that can be
changed.
Separated the Coder interface from implementation.
Used assertSame to compare references.
Used numbers instead of strings so don't have to deal with escaping quotes
in the test cases.
Change-Id: Iea9001d2adc5a3150b3367619b5f43e96b5f8b41
Issue-ID: POLICY-1444
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
This class is used by the DAO model code being moved from
the APEX PDP to policy-models for generic DAO handling in the
Policy Framework
Issue-ID: POLICY-1264
Change-Id: I67cca540d9357f9ab16532090cb2edf397b332be
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
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>
|
|
Added common classes needed by other gson-jackson code.
Modified some logic to make it more maintainable or perform better.
Updated comments and spacing.
Fix another comment.
Moved gson classes from utils to a separate gson project.
Added GsonXxx annotations to mirror jackson annotations.
Removed unneeded dependencies from gson pom.
Removed old GsonMessage class from policy-endpoints.
Removed trailing spaces.
Updated licenses.
Removed more trailing spaces.
Removed unneeded checkstyle suppression file from utils.
Change-Id: I1a285500faeb0a0b6a1467d09b92ecd3cded713e
Issue-ID: POLICY-1428
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Created an exclusion strategy that will prevent gson from serializing
any fields within a class. The strategy must be registered to take
effect.
Uses lists to identify classes to be excluded when using gson with
the jackson default behavior.
Change-Id: I747fb1159846ad3000f69603f9b5d3f03bc8764f
Issue-ID: POLICY-1428
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Instead of defining static string variable inside Topic class let's
create helper class for getting specific loggers.
Issue-ID: POLICY-1486
Change-Id: Ic1f07466e1ab6abcc00098e617f0e82da19e852d
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Added gson dependency to utils pom in anticipation of future
reviews.
Change-Id: I1d0e4130083a73d250fe01f0e1a0154c608c6ce6
Issue-ID: POLICY-1428
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Use eclipselink from policy parent.
Change-Id: I472900a82a5c8b69e1a4a1efc4b3bcb86f3965a8
Issue-ID: POLICY-1359
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Make test classes name consistence
Issue-ID: POLICY-1281
Change-Id: I2d70eda0a2fe7dc60e020dd91c743c1708d1f11a
Signed-off-by: Parshad Patel <pars.patel@samsung.com>
|
|
Issue-ID: POLICY-1232
Change-Id: Icb6179ace3f320bdda3da2160afd2d058762ae5e
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
|
|
Issue-ID: POLICY-1213
Change-Id: Id34f28a3f41687993009128940e9ddec69d5b88f
Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
|
|
Change-Id: I84fd562e7050508a75b4192ba162a09acd938986
Issue-ID: POLICY-1148
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
The root pom.xml had a syntax error in a declaration. The suppressions
xml was not being found by the sub-modules. It was better to create a
copy in each of the sub-modules where we will not be fixing
abbreviations or the interface declarations in own java file.
Added specific checkstyle files for each submodule.
One interesting note for the InheritDoc tag. It seems that the mvn
compile has a bug that interprets these as missing a period after
the tag. Even though the parent interface has it correctly. It was
easier to just remove it than duplicate.
There are new JIRA's for that work to be done in Dublin.
Fixed some spacing in pom's.
Issue-ID: POLICY-1131
Change-Id: I5f845958ccefd50a3b7290662da43c994870f1f7
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Parameter handling refactored to remove changing of
access on fields in parameters, new implementation requires
getters to be defined for all fields.
Note: This change causes a knock on into distribution
Change-Id: I172f5d9310caf92d6ea825ff93292019c00a47c3
Issue-ID: POLICY-1095
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
|
|
|
|
* Changing TestHealthCheckReport to use openpojo for testing the
HealthCheckReport class.
* Adding a custom Tester implementation called ToStringTester
as a utility to test toString() method of classes using openpojo.
Change-Id: I491a23c471d50454b4d5591c6c09c6758e2c0624
Issue-ID: POLICY-1035
Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
|
|
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>
|
|
* Adding HealthCheckReport class to policy/common for wider use
among all policy modules.
* Adding utility class called ParameterValidationUtils for providing
common validation methods to all policy modules. For now, it has only 3
validation methods but we all can add more in future.
Change-Id: I363fe116ba74f25299fd71211be73505b3164f72
Issue-ID: POLICY-1035
Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
|
|
Cleared all the checkstyle in these 2 submodules.
Issue-ID: POLICY-881
Change-Id: I248e1894aebf549d5a4f8669a6466ec227d40b55
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Some dependency versions are now managed in the master POM
Checkstyle showed up some warnings in paramters and capabilities.
Change-Id: Ifebd8a076bdb3fda626b5b1fda9324801bf58643
Issue-ID: POLICY-716
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
|
|
Add ResourceUtils, a class that provides utility methods
for dealing with Java resources on the classpath.
Change-Id: Ie4df249315ad145aabdfb35bb827ffbf6d79e095
Issue-ID: POLICY-922
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
|
|
Issue-ID: POLICY-967
Change-Id: I374c155ee102c3e157c60d0a22d7191544abb76a
Signed-off-by: mmis <michael.morris@ericsson.com>
|
|
|
|
|
|
Change-Id: Ie97d2c396ec6df1e03287a7ecb866bc8acf6cfbc
Issue-ID: POLICY-907
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Add some comments. Update license text.
Change-Id: I4cee208378c44d9730274aee337feb95f9026add
Issue-ID: POLICY-908
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
|
|
Change-Id: Ifa1785922b42f990d4d84c1410dd1d881b10647d
Issue-ID: POLICY-907
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
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>
|
|
Snapshot updated for Casablanca.
Change-Id: Ife941f771b02be68e35fd638adfac78cf2b3ba99
Issue-ID: POLICY-875
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
|
|
These reviews must be merged in order because of layering.
This review should be merged FIRST.
Issue-ID: POLICY-844
Change-Id: I7cf07902c3b2d7766dc64f1c1dd80d91dee18467
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
|
|
These reviews must be merged in order because of layering.
This review should be merged FIRST
Change-Id: If143b2d23487c073fafad8f6208cd8d320ec98e9
Issue-ID: POLICY-798
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
|
|
Issue-ID: POLICY-736
Change-Id: Iccb43b692908ffc35fc0d18da1e967718e3c3519
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
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>
|
|
Removed checkstyle warnings in policy/common/utils
Issue-ID: POLICY-695
Change-Id: I831b74c889d44784d6328619d88eb92fb524ce74
Signed-off-by: mmis <michael.morris@ericsson.com>
|
|
This is the first sweep to organize the dependencies. I did upgrade
the JUnit in this repo to 4.12 as I thought this would be harmless.
Issue-ID: POLICY-626
Change-Id: I4dc120d2d48830b282d9a173ab69cc553a4d5e78
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Added EntityMgrCloser and EntityMgrTrans classes that will automatically
close/rollback the wrapped JPA classes. As a result, these classes can
be used in try-with-resource statements to ensure that the JPA
EntityTransaction is rolled back and the EntityManager is closed.
Add "build" section into pom to make it consistent with other poms
in common.
Changed scope to "provided" in utils pom for javax.persistence to
prevent clashes with other projects that depend on the utils project.
Changed scope to "test" in utils pom and to "provided" in utils-test
pom for junit.
Fixed license date in EntityTransCloser.
Fixed license titles in utils & utils-test source files.
Moved files from package xxx.test.jpa to package xxx.jpa, because they
are not test-specific classes.
Include exception when logging message in ThrowablesTester, hopefully
eliminating sonar complaint.
Change-Id: I531f20d93a679d4bb432c1d75c1feac0e334bc44
Issue-ID: POLICY-582
Signed-off-by: Jim Hahn <jrh3@att.com>
|