aboutsummaryrefslogtreecommitdiffstats
path: root/utils
AgeCommit message (Collapse)AuthorFilesLines
2018-06-19Add CurrentTime utilitiesJim Hahn2-0/+120
Add some comments. Update license text. Change-Id: I4cee208378c44d9730274aee337feb95f9026add Issue-ID: POLICY-908 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-06-19Merge "Move SpecProperties from drools-pdp to common"Pamela Dragosh2-0/+341
2018-06-18Move SpecProperties from drools-pdp to commonJim Hahn2-0/+341
Change-Id: Ifa1785922b42f990d4d84c1410dd1d881b10647d Issue-ID: POLICY-907 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-06-18Use setXxx() methods for @Property fieldsJim Hahn4-180/+534
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-06-05Update policy-common to SNAPSHOT-1.3.0liamfallon1-1/+1
Snapshot updated for Casablanca. Change-Id: Ife941f771b02be68e35fd638adfac78cf2b3ba99 Issue-ID: POLICY-875 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-05-21Update Policy Common to 1.2.3-SNAPSHOTliamfallon1-1/+1
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>
2018-05-16Upgrade SNAPSHOT to 1.2.2liamfallon1-1/+1
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>
2018-04-13Upgrade SNAPSHOT to 1.2.1Pamela Dragosh1-1/+1
Issue-ID: POLICY-736 Change-Id: Iccb43b692908ffc35fc0d18da1e967718e3c3519 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-03-25Add PropertyConfiguration classJim Hahn15-0/+2896
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>
2018-03-16Removed checkstyle warningsmmis6-448/+444
Removed checkstyle warnings in policy/common/utils Issue-ID: POLICY-695 Change-Id: I831b74c889d44784d6328619d88eb92fb524ce74 Signed-off-by: mmis <michael.morris@ericsson.com>
2018-02-20Consolidating and organizing dependenciesPamela Dragosh1-1/+0
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>
2018-02-10Add AutoClose wrappers for JPA classesJim Hahn7-0/+770
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>