Commit Graph

56 Commits

Author SHA1 Message Date
Konstantina Galouni 880681ee61 [maven-release-plugin] prepare release uoa-admin-tools-library-1.0.7 2023-05-03 12:47:56 +03:00
Konstantina Galouni a1fddbd2a8 PageService.java: Added method "updatePid()" to set new portal pid to all pages related to this specific portal. 2023-04-28 17:50:02 +03:00
Konstantina Galouni f50d434e1d [maven-release-plugin] prepare for next development iteration 2022-10-10 10:26:09 +03:00
Konstantina Galouni 09ac473aba [maven-release-plugin] prepare release uoa-admin-tools-library-1.0.6 2022-10-10 10:26:03 +03:00
Konstantina Galouni 49b4e8dfe2 pom.xml: Updated versions of uoa-spring-boot-parent and uoa-authorization-library. 2022-10-10 10:18:56 +03:00
Konstantina Galouni 3bb2ead86e pom.xml: Updated scm from svn to git. 2022-10-10 10:16:26 +03:00
Konstantina Galouni 806a2365c3 Updated parent in pom.xml and moved to log4j2 2022-10-07 13:35:48 +03:00
Konstantina Galouni 9bcf884a6d Adding .gitignore 2022-08-31 16:21:10 +03:00
Konstantina Galouni 91a6560fca [maven-release-plugin] prepare for next development iteration 2022-07-27 11:45:23 +00:00
Konstantina Galouni 8319480fde [maven-release-plugin] prepare release uoa-admin-tools-library-1.0.5 2022-07-27 11:45:21 +00:00
Konstantina Galouni 8af24273e5 [Trunk | Admin Tools Library]: PortalType.java: Added "eosc" in PortalType enum | DivHelpContentService.java: Updated footer contents (font-size:12px instead of 8pt). 2022-07-27 11:37:53 +00:00
Konstantina Galouni 0de1d1d662 [Trunk | Admin tools library]: Added portal specific pages.
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.
2022-02-09 12:14:23 +00:00
Konstantinos Triantafyllou e2da303c98 [maven-release-plugin] prepare for next development iteration 2021-12-07 09:26:32 +00:00
Konstantinos Triantafyllou 507557cd9f [maven-release-plugin] prepare release uoa-admin-tools-library-1.0.4 2021-12-07 09:26:31 +00:00
Konstantinos Triantafyllou 24cf96ac3f Update authorization library 2021-12-07 09:25:47 +00:00
Konstantinos Triantafyllou 1da1d75771 Add component scan to configuration file 2021-12-06 15:20:43 +00:00
Konstantinos Triantafyllou 5cc4834f5c [maven-release-plugin] prepare for next development iteration 2021-11-30 11:52:37 +00:00
Konstantinos Triantafyllou 0a3cc088a8 [maven-release-plugin] prepare release uoa-admin-tools-library-1.0.3 2021-11-30 11:52:35 +00:00
Konstantinos Triantafyllou 121a72611d Update authorization library 2021-11-30 11:52:19 +00:00
Konstantinos Triantafyllou b2375fcdb7 [maven-release-plugin] prepare for next development iteration 2021-11-16 14:48:28 +00:00
Konstantinos Triantafyllou e26361cb38 [maven-release-plugin] prepare release uoa-admin-tools-library-1.0.2 2021-11-16 14:48:27 +00:00
Konstantinos Triantafyllou c4134a9f41 Add version to global vars. Update authorization library 2021-11-16 14:48:05 +00:00
Konstantina Galouni f9f542291e [Trunk | Admin Tools Library]:
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.
2021-11-15 13:19:56 +00:00
Konstantina Galouni a262fe2c45 [Trunk | Admin Tools Library]:
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.".
2021-11-15 11:07:42 +00:00
Konstantina Galouni 2bc3506cf3 [maven-release-plugin] prepare for next development iteration 2021-10-25 09:51:16 +00:00
Konstantina Galouni 0399381dea [maven-release-plugin] prepare release uoa-admin-tools-library-1.0.1 2021-10-25 09:51:14 +00:00
Konstantina Galouni e1f8b4308f [Trunk | Admin Tools Library]: Portal.java & PortalResponse.java & PortalService.java: Added new field in Portal (and PortalResponse) "twitterAccount". 2021-10-25 09:17:37 +00:00
Konstantina Galouni 3c8fb7d8b6 [maven-release-plugin] prepare for next development iteration 2021-10-12 10:59:13 +00:00
Konstantina Galouni 70f4a22954 [maven-release-plugin] prepare release uoa-admin-tools-library-1.0.0 2021-10-12 10:59:11 +00:00
Konstantina Galouni 056378c7a7 [Trunk | Admin Tools Library]: pom.xml: Added <scm> and commented <groupId>, to release this library to maven nexus repository. 2021-10-12 10:50:23 +00:00
Konstantina Galouni b27831abcf [Trunk | Admin Tools Library]: pom.xml:
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.
2021-10-05 21:04:12 +00:00
Konstantina Galouni a7b07ad7e0 [Trunk | Admin Tools Library]:
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@.
2021-09-15 21:58:27 +00:00
Konstantina Galouni ca3a327172 [Trunk | Admin Tools Library]: Added properties.put("mail.smtp.ssl.protocols", "TLSv1.2"); if(mailConfig.getHost().equals("smtp.gmail.com")) (only for dev). 2021-06-24 12:29:18 +00:00
Konstantina Galouni bcf37d165c [Trunk | Admin Tools Library]: DivHelpContentService.java: Updated default footer div helptext for new communities and added default footer div helptext for new monitor dashboards and other portals. 2021-06-04 10:07:17 +00:00
Konstantina Galouni e3d5e5679b [Trunk | Admin Tools Library]: DivHelpContentService.java: In method "addDivHelpContentsInPortal()" (when creating a new portal), added default footer div help content for divId with name "footer". 2021-06-04 09:25:55 +00:00
Konstantina Galouni 62cb461196 [Trunk | Admin Tools Library]:
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).
2021-04-22 09:09:16 +00:00
Konstantina Galouni 9c57010ca3 [Trunk | Admin Tools Library]: AdminPortalRelationsController.java:
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.
2021-03-31 15:45:53 +00:00
Konstantina Galouni 93efd1f7d3 [Trunk | Admin Tools Library]: AdminToolsLibraryCheckDeployController.java: [NEW] Controller added with @RequestMapping("/admin-tools-library") and
"hello()" method (@RequestMapping(value = "", method = RequestMethod.GET)) which just prints and returns a greeting message.
2021-03-24 10:26:35 +00:00
Konstantina Galouni 2a3f6c6a58 [Trunk | Admin Tools Library]:
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".
2021-03-04 16:20:19 +00:00
Konstantina Galouni a265d414a4 [Trunk | Admin Tools Library]:
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().
2021-02-26 12:44:44 +00:00
Konstantina Galouni 3b563eb5c2 [Trunk | Admin Tools Library]:
1. pom.xml: Added in dependency for spring security and and for uoa-authorization-library.
2. UoaAdminToolsLibraryApplication.java: import "AuthorizationConfiguration.class".
3. RolesUtils.java: Added folder handlers/utils and file handlers/utils/RolesUtils.java to get roles and info of user from authorization library.
4. AdminToolsLibraryExceptionsHandler.java: call setStatus of ExceptionResponse in handlers that status was not set | Use log.error instead of log.debug.
5. DivHelpContentService.java: Added checks and throw Exceptions in methods "deleteDivHelpContents()" and "toggleDivHelpContent()".
6. PageHelpContentService.java: Added checks and throw Exceptions in methods "deletePageHelpContents()" and "togglePageHelpContent()".
7. PortalService.java: Added checks and throw Exceptions in method "togglePage()".
8. EntityController.java: Added @PreAuthorize
	Portal Admins: methods "insertEntity()" (/entity/save), "updateEntity()" (/entity/update), "deleteEntities()" (/entity/delete).
