Modify code to limit garbage collectible objects and create method to deploy adapters without custom mapping
See merge request entgra/carbon-device-mgt!316
Removed creation of ArrayLists when a service is been called and added null validation to those lists in service layer. Developed code to deploy adapters when custom mapping is false and updated exception handling.
Removed repeated classes and implemented code to already existing classes and divided code into sub methods to limit repetitive code and increase readability. And the response messages were change in order to give users a better understating of the responses they get when calling the api endpoints.
Permanent delete DAO fix
## Purpose
Fix issue in deleting duplicate deviceIds from tables
## Security checks
* Followed secure coding standards? yes
* Ran FindSecurityBugs plugin and verified report? no
* Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets? yes
See merge request entgra/carbon-device-mgt!302
Fix Permanent delete for multiple enrollments
## Purpose
To enable permanent deletion of a sinlge device with multiple enroolmemts
## Goals
> (Goals achieved by feature)
## Approach
## Documentation
## Automation tests
## Security checks
- Followed secure coding standards? (yes/no)
- Ran FindSecurityBugs plugin and verified report? (yes/no)
- Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets? (yes/no)
## Related MRs
## Test environment
## Learning
See merge request entgra/carbon-device-mgt!296
The cause of the issue is not passing the newly introduced parameter 'policyType' in the policy edit payload. This parameter is marked @NotNull. Hence throwing an error.
This fix sets the policyType parameter from the existing payload (Doesn't allow to edit as there is no UI interface to edit this parameter ATM
Fixes: entgra/product-iots#175