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.".
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().
1. GenericPortalController.java: Added Generic portal controller for handling all portals without type limitation.
2. SimpleErrorController.java: Added /error request mapping, to format all error that are not explicitly handled.
3. AdminToolsLibraryExceptionsHandler.java: Added methods
"notFoundException()" (ChangeSetPersister.NotFoundException),
"forbiddenException()" (ForbiddenException),
"duplicateKeyException()" (DuplicateKeyException).
4. ForbiddenException.java: [NEW] Added class ForbiddenException extends RuntimeException.
5. ExceptionResponse.java: Added field HttpStatus status.
6. SingleValueWrapperResponse.java: [Moved from Admin Tools Service to Admin Tools Library]
Generic class SingleValueWrapperResponse created, with field "value" of type defined when instance is created (used for returning single value from API methods).
1. AdminPortalRelationsController.java: In "getDivIdsFull()" (/{pid}/div/full) set RequestParam page as NOT required (bug fix in admin portal).
2. EntityService.java: [Bug fix]
a. In "deleteEntities()", delete entity, after all relations with it have been deleted.
b. Check equality of page entity with id with "equals" not "==".
3. PageService.java: [Bug fix]
a. Delete page, after all related divIds, related div help contents, related page help contents have been deleted.
b. Delete divId, after all related div help contents have been deleted.
c. In "getDivHelpContents()" and "getPageHelpContents()" param is "page.getRoute()" (not its id).
1. DivHelpContentController.java & PageHelpContentController.java: Comment every method (not used anymore by portals) (changed and moved to AdminPortalRelationsController.java - portal specific).
2. DivIdController.java & EntityController.java & PageController.java: Comment methods not used by portals (some of them changed and moved to AdminPortalRelationsController.java - portal specific).
3. PortalController.java:
a. Comment methods not used by portals (some of them changed and moved to AdminPortalRelationsController.java - entities portal specific).
b. Methods to get portal (basic and full response) by pid.
c. In path of methods "getPageHelpContentsByPosition()" and "getDivHelpContentsByPosition()" add "/grouped" (without it, methods in AdminPortalRelationsController.java return simple lists).
4. DivId.java & DivIdResponse.java & Page.java & PageResponse.java & Portal.java & PortalResponse.java: Change type of field "portalType" (type for Portal.java) from "String" to "PortalType" (enum).
5. VerifyRecaptcha.java: log error before throwing exception.
6. PageHelpContentService.java:
a. Replace methods "insertPageHelpContent()" and "updatePageHelpContent()" with "insertOrUpdatePageHelpContent()".
b. In "addPageHelpContentsInPortal()" call DAO instead of insert.
7. PageService.java: Use method "getAllPortalsByType()" with portalType parameter, instead of "getAllPortals()".
8. PortalService.java:
a. Add methods "getAllPortalsByType()" and "getAllPortalsFullByType()".
b. In method "getPagesForPortalByType()" add parameter "with_positions".
c. Add method "checkPortalInfo()", which checks if pid and portalType matches, otherwise throws exception.
9. AdminPortalRelationsController.java: [NEW] controller to handle actions (get, delete, save, update, toggle) for portal specific entities.
10. PortalType.java: [NEW] Enumeration for acceptable portal types.
11. AdminToolsLibraryExceptionsHandler.java & ContentNotFoundException.java & MismatchingContentException.java & ExceptionResponse.java: [NEW] Exception handling for specific error cases.
1. DivHelpContentController.java: In "getDivHelpContents()" (/divhelpcontent) method rename parameter "div" to "divId" | Delete unnecessary method "addDivHelpContentsInPortal()".
2. PageHelpContentController.java: In "getPageHelpContents()" (/pagehelpconent) method add request parameter "portalType".
3. PortalController.java: Controller added for common methods of "ExploreController", "ConnectController" and "CommunityController" in "Admin Tools Service" - @RequestMapping with multiple paths.
4. DivIdDAO.java & MongoDBDivIdDAO.java:
a. Method "findByName()" returns List with new schema.
b. Added methods: "List<DivId> findByPagesContainingAndPortalType()", "DivId findByPagesContainingAndNameAndPortalType()", "DivId findByNameAndPortalType()".
5. PortalDAO.java & MongoDBPortalDAO.java: Added method "findByType()".
6. Portal.java & PortalResponse.java: Removed "layout" field and its methods.
7. DivHelpContentService.java:
a. In "getDivHelpContents()" (/divhelpcontent) method rename parameter "div" to "divId"
b. public void addDivHelpContentsInPortal(String pid, String portalId, String divIdName) --> public void addDivHelpContentsInPortal(String portalId, String portalType)
8. DivIdService.java:
a. [Bug fix] "getDivIds()", "getDivIdsFull()", "deleteDivIds()", "getDivIdsPages()" methods
b. Added method "getDivIdsByPortalType()"
c. Commented "getDivIdByName()" method.
9. PageHelpContentService.java:
a. In "getPageHelpContents()" method add parameter "portalType" and do bug fixes.
b. public void addPageHelpContentsInPortal(String pid, String portalId) --> public void addPageHelpContentsInPortal(String portalId, String portalType).
10. PageService.java:
a. [Bug fix] "getPagesFull()", "getAllPages()", "deletePageHelpContentsForPositionsIfDisabled()" methods.
b. Added methods "getPagesByPortalType()" and "getPageByPortalTypeAndRoute()".
11. PortalService.java:
a. [Bug fix] "getPortalFull()".
b. Method "deletePortal()" renamed to "deletePortalId()" and added NEW "deletePortal()" which deletes related page and div contents (and if no portal with the same type, also pages and divIds).
1. Created services for all entities: PortalService.java, PageService.java, EntityService.java, DivIdService.java, PageHelpContentService.java, DivHelpContentService.java.
2. PortalController.java: Deleted from library. Each service will have its own portal controllers, that will use methods from PortalService.java.
3. In all controllers use methods only from services.
1. Community.java: Add field "alias" (now it will be: openaire/explore (to be decided), connect, community, monitor) - it may be renamed again to: type.
2. Page.java & DivId.java & CommunityPage.java & DivIdResponse.java: Remove fields: "connect", "communities", "openaire" and add field: "dashboardAlias".
3. PageDAO.java & MongoDBPageDAO.java & DivIdDAO.java & MongoDBDivIdDAO.java: Methods use new field "dashboardAlias" instead of old fields: "connect", "communities", "openaire".
4. CommunityController.java & PageController.java & DivIdController.java & DivHelpContentController.java: Use methods for new field "dashboardAlias" instead of old fields: "connect", "communities", "openaire".
1. Entities: common entities are Community, Entity, Page, DivId, PageHelpContent, DivHelpContent (+ fullEntities), email: Email, EmailRecaptcha, GoogleResponse.
2. DAOs: DAOs for common entities are CommunityDAO, EntityDAO, PageDAO, DivIdDAO, PageHelpContentDAO, DivHelpContentDAO (+MongoDBDAOs).
3. Controllers: controllers for common entities are CommunityController, EntityController, PageController, DivIdController, PageHelpContentController, DivHelpContentController
(comment references to community specific entities e.g. Statistics, Subscribers, Layout).
4. Configuration: common configuration files are GoogleConfig, MailConfig.
5. For email: emailSender/EmailSender.java & handlers/InvalidReCaptchaException.java & recaptcha/VerifyRecaptcha.java.
6. Resources: log4j.properties.