summaryrefslogtreecommitdiffstats
path: root/POLICY-SDK-APP/src/main
AgeCommit message (Collapse)AuthorFilesLines
2018-02-27Policy:MajorManamohan Satapathy1-6/+6
Local variables should not shadow class field:L992 L1719 Issue-ID: POLICY-649 Sonar Link: https://sonar.onap.org/issues?myIssues=true&projectUuids=AV2blNLJ5bp_wwmIUP3L&resolved=false&severities=CRITICAL%2CMAJOR&types=CODE_SMELL Location:POLICY-SDK-APP\src\main\java\org\onap\policy\controller\CreateDcaeMicroServiceController.java Change-Id: I1d038829867c7d019473909650946a9539b5e736 Signed-off-by: Manamohan Satapathy <MS00534989@techmahindra.com>
2018-02-21Merge "Added Junits for POLICY-SDK-APP controllers"Jorge Hernandez2-3/+14
2018-02-21Added Junits for POLICY-SDK-APP controllersuj426b2-3/+14
Issue-ID: POLICY-584 Change-Id: I306f3484f466accf11ca4fd59864a4b402dcb733 Signed-off-by: uj426b <uj426b@att.com>
2018-02-20Added Junits for Policy PAP-RESTrb71477-751/+4
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-19Fix Fortify Scan Issue:guangxingwang3-9/+12
1) Fix Fortify Header Manipulation issue by checking the format of the message before adding it response header. 2) Fix Fortify Hardcoded Password issue by using encryption and decryption Issue-ID: POLICY-543 Change-Id: I16b44b9b0670b1af75094c9ae9d1f7d352fa894a Signed-off-by: guangxingwang <gw1218@att.com>
2018-02-16Added Junis for Policy ONAP-RESTrb71471-14/+1
Cleaned the unused constructors. Cleaned the unused code. Added Junits for all JPAS. Renamed the Junit class names on removing classes. Issue-ID: POLICY-603 Change-Id: I0709ccecd7a2f3ec49367ff85f5a6d273479493e Signed-off-by: rb7147 <rb7147@att.com>
2018-02-13Fix a Bug on Editor Screenguangxingwang1-0/+7
On editor screen, sometimes click on + button only one click, it creates more than text fields Issue-ID: POLICY-629 Change-Id: I9acc95fa0a4a7df3828e579f994c06bfa3199eb5 Signed-off-by: guangxingwang <gw1218@att.com>
2018-02-08Remove Password from Loggingguangxingwang1-2/+2
Fix Fortify logging issue Issue-ID: POLICY-544 Change-Id: Ibfc7665dcab229a705ec3f999545b14675c24430 Signed-off-by: guangxingwang <gw1218@att.com>
2018-02-08Merge "MS Model Input Validation"Pamela Dragosh1-9/+11
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-07FFix the Bug of Missing fields on View Screenguangxingwang1-18/+47
Missing extra fields added by clicking add buton if they are more than 10 on view screen Issue-ID: POLICY-613 Change-Id: I9e718b62301f24b71a4f6506d3e63e6185e0b1ce Signed-off-by: guangxingwang <gw1218@att.com>
2018-02-06Policy Resiliency Code Fixesrb71473-202/+314
Resolved the issue on updating the configuration files when rename/clone/export/move actions are done through GUI. Fixed the PolicyManagerServlet code. Added test cases for newly added files. Issue-ID: POLICY-609 Change-Id: I9d14f19fe20bbc0e3b3844f85d81f26e34bb26ec Signed-off-by: rb7147 <rb7147@att.com>
2018-02-05Remove technical debtPamela Dragosh4-16/+22
* 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-02Resolved Fortify System Information Leak issuesrb71473-3/+6
Issue-ID: POLICY-550 Change-Id: I2145ecb6de43b69d6faf44c6395b119134a9904f Signed-off-by: rb7147 <rb7147@att.com>
2018-02-01Included Policy GUI Enhancements and validationsrb714739-627/+712
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-02-01Merge "Reduce technical debt"Jorge Hernandez3-102/+87
2018-01-31Fixed the Sonar technical debt.Ankitkumar Patel1-1/+1
Fixed the sonar technical dept primarily for the POLICY-REST module, and accordingly updated the other policy-engine modules for successful built. Issue-ID: POLICY-476 Change-Id: I0e9bd7209a7f9af247fa409a1682683082f92698 Signed-off-by: Ankitkumar Patel <ankit@research.att.com>
2018-01-31Reduce technical debtPamela Dragosh3-102/+87
The last for technical debt I believe. The last try-with-resources I dare to fix. Useless import that I missed last time. Did a couple of minor reductions in cyclomatic complexity that I think are harmless. And lastly introduce a new variable instead of reusing a parameter. Issue-ID: POLICY-482 Change-Id: I5f2e5abbdd472496b48cf12e485fc9b4d903f35a Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-01-31Adding code coverage reduce duplicate linesPamela Dragosh6-123/+134
Removed some duplicate code across some of the classes. For CheckPDP, got the code coverage above 80%. Issue-ID: POLICY-482 Change-Id: I41495cf9f92e8fd248350bf33f5a183c876f38f2 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-01-30Fix technical debt and reduce linesPamela Dragosh9-94/+83
Focused on iterating over entrySet along with more fixes for dead stores, unnecessary exceptions. I'm also starting to work on reducing the number of code lines. * Iterate using entrySet * Remove useless assignments * Unnecessary exceptions * Use StringBuilder instead of StringBuffer due to synchronization * Potential null exceptions being thrown * Returning a empty collection vs null Issue-ID: POLICY-482 Change-Id: If6ac8e812237f37b2b10c534535df4090a5073dd Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-01-29Reduce technical debtPamela Dragosh17-218/+195
Focusing on easy try-with-resources changes. Plus some other minor items. I did not get all of them yet, as some have some heavy refactoring. These try-with-resources seem to be fairly harmless. * Utilize try-with-resources * Remove unnecessary parenthesis * Merging simple if statements * Remove useless assignment * Moving string literals to left hand side Issue-ID: POLICY-482 Change-Id: If519ec8ea96f6b90bf82ac2676ffea9cd0cd2daf Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-01-26Use try-with-resourcesPamela Dragosh1-26/+13
Also enhanced JUnit tests to ensure this will work. Reduced code. Issue-ID: POLICY-482 Change-Id: If07e17df274bdb709f7ca60078bd1fbd78d1aaaa Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-01-23Reduce technical debtPamela Dragosh10-100/+98
Mainly use StringBuilder() to improve speed * Use StringBuilder * Remove superflous exceptions in constructor * Remove unnecessary casts * Remove unnecessary toString() * Combine return into one statement * Move string literal to LHS Issue-ID: POLICY-482 Change-Id: Id196728d92dda7fab7e83d6eea07633c5be37f7c Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-01-23Addressing Technical Debt for POLICY-SDK-APPPamela Dragosh27-177/+161
* 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-16Restrict file upload size in policy editorMagnusen, Drew (dm741q)2-10/+28
Restrict file upload size in Policy Editory using a configurable value (in bytes) set in xacml.admin.properties. Default value is 30MB. Issue-ID: POLICY-538 Change-Id: I4d8539ab33320446aed250ea4fdc51de585d5f2a Signed-off-by: Magnusen, Drew (dm741q) <dm741q@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>
2018-01-12Fixed as per Java Code Conventionsroot11-9/+9
*Moved the constructors after the variables Change-Id: I099f75aea285f0bb845d464065d1e5f031d44a13 Issue-ID: POLICY-336 Signed-off-by: SRINIVAS V <srinivasa.mohan@huawei.com>
2018-01-11Removed useless parenthesesroot11-1/+1
*Removed those useless parentheses Change-Id: I19e9e027182dfd7dc2211d71fbb4acd8bf6b8be5 Issue-ID: POLICY-336 Signed-off-by: SRINIVAS V <srinivasa.mohan@huawei.com>
2018-01-11Merge "Fixed as code optimization"Pamela Dragosh1-4/+2
2018-01-11Fixed as per Java Code Conventionsroot11-2/+8
*Moved the constructors after the variables Change-Id: I531a911570867e05d2eabca98d349f4f2f26d0f9 Issue-ID: POLICY-336 Signed-off-by: SRINIVAS V <srinivasa.mohan@huawei.com>
2018-01-09Fixed as code optimizationSRINIVAS V1-4/+2
*no need to create seperate object, so optimized Change-Id: I245d7fd26c0fabb26de6e9eb7c8bedf405d9d602 Issue-ID: POLICY-336 Signed-off-by: SRINIVAS V <srinivasa.mohan@huawei.com>
2018-01-08Fixed as per Java Code ConventionsSRINIVAS V1-9/+11
*Moved the constructors after the variables *Deleted the commented code Change-Id: I6afa9ae5b04fe5c8280fc9e08352aef699117567 Issue-ID: POLICY-336 Signed-off-by: SRINIVAS V <srinivasa.mohan@huawei.com>
2018-01-03Merge "Adding SONAR fixes for"Pamela Dragosh2-9/+1
2017-12-11Resolved the Policy GUI Javascript issuesrb714719-85/+191
Issue-ID: POLICY-440 Change-Id: I44d5304699da19bee7ae2997565802fc7d44cb0e Signed-off-by: rb7147 <rb7147@att.com>
2017-12-11Adding SONAR fixes forMichael Mokry2-9/+1
- pushPolicy defect fixes for POLICY-486 - Common Policy Validation feature for POLIYC-449 Change-Id: I8d54aa5a9b819c6eb4427dfa47c4ce963a21c2e0 Issue-ID: POLICY-449,POLICY-486 Signed-off-by: Michael Mokry <mm117s@att.com>
2017-12-08Upgraded the latest ONAP SDKrb714721-161/+268
Upgraded latest ONAP SDK Code. Change-Id: I669d6cfcefe068b1e4c078889d7d6c77ce788e2e Issue-ID: POLICY-432 Signed-off-by: rb7147 <rb7147@att.com>
2017-12-06Merge "Refactor to provide Common Policy Validation"Pamela Dragosh4-582/+20
2017-12-05Modified the code to fix various pushPolicy issuesMichael Mokry1-2/+2
- Added modifications per Pam's review Change-Id: I5d67ee529cbc5245e7d1f8dbec6f2f2d453ce299 Issue-ID: POLICY-486 Signed-off-by: Michael Mokry <mm117s@att.com>
2017-12-04Refactor to provide Common Policy ValidationMichael Mokry4-582/+20
Provides a common class to perform policy validation during create/udpate of policies by the GUI and API for consistency. Change-Id: Ied459e73d48517bb50064cd10d6a1c871b8311e5 Issue-ID: POLICY-449 Signed-off-by: Michael Mokry <mm117s@att.com>
2017-11-02Resolved Policy Blocker issuerb71471-11/+5
Issue-ID: POLICY-411 Change-Id: I9579a1fa58a4b40aa6aa70a3007b3ce7c02f5ca2 Signed-off-by: rb7147 <rb7147@att.com>
2017-10-31Merge "Fixed TOSCA parsing bugs"Jorge Hernandez2-23/+209
2017-10-31Fixed TOSCA parsing bugsguangxingwang2-23/+209
Fixed TOSCA paring bugs and retuned error messages to front-end. Issue-ID: POLICY-405 Change-Id: Idc6efd062360acbb4ceb143af8619b5f7def723a Signed-off-by: guangxingwang <gw1218@att.com>
2017-10-30Merge "Fixed a bug on view and editor screens"Jorge Hernandez1-38/+139
2017-10-30Fixed a bug on view and editor screensguangxingwang1-38/+146
Modified the code of view and editor functions Issue-ID: POLICY-403 Change-Id: I54c7454fd6beabfec7a24227310efa44c7dd1ec6 Signed-off-by: guangxingwang <gw1218@att.com>
2017-10-26Updated the DB Script with New TOSCA modelrb71471-0/+8
Added the caching issue while uploading the model to db. Issue-ID: POLICY-372 Change-Id: I10bfcead0a5cbcb1484858a79976b7c86fba3ece Signed-off-by: rb7147 <rb7147@att.com>
2017-10-11Added Policy GUI Cosmetic Fixesrb714715-22/+81
Fixed the Refresh cache issue. Fixed the Popup modal css issue. Fixed the cosmetic issues. Issue-Id: POLICY-310 Change-Id: Ib41713a6f9a6573667d7b4ae6836e411dc32c854 Signed-off-by: rb7147 <rb7147@att.com>
2017-10-10Fixing the BRMS rule generation issueTej, Tarun1-6/+6
Fixing the rule params section to look for PapParams istead of Params. This will be a temporary solution for now. Issue-Id: POLICY-302 Change-Id: I4b6b415b3eacf121be374d2dfd50303049c35aba Signed-off-by: Tej, Tarun <tt3868@att.com>
2017-10-06Fixed bug introduced by sql injeciton protection.Temoc Rodriguez2-61/+67
Added missing colon before the named parameters. Fixed a typo parameter name. Fixed bad cast by setParameter. This fixes issues encountered in the UI. Whenever a policy is moved, renamed, or deleted it makes a db call and that db call fails on setParameter method. This hibernate method is supposed to automatically detect the type of the object for the named parameters but it fails with type Long. It tries to convert to int and it fails. A check is now added for type Long. Issue-ID: POLICY-278 Change-Id: Idbb4067a5ec2cc9d9b040de9e574ba2564e1ee2c Signed-off-by: Temoc Rodriguez <cr056n@att.com>
2017-09-27Added R1 MS Tosca templaterb71471-1/+1
Added the MS Tosca template to db scripts and cleaned up old policies. Issue-Id: POLICY-264 Change-Id: I0ee5cffbb78d1f7df0379b71fe0f3368587aa9a6 Signed-off-by: rb7147 <rb7147@att.com>
2017-09-25String literal comparision on left siderama-huawei2-9/+9
Used isEmpty instead of size method Issue-ID: POLICY-239 Change-Id: I9007fa99b40e53000a972147079ec6db4ecc7a66 Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>