aboutsummaryrefslogtreecommitdiffstats
path: root/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/AutoPushController.java
AgeCommit message (Collapse)AuthorFilesLines
2020-04-22Fix for Push/Unpush Policy On GUIuj426b1-2/+2
Issue-ID: POLICY-2518 Change-Id: Ie70fc5049f87b55384731900373884d8b25803bb Signed-off-by: uj426b <uj426b@att.com>
2019-11-18Unit/SONAR/Checkstyle in ONAP-RESTliamfallon1-3/+3
Util package of ONAP-REST, with JUnit added and SONAR/Checkstyle issues addressed. In cases where a class name change caused an update in another package, the license header on files for those knock on changes are not updated. Issue-ID: POLICY-2131 Change-Id: Ic134408efe76b9838f5607a07f1735d12bd41032 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-10-23Consolidate PolicyRestAdapter setupPamela Dragosh1-13/+12
Put common code into PolicyEngineUtils that the controllers use to populate the PolicyRestController. Also some more sonar cleanup and formatting of XML files. Shortened 120 line characters. Removed some trailing spaces from comments. Fixed up one JUnit. Licenses. Issue-ID: POLICY-2133 Change-Id: Id7d8ac3ab60331535f048ec0f26aeb17a099414e Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-10-14Sonar cleanup in controllers etcPamela Dragosh1-12/+3
Variable renaming of consecutive capital letters. Adding Javadoc Missing curly braces Re-writing some methods to reduce cyclomatic complexity Combining while's into a simple for statement. Addressing previous review comments No real effort on code coverage in this one. Issue-ID: POLICY-2133 Change-Id: I4afb3030203e1dbc743507e037ca3d57faf41f1d Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-10-11More sonar cleanup and line consolidationPamela Dragosh1-27/+37
Missing javadoc and some variable naming to remove consecutive capitlization of letters. 120 line width reduction Missing curly braces Moving variables due to distance requirements Add missing rawtype suppression or useless ones There are some null return statements that are useless Started doing some combining of lines at the risk of making the code even more unreadable than it already is. Started addressing some nested if's. I see opportunity for a lot of common code to be combined or put into a base controller or utility method. Issue-ID: POLICY-2133 Change-Id: I6d4d9618bea685cf1d02899e3a9d4a43919a2a96 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-10-07Format java POLICY-SDK-APPPamela Dragosh1-1/+6
As a result of doing command maven reformat, these files are now changed. Updated licenses. Issue-ID: POLICY-2133 Change-Id: I19a8dd70eb10c0d879b97635f7780ab7f92a1753 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-08-12Fix issue for policies not loading on GUI push tabMichael Mokry1-1/+9
- found the problem to be with a line of code to add all the scopes from the role to a Set of scopes. when the scopes attribute in the role object is null it logs an exception and fails to load policies. I added a new method to check the value of the roles.getScopes() for null and only attempt to add the scope to the set if it is not null - I created a separate method to do this in order to avoid an increase in technical debt as it would have added to the complexity if I kept it in the same method. - PATCH 4: Added scopes to the method arguments in order to avoid overwriting scopes that are added in prevous interations of the loop. - PATCH 5: removed redundant scopes assignment per Jorge's review. Change-Id: Ifcc8775d3db8ecc722ee6806310a58ecb4e15856 Issue-ID: POLICY-1981 Signed-off-by: Michael Mokry <michael.mokry@att.com>
2019-04-04Auditing User Operations Push or Delete Policies.uj426b1-26/+20
Change-Id: I39d5fc01e68e9d711c5dd09790dc34beb68783c3 Issue-ID: POLICY-1421 Signed-off-by: uj426b <uj426b@att.com>
2019-03-28FIx Sonar Issues reported on ActionPolicyControllerRashmi Pujar1-46/+30
- code cleanup, reduce cognitive complexity, extract constants etc Issue-ID: POLICY-1615 Change-Id: Ie0f634b1848076bba4c3ea3cbf9252b9faba0f8f Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca>
2019-03-26Add capability for multi-role supportPolina Volodina1-329/+337
Changes ported from ECOMP into ONAP for multi-role functionality in Policy Editor GUI Issue-ID: POLICY-1419 Change-Id: I438c074e935c28b014be44ae2eab1d49b45e11e2 Signed-off-by: Polina Volodina <pv789v@att.com>
2018-02-20Added Junits for Policy PAP-RESTrb71471-1/+1
Clenaed the unsued code. Cleaned the duplication of code and moved to ONAP-REST. Added Junits for PAP-REST Issue-ID: POLICY-600 Change-Id: I56e6e8f2f547def9eaf8624a9e0dd52dc05ad136 Signed-off-by: rb7147 <rb7147@att.com>
2018-02-08MS Model Input ValidationMichael Mokry1-9/+11
- Provides validation for MS policy input content body that matches the GUI validations when create/update MS policy from API - Added changes to satisfy review comments and updated copywright headers for modified and new files Change-Id: I02bfa639bffb48520badd0e4fa34eb36418547ae Issue-ID: POLICY-377 Signed-off-by: Michael Mokry <mm117s@att.com>
2018-02-05Remove technical debtPamela Dragosh1-6/+10
* String literals on the left * Unnecessary initialization of variables * Change ArrayList to using List * Remove extra semicolons * Empty Constructor comments * Useless parenthesis I also added a comment on some code that is suspicious. Not comfortable with changing that code. Issue-ID: POLICY-482 Change-Id: I89d889737d398d047fab4b25cb5d962ee1ecdd03 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-02-01Included Policy GUI Enhancements and validationsrb71471-2/+5
Added hover messages for all policy templates. Resolved few sonar issues. Added fixes for Policy GUI Validations. Issue-ID: POLICY-597 Change-Id: I74abb92dd6ac8722d7869b6a316fad1d8db11d9c Signed-off-by: rb7147 <rb7147@att.com>
2018-01-23Addressing Technical Debt for POLICY-SDK-APPPamela Dragosh1-3/+3
* Using booleans true and false * Using already predefined static strings * Adding private constructors to hide implicit * Adding empty constructor comment to satisfy SONAR * Using single quotes for indexOf to use faster method * Preferred use of .isEmpty() * Ordering of public static synchronized syntax * Removing commented out code * Using an already defined constant * Unnecessary declaration of runtime exceptions * Unnecessary casts * Unused variables and imports * Unnecessary use of toString() * Just using return vs storing into a local var and returning that * Extra semicolons Issue-ID: POLICY-482 Change-Id: I6b9dcc5211dd52895a8787239b9df3059928fa45 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-01-12Local and Class variable name conflict resolvedSRINIVAS V1-3/+3
*Renamed the local variable to othername Change-Id: I5f1e1b8b9140acf73de241f78b0437dc9e5805b5 Issue-ID: POLICY-336 Signed-off-by: SRINIVAS V <srinivasa.mohan@huawei.com>
2017-12-08Upgraded the latest ONAP SDKrb71471-4/+16
Upgraded latest ONAP SDK Code. Change-Id: I669d6cfcefe068b1e4c078889d7d6c77ce788e2e Issue-ID: POLICY-432 Signed-off-by: rb7147 <rb7147@att.com>
2017-08-23Fixes for sonar critical issuesTej, Tarun1-4/+6
Fixes for critical and blocker issues reported in sonar. Issue-Id: POLICY-113 Change-Id: I50969fe93a94b0497f3fb30864a6c45e63208fe6 Signed-off-by: Tej, Tarun <tt3868@att.com>
2017-08-14Add fix for SQL injection.Rodriguez, Cuauhtemoctzin (cr056n)1-4/+11
Add fix for SQL injection by passing parameters into getDataByQuery method and binding parameters. Add junit test file. Override equals and hashcode methods for more thorough testing on ActionBodyEntity, ConfigurationDataEntity, PolicyEntity, PolicyVersion, WatchPolicyNotificationTable classes. Issue-Id: [POLICY-158] Change-Id: Icebe1ca1ff01c8ea7435729967f4d349a1026054 Signed-off-by: ITSERVICES\cr056n <cr056n@att.com>
2017-08-10Fix console issuesTej, Tarun1-1/+1
Reverted package names to org.openecomp to fix portal issues Issue-ID: POLICY-144 Change-Id: Ie108db431b9d211b15c59a29e564517c785e0da5 Signed-off-by: Tarun Tej Velaga <tt3868@att.com>
2017-07-31[POLICY-73] replace openecomp for policy-engineGuo Ruijing1-0/+377
Change-Id: I54072f6bcd388c0e05562614ee89b4ae7ad67004 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com> Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>