9. DivIdController.java: Added @PreAuthorize
	Portal Admins: methods "insertDivId()" (/div/save), "updateDivId()" (/div/update), "deleteDivIds()" (/div/delete).
10. PageController.java: Added @PreAuthorize
        Portal Admins: methods "insertPage()" (/page/save), "updatePage()" (/page/update), "deletePages()" (/page/delete).
11. AdminPortalRelationsController.java:  
	a. Added checks and throw Exceptions in methods "getEntitiesForCommunity()", 
							"getDivHelpContent()", "saveDivHelpContent()", "updateDivHelpContent()", "deleteDivHelpContents()", "toggleDivHelpContent()",
							"togglePage()",
							"getPageHelpContent()", "savePageHelpContent()", "updatePageHelpContent()", "deletePageHelpContents()", "togglePageHelpContent()"
	b. Added @PreAuthorize
		Portals Admin - Curators - Managers: "toggleEntity()" (/{portalType}/{pid}/entity/toggle), 
						     "saveDivHelpContent()" (/{portalType}/{pid}/divhelpcontent/save), "updateDivHelpContent()" (/{portalType}/{pid}/divhelpcontent/update),
						     "deleteDivHelpContents()" (/{portalType}/{pid|/divhelpcontent/delete), "toggleDivHelpContent()"  (/{portalType}/{pid|/divhelpcontent/toggle),
						     "togglePage()" (/{portalType}/{pid}/page/toggle),
						     "savePageHelpContent()" (/{portalType}/{pid}/pagehelpcontent/save), "updatePageHelpContent()" (/{portalType}/{pid}/pagehelpcontent/update),
                                                     "deletePageHelpContents()" (/{portalType}/{pid|/pagehelpcontent/delete), "togglePageHelpContent()"  (/{portalType}/{pid|/pagehelpcontent/toggle)
2021-02-25 10:03:23 +00:00
Konstantina Galouni e98cf88a13 [Trunk | Admin Tools Library]:
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).
2020-12-09 13:46:32 +00:00
Konstantina Galouni 613af8fc70 [Trunk | Admin tools Library]: PortalType.java: In enum PortalType add "aggregator". 2020-12-04 09:35:13 +00:00
Konstantina Galouni 4e770197e1 [Trunk | Admin tools Library]:
1. Portal.java & PortalResponse.java & PortalService.java: New field "piwik".
2. PortalType.java: Added "funder", "ri", "project", "organization" values in PortalType enum for monitor Stakeholder types.
2020-11-20 14:46:28 +00:00
Konstantina Galouni 2cf8fd5b8b [use-UoaAdminToolsLibrary | Admin Tools Library]: pom.xml & UoaAdminToolsApplication.java: Commit commented configuration for spring secutiry and "uoa-authorization-library". 2020-09-24 09:57:20 +00:00
Konstantina Galouni 7d14e75334 [Trunk | Admin Tools Library]:
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).
2020-09-22 14:14:35 +00:00
Konstantina Galouni 1f0fb6df28 [Trunk | Admin Tools Library]:
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.
2020-09-15 10:04:52 +00:00
Konstantina Galouni b12d839964 [Trunk | Admin Tools Library Service]: [Bug fix] PageService.java: Error (by accident) in name of "getPageByPortalTypeAndRoute()" method. 2020-04-03 20:35:19 +00:00
Konstantina Galouni 011628562d [Trunk | Admin Tools Library Service]:
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).
2020-04-03 20:32:32 +00:00
Konstantina Galouni 1872dbc4ab [Trunk - Admin tools library Service]: Commit r58031 was not completed.
DivIdService.java, PageService.java: In all controllers/services use methods only from services (except for entity's DAO).
2020-01-30 12:22:02 +00:00