1. Page.java & PortalPage.java: Added new field "String portalPid" - pages will be either portalPid and portalType specific either only portalType specific.
2. MongoDBDAOs/MongoDBPageDAO.java & PageDAO.java: Updated find methods to search for pages related to portalType and pages related to both portalPid and portalType.
a. Replaced findByPortalType with: @Query("{'portalType': ?0, 'portalPid': {$in: [?1, null] }}") List<Page> findByPortalTypeAndPortalPidOrNull(String portalType, String portalPid);
b. Replaced findByPortalTypeAndRoute with: @Query("{'portalType': ?0, 'route': ?1, 'portalPid': {$in: [?2, null] }}") Page findByPortalTypeAndRouteAndPortalPidOrNull(String portalType, String route, String portalPid);
3. PageController.java & PageService.java & PortalService.java & PageHelpContentService.java: Updated methods to handle pages with portalPid and added more checks for null values and permissions.
1. MailConfig.java: Added field "sslProtocols".
2. AdminToolsLibraryCheckDeployController.java: Expose property "admintoolslibrary.mail.sslProtocols".
3. EmailSender.java: Set "mail.smtp.ssl.protocols" with value from property "admintoolslibrary.mail.sslProtocols", if it is not null.
1. AdminToolsLibraryCheckDeployController.java: [Bug fix] In health-check/advanced method, show "admintoolslibrary.mail.from" property correctly (it showed "auth" property).
2. EmailSender.java: Spelling error fix "Email could not be sent.".
a. Update parent from "spring-boot-starter-parent" to "dnet45-parent" ==> add <dependencyManagement>.
b. For dependency "uoa-authorization-library", use version 1.0.0 (released version), not 1.0.0-SNAPSHOT.
1. pom.xml:
a. Added timestamp in properties.
b. In <build> added <resources> with filtering set to true.
2. GlobalVars.java: Added GlobalVars class for date of deploy & date of build.
3. UoaAdminToolsLibraryApplication.java: In @EnableConfigurationProperties added GlobalVars.class.
4. AdminToolsLibraryCheckDeployController.java: Added exposing date of deploy and date of build.
5. admintoolslibrary.properties: Added property admintoolslibrary.globalVars.buildDate=@timestamp@.
1. AdminToolsLibraryCheckDeployController.java:
a. In "hello()" method added @RequestMapping (except for existing ""), "/health_check".
b. Added method "checkEverything()" (/health_chech/advanced) only accessible by PORTAL ADMINS which checks connection with db and prints properties.
2. PortalPage.java: Added default value "false" for position fields (top, bottom, left, right).
a. Uncomment method "getDivHelpContent()" ({portalType}/{pid}/divhelpcontent/{id}) (used by portal).
b. Update method "List<DivHelpContent> getDivHelpContentsByPageId()" to "List<DivHelpContentResponse> getDivHelpContentsByPageId()" to return full objects for DivHelpContents.
1. DivHelpContentDAO.java & MongoDBDivHelpContentDAO.java: [Bug fix] Remove method "findByPortalAndPage()" as there is no "page" field in "DivHelpContent" class.
2. DivHelpContentService.java: [Bug fix] In method "getDivHelpContentsBasic()" change the way parameter "pageId" is used to filter results - find page in "DivId" not "DivHelpContent".
3. AdminPortalRelationsController.java: In method "getPagesForPortalByType()" add again optional parameter "page_route".
1. PageHelpContentDAO.java & MongoDBPageHelpContentDAO.java: Added method "findByPortalAndPageOrderByPlacementAscOrderAsc()" to get page help contents for a specific portal and page.
2. PageHelpContentService.java: Added method "getPageHelpContentsBasic()".
3. DivHelpContentDAO.java & MongoDBDivHelpContentDAO.java: Added method "findByPortalAndPage()" to get div help contents for a specific portal and page.
4. DivHelpContentService.java: Added method "getDivHelpContentsBasic()".
5. AdminPortalRelationsController.java:
a. Added methods
"public List<PageHelpContent> getPageHelpContentsByPageId()" (/{portalType}/{pid}/{pageId}/pagehelpcontent),
"public Map<String, Integer> countPageHelpContentsForPages()" (/{portalType}/{pid}/pagehelpcontent/page/count),
"public List<DivHelpContent> getDivHelpContentsByPageId()" (/{portalType}/{pid}/{pageId}/divhelpcontent),
"public Map<String, Integer> countDivHelpContentsForPages()" (/{portalType}/{pid}/divhelpcontent/page/count)
b. Added @PreAuthorize("hasAnyAuthority(@AuthorizationService.PORTAL_ADMIN)") in methods:
"public List<PageHelpContentResponse> getPageHelpContents()" and "public List<DivHelpContentResponse> getDivHelpContents()".
6. RolesUtils.java: [Bug fix] In method "getEmail()" call authorizationService.getEmail().