summaryrefslogtreecommitdiffstats
path: root/portal-BE/src
diff options
context:
space:
mode:
Diffstat (limited to 'portal-BE/src')
-rw-r--r--portal-BE/src/main/java/org/onap/portal/PortalApplication.java2
-rw-r--r--portal-BE/src/main/java/org/onap/portal/aop/service/FnLanguageServiceAOP.java4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/aop/service/FnUserServiceAOP.java2
-rw-r--r--portal-BE/src/main/java/org/onap/portal/aop/service/WidgetServiceAOP.java2
-rw-r--r--portal-BE/src/main/java/org/onap/portal/configuration/DBInitializingBean.java384
-rw-r--r--portal-BE/src/main/java/org/onap/portal/configuration/SecurityConfig.java2
-rw-r--r--portal-BE/src/main/java/org/onap/portal/configuration/WebMvcConfiguration.java9
-rw-r--r--portal-BE/src/main/java/org/onap/portal/controller/LanguageController.java4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/controller/UserController.java2
-rw-r--r--portal-BE/src/main/java/org/onap/portal/controller/UserRolesController.java4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/controller/WidgetsCatalogController.java6
-rw-r--r--portal-BE/src/main/java/org/onap/portal/controller/WidgetsController.java6
-rw-r--r--portal-BE/src/main/java/org/onap/portal/logging/aop/EPEELFLoggerAdvice.java2
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/AdminRolesService.java21
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/AppsCacheService.java2
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/EPRoleFunctionService.java (renamed from portal-BE/src/main/java/org/onap/portal/service/fn/old/EPRoleFunctionService.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/ExternalAccessRolesService.java6
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/PersUserWidgetService.java24
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/app/FnAppDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnAppDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/app/FnAppService.java (renamed from portal-BE/src/main/java/org/onap/portal/service/fn/FnAppService.java)12
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/appContactUs/FnAppContactUsDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnAppContactUsDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/appContactUs/FnAppContactUsService.java22
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/appFunction/EpAppFunctionDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/ep/EpAppFunctionDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/appFunction/EpAppFunctionService.java (renamed from portal-BE/src/main/java/org/onap/portal/service/ep/EpAppFunctionService.java)8
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/appRoleFunction/EpAppRoleFunctionDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/ep/EpAppRoleFunctionDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/appRoleFunction/EpAppRoleFunctionService.java62
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/auditLog/FnAuditLogDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnAuditLogDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/auditLog/FnAuditLogService.java22
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/basicAuthAccount/EpBasicAuthAccountDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/ep/EpBasicAuthAccountDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/basicAuthAccount/EpBasicAuthAccountService.java20
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/commonWidgetData/FnCommonWidgetDataDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnCommonWidgetDataDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/commonWidgetData/FnCommonWidgetDataService.java22
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/displayText/FnDisplayTextDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnDisplayTextDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/displayText/FnDisplayTextService.java22
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/function/FnFunctionDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnFunctionDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/function/FnFunctionService.java22
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/language/FnLanguageDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnLanguageDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/language/FnLanguageService.java (renamed from portal-BE/src/main/java/org/onap/portal/service/fn/FnLanguageService.java)12
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/luActivity/FnLuActivityDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnLuActivityDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/luActivity/FnLuActivityService.java22
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/luAlertMethod/FnLuAlertMethodDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnLuAlertMethodDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/luAlertMethod/FnLuAlertMethodService.java22
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/luMenuSet/FnLuMenuSetDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnLuMenuSetDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/luMenuSet/FnLuMenuSetService.java20
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/luPriority/FnLuPriorityDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnLuPriorityDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/luPriority/FnLuPriorityService.java22
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/luTabSet/FnLuTabSetDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnLuTabSetDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/luTabSet/FnLuTabSetService.java20
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/luTimezone/FnLuTimezoneDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnLuTimezoneDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/luTimezone/FnLuTimezoneService.java (renamed from portal-BE/src/main/java/org/onap/portal/service/fn/FnLuTimezoneService.java)9
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/menu/FnMenuDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnMenuDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/menu/FnMenuService.java22
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/menuFunctional/FnMenuFunctionalDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnMenuFunctionalDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/menuFunctional/FnMenuFunctionalService.java (renamed from portal-BE/src/main/java/org/onap/portal/service/fn/FnMenuFunctionalService.java)7
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/menuFunctionalAncestors/FnMenuFunctionalAncestorsDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnMenuFunctionalAncestorsDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/menuFunctionalAncestors/FnMenuFunctionalAncestorsService.java22
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/menuFunctionalRoles/FnMenuFunctionalRolesDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnMenuFunctionalRolesDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/menuFunctionalRoles/FnMenuFunctionalRolesService.java (renamed from portal-BE/src/main/java/org/onap/portal/service/fn/FnMenuFunctionalRolesService.java)7
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/microservice/EpMicroserviceDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/ep/EpMicroserviceDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/microservice/EpMicroserviceService.java22
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/microserviceParameter/EpMicroserviceParameterDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/ep/EpMicroserviceParameterDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/microserviceParameter/EpMicroserviceParameterService.java (renamed from portal-BE/src/main/java/org/onap/portal/service/ep/EpMicroserviceParameterService.java)8
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/persUserAppSel/FnPersUserAppSelDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnPersUserAppSelDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/persUserAppSel/FnPersUserAppSelService.java22
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/persUserAppSort/EpPersUserAppSortDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/ep/EpPersUserAppSortDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/persUserAppSort/EpPersUserAppSortService.java20
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/persUserWidgetSel/EpPersUserWidgetSelDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/ep/EpPersUserWidgetSelDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/persUserWidgetSel/EpPersUserWidgetSelService.java32
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/qzCronTriggers/FnQzCronTriggersDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnQzCronTriggersDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/qzCronTriggers/FnQzCronTriggersService.java15
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/qzJobDetails/FnQzJobDetailsDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnQzJobDetailsDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/qzJobDetails/FnQzJobDetailsService.java22
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/qzLocks/FnQzLocksDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnQzLocksDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/qzLocks/FnQzLocksService.java22
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/qzSchedulerState/FnQzSchedulerStateDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnQzSchedulerStateDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/qzSchedulerState/FnQzSchedulerStateService.java20
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/qzTriggers/FnQzTriggersDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnQzTriggersDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/qzTriggers/FnQzTriggersService.java15
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/restrictedUrl/FnRestrictedUrlDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnRestrictedUrlDao.java)5
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/restrictedUrl/FnRestrictedUrlService.java15
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/role/FnRoleDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnRoleDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/role/FnRoleService.java (renamed from portal-BE/src/main/java/org/onap/portal/service/fn/FnRoleService.java)9
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/roleComposite/FnRoleCompositeDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnRoleCompositeDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/roleComposite/FnRoleCompositeService.java15
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/roleFunction/FnRoleFunctionDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnRoleFunctionDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/roleFunction/FnRoleFunctionService.java22
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/sharedContext/FnSharedContextDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnSharedContextDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/sharedContext/FnSharedContextService.java22
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/tab/FnTabDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnTabDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/tab/FnTabService.java22
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/tabSelected/FnTabSelectedDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnTabSelectedDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/tabSelected/FnTabSelectedService.java15
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/user/FnUserDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnUserDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/user/FnUserService.java (renamed from portal-BE/src/main/java/org/onap/portal/service/fn/FnUserService.java)22
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/userRole/FnUserRoleDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnUserRoleDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/userRole/FnUserRoleService.java (renamed from portal-BE/src/main/java/org/onap/portal/service/fn/FnUserRoleService.java)15
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/userRolesRequest/EpUserRolesRequestDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/ep/EpUserRolesRequestDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/userRolesRequest/EpUserRolesRequestService.java (renamed from portal-BE/src/main/java/org/onap/portal/service/ep/EpUserRolesRequestService.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/userRolesRequestDet/EpUserRolesRequestDetDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/ep/EpUserRolesRequestDetDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/userRolesRequestDet/EpUserRolesRequestDetService.java (renamed from portal-BE/src/main/java/org/onap/portal/service/ep/EpUserRolesRequestDetService.java)3
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/widget/FnWidgetDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/FnWidgetDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/widget/WidgetService.java (renamed from portal-BE/src/main/java/org/onap/portal/service/WidgetService.java)7
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/widgetCatalog/EpWidgetCatalogDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/fn/EpWidgetCatalogDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/widgetCatalog/EpWidgetCatalogService.java (renamed from portal-BE/src/main/java/org/onap/portal/service/ep/EpWidgetCatalogService.java)14
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/widgetCatalogParameter/EpWidgetCatalogParameterDao.java (renamed from portal-BE/src/main/java/org/onap/portal/dao/ep/EpWidgetCatalogParameterDao.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/widgetCatalogParameter/EpWidgetCatalogParameterService.java (renamed from portal-BE/src/main/java/org/onap/portal/service/ep/EpWidgetCatalogParameterService.java)4
-rw-r--r--portal-BE/src/main/java/org/onap/portal/utils/EPUserUtils.java2
-rw-r--r--portal-BE/src/test/java/org/onap/portal/controller/LanguageControllerTest.java14
-rw-r--r--portal-BE/src/test/java/org/onap/portal/controller/UserControllerTest.java2
-rw-r--r--portal-BE/src/test/java/org/onap/portal/controller/UserRolesControllerTest.java10
-rw-r--r--portal-BE/src/test/java/org/onap/portal/controller/WidgetsCatalogControllerTest.java15
-rw-r--r--portal-BE/src/test/java/org/onap/portal/controller/WidgetsControllerTest.java40
-rw-r--r--portal-BE/src/test/java/org/onap/portal/service/ep/EpMicroserviceParameterServiceTest.java1
-rw-r--r--portal-BE/src/test/java/org/onap/portal/service/ep/EpWidgetCatalogParameterServiceTest.java19
-rw-r--r--portal-BE/src/test/java/org/onap/portal/service/fn/FnUserRoleServiceTest.java2
-rw-r--r--portal-BE/src/test/java/org/onap/portal/service/fn/FnUserServiceTest.java8
116 files changed, 1101 insertions, 459 deletions
diff --git a/portal-BE/src/main/java/org/onap/portal/PortalApplication.java b/portal-BE/src/main/java/org/onap/portal/PortalApplication.java
index cf6f9d7a..047880ab 100644
--- a/portal-BE/src/main/java/org/onap/portal/PortalApplication.java
+++ b/portal-BE/src/main/java/org/onap/portal/PortalApplication.java
@@ -48,7 +48,7 @@ import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
@SpringBootApplication
@EntityScan("org.onap.portal.domain")
-@EnableJpaRepositories("org.onap.portal.dao")
+@EnableJpaRepositories("org.onap.portal.service")
public class PortalApplication {
public static void main(String[] args) {
diff --git a/portal-BE/src/main/java/org/onap/portal/aop/service/FnLanguageServiceAOP.java b/portal-BE/src/main/java/org/onap/portal/aop/service/FnLanguageServiceAOP.java
index 4b48ae41..b62e7f7a 100644
--- a/portal-BE/src/main/java/org/onap/portal/aop/service/FnLanguageServiceAOP.java
+++ b/portal-BE/src/main/java/org/onap/portal/aop/service/FnLanguageServiceAOP.java
@@ -60,7 +60,7 @@ public class FnLanguageServiceAOP {
@Autowired
private DataValidator dataValidator;
- @Before("execution(* org.onap.portal.service.fn.FnLanguageService.save(..)) && args(fnLanguage)")
+ @Before("execution(* org.onap.portal.service.language.FnLanguageService.save(..)) && args(fnLanguage)")
public void save(final FnLanguage fnLanguage) {
if (fnLanguage == null) {
LOGGER.info("User " + " try to save NULL fnLanguage");
@@ -75,7 +75,7 @@ public class FnLanguageServiceAOP {
}
}
- @Before("execution(* org.onap.portal.service.fn.FnLanguageService.getLanguageList(..)) && args(principal)")
+ @Before("execution(* org.onap.portal.service.language.FnLanguageService.getLanguageList(..)) && args(principal)")
public void getLanguageList(final Principal principal) {
LOGGER.info("User " + principal.getName() + " try requested for all language list");
}
diff --git a/portal-BE/src/main/java/org/onap/portal/aop/service/FnUserServiceAOP.java b/portal-BE/src/main/java/org/onap/portal/aop/service/FnUserServiceAOP.java
index f891392e..5cbec719 100644
--- a/portal-BE/src/main/java/org/onap/portal/aop/service/FnUserServiceAOP.java
+++ b/portal-BE/src/main/java/org/onap/portal/aop/service/FnUserServiceAOP.java
@@ -68,7 +68,7 @@ public class FnUserServiceAOP {
this.fnUserMapper = fnUserMapper;
}
- @Before("execution(* org.onap.portal.service.fn.FnUserService.saveFnUser(..)) && args(principal, fnUser)")
+ @Before("execution(* org.onap.portal.service.user.FnUserService.saveFnUser(..)) && args(principal, fnUser)")
public void save(final Principal principal, final FnUser fnUser) {
FnUser user;
if (fnUser == null) {
diff --git a/portal-BE/src/main/java/org/onap/portal/aop/service/WidgetServiceAOP.java b/portal-BE/src/main/java/org/onap/portal/aop/service/WidgetServiceAOP.java
index 14172937..c1357e2a 100644
--- a/portal-BE/src/main/java/org/onap/portal/aop/service/WidgetServiceAOP.java
+++ b/portal-BE/src/main/java/org/onap/portal/aop/service/WidgetServiceAOP.java
@@ -23,7 +23,7 @@ public class WidgetServiceAOP {
this.dataValidator = dataValidator;
}
- @Before("execution(* org.onap.portal.service.WidgetService.setOnboardingWidget(..)) && args(userId, onboardingWidget)")
+ @Before("execution(* org.onap.portal.service.widget.WidgetService.setOnboardingWidget(..)) && args(userId, onboardingWidget)")
public void setOnboardingWidget(final Long userId, OnboardingWidget onboardingWidget) {
if (!dataValidator.isValid(onboardingWidget)) {
throw new IllegalArgumentException(dataValidator.getConstraintViolationsString(onboardingWidget));
diff --git a/portal-BE/src/main/java/org/onap/portal/configuration/DBInitializingBean.java b/portal-BE/src/main/java/org/onap/portal/configuration/DBInitializingBean.java
index ebd23cd9..3f5b3883 100644
--- a/portal-BE/src/main/java/org/onap/portal/configuration/DBInitializingBean.java
+++ b/portal-BE/src/main/java/org/onap/portal/configuration/DBInitializingBean.java
@@ -40,196 +40,142 @@
package org.onap.portal.configuration;
+import org.onap.portal.domain.db.ep.*;
+import org.onap.portal.domain.db.fn.*;
+import org.onap.portal.service.app.FnAppService;
+import org.onap.portal.service.appContactUs.FnAppContactUsService;
+import org.onap.portal.service.appFunction.EpAppFunctionService;
+import org.onap.portal.service.appRoleFunction.EpAppRoleFunctionService;
+import org.onap.portal.service.auditLog.FnAuditLogService;
+import org.onap.portal.service.basicAuthAccount.EpBasicAuthAccountService;
+import org.onap.portal.service.commonWidgetData.FnCommonWidgetDataService;
+import org.onap.portal.service.displayText.FnDisplayTextService;
+import org.onap.portal.service.function.FnFunctionService;
+import org.onap.portal.service.language.FnLanguageService;
+import org.onap.portal.service.luActivity.FnLuActivityService;
+import org.onap.portal.service.luAlertMethod.FnLuAlertMethodService;
+import org.onap.portal.service.luMenuSet.FnLuMenuSetService;
+import org.onap.portal.service.luPriority.FnLuPriorityService;
+import org.onap.portal.service.luTabSet.FnLuTabSetService;
+import org.onap.portal.service.luTimezone.FnLuTimezoneService;
+import org.onap.portal.service.menu.FnMenuService;
+import org.onap.portal.service.menuFunctional.FnMenuFunctionalService;
+import org.onap.portal.service.menuFunctionalAncestors.FnMenuFunctionalAncestorsService;
+import org.onap.portal.service.menuFunctionalRoles.FnMenuFunctionalRolesService;
+import org.onap.portal.service.microservice.EpMicroserviceService;
+import org.onap.portal.service.microserviceParameter.EpMicroserviceParameterService;
+import org.onap.portal.service.persUserAppSel.FnPersUserAppSelService;
+import org.onap.portal.service.persUserAppSort.EpPersUserAppSortService;
+import org.onap.portal.service.qzCronTriggers.FnQzCronTriggersService;
+import org.onap.portal.service.qzJobDetails.FnQzJobDetailsService;
+import org.onap.portal.service.qzLocks.FnQzLocksService;
+import org.onap.portal.service.qzSchedulerState.FnQzSchedulerStateService;
+import org.onap.portal.service.qzTriggers.FnQzTriggersService;
+import org.onap.portal.service.restrictedUrl.FnRestrictedUrlService;
+import org.onap.portal.service.role.FnRoleService;
+import org.onap.portal.service.roleComposite.FnRoleCompositeService;
+import org.onap.portal.service.roleFunction.FnRoleFunctionService;
+import org.onap.portal.service.sharedContext.FnSharedContextService;
+import org.onap.portal.service.tab.FnTabService;
+import org.onap.portal.service.tabSelected.FnTabSelectedService;
+import org.onap.portal.service.user.FnUserService;
+import org.onap.portal.service.userRole.FnUserRoleService;
+import org.onap.portal.service.widgetCatalog.EpWidgetCatalogService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.stereotype.Component;
+
import java.math.BigInteger;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import org.onap.portal.dao.ep.EpAppFunctionDao;
-import org.onap.portal.dao.ep.EpAppRoleFunctionDao;
-import org.onap.portal.dao.ep.EpBasicAuthAccountDao;
-import org.onap.portal.dao.ep.EpMicroserviceDao;
-import org.onap.portal.dao.ep.EpMicroserviceParameterDao;
-import org.onap.portal.dao.ep.EpPersUserAppSortDao;
-import org.onap.portal.dao.fn.EpWidgetCatalogDao;
-import org.onap.portal.dao.fn.FnAppContactUsDao;
-import org.onap.portal.dao.fn.FnAppDao;
-import org.onap.portal.dao.fn.FnAuditLogDao;
-import org.onap.portal.dao.fn.FnCommonWidgetDataDao;
-import org.onap.portal.dao.fn.FnDisplayTextDao;
-import org.onap.portal.dao.fn.FnFunctionDao;
-import org.onap.portal.dao.fn.FnLanguageDao;
-import org.onap.portal.dao.fn.FnLuActivityDao;
-import org.onap.portal.dao.fn.FnLuAlertMethodDao;
-import org.onap.portal.dao.fn.FnLuMenuSetDao;
-import org.onap.portal.dao.fn.FnLuPriorityDao;
-import org.onap.portal.dao.fn.FnLuTabSetDao;
-import org.onap.portal.dao.fn.FnLuTimezoneDao;
-import org.onap.portal.dao.fn.FnMenuDao;
-import org.onap.portal.dao.fn.FnMenuFunctionalAncestorsDao;
-import org.onap.portal.dao.fn.FnMenuFunctionalDao;
-import org.onap.portal.dao.fn.FnMenuFunctionalRolesDao;
-import org.onap.portal.dao.fn.FnPersUserAppSelDao;
-import org.onap.portal.dao.fn.FnQzCronTriggersDao;
-import org.onap.portal.dao.fn.FnQzJobDetailsDao;
-import org.onap.portal.dao.fn.FnQzLocksDao;
-import org.onap.portal.dao.fn.FnQzSchedulerStateDao;
-import org.onap.portal.dao.fn.FnQzTriggersDao;
-import org.onap.portal.dao.fn.FnRestrictedUrlDao;
-import org.onap.portal.dao.fn.FnRoleCompositeDao;
-import org.onap.portal.dao.fn.FnRoleDao;
-import org.onap.portal.dao.fn.FnRoleFunctionDao;
-import org.onap.portal.dao.fn.FnSharedContextDao;
-import org.onap.portal.dao.fn.FnTabDao;
-import org.onap.portal.dao.fn.FnTabSelectedDao;
-import org.onap.portal.dao.fn.FnUserDao;
-import org.onap.portal.dao.fn.FnUserRoleDao;
-import org.onap.portal.domain.db.ep.EpAppFunction;
-import org.onap.portal.domain.db.ep.EpAppRoleFunction;
-import org.onap.portal.domain.db.ep.EpBasicAuthAccount;
-import org.onap.portal.domain.db.ep.EpMicroservice;
-import org.onap.portal.domain.db.ep.EpMicroserviceParameter;
-import org.onap.portal.domain.db.ep.EpPersUserAppSort;
-import org.onap.portal.domain.db.ep.EpWidgetCatalog;
-import org.onap.portal.domain.db.fn.FnApp;
-import org.onap.portal.domain.db.fn.FnAppContactUs;
-import org.onap.portal.domain.db.fn.FnAuditLog;
-import org.onap.portal.domain.db.fn.FnCommonWidgetData;
-import org.onap.portal.domain.db.fn.FnDisplayText;
-import org.onap.portal.domain.db.fn.FnFunction;
-import org.onap.portal.domain.db.fn.FnLanguage;
-import org.onap.portal.domain.db.fn.FnLuActivity;
-import org.onap.portal.domain.db.fn.FnLuAlertMethod;
-import org.onap.portal.domain.db.fn.FnLuMenuSet;
-import org.onap.portal.domain.db.fn.FnLuPriority;
-import org.onap.portal.domain.db.fn.FnLuTabSet;
-import org.onap.portal.domain.db.fn.FnLuTimezone;
-import org.onap.portal.domain.db.fn.FnMenu;
-import org.onap.portal.domain.db.fn.FnMenuFunctional;
-import org.onap.portal.domain.db.fn.FnMenuFunctionalAncestors;
-import org.onap.portal.domain.db.fn.FnMenuFunctionalRoles;
-import org.onap.portal.domain.db.fn.FnPersUserAppSel;
-import org.onap.portal.domain.db.fn.FnQzCronTriggers;
-import org.onap.portal.domain.db.fn.FnQzJobDetails;
-import org.onap.portal.domain.db.fn.FnQzLocks;
-import org.onap.portal.domain.db.fn.FnQzSchedulerState;
-import org.onap.portal.domain.db.fn.FnQzTriggers;
-import org.onap.portal.domain.db.fn.FnRestrictedUrl;
-import org.onap.portal.domain.db.fn.FnRole;
-import org.onap.portal.domain.db.fn.FnRoleComposite;
-import org.onap.portal.domain.db.fn.FnRoleFunction;
-import org.onap.portal.domain.db.fn.FnSharedContext;
-import org.onap.portal.domain.db.fn.FnTab;
-import org.onap.portal.domain.db.fn.FnTabSelected;
-import org.onap.portal.domain.db.fn.FnUser;
-import org.onap.portal.domain.db.fn.FnUserRole;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
@Component
public class DBInitializingBean implements org.springframework.beans.factory.InitializingBean {
- private final FnAppDao fnAppDao;
- private final EpAppFunctionDao epAppFunctionDao;
- private final FnRoleDao fnRoleDao;
- private final EpAppRoleFunctionDao epAppRoleFunctionDao;
- private final EpBasicAuthAccountDao epBasicAuthAccountDao;
- private final EpMicroserviceDao epMicroserviceDao;
- private final EpMicroserviceParameterDao epMicroserviceParameterDao;
- private final EpWidgetCatalogDao epWidgetCatalogDao;
- private final FnAppContactUsDao fnAppContactUsDao;
- private final FnCommonWidgetDataDao fnCommonWidgetDataDao;
- private final FnLanguageDao fnLanguageDao;
- private final FnDisplayTextDao fnDisplayTextDao;
- private final FnFunctionDao fnFunctionDao;
- private final FnLuActivityDao fnLuActivityDao;
- private final FnLuAlertMethodDao fnLuAlertMethodDao;
- private final FnLuMenuSetDao fnLuMenuSetDao;
- private final FnLuPriorityDao fnLuPriorityDao;
- private final FnLuTimezoneDao fnLuTimezoneDao;
- private final FnMenuDao fnMenuDao;
- private final FnMenuFunctionalDao fnMenuFunctionalDao;
- private final FnMenuFunctionalAncestorsDao fnMenuFunctionalAncestorsDao;
- private final FnMenuFunctionalRolesDao fnMenuFunctionalRolesDao;
- private final FnQzJobDetailsDao fnQzJobDetailsDao;
- private final FnQzLocksDao fnQzLocksDao;
- private final FnQzSchedulerStateDao fnQzSchedulerStateDao;
- private final FnQzTriggersDao fnQzTriggersDao;
- private final FnQzCronTriggersDao fnQzCronTriggersDao;
- private final FnRestrictedUrlDao fnRestrictedUrlDao;
- private final FnRoleCompositeDao fnRoleCompositeDao;
- private final FnRoleFunctionDao fnRoleFunctionDao;
- private final FnSharedContextDao fnSharedContextDao;
- private final FnLuTabSetDao fnLuTabSetDao;
- private final FnTabDao fnTabDao;
- private final FnTabSelectedDao fnTabSelectedDao;
- private final FnUserDao fnUserDao;
- private final EpPersUserAppSortDao epPersUserAppSortDao;
- private final FnPersUserAppSelDao fnPersUserAppSelDao;
- private final FnAuditLogDao fnAuditLogDao;
- private final FnUserRoleDao fnUserRoleDao;
+ private final FnAppService fnAppService;
+ private final EpAppFunctionService epAppFunctionService;
+ private final FnRoleService fnRoleService;
+ private final EpAppRoleFunctionService epAppRoleFunctionService;
+ private final EpBasicAuthAccountService epBasicAuthAccountService;
+ private final EpMicroserviceService epMicroserviceService;
+ private final EpMicroserviceParameterService epMicroserviceParameterService;
+ private final EpWidgetCatalogService epWidgetCatalogService;
+ private final FnAppContactUsService fnAppContactUsService;
+ private final FnCommonWidgetDataService fnCommonWidgetDataService;
+ private final FnLanguageService fnLanguageService;
+ private final FnDisplayTextService fnDisplayTextService;
+ private final FnFunctionService fnFunctionService;
+ private final FnLuActivityService fnLuActivityService;
+ private final FnLuAlertMethodService fnLuAlertMethodService;
+ private final FnLuMenuSetService fnLuMenuSetService;
+ private final FnLuPriorityService fnLuPriorityService;
+ private final FnLuTimezoneService fnLuTimezoneService;
+ private final FnMenuService fnMenuService;
+ private final FnMenuFunctionalService fnMenuFunctionalService;
+ private final FnMenuFunctionalAncestorsService fnMenuFunctionalAncestorsService;
+ private final FnMenuFunctionalRolesService fnMenuFunctionalRolesService;
+ private final FnQzJobDetailsService fnQzJobDetailsService;
+ private final FnQzLocksService fnQzLocksService;
+ private final FnQzSchedulerStateService fnQzSchedulerStateService;
+ private final FnQzTriggersService fnQzTriggersService;
+ private final FnQzCronTriggersService fnQzCronTriggersService;
+ private final FnRestrictedUrlService fnRestrictedUrlService;
+ private final FnRoleCompositeService fnRoleCompositeService;
+ private final FnRoleFunctionService fnRoleFunctionService;
+ private final FnSharedContextService fnSharedContextService;
+ private final FnLuTabSetService fnLuTabSetService;
+ private final FnTabService fnTabService;
+ private final FnTabSelectedService fnTabSelectedService;
+ private final FnUserService fnUserService;
+ private final EpPersUserAppSortService epPersUserAppSortService;
+ private final FnPersUserAppSelService fnPersUserAppSelService;
+ private final FnAuditLogService fnAuditLogService;
+ private final FnUserRoleService fnUserRoleService;
@Autowired
- public DBInitializingBean(FnAppDao fnAppDao, EpAppFunctionDao epAppFunctionDao,
- FnRoleDao fnRoleDao, EpAppRoleFunctionDao epAppRoleFunctionDao,
- EpBasicAuthAccountDao epBasicAuthAccountDao, EpMicroserviceDao epMicroserviceDao,
- EpMicroserviceParameterDao epMicroserviceParameterDao,
- EpWidgetCatalogDao epWidgetCatalogDao, FnAppContactUsDao fnAppContactUsDao,
- FnCommonWidgetDataDao fnCommonWidgetDataDao, FnLanguageDao fnLanguageDao,
- FnDisplayTextDao fnDisplayTextDao, FnFunctionDao fnFunctionDao,
- FnLuActivityDao fnLuActivityDao, FnLuAlertMethodDao fnLuAlertMethodDao,
- FnLuMenuSetDao fnLuMenuSetDao, FnLuPriorityDao fnLuPriorityDao,
- FnLuTimezoneDao fnLuTimezoneDao, FnMenuDao fnMenuDao,
- FnMenuFunctionalDao fnMenuFunctionalDao,
- FnMenuFunctionalAncestorsDao fnMenuFunctionalAncestorsDao,
- FnMenuFunctionalRolesDao fnMenuFunctionalRolesDao, FnQzJobDetailsDao fnQzJobDetailsDao,
- FnQzLocksDao fnQzLocksDao, FnQzSchedulerStateDao fnQzSchedulerStateDao,
- FnQzTriggersDao fnQzTriggersDao, FnQzCronTriggersDao fnQzCronTriggersDao,
- FnRestrictedUrlDao fnRestrictedUrlDao, FnRoleCompositeDao fnRoleCompositeDao,
- FnRoleFunctionDao fnRoleFunctionDao, FnSharedContextDao fnSharedContextDao,
- FnLuTabSetDao fnLuTabSetDao, FnTabDao fnTabDao, FnTabSelectedDao fnTabSelectedDao,
- FnUserDao fnUserDao, EpPersUserAppSortDao epPersUserAppSortDao,
- FnPersUserAppSelDao fnPersUserAppSelDao, FnAuditLogDao fnAuditLogDao,
- FnUserRoleDao fnUserRoleDao) {
- this.fnAppDao = fnAppDao;
- this.epAppFunctionDao = epAppFunctionDao;
- this.fnRoleDao = fnRoleDao;
- this.epAppRoleFunctionDao = epAppRoleFunctionDao;
- this.epBasicAuthAccountDao = epBasicAuthAccountDao;
- this.epMicroserviceDao = epMicroserviceDao;
- this.epMicroserviceParameterDao = epMicroserviceParameterDao;
- this.epWidgetCatalogDao = epWidgetCatalogDao;
- this.fnAppContactUsDao = fnAppContactUsDao;
- this.fnCommonWidgetDataDao = fnCommonWidgetDataDao;
- this.fnLanguageDao = fnLanguageDao;
- this.fnDisplayTextDao = fnDisplayTextDao;
- this.fnFunctionDao = fnFunctionDao;
- this.fnLuActivityDao = fnLuActivityDao;
- this.fnLuAlertMethodDao = fnLuAlertMethodDao;
- this.fnLuMenuSetDao = fnLuMenuSetDao;
- this.fnLuPriorityDao = fnLuPriorityDao;
- this.fnLuTimezoneDao = fnLuTimezoneDao;
- this.fnMenuDao = fnMenuDao;
- this.fnMenuFunctionalDao = fnMenuFunctionalDao;
- this.fnMenuFunctionalAncestorsDao = fnMenuFunctionalAncestorsDao;
- this.fnMenuFunctionalRolesDao = fnMenuFunctionalRolesDao;
- this.fnQzJobDetailsDao = fnQzJobDetailsDao;
- this.fnQzLocksDao = fnQzLocksDao;
- this.fnQzSchedulerStateDao = fnQzSchedulerStateDao;
- this.fnQzTriggersDao = fnQzTriggersDao;
- this.fnQzCronTriggersDao = fnQzCronTriggersDao;
- this.fnRestrictedUrlDao = fnRestrictedUrlDao;
- this.fnRoleCompositeDao = fnRoleCompositeDao;
- this.fnRoleFunctionDao = fnRoleFunctionDao;
- this.fnSharedContextDao = fnSharedContextDao;
- this.fnLuTabSetDao = fnLuTabSetDao;
- this.fnTabDao = fnTabDao;
- this.fnTabSelectedDao = fnTabSelectedDao;
- this.fnUserDao = fnUserDao;
- this.epPersUserAppSortDao = epPersUserAppSortDao;
- this.fnPersUserAppSelDao = fnPersUserAppSelDao;
- this.fnAuditLogDao = fnAuditLogDao;
- this.fnUserRoleDao = fnUserRoleDao;
+ public DBInitializingBean(FnAppService fnAppService, EpAppFunctionService epAppFunctionService, FnRoleService fnRoleService, EpAppRoleFunctionService epAppRoleFunctionService, EpBasicAuthAccountService epBasicAuthAccountService, EpMicroserviceService epMicroserviceService, EpMicroserviceParameterService epMicroserviceParameterService, EpWidgetCatalogService epWidgetCatalogService, FnAppContactUsService fnAppContactUsService, FnCommonWidgetDataService fnCommonWidgetDataService, FnLanguageService fnLanguageService, FnDisplayTextService fnDisplayTextService, FnFunctionService fnFunctionService, FnLuActivityService fnLuActivityService, FnLuAlertMethodService fnLuAlertMethodService, FnLuMenuSetService fnLuMenuSetService, FnLuPriorityService fnLuPriorityService, FnLuTimezoneService fnLuTimezoneService, FnMenuService fnMenuService, FnMenuFunctionalService fnMenuFunctionalService, FnMenuFunctionalAncestorsService fnMenuFunctionalAncestorsService, FnMenuFunctionalRolesService fnMenuFunctionalRolesService, FnQzJobDetailsService fnQzJobDetailsService, FnQzLocksService fnQzLocksService, FnQzSchedulerStateService fnQzSchedulerStateService, FnQzTriggersService fnQzTriggersService, FnQzCronTriggersService fnQzCronTriggersService, FnRestrictedUrlService fnRestrictedUrlService, FnRoleCompositeService fnRoleCompositeService, FnRoleFunctionService fnRoleFunctionService, FnSharedContextService fnSharedContextService, FnLuTabSetService fnLuTabSetService, FnTabService fnTabService, FnTabSelectedService fnTabSelectedService, FnUserService fnUserService, EpPersUserAppSortService epPersUserAppSortService, FnPersUserAppSelService fnPersUserAppSelService, FnAuditLogService fnAuditLogService, FnUserRoleService fnUserRoleService) {
+ this.fnAppService = fnAppService;
+ this.epAppFunctionService = epAppFunctionService;
+ this.fnRoleService = fnRoleService;
+ this.epAppRoleFunctionService = epAppRoleFunctionService;
+ this.epBasicAuthAccountService = epBasicAuthAccountService;
+ this.epMicroserviceService = epMicroserviceService;
+ this.epMicroserviceParameterService = epMicroserviceParameterService;
+ this.epWidgetCatalogService = epWidgetCatalogService;
+ this.fnAppContactUsService = fnAppContactUsService;
+ this.fnCommonWidgetDataService = fnCommonWidgetDataService;
+ this.fnLanguageService = fnLanguageService;
+ this.fnDisplayTextService = fnDisplayTextService;
+ this.fnFunctionService = fnFunctionService;
+ this.fnLuActivityService = fnLuActivityService;
+ this.fnLuAlertMethodService = fnLuAlertMethodService;
+ this.fnLuMenuSetService = fnLuMenuSetService;
+ this.fnLuPriorityService = fnLuPriorityService;
+ this.fnLuTimezoneService = fnLuTimezoneService;
+ this.fnMenuService = fnMenuService;
+ this.fnMenuFunctionalService = fnMenuFunctionalService;
+ this.fnMenuFunctionalAncestorsService = fnMenuFunctionalAncestorsService;
+ this.fnMenuFunctionalRolesService = fnMenuFunctionalRolesService;
+ this.fnQzJobDetailsService = fnQzJobDetailsService;
+ this.fnQzLocksService = fnQzLocksService;
+ this.fnQzSchedulerStateService = fnQzSchedulerStateService;
+ this.fnQzTriggersService = fnQzTriggersService;
+ this.fnQzCronTriggersService = fnQzCronTriggersService;
+ this.fnRestrictedUrlService = fnRestrictedUrlService;
+ this.fnRoleCompositeService = fnRoleCompositeService;
+ this.fnRoleFunctionService = fnRoleFunctionService;
+ this.fnSharedContextService = fnSharedContextService;
+ this.fnLuTabSetService = fnLuTabSetService;
+ this.fnTabService = fnTabService;
+ this.fnTabSelectedService = fnTabSelectedService;
+ this.fnUserService = fnUserService;
+ this.epPersUserAppSortService = epPersUserAppSortService;
+ this.fnPersUserAppSelService = fnPersUserAppSelService;
+ this.fnAuditLogService = fnAuditLogService;
+ this.fnUserRoleService = fnUserRoleService;
}
@Override
@@ -472,7 +418,7 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
.authNamespace(null)
.build();
List<FnApp> fnApps = new ArrayList<>(Arrays.asList(app, app2, app3, app4, app5, app6, app7, app8, app9, app10));
- fnAppDao.saveAll(fnApps);
+ fnAppService.saveAll(fnApps);
// EP_APP_FUNCTION TABLE
@@ -535,7 +481,7 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
function10, function11, function12, function13, function14, function15, function16, function17, function18,
function19, function20, function21, function22, function23, function24, function25, function26,
function27));
- epAppFunctionDao.saveAll(epAppFunctions);
+ epAppFunctionService.saveAll(epAppFunctions);
// FN_ROLE TABLE
@@ -565,7 +511,7 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
List<FnRole> fnRoles = new ArrayList<>(Arrays
.asList(fnRole1, fnRole16, fnRole900, fnRole950, fnRole999, fnRole1000, fnRole1001, fnRole1002, fnRole1003, fnRole1004, fnRole1005,
fnRole1006, fnRole1007, fnRole1008, fnRole1009, fnRole1010, fnRole1011, fnRole1012, fnRole2115));
- fnRoleDao.saveAll(fnRoles);
+ fnRoleService.saveAll(fnRoles);
// EP_APP_ROLE_FUNCTION TABLE
@@ -634,10 +580,10 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
epAppRoleFunction21, epAppRoleFunction22, epAppRoleFunction23, epAppRoleFunction24, epAppRoleFunction25,
epAppRoleFunction26, epAppRoleFunction27, epAppRoleFunction28));
- epAppRoleFunctionDao.saveAll(epAppRoleFunctions);
+ epAppRoleFunctionService.saveAll(epAppRoleFunctions);
EpBasicAuthAccount epBasicAuthAccount = EpBasicAuthAccount.builder().extAppName("JIRA").username("jira").password("6APqvG4AU2rfLgCvMdySwQ==").activeYn(true).build();
- epBasicAuthAccountDao.save(epBasicAuthAccount);
+ epBasicAuthAccountService.save(epBasicAuthAccount);
// EP_MICROSERVICE TABLE
@@ -648,7 +594,7 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
List<EpMicroservice> epMicroservices = new ArrayList<>(Arrays.asList(epMicroservice1, epMicroservice2, epMicroservice3, epMicroservice4));
- epMicroserviceDao.saveAll(epMicroservices);
+ epMicroserviceService.saveAll(epMicroservices);
// ep_microservice_parameter table
@@ -659,7 +605,7 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
List<EpMicroserviceParameter> epMicroserviceParameters = new ArrayList<>(Arrays.asList(parameter1, parameter2, parameter3, parameter4));
- epMicroserviceParameterDao.saveAll(epMicroserviceParameters);
+ epMicroserviceParameterService.saveAll(epMicroserviceParameters);
// ep_widget_catalog table
//TODO should we connect serviceId to EpMicroservice?
@@ -671,7 +617,7 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
List<EpWidgetCatalog> epWidgetCatalogs = new ArrayList<>(Arrays.asList(epWidgetCatalog1, epWidgetCatalog2, epWidgetCatalog3, epWidgetCatalog4));
- epWidgetCatalogDao.saveAll(epWidgetCatalogs);
+ epWidgetCatalogService.saveAll(epWidgetCatalogs);
// ep_widget_catalog_files table
//TODO
@@ -691,7 +637,7 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
List<FnAppContactUs> fnAppContactUses = new ArrayList<>(Arrays.asList(fnAppContactUs1, fnAppContactUs2, fnAppContactUs3, fnAppContactUs4, fnAppContactUs5, fnAppContactUs6, fnAppContactUs7, fnAppContactUs8));
- fnAppContactUsDao.saveAll(fnAppContactUses);
+ fnAppContactUsService.saveAll(fnAppContactUses);
// fn_common_widget_data table
@@ -708,15 +654,15 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
List<FnCommonWidgetData> fnCommonWidgetDataList = new ArrayList<>(Arrays.asList(fnCommonWidgetData1, fnCommonWidgetData2, fnCommonWidgetData3, fnCommonWidgetData4, fnCommonWidgetData5, fnCommonWidgetData6, fnCommonWidgetData7, fnCommonWidgetData8, fnCommonWidgetData9, fnCommonWidgetData10));
- fnCommonWidgetDataDao.saveAll(fnCommonWidgetDataList);
+ fnCommonWidgetDataService.saveAll(fnCommonWidgetDataList);
// fn_language table
//TODO fix china text
FnLanguage language1 = new FnLanguage("English", "EN");
FnLanguage language2 = new FnLanguage("简体ä¸\u00ADæ–‡", "CN");
- fnLanguageDao.save(language1);
- fnLanguageDao.save(language2);
+ fnLanguageService.save(language1);
+ fnLanguageService.save(language2);
// fn_display_text table
// TODO should we change languageId from long type to FnLanguage?
@@ -754,7 +700,7 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
fnDisplayText18, fnDisplayText19, fnDisplayText20, fnDisplayText21, fnDisplayText22, fnDisplayText23, fnDisplayText24,
fnDisplayText25, fnDisplayText26));
- fnDisplayTextDao.saveAll(fnDisplayTexts);
+ fnDisplayTextService.saveAll(fnDisplayTexts);
// fn_function table
@@ -792,7 +738,7 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
menuJobDesigner, menuLogout, menuMap, menuNotes, menuProcess, menuProfile, menuProfileCreate, menuProfileImport,
menuReports, menuSample, menuTab, menuTask, menuTaskSearch, menuWebAnalytics, saveNotification, viewReports));
- fnFunctionDao.saveAll(fnFunctions);
+ fnFunctionService.saveAll(fnFunctions);
// fn_lu_activity table
@@ -830,7 +776,7 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
activity16, activity17, activity18, activity19, activity20, activity21, activity22, activity23, activity24, activity25,
tabAccess, activity27, activity28));
- fnLuActivityDao.saveAll(luActivities);
+ fnLuActivityService.saveAll(luActivities);
//fn_lu_alert_method table
@@ -842,19 +788,19 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
List<FnLuAlertMethod> alertMethods = new ArrayList<>(Arrays.asList(alertMethod1, alertMethod2, alertMethod3, alertMethod4, alertMethod5));
- fnLuAlertMethodDao.saveAll(alertMethods);
+ fnLuAlertMethodService.saveAll(alertMethods);
// fn_lu_menu_set table
FnLuMenuSet menuSet = FnLuMenuSet.builder().menuSetCd("APP").menuSetName("Application Menu").build();
- fnLuMenuSetDao.save(menuSet);
+ fnLuMenuSetService.save(menuSet);
// fn_lu_tab_set table
FnLuTabSet fnLuTabSet = FnLuTabSet.builder().tabSetCd("APP").tabSetName("Application Tabs").build();
- fnLuTabSetDao.save(fnLuTabSet);
+ fnLuTabSetService.save(fnLuTabSet);
// fn_lu_priority table
@@ -866,7 +812,7 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
List<FnLuPriority> priorities = new ArrayList<>(Arrays.asList(low, normal, high, urgent, fatal));
- fnLuPriorityDao.saveAll(priorities);
+ fnLuPriorityService.saveAll(priorities);
// fn_lu_timezone table
@@ -880,7 +826,7 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
List<FnLuTimezone> timezones = new ArrayList<>(Arrays.asList(USEastern, USCentral, USMountain, USArizona, USPacific, USAlaska, USHawaii));
- fnLuTimezoneDao.saveAll(timezones);
+ fnLuTimezoneService.saveAll(timezones);
// fn_menu table
@@ -901,7 +847,7 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
List<FnMenu> fnMenus = new ArrayList<>(Arrays.asList(menu1, menu2, menu3, menu4, menu5, menu6, menu7, menu8, menu9, menu10, menu11, menu12, menu13, menu14));
- fnMenuDao.saveAll(fnMenus);
+ fnMenuService.saveAll(fnMenus);
// fn_menu_functional table
@@ -953,7 +899,7 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
menuFunctional313, menuFunctional316, menuFunctional148, menuFunctional317, menuFunctional318, menuFunctional319));
- fnMenuFunctionalDao.saveAll(menuFunctionals);
+ fnMenuFunctionalService.saveAll(menuFunctionals);
// fn_menu_functional_ancestors table
@@ -1086,7 +1032,7 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
ancestors150, ancestors151, ancestors152, ancestors158, ancestors159, ancestors160, ancestors161, ancestors162,
ancestors163, ancestors164, ancestors165, ancestors166, ancestors167, ancestors168, ancestors169));
- fnMenuFunctionalAncestorsDao.saveAll(ancestors);
+ fnMenuFunctionalAncestorsService.saveAll(ancestors);
// fn_menu_functional_roles table
@@ -1128,7 +1074,7 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
functionalRoles22, functionalRoles23, functionalRoles24, functionalRoles25, functionalRoles26, functionalRoles27,
functionalRoles39, functionalRoles40, functionalRoles42, functionalRoles43));
- fnMenuFunctionalRolesDao.saveAll(functionalRoles);
+ fnMenuFunctionalRolesService.saveAll(functionalRoles);
// fn_qz_job_details table
@@ -1142,7 +1088,7 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
List<FnQzJobDetails> jobDetails = new ArrayList<>(Arrays.asList(fnQzJobDetails1, fnQzJobDetails2));
- fnQzJobDetailsDao.saveAll(jobDetails);
+ fnQzJobDetailsService.saveAll(jobDetails);
// fn_qz_locks table
@@ -1151,7 +1097,7 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
List<FnQzLocks> locks = new ArrayList<>(Arrays.asList(fnQzLocks1, fnQzLocks2));
- fnQzLocksDao.saveAll(locks);
+ fnQzLocksService.saveAll(locks);
// fn_qz_scheduler_state table
@@ -1159,7 +1105,7 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
.instanceName("portal-portal-app-76c9f7bfb5-s8rhd1565254283688").lastCheckinTime(BigInteger.valueOf(1565691615399L))
.checkinInterval(BigInteger.valueOf(20000L)).build();
- fnQzSchedulerStateDao.save(schedulerState);
+ fnQzSchedulerStateService.save(schedulerState);
// fn_qz_triggers table
//TODO
@@ -1168,7 +1114,7 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
List<FnQzTriggers> fnQzTriggers = new ArrayList<>(Arrays.asList(trigger1, trigger2));
- // fnQzTriggersDao.saveAll(fnQzTriggers);
+ // fnQzTriggersService.saveAll(fnQzTriggers);
// fn_qz_cron_triggers table
//TODO
@@ -1178,7 +1124,7 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
List<FnQzCronTriggers> cronTriggers = new ArrayList<>(Arrays.asList(cronTrigger1, cronTrigger2));
- //fnQzCronTriggersDao.saveAll(cronTriggers);
+ //fnQzCronTriggersService.saveAll(cronTriggers);
// fn_restricted_url table
//TODO
@@ -1231,13 +1177,13 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
url26, url27, url28, url29, url30, url31, url32, url33, url34, url35, url36, url37, url38, url39, url40, url41,
url42, url43));
- //fnRestrictedUrlDao.saveAll(urls);
+ //fnRestrictedUrlService.saveAll(urls);
// fn_role_composite table
//TODO
FnRoleComposite roleComposite = FnRoleComposite.builder().parentRoles(fnRole1).childRoles(fnRole16).build();
- //fnRoleCompositeDao.save(roleComposite);
+ //fnRoleCompositeService.save(roleComposite);
// fn_role_function table
@@ -1283,7 +1229,7 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
roleFunction23, roleFunction24, roleFunction25, roleFunction26, roleFunction27, roleFunction28, roleFunction29,
roleFunction30, roleFunction31, roleFunction32, roleFunction33, roleFunction34));
- fnRoleFunctionDao.saveAll(roleFunctions);
+ fnRoleFunctionService.saveAll(roleFunctions);
// fn_shared_context table
@@ -1304,7 +1250,7 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
List<FnSharedContext> sharedContexts = new ArrayList<>(Arrays.asList(sharedContext1, sharedContext2, sharedContext3,
sharedContext4, sharedContext5, sharedContext6, sharedContext7, sharedContext8, sharedContext9, sharedContext10, sharedContext11, sharedContext12));
- fnSharedContextDao.saveAll(sharedContexts);
+ fnSharedContextService.saveAll(sharedContexts);
// fn_tab table
@@ -1319,7 +1265,7 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
List<FnTab> fnTabs = new ArrayList<>(Arrays.asList(TAB1, TAB2, TAB2_SUB1, TAB2_SUB1_S1, TAB2_SUB2, TAB2_SUB3, TAB3, TAB4));
- fnTabDao.saveAll(fnTabs);
+ fnTabService.saveAll(fnTabs);
// fn_tab_selected table
@@ -1337,7 +1283,7 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
List<FnTabSelected> tabSelecteds = new ArrayList<>(Arrays.asList(tabSelected1, tabSelected2, tabSelected3, tabSelected4,
tabSelected5, tabSelected6, tabSelected7, tabSelected8, tabSelected9, tabSelected10));
-// fnTabSelectedDao.saveAll(tabSelecteds);
+// fnTabSelectedService.saveAll(tabSelecteds);
// fn_user table
@@ -1356,13 +1302,13 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
List<FnUser> fnUsers = new ArrayList<>(Arrays.asList(fnUser1, fnUser2, fnUser3, fnUser4, fnUser5, fnUser6, fnUser7, fnUser8, fnUser9, fnUser10, fnUser11, fnUser12));
- fnUserDao.saveAll(fnUsers);
+ fnUserService.saveAll(fnUsers);
// ep_pers_user_app_sort table
EpPersUserAppSort appSort = EpPersUserAppSort.builder().userID(fnUser1).sortPref(0).build();
- epPersUserAppSortDao.save(appSort);
+ epPersUserAppSortService.save(appSort);
// fn_pers_user_app_sel table
@@ -1373,7 +1319,7 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
List<FnPersUserAppSel> appSels = new ArrayList<>(Arrays.asList(appSel1, appSel2, appSel3, appSel4));
- fnPersUserAppSelDao.saveAll(appSels);
+ fnPersUserAppSelService.saveAll(appSels);
// fn_audit_log table
@@ -1387,7 +1333,7 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
List<FnAuditLog> auditLogs = new ArrayList<>(Arrays.asList(fnAuditLog1, fnAuditLog2, fnAuditLog3, fnAuditLog4, fnAuditLog5, fnAuditLog6, fnAuditLog7));
- fnAuditLogDao.saveAll(auditLogs);
+ fnAuditLogService.saveAll(auditLogs);
// fn_user_role table
@@ -1437,7 +1383,7 @@ public class DBInitializingBean implements org.springframework.beans.factory.Ini
userRole25, userRole26, userRole27, userRole28, userRole29, userRole30, userRole31, userRole32, userRole33, userRole34,
userRole35, userRole36, userRole37, userRole38, userRole39));
- fnUserRoleDao.saveAll(userRoles);
+ fnUserRoleService.saveAll(userRoles);
}
diff --git a/portal-BE/src/main/java/org/onap/portal/configuration/SecurityConfig.java b/portal-BE/src/main/java/org/onap/portal/configuration/SecurityConfig.java
index a0542ec4..5fd919ba 100644
--- a/portal-BE/src/main/java/org/onap/portal/configuration/SecurityConfig.java
+++ b/portal-BE/src/main/java/org/onap/portal/configuration/SecurityConfig.java
@@ -40,7 +40,7 @@
package org.onap.portal.configuration;
-import org.onap.portal.service.fn.FnUserService;
+import org.onap.portal.service.user.FnUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
diff --git a/portal-BE/src/main/java/org/onap/portal/configuration/WebMvcConfiguration.java b/portal-BE/src/main/java/org/onap/portal/configuration/WebMvcConfiguration.java
index f3b38187..93609844 100644
--- a/portal-BE/src/main/java/org/onap/portal/configuration/WebMvcConfiguration.java
+++ b/portal-BE/src/main/java/org/onap/portal/configuration/WebMvcConfiguration.java
@@ -40,9 +40,10 @@
package org.onap.portal.configuration;
-import org.onap.portal.dao.fn.FnFunctionDao;
+import org.onap.portal.service.function.FnFunctionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
@@ -52,11 +53,11 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@ComponentScan("org.springframework.security.samples.mvc")
public class WebMvcConfiguration implements WebMvcConfigurer {
- private final FnFunctionDao fnFunctionDao;
+ private final FnFunctionService fnFunctionService;
@Autowired
- public WebMvcConfiguration(FnFunctionDao fnFunctionDao) {
- this.fnFunctionDao = fnFunctionDao;
+ public WebMvcConfiguration(FnFunctionService fnFunctionService) {
+ this.fnFunctionService = fnFunctionService;
}
@Override
diff --git a/portal-BE/src/main/java/org/onap/portal/controller/LanguageController.java b/portal-BE/src/main/java/org/onap/portal/controller/LanguageController.java
index 4a25e614..28c21d36 100644
--- a/portal-BE/src/main/java/org/onap/portal/controller/LanguageController.java
+++ b/portal-BE/src/main/java/org/onap/portal/controller/LanguageController.java
@@ -50,8 +50,8 @@ import org.onap.portal.domain.dto.PortalRestStatusEnum;
import org.onap.portal.domain.dto.fn.FnLanguageDto;
import org.onap.portal.domain.mapper.FnLanguageMapper;
import org.onap.portal.domain.mapper.FnUserMapper;
-import org.onap.portal.service.fn.FnLanguageService;
-import org.onap.portal.service.fn.FnUserService;
+import org.onap.portal.service.language.FnLanguageService;
+import org.onap.portal.service.user.FnUserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/portal-BE/src/main/java/org/onap/portal/controller/UserController.java b/portal-BE/src/main/java/org/onap/portal/controller/UserController.java
index 571ab20a..3f05b0a9 100644
--- a/portal-BE/src/main/java/org/onap/portal/controller/UserController.java
+++ b/portal-BE/src/main/java/org/onap/portal/controller/UserController.java
@@ -45,7 +45,7 @@ import org.onap.portal.domain.db.fn.FnUser;
import org.onap.portal.domain.dto.PortalRestResponse;
import org.onap.portal.domain.dto.PortalRestStatusEnum;
import org.onap.portal.domain.dto.transport.ProfileDetail;
-import org.onap.portal.service.fn.FnUserService;
+import org.onap.portal.service.user.FnUserService;
import org.onap.portal.validation.DataValidator;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.onap.portalsdk.core.onboarding.util.CipherUtil;
diff --git a/portal-BE/src/main/java/org/onap/portal/controller/UserRolesController.java b/portal-BE/src/main/java/org/onap/portal/controller/UserRolesController.java
index dbba777e..1a2cb5d0 100644
--- a/portal-BE/src/main/java/org/onap/portal/controller/UserRolesController.java
+++ b/portal-BE/src/main/java/org/onap/portal/controller/UserRolesController.java
@@ -66,8 +66,8 @@ import org.onap.portal.logging.aop.EPEELFLoggerAdvice;
import org.onap.portal.logging.logic.EPLogUtil;
import org.onap.portal.service.AdminRolesService;
import org.onap.portal.service.ApplicationsRestClientService;
-import org.onap.portal.service.fn.FnUserRoleService;
-import org.onap.portal.service.fn.FnUserService;
+import org.onap.portal.service.userRole.FnUserRoleService;
+import org.onap.portal.service.user.FnUserService;
import org.onap.portal.utils.EPCommonSystemProperties;
import org.onap.portal.utils.EcompPortalUtils;
import org.onap.portal.utils.PortalConstants;
diff --git a/portal-BE/src/main/java/org/onap/portal/controller/WidgetsCatalogController.java b/portal-BE/src/main/java/org/onap/portal/controller/WidgetsCatalogController.java
index 59779448..93d6dd56 100644
--- a/portal-BE/src/main/java/org/onap/portal/controller/WidgetsCatalogController.java
+++ b/portal-BE/src/main/java/org/onap/portal/controller/WidgetsCatalogController.java
@@ -59,9 +59,9 @@ import org.onap.portal.domain.dto.ecomp.WidgetParameterResult;
import org.onap.portal.domain.dto.ecomp.WidgetServiceHeaders;
import org.onap.portal.logging.aop.EPAuditLog;
import org.onap.portal.service.WidgetMService;
-import org.onap.portal.service.ep.EpMicroserviceParameterService;
-import org.onap.portal.service.ep.EpWidgetCatalogParameterService;
-import org.onap.portal.service.fn.FnUserService;
+import org.onap.portal.service.microserviceParameter.EpMicroserviceParameterService;
+import org.onap.portal.service.widgetCatalogParameter.EpWidgetCatalogParameterService;
+import org.onap.portal.service.user.FnUserService;
import org.onap.portal.utils.EPCommonSystemProperties;
import org.onap.portal.utils.EcompPortalUtils;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
diff --git a/portal-BE/src/main/java/org/onap/portal/controller/WidgetsController.java b/portal-BE/src/main/java/org/onap/portal/controller/WidgetsController.java
index 6a92fbc3..db7039fe 100644
--- a/portal-BE/src/main/java/org/onap/portal/controller/WidgetsController.java
+++ b/portal-BE/src/main/java/org/onap/portal/controller/WidgetsController.java
@@ -50,12 +50,10 @@ import org.onap.portal.domain.dto.transport.FieldsValidator;
import org.onap.portal.domain.dto.transport.OnboardingWidget;
import org.onap.portal.domain.dto.transport.WidgetCatalogPersonalization;
import org.onap.portal.logging.aop.EPAuditLog;
-import org.onap.portal.service.AdminRolesService;
import org.onap.portal.service.PersUserWidgetService;
-import org.onap.portal.service.WidgetService;
-import org.onap.portal.service.fn.FnUserService;
+import org.onap.portal.service.widget.WidgetService;
+import org.onap.portal.service.user.FnUserService;
import org.onap.portal.utils.EcompPortalUtils;
-import org.onap.portal.validation.DataValidator;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
diff --git a/portal-BE/src/main/java/org/onap/portal/logging/aop/EPEELFLoggerAdvice.java b/portal-BE/src/main/java/org/onap/portal/logging/aop/EPEELFLoggerAdvice.java
index 2c7151a2..9c00b7a2 100644
--- a/portal-BE/src/main/java/org/onap/portal/logging/aop/EPEELFLoggerAdvice.java
+++ b/portal-BE/src/main/java/org/onap/portal/logging/aop/EPEELFLoggerAdvice.java
@@ -50,7 +50,7 @@ import javax.servlet.http.HttpServletRequest;
import org.onap.portal.domain.db.fn.FnApp;
import org.onap.portal.domain.db.fn.FnUser;
import org.onap.portal.service.AppsCacheService;
-import org.onap.portal.service.fn.FnUserService;
+import org.onap.portal.service.user.FnUserService;
import org.onap.portal.utils.EPCommonSystemProperties;
import org.onap.portal.utils.EcompPortalUtils;
import org.onap.portalsdk.core.exception.SessionExpiredException;
diff --git a/portal-BE/src/main/java/org/onap/portal/service/AdminRolesService.java b/portal-BE/src/main/java/org/onap/portal/service/AdminRolesService.java
index 8049cd65..187e175e 100644
--- a/portal-BE/src/main/java/org/onap/portal/service/AdminRolesService.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/AdminRolesService.java
@@ -57,7 +57,6 @@ import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
import java.util.stream.Collectors;
-import javax.annotation.PostConstruct;
import javax.persistence.EntityManager;
import javax.persistence.Query;
import javax.persistence.Tuple;
@@ -96,15 +95,15 @@ import org.onap.portal.exception.DeleteDomainObjectFailedException;
import org.onap.portal.exception.SyncUserRolesException;
import org.onap.portal.logging.format.EPAppMessagesEnum;
import org.onap.portal.logging.logic.EPLogUtil;
-import org.onap.portal.service.ep.EpAppFunctionService;
-import org.onap.portal.service.ep.EpUserRolesRequestDetService;
-import org.onap.portal.service.ep.EpUserRolesRequestService;
-import org.onap.portal.service.fn.FnAppService;
-import org.onap.portal.service.fn.FnMenuFunctionalRolesService;
-import org.onap.portal.service.fn.FnMenuFunctionalService;
-import org.onap.portal.service.fn.FnRoleService;
-import org.onap.portal.service.fn.FnUserRoleService;
-import org.onap.portal.service.fn.FnUserService;
+import org.onap.portal.service.appFunction.EpAppFunctionService;
+import org.onap.portal.service.userRolesRequestDet.EpUserRolesRequestDetService;
+import org.onap.portal.service.userRolesRequest.EpUserRolesRequestService;
+import org.onap.portal.service.app.FnAppService;
+import org.onap.portal.service.menuFunctionalRoles.FnMenuFunctionalRolesService;
+import org.onap.portal.service.menuFunctional.FnMenuFunctionalService;
+import org.onap.portal.service.role.FnRoleService;
+import org.onap.portal.service.userRole.FnUserRoleService;
+import org.onap.portal.service.user.FnUserService;
import org.onap.portal.utils.EPCommonSystemProperties;
import org.onap.portal.utils.EPUserUtils;
import org.onap.portal.utils.EcompPortalUtils;
@@ -223,7 +222,7 @@ public class AdminRolesService {
return false;
}
- boolean isUser(FnUser user) {
+ public boolean isUser(FnUser user) {
try {
FnUser currentUser = fnUserService.getUser(user.getId()).orElseThrow(Exception::new);
if (currentUser != null && currentUser.getId() != null) {
diff --git a/portal-BE/src/main/java/org/onap/portal/service/AppsCacheService.java b/portal-BE/src/main/java/org/onap/portal/service/AppsCacheService.java
index 83b5df99..b7dd4bfb 100644
--- a/portal-BE/src/main/java/org/onap/portal/service/AppsCacheService.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/AppsCacheService.java
@@ -48,7 +48,7 @@ import java.util.stream.Collectors;
import javax.annotation.PostConstruct;
import org.onap.portal.domain.db.fn.FnApp;
import org.onap.portal.domain.dto.transport.OnboardingApp;
-import org.onap.portal.service.fn.FnAppService;
+import org.onap.portal.service.app.FnAppService;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
diff --git a/portal-BE/src/main/java/org/onap/portal/service/fn/old/EPRoleFunctionService.java b/portal-BE/src/main/java/org/onap/portal/service/EPRoleFunctionService.java
index b044dfb9..6023a1c4 100644
--- a/portal-BE/src/main/java/org/onap/portal/service/fn/old/EPRoleFunctionService.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/EPRoleFunctionService.java
@@ -35,7 +35,7 @@
*
*
*/
-package org.onap.portal.service.fn.old;
+package org.onap.portal.service;
import java.util.HashMap;
import java.util.HashSet;
@@ -57,8 +57,6 @@ import org.springframework.transaction.annotation.Transactional;
public class EPRoleFunctionService {
@Autowired
private DataAccessService dataAccessService;
-
-
public DataAccessService getDataAccessService() {
return dataAccessService;
diff --git a/portal-BE/src/main/java/org/onap/portal/service/ExternalAccessRolesService.java b/portal-BE/src/main/java/org/onap/portal/service/ExternalAccessRolesService.java
index b6739234..b9f161fe 100644
--- a/portal-BE/src/main/java/org/onap/portal/service/ExternalAccessRolesService.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/ExternalAccessRolesService.java
@@ -59,9 +59,9 @@ import org.onap.portal.domain.dto.transport.CentralV2Role;
import org.onap.portal.domain.dto.transport.GlobalRoleWithApplicationRoleFunction;
import org.onap.portal.exception.RoleFunctionException;
import org.onap.portal.logging.logic.EPLogUtil;
-import org.onap.portal.service.ep.EpAppFunctionService;
-import org.onap.portal.service.fn.FnAppService;
-import org.onap.portal.service.fn.FnRoleService;
+import org.onap.portal.service.appFunction.EpAppFunctionService;
+import org.onap.portal.service.app.FnAppService;
+import org.onap.portal.service.role.FnRoleService;
import org.onap.portal.utils.EPCommonSystemProperties;
import org.onap.portal.utils.EPUserUtils;
import org.onap.portal.utils.EcompPortalUtils;
diff --git a/portal-BE/src/main/java/org/onap/portal/service/PersUserWidgetService.java b/portal-BE/src/main/java/org/onap/portal/service/PersUserWidgetService.java
index 28d63eb2..2a5d0aec 100644
--- a/portal-BE/src/main/java/org/onap/portal/service/PersUserWidgetService.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/PersUserWidgetService.java
@@ -43,13 +43,13 @@ package org.onap.portal.service;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
-import org.onap.portal.dao.ep.EpPersUserWidgetSelDao;
-import org.onap.portal.dao.fn.EpWidgetCatalogDao;
import org.onap.portal.domain.db.ep.EpPersUserWidgetSel;
import org.onap.portal.domain.db.ep.EpWidgetCatalog;
import org.onap.portal.domain.db.fn.FnUser;
import org.onap.portal.domain.dto.ecomp.PersUserWidgetSelection;
import org.onap.portal.domain.dto.transport.WidgetCatalogPersonalization;
+import org.onap.portal.service.persUserWidgetSel.EpPersUserWidgetSelService;
+import org.onap.portal.service.widgetCatalog.EpWidgetCatalogService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -61,14 +61,14 @@ import org.springframework.transaction.annotation.Transactional;
public class PersUserWidgetService {
private static final Logger LOGGER = LoggerFactory.getLogger(PersUserWidgetService.class);
- private final EpPersUserWidgetSelDao epPersUserWidgetSelDao;
- private final EpWidgetCatalogDao epWidgetCatalogDao;
+ private final EpPersUserWidgetSelService epPersUserWidgetSelService;
+ private final EpWidgetCatalogService epWidgetCatalogService;
@Autowired
- public PersUserWidgetService(final EpPersUserWidgetSelDao epPersUserWidgetSelDao,
- final EpWidgetCatalogDao epWidgetCatalogDao) {
- this.epPersUserWidgetSelDao = epPersUserWidgetSelDao;
- this.epWidgetCatalogDao = epWidgetCatalogDao;
+ public PersUserWidgetService(final EpPersUserWidgetSelService epPersUserWidgetSelService,
+ final EpWidgetCatalogService epWidgetCatalogService) {
+ this.epPersUserWidgetSelService = epPersUserWidgetSelService;
+ this.epWidgetCatalogService = epWidgetCatalogService;
}
public void setPersUserAppValue(FnUser user, WidgetCatalogPersonalization personalization) {
@@ -83,19 +83,19 @@ public class PersUserWidgetService {
}
if (persRow.getId() != null) {
- epPersUserWidgetSelDao.deleteById(persRow.getId());
+ epPersUserWidgetSelService.deleteById(persRow.getId());
}
persRow.setStatusCode(personalization.getSelect() ? "S" : "H"); // Show / Hide
EpPersUserWidgetSel epPersUserWidgetSel = new EpPersUserWidgetSel();
epPersUserWidgetSel.setUserId(user);
epPersUserWidgetSel.setWidgetId(
- epWidgetCatalogDao.findById(personalization.getWidgetId()).orElse(new EpWidgetCatalog()));
- epPersUserWidgetSelDao.saveAndFlush(epPersUserWidgetSel);
+ epWidgetCatalogService.findById(personalization.getWidgetId()).orElse(new EpWidgetCatalog()));
+ epPersUserWidgetSelService.saveAndFlush(epPersUserWidgetSel);
}
private List<PersUserWidgetSelection> getUserWidgetSelction(FnUser user, Long widgetId) {
- return epPersUserWidgetSelDao
+ return epPersUserWidgetSelService
.getEpPersUserWidgetSelForUserIdAndWidgetId(user.getId(), widgetId)
.orElse(new ArrayList<>())
.stream()
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnAppDao.java b/portal-BE/src/main/java/org/onap/portal/service/app/FnAppDao.java
index f86456f2..f57cc246 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnAppDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/app/FnAppDao.java
@@ -1,4 +1,4 @@
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.app;
import java.util.List;
import org.onap.portal.domain.db.fn.FnApp;
@@ -10,7 +10,7 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface FnAppDao extends JpaRepository<FnApp, Long> {
+interface FnAppDao extends JpaRepository<FnApp, Long> {
@Query
List<FnApp> getByUebKey(final @Param("uebKey") String uebKey);
diff --git a/portal-BE/src/main/java/org/onap/portal/service/fn/FnAppService.java b/portal-BE/src/main/java/org/onap/portal/service/app/FnAppService.java
index 6e3c2879..13d0911a 100644
--- a/portal-BE/src/main/java/org/onap/portal/service/fn/FnAppService.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/app/FnAppService.java
@@ -38,14 +38,14 @@
*
*/
-package org.onap.portal.service.fn;
+package org.onap.portal.service.app;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import javax.persistence.EntityExistsException;
import javax.persistence.EntityManager;
-import org.onap.portal.dao.fn.FnAppDao;
+
import org.onap.portal.domain.db.fn.FnApp;
import org.onap.portal.domain.dto.transport.OnboardingApp;
import org.onap.portal.utils.EPCommonSystemProperties;
@@ -66,7 +66,7 @@ public class FnAppService {
private final EntityManager entityManager;
@Autowired
- public FnAppService(final FnAppDao fnAppDao, EntityManager entityManager) {
+ public FnAppService(FnAppDao fnAppDao, EntityManager entityManager) {
this.fnAppDao = fnAppDao;
this.entityManager = entityManager;
}
@@ -123,7 +123,7 @@ public class FnAppService {
return result;
}
- List<FnApp> getUserRemoteApps(String id) {
+ public List<FnApp> getUserRemoteApps(String id) {
/* StringBuilder sb = new StringBuilder();
sb.append("SELECT * FROM FnApp join FN_USER_ROLE ON FN_USER_ROLE.APP_ID = FN_APP.APP_ID where ");
sb.append("FN_USER_ROLE.USER_ID = ").append(id).append(" AND FN_USER_ROLE.ROLE_ID != ")
@@ -134,4 +134,8 @@ public class FnAppService {
List<FnApp> adminApps = query.getResultList();*/
return new ArrayList<>();
}
+
+ public List<FnApp> saveAll(List<FnApp> fnApps) {
+ return fnAppDao.saveAll(fnApps);
+ }
}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnAppContactUsDao.java b/portal-BE/src/main/java/org/onap/portal/service/appContactUs/FnAppContactUsDao.java
index 39603eb7..7b57e953 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnAppContactUsDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/appContactUs/FnAppContactUsDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.appContactUs;
import org.onap.portal.domain.db.fn.FnAppContactUs;
import org.springframework.data.jpa.repository.JpaRepository;
@@ -47,6 +47,6 @@ import org.springframework.transaction.annotation.Transactional;
@Transactional
@Repository
-public interface FnAppContactUsDao extends JpaRepository<FnAppContactUs, Long> {
+interface FnAppContactUsDao extends JpaRepository<FnAppContactUs, Long> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/appContactUs/FnAppContactUsService.java b/portal-BE/src/main/java/org/onap/portal/service/appContactUs/FnAppContactUsService.java
new file mode 100644
index 00000000..600d8325
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/appContactUs/FnAppContactUsService.java
@@ -0,0 +1,22 @@
+package org.onap.portal.service.appContactUs;
+
+import org.onap.portal.domain.db.fn.FnAppContactUs;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class FnAppContactUsService {
+
+ private final FnAppContactUsDao fnAppContactUsDao;
+
+ @Autowired
+ public FnAppContactUsService(FnAppContactUsDao fnAppContactUsDao) {
+ this.fnAppContactUsDao = fnAppContactUsDao;
+ }
+
+ public List<FnAppContactUs> saveAll(List<FnAppContactUs> fnAppContactUses) {
+ return fnAppContactUsDao.saveAll(fnAppContactUses);
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/ep/EpAppFunctionDao.java b/portal-BE/src/main/java/org/onap/portal/service/appFunction/EpAppFunctionDao.java
index c7782b56..1f8c64b4 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/ep/EpAppFunctionDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/appFunction/EpAppFunctionDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.ep;
+package org.onap.portal.service.appFunction;
import java.util.List;
import org.onap.portal.domain.db.ep.EpAppFunction;
@@ -50,7 +50,7 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface EpAppFunctionDao extends JpaRepository<EpAppFunction, Long> {
+interface EpAppFunctionDao extends JpaRepository<EpAppFunction, Long> {
@Query
List<EpAppFunction> getAppRoleFunctionList(final @Param("roleId") Long roleId, final @Param("appId") Long appId);
diff --git a/portal-BE/src/main/java/org/onap/portal/service/ep/EpAppFunctionService.java b/portal-BE/src/main/java/org/onap/portal/service/appFunction/EpAppFunctionService.java
index 012983d3..aa5e258a 100644
--- a/portal-BE/src/main/java/org/onap/portal/service/ep/EpAppFunctionService.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/appFunction/EpAppFunctionService.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.service.ep;
+package org.onap.portal.service.appFunction;
import java.util.ArrayList;
import java.util.List;
@@ -46,7 +46,7 @@ import java.util.Optional;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.stream.Collectors;
-import org.onap.portal.dao.ep.EpAppFunctionDao;
+
import org.onap.portal.domain.db.ep.EpAppFunction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -76,4 +76,8 @@ public class EpAppFunctionService {
List<Object> seen = new ArrayList<>();
return t -> seen.add(keyExtractor.apply(t));
}
+
+ public List<EpAppFunction> saveAll(List<EpAppFunction> epAppFunctions) {
+ return epAppFunctionDao.saveAll(epAppFunctions);
+ }
}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/ep/EpAppRoleFunctionDao.java b/portal-BE/src/main/java/org/onap/portal/service/appRoleFunction/EpAppRoleFunctionDao.java
index 3296eb7e..801c9385 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/ep/EpAppRoleFunctionDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/appRoleFunction/EpAppRoleFunctionDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.ep;
+package org.onap.portal.service.appRoleFunction;
import org.onap.portal.domain.db.ep.EpAppRoleFunction;
import org.springframework.data.jpa.repository.JpaRepository;
@@ -47,6 +47,6 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface EpAppRoleFunctionDao extends JpaRepository<EpAppRoleFunction, Integer> {
+interface EpAppRoleFunctionDao extends JpaRepository<EpAppRoleFunction, Integer> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/appRoleFunction/EpAppRoleFunctionService.java b/portal-BE/src/main/java/org/onap/portal/service/appRoleFunction/EpAppRoleFunctionService.java
new file mode 100644
index 00000000..cb5383bf
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/appRoleFunction/EpAppRoleFunctionService.java
@@ -0,0 +1,62 @@
+/*
+ * ============LICENSE_START==========================================
+ * ONAP Portal
+ * ===================================================================
+ * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ===================================================================
+ *
+ * Unless otherwise specified, all software contained herein is licensed
+ * under the Apache License, Version 2.0 (the "License");
+ * you may not use this software except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Unless otherwise specified, all documentation contained herein is licensed
+ * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
+ * you may not use this documentation except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://creativecommons.org/licenses/by/4.0/
+ *
+ * Unless required by applicable law or agreed to in writing, documentation
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * ============LICENSE_END============================================
+ *
+ *
+ */
+
+package org.onap.portal.service.appRoleFunction;
+
+import org.onap.portal.domain.db.ep.EpAppRoleFunction;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class EpAppRoleFunctionService {
+
+ private final EpAppRoleFunctionDao epAppRoleFunctionDao;
+
+ @Autowired
+ public EpAppRoleFunctionService(EpAppRoleFunctionDao epAppRoleFunctionDao) {
+ this.epAppRoleFunctionDao = epAppRoleFunctionDao;
+ }
+
+ public List<EpAppRoleFunction> saveAll(List<EpAppRoleFunction> epAppRoleFunctions) {
+ return epAppRoleFunctionDao.saveAll(epAppRoleFunctions);
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnAuditLogDao.java b/portal-BE/src/main/java/org/onap/portal/service/auditLog/FnAuditLogDao.java
index 4e747b4f..f6f4a336 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnAuditLogDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/auditLog/FnAuditLogDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.auditLog;
import org.onap.portal.domain.db.fn.FnAuditLog;
import org.springframework.data.jpa.repository.JpaRepository;
@@ -47,6 +47,6 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface FnAuditLogDao extends JpaRepository<FnAuditLog, Integer> {
+interface FnAuditLogDao extends JpaRepository<FnAuditLog, Integer> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/auditLog/FnAuditLogService.java b/portal-BE/src/main/java/org/onap/portal/service/auditLog/FnAuditLogService.java
new file mode 100644
index 00000000..ef51aab1
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/auditLog/FnAuditLogService.java
@@ -0,0 +1,22 @@
+package org.onap.portal.service.auditLog;
+
+import org.onap.portal.domain.db.fn.FnAuditLog;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class FnAuditLogService {
+
+ private final FnAuditLogDao fnAuditLogDao;
+
+ @Autowired
+ public FnAuditLogService(FnAuditLogDao fnAuditLogDao) {
+ this.fnAuditLogDao = fnAuditLogDao;
+ }
+
+ public List<FnAuditLog> saveAll(List<FnAuditLog> auditLogs) {
+ return fnAuditLogDao.saveAll(auditLogs);
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/ep/EpBasicAuthAccountDao.java b/portal-BE/src/main/java/org/onap/portal/service/basicAuthAccount/EpBasicAuthAccountDao.java
index cc3219c0..9c3a0a8e 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/ep/EpBasicAuthAccountDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/basicAuthAccount/EpBasicAuthAccountDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.ep;
+package org.onap.portal.service.basicAuthAccount;
import org.onap.portal.domain.db.ep.EpBasicAuthAccount;
import org.springframework.data.jpa.repository.JpaRepository;
@@ -47,6 +47,6 @@ import org.springframework.transaction.annotation.Transactional;
@Transactional
@Repository
-public interface EpBasicAuthAccountDao extends JpaRepository<EpBasicAuthAccount, Long> {
+interface EpBasicAuthAccountDao extends JpaRepository<EpBasicAuthAccount, Long> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/basicAuthAccount/EpBasicAuthAccountService.java b/portal-BE/src/main/java/org/onap/portal/service/basicAuthAccount/EpBasicAuthAccountService.java
new file mode 100644
index 00000000..3b23e918
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/basicAuthAccount/EpBasicAuthAccountService.java
@@ -0,0 +1,20 @@
+package org.onap.portal.service.basicAuthAccount;
+
+import org.onap.portal.domain.db.ep.EpBasicAuthAccount;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class EpBasicAuthAccountService {
+
+ private final EpBasicAuthAccountDao epBasicAuthAccountDao;
+
+ @Autowired
+ public EpBasicAuthAccountService(EpBasicAuthAccountDao epBasicAuthAccountDao) {
+ this.epBasicAuthAccountDao = epBasicAuthAccountDao;
+ }
+
+ public EpBasicAuthAccount save(EpBasicAuthAccount epBasicAuthAccount) {
+ return epBasicAuthAccountDao.save(epBasicAuthAccount);
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnCommonWidgetDataDao.java b/portal-BE/src/main/java/org/onap/portal/service/commonWidgetData/FnCommonWidgetDataDao.java
index deb062f0..f18082dc 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnCommonWidgetDataDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/commonWidgetData/FnCommonWidgetDataDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.commonWidgetData;
import org.onap.portal.domain.db.fn.FnCommonWidgetData;
import org.springframework.data.jpa.repository.JpaRepository;
@@ -47,6 +47,6 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface FnCommonWidgetDataDao extends JpaRepository<FnCommonWidgetData, Long> {
+interface FnCommonWidgetDataDao extends JpaRepository<FnCommonWidgetData, Long> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/commonWidgetData/FnCommonWidgetDataService.java b/portal-BE/src/main/java/org/onap/portal/service/commonWidgetData/FnCommonWidgetDataService.java
new file mode 100644
index 00000000..940d3adc
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/commonWidgetData/FnCommonWidgetDataService.java
@@ -0,0 +1,22 @@
+package org.onap.portal.service.commonWidgetData;
+
+import org.onap.portal.domain.db.fn.FnCommonWidgetData;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class FnCommonWidgetDataService {
+
+ private final FnCommonWidgetDataDao fnCommonWidgetDataDao;
+
+ @Autowired
+ public FnCommonWidgetDataService(FnCommonWidgetDataDao fnCommonWidgetDataDao) {
+ this.fnCommonWidgetDataDao = fnCommonWidgetDataDao;
+ }
+
+ public List<FnCommonWidgetData> saveAll(List<FnCommonWidgetData> fnCommonWidgetDataList) {
+ return fnCommonWidgetDataDao.saveAll(fnCommonWidgetDataList);
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnDisplayTextDao.java b/portal-BE/src/main/java/org/onap/portal/service/displayText/FnDisplayTextDao.java
index fae8d684..00449dc4 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnDisplayTextDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/displayText/FnDisplayTextDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.displayText;
import org.onap.portal.domain.db.fn.FnDisplayText;
import org.springframework.data.jpa.repository.JpaRepository;
@@ -47,6 +47,6 @@ import org.springframework.transaction.annotation.Transactional;
@Transactional
@Repository
-public interface FnDisplayTextDao extends JpaRepository<FnDisplayText, Long> {
+interface FnDisplayTextDao extends JpaRepository<FnDisplayText, Long> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/displayText/FnDisplayTextService.java b/portal-BE/src/main/java/org/onap/portal/service/displayText/FnDisplayTextService.java
new file mode 100644
index 00000000..45870ca3
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/displayText/FnDisplayTextService.java
@@ -0,0 +1,22 @@
+package org.onap.portal.service.displayText;
+
+import org.onap.portal.domain.db.fn.FnDisplayText;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class FnDisplayTextService {
+
+ private final FnDisplayTextDao fnDisplayTextDao;
+
+ @Autowired
+ public FnDisplayTextService(FnDisplayTextDao fnDisplayTextDao) {
+ this.fnDisplayTextDao = fnDisplayTextDao;
+ }
+
+ public List<FnDisplayText> saveAll(List<FnDisplayText> fnDisplayTexts) {
+ return fnDisplayTextDao.saveAll(fnDisplayTexts);
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnFunctionDao.java b/portal-BE/src/main/java/org/onap/portal/service/function/FnFunctionDao.java
index 6892de21..29ce30a3 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnFunctionDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/function/FnFunctionDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.function;
import org.onap.portal.domain.db.fn.FnFunction;
import org.springframework.data.jpa.repository.JpaRepository;
@@ -47,6 +47,6 @@ import org.springframework.transaction.annotation.Transactional;
@Transactional
@Repository
-public interface FnFunctionDao extends JpaRepository<FnFunction, String> {
+interface FnFunctionDao extends JpaRepository<FnFunction, String> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/function/FnFunctionService.java b/portal-BE/src/main/java/org/onap/portal/service/function/FnFunctionService.java
new file mode 100644
index 00000000..d2361bea
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/function/FnFunctionService.java
@@ -0,0 +1,22 @@
+package org.onap.portal.service.function;
+
+import org.onap.portal.domain.db.fn.FnFunction;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class FnFunctionService {
+
+ private final FnFunctionDao fnFunctionDao;
+
+ @Autowired
+ public FnFunctionService(FnFunctionDao fnFunctionDao) {
+ this.fnFunctionDao = fnFunctionDao;
+ }
+
+ public List<FnFunction> saveAll(List<FnFunction> fnFunctions) {
+ return fnFunctionDao.saveAll(fnFunctions);
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnLanguageDao.java b/portal-BE/src/main/java/org/onap/portal/service/language/FnLanguageDao.java
index c79fb0ed..dd6967f0 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnLanguageDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/language/FnLanguageDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.language;
import org.onap.portal.domain.db.fn.FnLanguage;
import org.springframework.data.jpa.repository.JpaRepository;
@@ -49,7 +49,7 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface FnLanguageDao extends JpaRepository<FnLanguage, Long> {
+interface FnLanguageDao extends JpaRepository<FnLanguage, Long> {
@Query
FnLanguage getByLanguageAlias(final @Param("alias") String alias);
diff --git a/portal-BE/src/main/java/org/onap/portal/service/fn/FnLanguageService.java b/portal-BE/src/main/java/org/onap/portal/service/language/FnLanguageService.java
index c39a12b6..9221810e 100644
--- a/portal-BE/src/main/java/org/onap/portal/service/fn/FnLanguageService.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/language/FnLanguageService.java
@@ -38,12 +38,12 @@
*
*/
-package org.onap.portal.service.fn;
+package org.onap.portal.service.language;
import java.security.Principal;
import java.util.List;
import java.util.Optional;
-import org.onap.portal.dao.fn.FnLanguageDao;
+
import org.onap.portal.domain.db.fn.FnLanguage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
@@ -70,4 +70,12 @@ public class FnLanguageService {
public FnLanguage save(final FnLanguage fnLanguage){
return fnLanguageDao.saveAndFlush(fnLanguage);
}
+
+ public FnLanguage getByLanguageAlias(String language) {
+ return fnLanguageDao.getByLanguageAlias(language);
+ }
+
+ public void delete(FnLanguage fnLanguage) {
+ fnLanguageDao.delete(fnLanguage);
+ }
}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnLuActivityDao.java b/portal-BE/src/main/java/org/onap/portal/service/luActivity/FnLuActivityDao.java
index abc8cff1..fd6b37f6 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnLuActivityDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/luActivity/FnLuActivityDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.luActivity;
import org.onap.portal.domain.db.fn.FnLuActivity;
import org.springframework.data.jpa.repository.JpaRepository;
@@ -47,6 +47,6 @@ import org.springframework.transaction.annotation.Transactional;
@Transactional
@Repository
-public interface FnLuActivityDao extends JpaRepository<FnLuActivity, String> {
+interface FnLuActivityDao extends JpaRepository<FnLuActivity, String> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/luActivity/FnLuActivityService.java b/portal-BE/src/main/java/org/onap/portal/service/luActivity/FnLuActivityService.java
new file mode 100644
index 00000000..0ce68009
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/luActivity/FnLuActivityService.java
@@ -0,0 +1,22 @@
+package org.onap.portal.service.luActivity;
+
+import org.onap.portal.domain.db.fn.FnLuActivity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class FnLuActivityService {
+
+ private final FnLuActivityDao fnLuActivityDao;
+
+ @Autowired
+ public FnLuActivityService(FnLuActivityDao fnLuActivityDao) {
+ this.fnLuActivityDao = fnLuActivityDao;
+ }
+
+ public List<FnLuActivity> saveAll(List<FnLuActivity> luActivities) {
+ return fnLuActivityDao.saveAll(luActivities);
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnLuAlertMethodDao.java b/portal-BE/src/main/java/org/onap/portal/service/luAlertMethod/FnLuAlertMethodDao.java
index cfd22ce5..026d02f1 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnLuAlertMethodDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/luAlertMethod/FnLuAlertMethodDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.luAlertMethod;
import org.onap.portal.domain.db.fn.FnLuAlertMethod;
import org.springframework.data.jpa.repository.JpaRepository;
@@ -47,6 +47,6 @@ import org.springframework.transaction.annotation.Transactional;
@Transactional
@Repository
-public interface FnLuAlertMethodDao extends JpaRepository<FnLuAlertMethod, String> {
+interface FnLuAlertMethodDao extends JpaRepository<FnLuAlertMethod, String> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/luAlertMethod/FnLuAlertMethodService.java b/portal-BE/src/main/java/org/onap/portal/service/luAlertMethod/FnLuAlertMethodService.java
new file mode 100644
index 00000000..649ea987
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/luAlertMethod/FnLuAlertMethodService.java
@@ -0,0 +1,22 @@
+package org.onap.portal.service.luAlertMethod;
+
+import org.onap.portal.domain.db.fn.FnLuAlertMethod;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class FnLuAlertMethodService {
+
+ private final FnLuAlertMethodDao fnLuAlertMethodDao;
+
+ @Autowired
+ public FnLuAlertMethodService(FnLuAlertMethodDao fnLuAlertMethodDao) {
+ this.fnLuAlertMethodDao = fnLuAlertMethodDao;
+ }
+
+ public List<FnLuAlertMethod> saveAll(List<FnLuAlertMethod> alertMethods) {
+ return fnLuAlertMethodDao.saveAll(alertMethods);
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnLuMenuSetDao.java b/portal-BE/src/main/java/org/onap/portal/service/luMenuSet/FnLuMenuSetDao.java
index adcb792a..d925a83c 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnLuMenuSetDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/luMenuSet/FnLuMenuSetDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.luMenuSet;
import org.onap.portal.domain.db.fn.FnLuMenuSet;
import org.springframework.data.jpa.repository.JpaRepository;
@@ -47,6 +47,6 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface FnLuMenuSetDao extends JpaRepository<FnLuMenuSet, String> {
+interface FnLuMenuSetDao extends JpaRepository<FnLuMenuSet, String> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/luMenuSet/FnLuMenuSetService.java b/portal-BE/src/main/java/org/onap/portal/service/luMenuSet/FnLuMenuSetService.java
new file mode 100644
index 00000000..3433cde5
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/luMenuSet/FnLuMenuSetService.java
@@ -0,0 +1,20 @@
+package org.onap.portal.service.luMenuSet;
+
+import org.onap.portal.domain.db.fn.FnLuMenuSet;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class FnLuMenuSetService {
+
+ private final FnLuMenuSetDao fnLuMenuSetDao;
+
+ @Autowired
+ public FnLuMenuSetService(FnLuMenuSetDao fnLuMenuSetDao) {
+ this.fnLuMenuSetDao = fnLuMenuSetDao;
+ }
+
+ public FnLuMenuSet save(FnLuMenuSet menuSet) {
+ return fnLuMenuSetDao.save(menuSet);
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnLuPriorityDao.java b/portal-BE/src/main/java/org/onap/portal/service/luPriority/FnLuPriorityDao.java
index 98253ceb..951ca1f3 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnLuPriorityDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/luPriority/FnLuPriorityDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.luPriority;
import org.onap.portal.domain.db.fn.FnLuPriority;
import org.springframework.data.jpa.repository.JpaRepository;
@@ -47,6 +47,6 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface FnLuPriorityDao extends JpaRepository<FnLuPriority, Long> {
+interface FnLuPriorityDao extends JpaRepository<FnLuPriority, Long> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/luPriority/FnLuPriorityService.java b/portal-BE/src/main/java/org/onap/portal/service/luPriority/FnLuPriorityService.java
new file mode 100644
index 00000000..998589cb
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/luPriority/FnLuPriorityService.java
@@ -0,0 +1,22 @@
+package org.onap.portal.service.luPriority;
+
+import org.onap.portal.domain.db.fn.FnLuPriority;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class FnLuPriorityService {
+
+ private final FnLuPriorityDao fnLuPriorityDao;
+
+ @Autowired
+ public FnLuPriorityService(FnLuPriorityDao fnLuPriorityDao) {
+ this.fnLuPriorityDao = fnLuPriorityDao;
+ }
+
+ public List<FnLuPriority> saveAll(List<FnLuPriority> priorities) {
+ return fnLuPriorityDao.saveAll(priorities);
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnLuTabSetDao.java b/portal-BE/src/main/java/org/onap/portal/service/luTabSet/FnLuTabSetDao.java
index bcc3a1b8..13388010 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnLuTabSetDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/luTabSet/FnLuTabSetDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.luTabSet;
import org.onap.portal.domain.db.fn.FnLuTabSet;
import org.springframework.data.jpa.repository.JpaRepository;
@@ -47,6 +47,6 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface FnLuTabSetDao extends JpaRepository<FnLuTabSet, String> {
+interface FnLuTabSetDao extends JpaRepository<FnLuTabSet, String> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/luTabSet/FnLuTabSetService.java b/portal-BE/src/main/java/org/onap/portal/service/luTabSet/FnLuTabSetService.java
new file mode 100644
index 00000000..b9c131a0
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/luTabSet/FnLuTabSetService.java
@@ -0,0 +1,20 @@
+package org.onap.portal.service.luTabSet;
+
+import org.onap.portal.domain.db.fn.FnLuTabSet;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class FnLuTabSetService {
+
+ private final FnLuTabSetDao fnLuTabSetDao;
+
+ @Autowired
+ public FnLuTabSetService(FnLuTabSetDao fnLuTabSetDao) {
+ this.fnLuTabSetDao = fnLuTabSetDao;
+ }
+
+ public FnLuTabSet save(FnLuTabSet fnLuTabSet) {
+ return fnLuTabSetDao.save(fnLuTabSet);
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnLuTimezoneDao.java b/portal-BE/src/main/java/org/onap/portal/service/luTimezone/FnLuTimezoneDao.java
index d98d893b..3c35feef 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnLuTimezoneDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/luTimezone/FnLuTimezoneDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.luTimezone;
import org.onap.portal.domain.db.fn.FnLuTimezone;
import org.springframework.data.jpa.repository.JpaRepository;
@@ -47,6 +47,6 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface FnLuTimezoneDao extends JpaRepository<FnLuTimezone, Long> {
+interface FnLuTimezoneDao extends JpaRepository<FnLuTimezone, Long> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/fn/FnLuTimezoneService.java b/portal-BE/src/main/java/org/onap/portal/service/luTimezone/FnLuTimezoneService.java
index ebb5d332..c4180ffa 100644
--- a/portal-BE/src/main/java/org/onap/portal/service/fn/FnLuTimezoneService.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/luTimezone/FnLuTimezoneService.java
@@ -38,10 +38,11 @@
*
*/
-package org.onap.portal.service.fn;
+package org.onap.portal.service.luTimezone;
+import java.util.List;
import java.util.Optional;
-import org.onap.portal.dao.fn.FnLuTimezoneDao;
+
import org.onap.portal.domain.db.fn.FnLuTimezone;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -60,4 +61,8 @@ public class FnLuTimezoneService {
public Optional<FnLuTimezone> getById(Long id){
return fnLuTimezoneDao.findById(id);
}
+
+ public List<FnLuTimezone> saveAll(List<FnLuTimezone> timezones) {
+ return fnLuTimezoneDao.saveAll(timezones);
+ }
}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnMenuDao.java b/portal-BE/src/main/java/org/onap/portal/service/menu/FnMenuDao.java
index bbd1b6ad..a861b3db 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnMenuDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/menu/FnMenuDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.menu;
import org.onap.portal.domain.db.fn.FnMenu;
import org.springframework.data.jpa.repository.JpaRepository;
@@ -47,6 +47,6 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface FnMenuDao extends JpaRepository<FnMenu, Integer> {
+interface FnMenuDao extends JpaRepository<FnMenu, Integer> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/menu/FnMenuService.java b/portal-BE/src/main/java/org/onap/portal/service/menu/FnMenuService.java
new file mode 100644
index 00000000..ad7a34bb
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/menu/FnMenuService.java
@@ -0,0 +1,22 @@
+package org.onap.portal.service.menu;
+
+import org.onap.portal.domain.db.fn.FnMenu;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class FnMenuService {
+
+ private final FnMenuDao fnMenuDao;
+
+ @Autowired
+ public FnMenuService(FnMenuDao fnMenuDao) {
+ this.fnMenuDao = fnMenuDao;
+ }
+
+ public List<FnMenu> saveAll(List<FnMenu> fnMenus) {
+ return fnMenuDao.saveAll(fnMenus);
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnMenuFunctionalDao.java b/portal-BE/src/main/java/org/onap/portal/service/menuFunctional/FnMenuFunctionalDao.java
index 0c8ac4a9..424d90df 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnMenuFunctionalDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/menuFunctional/FnMenuFunctionalDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.menuFunctional;
import java.util.List;
import org.onap.portal.domain.db.fn.FnMenuFunctional;
@@ -50,7 +50,7 @@ import org.springframework.transaction.annotation.Transactional;
@Transactional
@Repository
-public interface FnMenuFunctionalDao extends JpaRepository<FnMenuFunctional, Long> {
+interface FnMenuFunctionalDao extends JpaRepository<FnMenuFunctional, Long> {
@Query
List<FnMenuFunctional> retrieveByMenuId(final @Param("menuId") Long menuId);
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/fn/FnMenuFunctionalService.java b/portal-BE/src/main/java/org/onap/portal/service/menuFunctional/FnMenuFunctionalService.java
index 97f3188a..1abf3eef 100644
--- a/portal-BE/src/main/java/org/onap/portal/service/fn/FnMenuFunctionalService.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/menuFunctional/FnMenuFunctionalService.java
@@ -38,12 +38,12 @@
*
*/
-package org.onap.portal.service.fn;
+package org.onap.portal.service.menuFunctional;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
-import org.onap.portal.dao.fn.FnMenuFunctionalDao;
+
import org.onap.portal.domain.db.fn.FnMenuFunctional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -62,4 +62,7 @@ public class FnMenuFunctionalService {
return Optional.of(fnMenuFunctionalDao.retrieveByMenuId(menuId)).orElse(new ArrayList<>());
}
+ public List<FnMenuFunctional> saveAll(List<FnMenuFunctional> menuFunctionals) {
+ return fnMenuFunctionalDao.saveAll(menuFunctionals);
+ }
}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnMenuFunctionalAncestorsDao.java b/portal-BE/src/main/java/org/onap/portal/service/menuFunctionalAncestors/FnMenuFunctionalAncestorsDao.java
index 3ffc7bb9..2b248a90 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnMenuFunctionalAncestorsDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/menuFunctionalAncestors/FnMenuFunctionalAncestorsDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.menuFunctionalAncestors;
import org.onap.portal.domain.db.fn.FnMenuFunctionalAncestors;
import org.springframework.data.jpa.repository.JpaRepository;
@@ -47,6 +47,6 @@ import org.springframework.transaction.annotation.Transactional;
@Transactional
@Repository
-public interface FnMenuFunctionalAncestorsDao extends JpaRepository<FnMenuFunctionalAncestors, Integer> {
+interface FnMenuFunctionalAncestorsDao extends JpaRepository<FnMenuFunctionalAncestors, Integer> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/menuFunctionalAncestors/FnMenuFunctionalAncestorsService.java b/portal-BE/src/main/java/org/onap/portal/service/menuFunctionalAncestors/FnMenuFunctionalAncestorsService.java
new file mode 100644
index 00000000..070169f0
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/menuFunctionalAncestors/FnMenuFunctionalAncestorsService.java
@@ -0,0 +1,22 @@
+package org.onap.portal.service.menuFunctionalAncestors;
+
+import org.onap.portal.domain.db.fn.FnMenuFunctionalAncestors;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class FnMenuFunctionalAncestorsService {
+
+ private final FnMenuFunctionalAncestorsDao fnMenuFunctionalAncestorsDao;
+
+ @Autowired
+ public FnMenuFunctionalAncestorsService(FnMenuFunctionalAncestorsDao fnMenuFunctionalAncestorsDao) {
+ this.fnMenuFunctionalAncestorsDao = fnMenuFunctionalAncestorsDao;
+ }
+
+ public List<FnMenuFunctionalAncestors> saveAll(List<FnMenuFunctionalAncestors> ancestors) {
+ return fnMenuFunctionalAncestorsDao.saveAll(ancestors);
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnMenuFunctionalRolesDao.java b/portal-BE/src/main/java/org/onap/portal/service/menuFunctionalRoles/FnMenuFunctionalRolesDao.java
index 10b189bb..385552d2 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnMenuFunctionalRolesDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/menuFunctionalRoles/FnMenuFunctionalRolesDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.menuFunctionalRoles;
import java.util.List;
import org.onap.portal.domain.db.fn.FnMenuFunctionalRoles;
@@ -50,7 +50,7 @@ import org.springframework.transaction.annotation.Transactional;
@Transactional
@Repository
-public interface FnMenuFunctionalRolesDao extends JpaRepository<FnMenuFunctionalRoles, Long> {
+interface FnMenuFunctionalRolesDao extends JpaRepository<FnMenuFunctionalRoles, Long> {
@Query
List<FnMenuFunctionalRoles> retrieveByRoleId(final @Param("roleId") Long roleId);
diff --git a/portal-BE/src/main/java/org/onap/portal/service/fn/FnMenuFunctionalRolesService.java b/portal-BE/src/main/java/org/onap/portal/service/menuFunctionalRoles/FnMenuFunctionalRolesService.java
index c1747da1..3a2c62a5 100644
--- a/portal-BE/src/main/java/org/onap/portal/service/fn/FnMenuFunctionalRolesService.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/menuFunctionalRoles/FnMenuFunctionalRolesService.java
@@ -38,12 +38,12 @@
*
*/
-package org.onap.portal.service.fn;
+package org.onap.portal.service.menuFunctionalRoles;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
-import org.onap.portal.dao.fn.FnMenuFunctionalRolesDao;
+
import org.onap.portal.domain.db.fn.FnMenuFunctionalRoles;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -73,4 +73,7 @@ public class FnMenuFunctionalRolesService {
return Optional.of(fnMenuFunctionalRolesDao.retrieveByMenuId(menuId)).orElse(new ArrayList<>());
}
+ public List<FnMenuFunctionalRoles> saveAll(List<FnMenuFunctionalRoles> functionalRoles) {
+ return fnMenuFunctionalRolesDao.saveAll(functionalRoles);
+ }
}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/ep/EpMicroserviceDao.java b/portal-BE/src/main/java/org/onap/portal/service/microservice/EpMicroserviceDao.java
index d68e1f84..70c4c05e 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/ep/EpMicroserviceDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/microservice/EpMicroserviceDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.ep;
+package org.onap.portal.service.microservice;
import org.onap.portal.domain.db.ep.EpMicroservice;
import org.springframework.data.jpa.repository.JpaRepository;
@@ -47,6 +47,6 @@ import org.springframework.transaction.annotation.Transactional;
@Transactional
@Repository
-public interface EpMicroserviceDao extends JpaRepository<EpMicroservice, Long> {
+interface EpMicroserviceDao extends JpaRepository<EpMicroservice, Long> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/microservice/EpMicroserviceService.java b/portal-BE/src/main/java/org/onap/portal/service/microservice/EpMicroserviceService.java
new file mode 100644
index 00000000..1b999f85
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/microservice/EpMicroserviceService.java
@@ -0,0 +1,22 @@
+package org.onap.portal.service.microservice;
+
+import org.onap.portal.domain.db.ep.EpMicroservice;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class EpMicroserviceService {
+
+ private final EpMicroserviceDao epMicroserviceDao;
+
+ @Autowired
+ public EpMicroserviceService(EpMicroserviceDao epMicroserviceDao) {
+ this.epMicroserviceDao = epMicroserviceDao;
+ }
+
+ public List<EpMicroservice> saveAll(List<EpMicroservice> epMicroservices) {
+ return epMicroserviceDao.saveAll(epMicroservices);
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/ep/EpMicroserviceParameterDao.java b/portal-BE/src/main/java/org/onap/portal/service/microserviceParameter/EpMicroserviceParameterDao.java
index add897c9..ad054d95 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/ep/EpMicroserviceParameterDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/microserviceParameter/EpMicroserviceParameterDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.ep;
+package org.onap.portal.service.microserviceParameter;
import java.util.List;
import org.onap.portal.domain.db.ep.EpMicroserviceParameter;
@@ -50,7 +50,7 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface EpMicroserviceParameterDao extends JpaRepository<EpMicroserviceParameter, Long> {
+interface EpMicroserviceParameterDao extends JpaRepository<EpMicroserviceParameter, Long> {
@Query
void deleteByServiceId(@Param("SERVICEID") Long userId);
diff --git a/portal-BE/src/main/java/org/onap/portal/service/ep/EpMicroserviceParameterService.java b/portal-BE/src/main/java/org/onap/portal/service/microserviceParameter/EpMicroserviceParameterService.java
index ea0e69b6..f4359c5d 100644
--- a/portal-BE/src/main/java/org/onap/portal/service/ep/EpMicroserviceParameterService.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/microserviceParameter/EpMicroserviceParameterService.java
@@ -38,16 +38,16 @@
*
*/
-package org.onap.portal.service.ep;
+package org.onap.portal.service.microserviceParameter;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Restrictions;
-import org.onap.portal.dao.ep.EpMicroserviceParameterDao;
import org.onap.portal.domain.db.ep.EpMicroserviceParameter;
import org.onap.portal.domain.dto.ecomp.MicroserviceParameter;
+import org.onap.portal.service.widgetCatalogParameter.EpWidgetCatalogParameterService;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -101,4 +101,8 @@ public class EpMicroserviceParameterService {
return false;
}
}
+
+ public List<EpMicroserviceParameter> saveAll(List<EpMicroserviceParameter> epMicroserviceParameters) {
+ return epMicroserviceParameterDao.saveAll(epMicroserviceParameters);
+ }
}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnPersUserAppSelDao.java b/portal-BE/src/main/java/org/onap/portal/service/persUserAppSel/FnPersUserAppSelDao.java
index ff7e6e72..b6110748 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnPersUserAppSelDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/persUserAppSel/FnPersUserAppSelDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.persUserAppSel;
import org.onap.portal.domain.db.fn.FnPersUserAppSel;
import org.springframework.data.jpa.repository.JpaRepository;
@@ -47,6 +47,6 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface FnPersUserAppSelDao extends JpaRepository<FnPersUserAppSel, Long> {
+interface FnPersUserAppSelDao extends JpaRepository<FnPersUserAppSel, Long> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/persUserAppSel/FnPersUserAppSelService.java b/portal-BE/src/main/java/org/onap/portal/service/persUserAppSel/FnPersUserAppSelService.java
new file mode 100644
index 00000000..41c281dd
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/persUserAppSel/FnPersUserAppSelService.java
@@ -0,0 +1,22 @@
+package org.onap.portal.service.persUserAppSel;
+
+import org.onap.portal.domain.db.fn.FnPersUserAppSel;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class FnPersUserAppSelService {
+
+ private final FnPersUserAppSelDao fnPersUserAppSelDao;
+
+ @Autowired
+ public FnPersUserAppSelService(FnPersUserAppSelDao fnPersUserAppSelDao) {
+ this.fnPersUserAppSelDao = fnPersUserAppSelDao;
+ }
+
+ public List<FnPersUserAppSel> saveAll(List<FnPersUserAppSel> appSels) {
+ return fnPersUserAppSelDao.saveAll(appSels);
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/ep/EpPersUserAppSortDao.java b/portal-BE/src/main/java/org/onap/portal/service/persUserAppSort/EpPersUserAppSortDao.java
index bc9da593..e117fc3f 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/ep/EpPersUserAppSortDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/persUserAppSort/EpPersUserAppSortDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.ep;
+package org.onap.portal.service.persUserAppSort;
import org.onap.portal.domain.db.ep.EpPersUserAppSort;
import org.springframework.data.jpa.repository.JpaRepository;
@@ -47,6 +47,6 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface EpPersUserAppSortDao extends JpaRepository<EpPersUserAppSort, Long> {
+interface EpPersUserAppSortDao extends JpaRepository<EpPersUserAppSort, Long> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/persUserAppSort/EpPersUserAppSortService.java b/portal-BE/src/main/java/org/onap/portal/service/persUserAppSort/EpPersUserAppSortService.java
new file mode 100644
index 00000000..05d32e6d
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/persUserAppSort/EpPersUserAppSortService.java
@@ -0,0 +1,20 @@
+package org.onap.portal.service.persUserAppSort;
+
+import org.onap.portal.domain.db.ep.EpPersUserAppSort;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class EpPersUserAppSortService {
+
+ private final EpPersUserAppSortDao epPersUserAppSortDao;
+
+ @Autowired
+ public EpPersUserAppSortService(EpPersUserAppSortDao epPersUserAppSortDao) {
+ this.epPersUserAppSortDao = epPersUserAppSortDao;
+ }
+
+ public EpPersUserAppSort save(EpPersUserAppSort appSort) {
+ return epPersUserAppSortDao.save(appSort);
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/ep/EpPersUserWidgetSelDao.java b/portal-BE/src/main/java/org/onap/portal/service/persUserWidgetSel/EpPersUserWidgetSelDao.java
index 899fc1f0..cab80d83 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/ep/EpPersUserWidgetSelDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/persUserWidgetSel/EpPersUserWidgetSelDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.ep;
+package org.onap.portal.service.persUserWidgetSel;
import java.util.List;
import java.util.Optional;
@@ -51,7 +51,7 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface EpPersUserWidgetSelDao extends JpaRepository<EpPersUserWidgetSel, Long> {
+interface EpPersUserWidgetSelDao extends JpaRepository<EpPersUserWidgetSel, Long> {
@Query
Optional<List<EpPersUserWidgetSel>> getEpPersUserWidgetSelForUserIdAndWidgetId(@Param("USERID") Long userId, @Param("WIDGETID") Long widgetId);
diff --git a/portal-BE/src/main/java/org/onap/portal/service/persUserWidgetSel/EpPersUserWidgetSelService.java b/portal-BE/src/main/java/org/onap/portal/service/persUserWidgetSel/EpPersUserWidgetSelService.java
new file mode 100644
index 00000000..cd940d1c
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/persUserWidgetSel/EpPersUserWidgetSelService.java
@@ -0,0 +1,32 @@
+package org.onap.portal.service.persUserWidgetSel;
+
+import org.onap.portal.domain.db.ep.EpPersUserWidgetSel;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+
+@Service
+public class EpPersUserWidgetSelService {
+
+ private final EpPersUserWidgetSelDao epPersUserWidgetSelDao;
+
+ @Autowired
+ public EpPersUserWidgetSelService(EpPersUserWidgetSelDao epPersUserWidgetSelDao) {
+ this.epPersUserWidgetSelDao = epPersUserWidgetSelDao;
+ }
+
+ public void deleteById(Long id) {
+ epPersUserWidgetSelDao.deleteById(id);
+ }
+
+ public EpPersUserWidgetSel saveAndFlush(EpPersUserWidgetSel epPersUserWidgetSel) {
+ return epPersUserWidgetSelDao.saveAndFlush(epPersUserWidgetSel);
+ }
+
+ public Optional<List<EpPersUserWidgetSel>> getEpPersUserWidgetSelForUserIdAndWidgetId(Long id, Long widgetId) {
+ return epPersUserWidgetSelDao.getEpPersUserWidgetSelForUserIdAndWidgetId(id, widgetId);
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnQzCronTriggersDao.java b/portal-BE/src/main/java/org/onap/portal/service/qzCronTriggers/FnQzCronTriggersDao.java
index ec09ae54..a994050f 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnQzCronTriggersDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/qzCronTriggers/FnQzCronTriggersDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.qzCronTriggers;
import org.onap.portal.domain.db.fn.FnQzCronTriggers;
import org.onap.portal.domain.db.fn.compositePK.FnQzTriggersId;
@@ -48,6 +48,6 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface FnQzCronTriggersDao extends JpaRepository<FnQzCronTriggers, FnQzTriggersId> {
+interface FnQzCronTriggersDao extends JpaRepository<FnQzCronTriggers, FnQzTriggersId> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/qzCronTriggers/FnQzCronTriggersService.java b/portal-BE/src/main/java/org/onap/portal/service/qzCronTriggers/FnQzCronTriggersService.java
new file mode 100644
index 00000000..8cfdef24
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/qzCronTriggers/FnQzCronTriggersService.java
@@ -0,0 +1,15 @@
+package org.onap.portal.service.qzCronTriggers;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class FnQzCronTriggersService {
+
+ private final FnQzCronTriggersDao fnQzCronTriggersDao;
+
+ @Autowired
+ public FnQzCronTriggersService(FnQzCronTriggersDao fnQzCronTriggersDao) {
+ this.fnQzCronTriggersDao = fnQzCronTriggersDao;
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnQzJobDetailsDao.java b/portal-BE/src/main/java/org/onap/portal/service/qzJobDetails/FnQzJobDetailsDao.java
index 3a3a4183..5212031f 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnQzJobDetailsDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/qzJobDetails/FnQzJobDetailsDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.qzJobDetails;
import org.onap.portal.domain.db.fn.FnQzJobDetails;
import org.onap.portal.domain.db.fn.FnQzJobDetails.FnQzJobDetailsID;
@@ -48,6 +48,6 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface FnQzJobDetailsDao extends JpaRepository<FnQzJobDetails, FnQzJobDetailsID> {
+interface FnQzJobDetailsDao extends JpaRepository<FnQzJobDetails, FnQzJobDetailsID> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/qzJobDetails/FnQzJobDetailsService.java b/portal-BE/src/main/java/org/onap/portal/service/qzJobDetails/FnQzJobDetailsService.java
new file mode 100644
index 00000000..f83f8e75
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/qzJobDetails/FnQzJobDetailsService.java
@@ -0,0 +1,22 @@
+package org.onap.portal.service.qzJobDetails;
+
+import org.onap.portal.domain.db.fn.FnQzJobDetails;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class FnQzJobDetailsService {
+
+ private final FnQzJobDetailsDao fnQzJobDetailsDao;
+
+ @Autowired
+ public FnQzJobDetailsService(FnQzJobDetailsDao fnQzJobDetailsDao) {
+ this.fnQzJobDetailsDao = fnQzJobDetailsDao;
+ }
+
+ public List<FnQzJobDetails> saveAll(List<FnQzJobDetails> jobDetails) {
+ return fnQzJobDetailsDao.saveAll(jobDetails);
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnQzLocksDao.java b/portal-BE/src/main/java/org/onap/portal/service/qzLocks/FnQzLocksDao.java
index 7063cf7e..e4df13af 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnQzLocksDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/qzLocks/FnQzLocksDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.qzLocks;
import org.onap.portal.domain.db.fn.FnQzLocks;
import org.onap.portal.domain.db.fn.FnQzLocks.FnQzLocksID;
@@ -48,6 +48,6 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface FnQzLocksDao extends JpaRepository<FnQzLocks, FnQzLocksID> {
+interface FnQzLocksDao extends JpaRepository<FnQzLocks, FnQzLocksID> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/qzLocks/FnQzLocksService.java b/portal-BE/src/main/java/org/onap/portal/service/qzLocks/FnQzLocksService.java
new file mode 100644
index 00000000..a582f6df
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/qzLocks/FnQzLocksService.java
@@ -0,0 +1,22 @@
+package org.onap.portal.service.qzLocks;
+
+import org.onap.portal.domain.db.fn.FnQzLocks;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class FnQzLocksService {
+
+ private final FnQzLocksDao fnQzLocksDao;
+
+ @Autowired
+ public FnQzLocksService(FnQzLocksDao fnQzLocksDao) {
+ this.fnQzLocksDao = fnQzLocksDao;
+ }
+
+ public List<FnQzLocks> saveAll(List<FnQzLocks> locks) {
+ return fnQzLocksDao.saveAll(locks);
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnQzSchedulerStateDao.java b/portal-BE/src/main/java/org/onap/portal/service/qzSchedulerState/FnQzSchedulerStateDao.java
index 17bbd7fa..56a2e84f 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnQzSchedulerStateDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/qzSchedulerState/FnQzSchedulerStateDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.qzSchedulerState;
import org.onap.portal.domain.db.fn.FnQzSchedulerState;
import org.onap.portal.domain.db.fn.FnQzSchedulerState.FnQzSchedulerStateID;
@@ -48,6 +48,6 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface FnQzSchedulerStateDao extends JpaRepository<FnQzSchedulerState, FnQzSchedulerStateID> {
+interface FnQzSchedulerStateDao extends JpaRepository<FnQzSchedulerState, FnQzSchedulerStateID> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/qzSchedulerState/FnQzSchedulerStateService.java b/portal-BE/src/main/java/org/onap/portal/service/qzSchedulerState/FnQzSchedulerStateService.java
new file mode 100644
index 00000000..54519793
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/qzSchedulerState/FnQzSchedulerStateService.java
@@ -0,0 +1,20 @@
+package org.onap.portal.service.qzSchedulerState;
+
+import org.onap.portal.domain.db.fn.FnQzSchedulerState;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class FnQzSchedulerStateService {
+
+ private final FnQzSchedulerStateDao fnQzSchedulerStateDao;
+
+ @Autowired
+ public FnQzSchedulerStateService(FnQzSchedulerStateDao fnQzSchedulerStateDao) {
+ this.fnQzSchedulerStateDao = fnQzSchedulerStateDao;
+ }
+
+ public FnQzSchedulerState save(FnQzSchedulerState schedulerState) {
+ return fnQzSchedulerStateDao.save(schedulerState);
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnQzTriggersDao.java b/portal-BE/src/main/java/org/onap/portal/service/qzTriggers/FnQzTriggersDao.java
index 55a86de2..c731f70d 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnQzTriggersDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/qzTriggers/FnQzTriggersDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.qzTriggers;
import org.onap.portal.domain.db.fn.FnQzTriggers;
import org.onap.portal.domain.db.fn.compositePK.FnQzTriggersId;
@@ -48,6 +48,6 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface FnQzTriggersDao extends JpaRepository<FnQzTriggers, FnQzTriggersId> {
+interface FnQzTriggersDao extends JpaRepository<FnQzTriggers, FnQzTriggersId> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/qzTriggers/FnQzTriggersService.java b/portal-BE/src/main/java/org/onap/portal/service/qzTriggers/FnQzTriggersService.java
new file mode 100644
index 00000000..4f175afe
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/qzTriggers/FnQzTriggersService.java
@@ -0,0 +1,15 @@
+package org.onap.portal.service.qzTriggers;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class FnQzTriggersService {
+
+ private final FnQzTriggersDao fnQzTriggersDao;
+
+ @Autowired
+ public FnQzTriggersService(FnQzTriggersDao fnQzTriggersDao) {
+ this.fnQzTriggersDao = fnQzTriggersDao;
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnRestrictedUrlDao.java b/portal-BE/src/main/java/org/onap/portal/service/restrictedUrl/FnRestrictedUrlDao.java
index 1bf54d6d..d836c488 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnRestrictedUrlDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/restrictedUrl/FnRestrictedUrlDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.restrictedUrl;
import org.onap.portal.domain.db.fn.FnRestrictedUrl;
import org.onap.portal.domain.db.fn.FnRestrictedUrl.FnRestrictedUrlId;
@@ -48,6 +48,5 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface FnRestrictedUrlDao extends JpaRepository<FnRestrictedUrl, FnRestrictedUrlId> {
-
+interface FnRestrictedUrlDao extends JpaRepository<FnRestrictedUrl, FnRestrictedUrlId> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/restrictedUrl/FnRestrictedUrlService.java b/portal-BE/src/main/java/org/onap/portal/service/restrictedUrl/FnRestrictedUrlService.java
new file mode 100644
index 00000000..8f04dbfe
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/restrictedUrl/FnRestrictedUrlService.java
@@ -0,0 +1,15 @@
+package org.onap.portal.service.restrictedUrl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class FnRestrictedUrlService {
+
+ private final FnRestrictedUrlDao fnRestrictedUrlDao;
+
+ @Autowired
+ public FnRestrictedUrlService(FnRestrictedUrlDao fnRestrictedUrlDao) {
+ this.fnRestrictedUrlDao = fnRestrictedUrlDao;
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnRoleDao.java b/portal-BE/src/main/java/org/onap/portal/service/role/FnRoleDao.java
index f979be6e..e12391d8 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnRoleDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/role/FnRoleDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.role;
import java.util.List;
import org.onap.portal.domain.db.fn.FnRole;
@@ -50,7 +50,7 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface FnRoleDao extends JpaRepository<FnRole, Long> {
+interface FnRoleDao extends JpaRepository<FnRole, Long> {
@Query
List<FnRole> retrieveAppRoleByAppRoleIdAndByAppId(final @Param("appId") Long appId,
diff --git a/portal-BE/src/main/java/org/onap/portal/service/fn/FnRoleService.java b/portal-BE/src/main/java/org/onap/portal/service/role/FnRoleService.java
index 39a886c2..d73ae66e 100644
--- a/portal-BE/src/main/java/org/onap/portal/service/fn/FnRoleService.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/role/FnRoleService.java
@@ -38,13 +38,13 @@
*
*/
-package org.onap.portal.service.fn;
+package org.onap.portal.service.role;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import javax.persistence.EntityExistsException;
-import org.onap.portal.dao.fn.FnRoleDao;
+
import org.onap.portal.domain.db.fn.FnRole;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.springframework.beans.factory.annotation.Autowired;
@@ -57,7 +57,6 @@ public class FnRoleService {
private final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FnRoleService.class);
-
private final FnRoleDao fnRoleDao;
@Autowired
@@ -149,4 +148,8 @@ public class FnRoleService {
public FnRole saveOne(final FnRole role){
return fnRoleDao.save(role);
}
+
+ public List<FnRole> saveAll(List<FnRole> fnRoles) {
+ return fnRoleDao.saveAll(fnRoles);
+ }
}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnRoleCompositeDao.java b/portal-BE/src/main/java/org/onap/portal/service/roleComposite/FnRoleCompositeDao.java
index 89df2c41..61c4e139 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnRoleCompositeDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/roleComposite/FnRoleCompositeDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.roleComposite;
import org.onap.portal.domain.db.fn.FnRoleComposite;
import org.onap.portal.domain.db.fn.compositePK.FnRoleCompositeId;
@@ -48,6 +48,6 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface FnRoleCompositeDao extends JpaRepository<FnRoleComposite, FnRoleCompositeId> {
+interface FnRoleCompositeDao extends JpaRepository<FnRoleComposite, FnRoleCompositeId> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/roleComposite/FnRoleCompositeService.java b/portal-BE/src/main/java/org/onap/portal/service/roleComposite/FnRoleCompositeService.java
new file mode 100644
index 00000000..ed15259e
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/roleComposite/FnRoleCompositeService.java
@@ -0,0 +1,15 @@
+package org.onap.portal.service.roleComposite;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class FnRoleCompositeService {
+
+ private final FnRoleCompositeDao fnRoleCompositeDao;
+
+ @Autowired
+ public FnRoleCompositeService(FnRoleCompositeDao fnRoleCompositeDao) {
+ this.fnRoleCompositeDao = fnRoleCompositeDao;
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnRoleFunctionDao.java b/portal-BE/src/main/java/org/onap/portal/service/roleFunction/FnRoleFunctionDao.java
index eaafb78d..2928d8a1 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnRoleFunctionDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/roleFunction/FnRoleFunctionDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.roleFunction;
import org.onap.portal.domain.db.fn.FnRoleFunction;
import org.springframework.data.jpa.repository.JpaRepository;
@@ -47,6 +47,6 @@ import org.springframework.transaction.annotation.Transactional;
@Transactional
@Repository
-public interface FnRoleFunctionDao extends JpaRepository<FnRoleFunction, Long> {
+interface FnRoleFunctionDao extends JpaRepository<FnRoleFunction, Long> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/roleFunction/FnRoleFunctionService.java b/portal-BE/src/main/java/org/onap/portal/service/roleFunction/FnRoleFunctionService.java
new file mode 100644
index 00000000..a91dee82
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/roleFunction/FnRoleFunctionService.java
@@ -0,0 +1,22 @@
+package org.onap.portal.service.roleFunction;
+
+import org.onap.portal.domain.db.fn.FnRoleFunction;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class FnRoleFunctionService {
+
+ private final FnRoleFunctionDao fnRoleFunctionDao;
+
+ @Autowired
+ public FnRoleFunctionService(FnRoleFunctionDao fnRoleFunctionDao) {
+ this.fnRoleFunctionDao = fnRoleFunctionDao;
+ }
+
+ public List<FnRoleFunction> saveAll(List<FnRoleFunction> roleFunctions) {
+ return fnRoleFunctionDao.saveAll(roleFunctions);
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnSharedContextDao.java b/portal-BE/src/main/java/org/onap/portal/service/sharedContext/FnSharedContextDao.java
index 765bc1dd..8faac5b6 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnSharedContextDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/sharedContext/FnSharedContextDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.sharedContext;
import org.onap.portal.domain.db.fn.FnSharedContext;
import org.springframework.data.jpa.repository.JpaRepository;
@@ -47,6 +47,6 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface FnSharedContextDao extends JpaRepository<FnSharedContext, Long> {
+interface FnSharedContextDao extends JpaRepository<FnSharedContext, Long> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/sharedContext/FnSharedContextService.java b/portal-BE/src/main/java/org/onap/portal/service/sharedContext/FnSharedContextService.java
new file mode 100644
index 00000000..7a427ae9
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/sharedContext/FnSharedContextService.java
@@ -0,0 +1,22 @@
+package org.onap.portal.service.sharedContext;
+
+import org.onap.portal.domain.db.fn.FnSharedContext;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class FnSharedContextService {
+
+ private final FnSharedContextDao fnSharedContextDao;
+
+ @Autowired
+ public FnSharedContextService(FnSharedContextDao fnSharedContextDao) {
+ this.fnSharedContextDao = fnSharedContextDao;
+ }
+
+ public List<FnSharedContext> saveAll(List<FnSharedContext> sharedContexts) {
+ return fnSharedContextDao.saveAll(sharedContexts);
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnTabDao.java b/portal-BE/src/main/java/org/onap/portal/service/tab/FnTabDao.java
index c6518a99..ad9e7b6f 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnTabDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/tab/FnTabDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.tab;
import org.onap.portal.domain.db.fn.FnTab;
import org.springframework.data.jpa.repository.JpaRepository;
@@ -47,6 +47,6 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface FnTabDao extends JpaRepository<FnTab, String> {
+interface FnTabDao extends JpaRepository<FnTab, String> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/tab/FnTabService.java b/portal-BE/src/main/java/org/onap/portal/service/tab/FnTabService.java
new file mode 100644
index 00000000..ed90831d
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/tab/FnTabService.java
@@ -0,0 +1,22 @@
+package org.onap.portal.service.tab;
+
+import org.onap.portal.domain.db.fn.FnTab;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class FnTabService {
+
+ private final FnTabDao fnTabDao;
+
+ @Autowired
+ public FnTabService(FnTabDao fnTabDao) {
+ this.fnTabDao = fnTabDao;
+ }
+
+ public List<FnTab> saveAll(List<FnTab> fnTabs) {
+ return fnTabDao.saveAll(fnTabs);
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnTabSelectedDao.java b/portal-BE/src/main/java/org/onap/portal/service/tabSelected/FnTabSelectedDao.java
index 42da97e0..a11b30c3 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnTabSelectedDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/tabSelected/FnTabSelectedDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.tabSelected;
import org.onap.portal.domain.db.fn.FnTabSelected;
import org.onap.portal.domain.db.fn.FnTabSelected.FnTabSelectedId;
@@ -48,6 +48,6 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface FnTabSelectedDao extends JpaRepository<FnTabSelected, FnTabSelectedId> {
+interface FnTabSelectedDao extends JpaRepository<FnTabSelected, FnTabSelectedId> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/tabSelected/FnTabSelectedService.java b/portal-BE/src/main/java/org/onap/portal/service/tabSelected/FnTabSelectedService.java
new file mode 100644
index 00000000..92c6f56b
--- /dev/null
+++ b/portal-BE/src/main/java/org/onap/portal/service/tabSelected/FnTabSelectedService.java
@@ -0,0 +1,15 @@
+package org.onap.portal.service.tabSelected;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class FnTabSelectedService {
+
+ private final FnTabSelectedDao fnTabSelectedDao;
+
+ @Autowired
+ public FnTabSelectedService(FnTabSelectedDao fnTabSelectedDao) {
+ this.fnTabSelectedDao = fnTabSelectedDao;
+ }
+}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnUserDao.java b/portal-BE/src/main/java/org/onap/portal/service/user/FnUserDao.java
index f52075c1..f7a150d3 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnUserDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/user/FnUserDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.user;
import java.util.List;
import java.util.Optional;
@@ -51,7 +51,7 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface FnUserDao extends JpaRepository<FnUser, Long> {
+interface FnUserDao extends JpaRepository<FnUser, Long> {
@Query
Optional<FnUser> findByLoginId(final @Param("loginId") String username);
diff --git a/portal-BE/src/main/java/org/onap/portal/service/fn/FnUserService.java b/portal-BE/src/main/java/org/onap/portal/service/user/FnUserService.java
index 16d32a67..975bd219 100644
--- a/portal-BE/src/main/java/org/onap/portal/service/fn/FnUserService.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/user/FnUserService.java
@@ -38,12 +38,12 @@
*
*/
-package org.onap.portal.service.fn;
+package org.onap.portal.service.user;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
-import org.onap.portal.dao.fn.FnUserDao;
+
import org.onap.portal.domain.db.fn.FnUser;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.springframework.beans.factory.annotation.Autowired;
@@ -89,12 +89,12 @@ public class FnUserService implements UserDetailsService {
return fnUserDao.getUserWithOrgUserId(orgUserIdValue).orElse(new ArrayList<>());
}
- List<FnUser> getUsersByOrgIds(final List<String> orgIds) {
+ public List<FnUser> getUsersByOrgIds(final List<String> orgIds) {
return fnUserDao.getUsersByOrgIds(orgIds).orElse(new ArrayList<>());
}
- List<FnUser> getActiveUsers() {
+ public List<FnUser> getActiveUsers() {
return fnUserDao.getActiveUsers().orElse(new ArrayList<>());
}
@@ -109,4 +109,16 @@ public class FnUserService implements UserDetailsService {
public List<FnUser> findAll() {
return fnUserDao.findAll();
}
- } \ No newline at end of file
+
+ public List<FnUser> saveAll(List<FnUser> fnUsers) {
+ return fnUserDao.saveAll(fnUsers);
+ }
+
+ public FnUser save(FnUser user) {
+ return fnUserDao.save(user);
+ }
+
+ public void delete(FnUser user) {
+ fnUserDao.delete(user);
+ }
+} \ No newline at end of file
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnUserRoleDao.java b/portal-BE/src/main/java/org/onap/portal/service/userRole/FnUserRoleDao.java
index 402304b8..141658a2 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnUserRoleDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/userRole/FnUserRoleDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.userRole;
import java.util.List;
import java.util.Optional;
@@ -52,7 +52,7 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface FnUserRoleDao extends JpaRepository<FnUserRole, Long> {
+interface FnUserRoleDao extends JpaRepository<FnUserRole, Long> {
@Query
Optional<List<FnUserRole>> getAdminUserRoles(final @Param("userId") Long userId, final @Param("roleId") Long roleId, final @Param("appId") Long appId);
diff --git a/portal-BE/src/main/java/org/onap/portal/service/fn/FnUserRoleService.java b/portal-BE/src/main/java/org/onap/portal/service/userRole/FnUserRoleService.java
index fac4b14a..eb7ece2b 100644
--- a/portal-BE/src/main/java/org/onap/portal/service/fn/FnUserRoleService.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/userRole/FnUserRoleService.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.service.fn;
+package org.onap.portal.service.userRole;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationFeature;
@@ -58,7 +58,6 @@ import javax.persistence.EntityManager;
import javax.persistence.Tuple;
import javax.servlet.http.HttpServletResponse;
import org.apache.cxf.transport.http.HTTPException;
-import org.onap.portal.dao.fn.FnUserRoleDao;
import org.onap.portal.domain.db.ep.EpUserRolesRequest;
import org.onap.portal.domain.db.ep.EpUserRolesRequestDet;
import org.onap.portal.domain.db.fn.FnApp;
@@ -75,9 +74,11 @@ import org.onap.portal.domain.dto.transport.Role;
import org.onap.portal.domain.dto.transport.RoleInAppForUser;
import org.onap.portal.domain.dto.transport.UserApplicationRoles;
import org.onap.portal.service.ApplicationsRestClientService;
-import org.onap.portal.service.ep.EpAppFunctionService;
-import org.onap.portal.service.ep.EpUserRolesRequestDetService;
-import org.onap.portal.service.ep.EpUserRolesRequestService;
+import org.onap.portal.service.userRolesRequestDet.EpUserRolesRequestDetService;
+import org.onap.portal.service.userRolesRequest.EpUserRolesRequestService;
+import org.onap.portal.service.app.FnAppService;
+import org.onap.portal.service.role.FnRoleService;
+import org.onap.portal.service.user.FnUserService;
import org.onap.portal.utils.EPCommonSystemProperties;
import org.onap.portal.utils.PortalConstants;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
@@ -536,4 +537,8 @@ public class FnUserRoleService {
}
return rolesInAppForUser;
}
+
+ public List<FnUserRole> saveAll(List<FnUserRole> userRoles) {
+ return fnUserRoleDao.saveAll(userRoles);
+ }
}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/ep/EpUserRolesRequestDao.java b/portal-BE/src/main/java/org/onap/portal/service/userRolesRequest/EpUserRolesRequestDao.java
index 7924d431..5fefa885 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/ep/EpUserRolesRequestDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/userRolesRequest/EpUserRolesRequestDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.ep;
+package org.onap.portal.service.userRolesRequest;
import java.util.List;
import org.onap.portal.domain.db.ep.EpUserRolesRequest;
@@ -50,7 +50,7 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface EpUserRolesRequestDao extends JpaRepository<EpUserRolesRequest, Long> {
+interface EpUserRolesRequestDao extends JpaRepository<EpUserRolesRequest, Long> {
@Query
List<EpUserRolesRequest> userAppRolesRequestList(final @Param("userId") Long userId, final @Param("appId") Long appId);
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/ep/EpUserRolesRequestService.java b/portal-BE/src/main/java/org/onap/portal/service/userRolesRequest/EpUserRolesRequestService.java
index 4f5326d7..ab363266 100644
--- a/portal-BE/src/main/java/org/onap/portal/service/ep/EpUserRolesRequestService.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/userRolesRequest/EpUserRolesRequestService.java
@@ -38,12 +38,12 @@
*
*/
-package org.onap.portal.service.ep;
+package org.onap.portal.service.userRolesRequest;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
-import org.onap.portal.dao.ep.EpUserRolesRequestDao;
+
import org.onap.portal.domain.db.ep.EpUserRolesRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/ep/EpUserRolesRequestDetDao.java b/portal-BE/src/main/java/org/onap/portal/service/userRolesRequestDet/EpUserRolesRequestDetDao.java
index cfc97baa..8d04bf92 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/ep/EpUserRolesRequestDetDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/userRolesRequestDet/EpUserRolesRequestDetDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.ep;
+package org.onap.portal.service.userRolesRequestDet;
import java.util.List;
import org.onap.portal.domain.db.ep.EpUserRolesRequestDet;
@@ -50,7 +50,7 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface EpUserRolesRequestDetDao extends JpaRepository<EpUserRolesRequestDet, Long> {
+interface EpUserRolesRequestDetDao extends JpaRepository<EpUserRolesRequestDet, Long> {
@Query
List<EpUserRolesRequestDet> appRolesRequestDetailList(final @Param("reqId") Long reqId);
diff --git a/portal-BE/src/main/java/org/onap/portal/service/ep/EpUserRolesRequestDetService.java b/portal-BE/src/main/java/org/onap/portal/service/userRolesRequestDet/EpUserRolesRequestDetService.java
index 11c78b46..f8641f06 100644
--- a/portal-BE/src/main/java/org/onap/portal/service/ep/EpUserRolesRequestDetService.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/userRolesRequestDet/EpUserRolesRequestDetService.java
@@ -38,12 +38,11 @@
*
*/
-package org.onap.portal.service.ep;
+package org.onap.portal.service.userRolesRequestDet;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
-import org.onap.portal.dao.ep.EpUserRolesRequestDetDao;
import org.onap.portal.domain.db.ep.EpUserRolesRequestDet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnWidgetDao.java b/portal-BE/src/main/java/org/onap/portal/service/widget/FnWidgetDao.java
index 9c3e7a1f..053479ea 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/FnWidgetDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/widget/FnWidgetDao.java
@@ -38,7 +38,7 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.widget;
import java.util.List;
import java.util.Optional;
@@ -51,7 +51,7 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface FnWidgetDao extends JpaRepository<FnWidget, Long> {
+interface FnWidgetDao extends JpaRepository<FnWidget, Long> {
@Query
Optional<List<FnWidget>> getForUrlNameAndAppId(final @Param("URL") String url, final @Param("NAME") String name, final @Param("APPID") Long appId);
diff --git a/portal-BE/src/main/java/org/onap/portal/service/WidgetService.java b/portal-BE/src/main/java/org/onap/portal/service/widget/WidgetService.java
index 6f8440e6..05917eb4 100644
--- a/portal-BE/src/main/java/org/onap/portal/service/WidgetService.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/widget/WidgetService.java
@@ -38,19 +38,20 @@
*
*/
-package org.onap.portal.service;
+package org.onap.portal.service.widget;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.EntityManager;
import javax.servlet.http.HttpServletResponse;
-import org.onap.portal.dao.fn.FnWidgetDao;
+
import org.onap.portal.domain.db.fn.FnUser;
import org.onap.portal.domain.db.fn.FnUserRole;
import org.onap.portal.domain.db.fn.FnWidget;
import org.onap.portal.domain.dto.transport.FieldsValidator;
import org.onap.portal.domain.dto.transport.OnboardingWidget;
-import org.onap.portal.service.fn.FnUserRoleService;
+import org.onap.portal.service.AdminRolesService;
+import org.onap.portal.service.userRole.FnUserRoleService;
import org.onap.portal.utils.EPCommonSystemProperties;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/fn/EpWidgetCatalogDao.java b/portal-BE/src/main/java/org/onap/portal/service/widgetCatalog/EpWidgetCatalogDao.java
index 1e8de2bb..63bc5de8 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/fn/EpWidgetCatalogDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/widgetCatalog/EpWidgetCatalogDao.java
@@ -38,11 +38,11 @@
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.widgetCatalog;
import org.onap.portal.domain.db.ep.EpWidgetCatalog;
import org.springframework.data.jpa.repository.JpaRepository;
-public interface EpWidgetCatalogDao extends JpaRepository<EpWidgetCatalog, Long> {
+interface EpWidgetCatalogDao extends JpaRepository<EpWidgetCatalog, Long> {
}
diff --git a/portal-BE/src/main/java/org/onap/portal/service/ep/EpWidgetCatalogService.java b/portal-BE/src/main/java/org/onap/portal/service/widgetCatalog/EpWidgetCatalogService.java
index f0c273ad..2b17ea79 100644
--- a/portal-BE/src/main/java/org/onap/portal/service/ep/EpWidgetCatalogService.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/widgetCatalog/EpWidgetCatalogService.java
@@ -1,10 +1,12 @@
-package org.onap.portal.service.ep;
+package org.onap.portal.service.widgetCatalog;
-import org.onap.portal.dao.fn.EpWidgetCatalogDao;
import org.onap.portal.domain.db.ep.EpWidgetCatalog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import java.util.List;
+import java.util.Optional;
+
@Service
public class EpWidgetCatalogService {
@@ -18,4 +20,12 @@ public class EpWidgetCatalogService {
public EpWidgetCatalog save(final EpWidgetCatalog epWidgetCatalog){
return epWidgetCatalogDao.save(epWidgetCatalog);
}
+
+ public Optional<EpWidgetCatalog> findById(Long widgetId) {
+ return epWidgetCatalogDao.findById(widgetId);
+ }
+
+ public List<EpWidgetCatalog> saveAll(List<EpWidgetCatalog> epWidgetCatalogs) {
+ return epWidgetCatalogDao.saveAll(epWidgetCatalogs);
+ }
}
diff --git a/portal-BE/src/main/java/org/onap/portal/dao/ep/EpWidgetCatalogParameterDao.java b/portal-BE/src/main/java/org/onap/portal/service/widgetCatalogParameter/EpWidgetCatalogParameterDao.java
index c5ec1248..6f388372 100644
--- a/portal-BE/src/main/java/org/onap/portal/dao/ep/EpWidgetCatalogParameterDao.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/widgetCatalogParameter/EpWidgetCatalogParameterDao.java
@@ -1,4 +1,4 @@
-package org.onap.portal.dao.ep;
+package org.onap.portal.service.widgetCatalogParameter;
import java.util.List;
import java.util.Optional;
@@ -12,7 +12,7 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional
-public interface EpWidgetCatalogParameterDao extends JpaRepository<EpWidgetCatalogParameter, Long> {
+interface EpWidgetCatalogParameterDao extends JpaRepository<EpWidgetCatalogParameter, Long> {
@Query
Optional<List<EpWidgetCatalogParameter>> retrieveByParamId(@Param("PARAMID") Long paramId);
diff --git a/portal-BE/src/main/java/org/onap/portal/service/ep/EpWidgetCatalogParameterService.java b/portal-BE/src/main/java/org/onap/portal/service/widgetCatalogParameter/EpWidgetCatalogParameterService.java
index 029c316e..cf9b9fc7 100644
--- a/portal-BE/src/main/java/org/onap/portal/service/ep/EpWidgetCatalogParameterService.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/widgetCatalogParameter/EpWidgetCatalogParameterService.java
@@ -38,12 +38,12 @@
*
*/
-package org.onap.portal.service.ep;
+package org.onap.portal.service.widgetCatalogParameter;
import java.util.ArrayList;
import java.util.List;
-import org.onap.portal.dao.ep.EpWidgetCatalogParameterDao;
import org.onap.portal.domain.db.ep.EpWidgetCatalogParameter;
+import org.onap.portal.service.microserviceParameter.EpMicroserviceParameterService;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
diff --git a/portal-BE/src/main/java/org/onap/portal/utils/EPUserUtils.java b/portal-BE/src/main/java/org/onap/portal/utils/EPUserUtils.java
index fea71337..027cebe7 100644
--- a/portal-BE/src/main/java/org/onap/portal/utils/EPUserUtils.java
+++ b/portal-BE/src/main/java/org/onap/portal/utils/EPUserUtils.java
@@ -63,7 +63,7 @@ import org.onap.portal.domain.db.fn.FnUser;
import org.onap.portal.domain.db.fn.FnUserRole;
import org.onap.portal.domain.dto.transport.Role;
import org.onap.portal.exception.RoleFunctionException;
-import org.onap.portal.service.fn.old.EPRoleFunctionService;
+import org.onap.portal.service.EPRoleFunctionService;
import org.onap.portalsdk.core.domain.RoleFunction;
import org.onap.portalsdk.core.exception.SessionExpiredException;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
diff --git a/portal-BE/src/test/java/org/onap/portal/controller/LanguageControllerTest.java b/portal-BE/src/test/java/org/onap/portal/controller/LanguageControllerTest.java
index e00dc5ca..ca0cf920 100644
--- a/portal-BE/src/test/java/org/onap/portal/controller/LanguageControllerTest.java
+++ b/portal-BE/src/test/java/org/onap/portal/controller/LanguageControllerTest.java
@@ -45,13 +45,13 @@ import static org.junit.jupiter.api.Assertions.assertNull;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
-import org.onap.portal.dao.fn.FnLanguageDao;
import org.onap.portal.domain.db.fn.FnLanguage;
import org.onap.portal.domain.db.fn.FnUser;
import org.onap.portal.domain.dto.PortalRestResponse;
import org.onap.portal.domain.dto.PortalRestStatusEnum;
import org.onap.portal.domain.dto.fn.FnLanguageDto;
-import org.onap.portal.service.fn.FnUserService;
+import org.onap.portal.service.language.FnLanguageService;
+import org.onap.portal.service.user.FnUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
@@ -69,7 +69,7 @@ class LanguageControllerTest {
@Autowired
private LanguageController languageController;
@Autowired
- private FnLanguageDao fnLanguageDao;
+ private FnLanguageService fnLanguageService;
@Autowired
private FnUserService fnUserService;
@@ -89,7 +89,7 @@ class LanguageControllerTest {
assertEquals(expected.getMessage(), actual.getMessage());
assertEquals(expected.getStatus(), actual.getStatus());
//Clean up
- fnLanguageDao.delete(fnLanguage);
+ fnLanguageService.delete(fnLanguage);
}
@Test
@@ -109,7 +109,7 @@ class LanguageControllerTest {
assertEquals(expected.getMessage(), actual.getMessage());
assertEquals(expected.getStatus(), actual.getStatus());
//Clean up
- fnLanguageDao.delete(fnLanguage);
+ fnLanguageService.delete(fnLanguage);
}
@Test
@@ -138,7 +138,7 @@ class LanguageControllerTest {
//Clean up
- fnLanguageDao.delete(fnLanguage);
+ fnLanguageService.delete(fnLanguage);
}
@Test
@@ -162,7 +162,7 @@ class LanguageControllerTest {
//Clean up
- fnLanguageDao.delete(fnLanguage);
+ fnLanguageService.delete(fnLanguage);
}
diff --git a/portal-BE/src/test/java/org/onap/portal/controller/UserControllerTest.java b/portal-BE/src/test/java/org/onap/portal/controller/UserControllerTest.java
index 0316683f..7c654ad4 100644
--- a/portal-BE/src/test/java/org/onap/portal/controller/UserControllerTest.java
+++ b/portal-BE/src/test/java/org/onap/portal/controller/UserControllerTest.java
@@ -47,7 +47,7 @@ import org.onap.portal.domain.db.fn.FnUser;
import org.onap.portal.domain.dto.PortalRestResponse;
import org.onap.portal.domain.dto.PortalRestStatusEnum;
import org.onap.portal.domain.dto.transport.ProfileDetail;
-import org.onap.portal.service.fn.FnUserService;
+import org.onap.portal.service.user.FnUserService;
import org.onap.portalsdk.core.onboarding.exception.CipherUtilException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
diff --git a/portal-BE/src/test/java/org/onap/portal/controller/UserRolesControllerTest.java b/portal-BE/src/test/java/org/onap/portal/controller/UserRolesControllerTest.java
index e83c2470..e9f9627e 100644
--- a/portal-BE/src/test/java/org/onap/portal/controller/UserRolesControllerTest.java
+++ b/portal-BE/src/test/java/org/onap/portal/controller/UserRolesControllerTest.java
@@ -45,11 +45,11 @@ import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.onap.portal.domain.dto.ecomp.ExternalSystemAccess;
-import org.onap.portal.service.fn.FnAppService;
-import org.onap.portal.service.fn.FnLanguageService;
-import org.onap.portal.service.fn.FnRoleService;
-import org.onap.portal.service.fn.FnUserRoleService;
-import org.onap.portal.service.fn.FnUserService;
+import org.onap.portal.service.app.FnAppService;
+import org.onap.portal.service.language.FnLanguageService;
+import org.onap.portal.service.role.FnRoleService;
+import org.onap.portal.service.userRole.FnUserRoleService;
+import org.onap.portal.service.user.FnUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
diff --git a/portal-BE/src/test/java/org/onap/portal/controller/WidgetsCatalogControllerTest.java b/portal-BE/src/test/java/org/onap/portal/controller/WidgetsCatalogControllerTest.java
index 27ce3484..65525dbe 100644
--- a/portal-BE/src/test/java/org/onap/portal/controller/WidgetsCatalogControllerTest.java
+++ b/portal-BE/src/test/java/org/onap/portal/controller/WidgetsCatalogControllerTest.java
@@ -51,18 +51,17 @@ import java.util.List;
import javax.transaction.Transactional;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.onap.portal.dao.fn.FnLanguageDao;
import org.onap.portal.domain.db.ep.EpMicroserviceParameter;
import org.onap.portal.domain.db.ep.EpWidgetCatalog;
import org.onap.portal.domain.db.ep.EpWidgetCatalogParameter;
import org.onap.portal.domain.db.fn.FnLanguage;
import org.onap.portal.domain.db.fn.FnUser;
import org.onap.portal.domain.dto.ecomp.WidgetCatalog;
-import org.onap.portal.service.ep.EpMicroserviceParameterService;
-import org.onap.portal.service.ep.EpWidgetCatalogParameterService;
-import org.onap.portal.service.ep.EpWidgetCatalogService;
-import org.onap.portal.service.fn.FnLanguageService;
-import org.onap.portal.service.fn.FnUserService;
+import org.onap.portal.service.microserviceParameter.EpMicroserviceParameterService;
+import org.onap.portal.service.widgetCatalogParameter.EpWidgetCatalogParameterService;
+import org.onap.portal.service.widgetCatalog.EpWidgetCatalogService;
+import org.onap.portal.service.language.FnLanguageService;
+import org.onap.portal.service.user.FnUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
@@ -88,8 +87,6 @@ public class WidgetsCatalogControllerTest {
private EpMicroserviceParameterService epMicroserviceParameterService;
@Autowired
private EpWidgetCatalogService epWidgetCatalogService;
- @Autowired
- private FnLanguageDao fnLanguageDao;
@Test
public void getUserWidgetCatalog() {
@@ -172,7 +169,7 @@ public class WidgetsCatalogControllerTest {
EpMicroserviceParameter parameter = new EpMicroserviceParameter();
epMicroserviceParameterService.save(parameter);
FnUser user = buildFnUser();
- FnLanguage language = fnLanguageDao.getByLanguageAlias("EN");
+ FnLanguage language = fnLanguageService.getByLanguageAlias("EN");
user.setLanguageId(language);
fnUserService.saveFnUser(user);
EpWidgetCatalogParameter data = EpWidgetCatalogParameter.builder()
diff --git a/portal-BE/src/test/java/org/onap/portal/controller/WidgetsControllerTest.java b/portal-BE/src/test/java/org/onap/portal/controller/WidgetsControllerTest.java
index 168fcc7a..9da6e733 100644
--- a/portal-BE/src/test/java/org/onap/portal/controller/WidgetsControllerTest.java
+++ b/portal-BE/src/test/java/org/onap/portal/controller/WidgetsControllerTest.java
@@ -53,8 +53,6 @@ import javax.servlet.http.HttpServletResponse;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.onap.portal.dao.fn.FnLanguageDao;
-import org.onap.portal.dao.fn.FnUserDao;
import org.onap.portal.domain.db.fn.FnLanguage;
import org.onap.portal.domain.db.fn.FnUser;
import org.onap.portal.domain.db.fn.FnWidget;
@@ -62,8 +60,9 @@ import org.onap.portal.domain.dto.transport.FieldsValidator;
import org.onap.portal.domain.dto.transport.OnboardingWidget;
import org.onap.portal.domain.dto.transport.WidgetCatalogPersonalization;
import org.onap.portal.framework.MockitoTestSuite;
-import org.onap.portal.service.WidgetService;
-import org.onap.portal.service.fn.FnLanguageService;
+import org.onap.portal.service.user.FnUserService;
+import org.onap.portal.service.widget.WidgetService;
+import org.onap.portal.service.language.FnLanguageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
@@ -89,14 +88,11 @@ public class WidgetsControllerTest {
@Autowired
private WidgetsController widgetsController;
@Autowired
- private FnUserDao fnUserDao;
- @Autowired
- private FnLanguageDao fnLanguageDao;
- @Autowired
private WidgetService widgetService;
@Autowired
private FnLanguageService fnLanguageService;
-
+ @Autowired
+ FnUserService fnUserService;
private FnLanguage language;
private FnUser questUser;
private FnUser notQuestUser;
@@ -120,14 +116,14 @@ public class WidgetsControllerTest {
public void getOnboardingWidgetsQuestUserTest() {
UsernamePasswordAuthenticationToken questPrincipal = new UsernamePasswordAuthenticationToken("questUser",
"demo123");
- fnUserDao.save(questUser);
+ fnUserService.save(questUser);
List<OnboardingWidget> onboardingWidgets = widgetsController
.getOnboardingWidgets(questPrincipal, request, response);
assertNull(onboardingWidgets);
//Clean up
- fnUserDao.delete(questUser);
- fnLanguageDao.delete(language);
+ fnUserService.delete(questUser);
+ fnLanguageService.delete(language);
}
@Test
@@ -135,7 +131,7 @@ public class WidgetsControllerTest {
UsernamePasswordAuthenticationToken notQuestprincipal = new UsernamePasswordAuthenticationToken(
"notQuestUser",
"demo123");
- fnUserDao.save(notQuestUser);
+ fnUserService.save(notQuestUser);
List<OnboardingWidget> expected = new ArrayList<>();
when(request.getHeader("X-Widgets-Type")).thenReturn("managed");
@@ -143,7 +139,7 @@ public class WidgetsControllerTest {
.getOnboardingWidgets(notQuestprincipal, request, response);
assertEquals(expected, actual);
- fnUserDao.delete(notQuestUser);
+ fnUserService.delete(notQuestUser);
}
@Test
@@ -151,19 +147,19 @@ public class WidgetsControllerTest {
UsernamePasswordAuthenticationToken notQuestprincipal = new UsernamePasswordAuthenticationToken(
"notQuestUser",
"demo123");
- fnUserDao.save(notQuestUser);
+ fnUserService.save(notQuestUser);
when(request.getHeader("X-Widgets-Type")).thenReturn("test");
List<OnboardingWidget> actual = widgetsController
.getOnboardingWidgets(notQuestprincipal, request, response);
assertNull(actual);
- fnUserDao.delete(notQuestUser);
+ fnUserService.delete(notQuestUser);
}
@Test
public void putOnboardingWidgetSameWidget() {
//Given
- fnUserDao.save(notQuestUser);
+ fnUserService.save(notQuestUser);
when(request.getHeader("X-Widgets-Type")).thenReturn("managed");
OnboardingWidget onboardingWidget = OnboardingWidget.builder()
@@ -199,7 +195,7 @@ public class WidgetsControllerTest {
@Test
public void putOnboardingWidgetAOP() {
//Given
- fnUserDao.save(notQuestUser);
+ fnUserService.save(notQuestUser);
when(request.getHeader("X-Widgets-Type")).thenReturn("managed");
OnboardingWidget onboardingWidget = OnboardingWidget.builder()
@@ -236,7 +232,7 @@ public class WidgetsControllerTest {
@Test
public void putOnboardingWidgetAOPXSSTest() {
//Given
- fnUserDao.save(notQuestUser);
+ fnUserService.save(notQuestUser);
when(request.getHeader("X-Widgets-Type")).thenReturn("managed");
OnboardingWidget onboardingWidget = OnboardingWidget.builder()
@@ -264,7 +260,7 @@ public class WidgetsControllerTest {
@Test
public void postOnboardingWidgetXSS() {
//Given
- fnUserDao.save(notQuestUser);
+ fnUserService.save(notQuestUser);
when(request.getHeader("X-Widgets-Type")).thenReturn("managed");
OnboardingWidget onboardingWidget = OnboardingWidget.builder()
@@ -290,7 +286,7 @@ public class WidgetsControllerTest {
@Test
public void postOnboardingWidget() {
//Given
- fnUserDao.save(notQuestUser);
+ fnUserService.save(notQuestUser);
when(request.getHeader("X-Widgets-Type")).thenReturn("managed");
OnboardingWidget onboardingWidget = OnboardingWidget.builder()
@@ -315,7 +311,7 @@ public class WidgetsControllerTest {
@Test
public void deleteOnboardingWidgetSCFORBIDDEN() {
//Given
- fnUserDao.save(notQuestUser);
+ fnUserService.save(notQuestUser);
when(request.getHeader("X-Widgets-Type")).thenReturn("managed");
OnboardingWidget onboardingWidget = OnboardingWidget.builder()
diff --git a/portal-BE/src/test/java/org/onap/portal/service/ep/EpMicroserviceParameterServiceTest.java b/portal-BE/src/test/java/org/onap/portal/service/ep/EpMicroserviceParameterServiceTest.java
index b4427ef3..e11a696c 100644
--- a/portal-BE/src/test/java/org/onap/portal/service/ep/EpMicroserviceParameterServiceTest.java
+++ b/portal-BE/src/test/java/org/onap/portal/service/ep/EpMicroserviceParameterServiceTest.java
@@ -45,6 +45,7 @@ import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.onap.portal.domain.db.ep.EpMicroserviceParameter;
+import org.onap.portal.service.microserviceParameter.EpMicroserviceParameterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.TestPropertySource;
diff --git a/portal-BE/src/test/java/org/onap/portal/service/ep/EpWidgetCatalogParameterServiceTest.java b/portal-BE/src/test/java/org/onap/portal/service/ep/EpWidgetCatalogParameterServiceTest.java
index ad1ee60d..7c7b0b7a 100644
--- a/portal-BE/src/test/java/org/onap/portal/service/ep/EpWidgetCatalogParameterServiceTest.java
+++ b/portal-BE/src/test/java/org/onap/portal/service/ep/EpWidgetCatalogParameterServiceTest.java
@@ -43,19 +43,20 @@ package org.onap.portal.service.ep;
import static org.junit.jupiter.api.Assertions.assertEquals;
import java.time.LocalDateTime;
-import java.util.Collections;
-import java.util.HashSet;
+
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.onap.portal.controller.WidgetsCatalogController;
-import org.onap.portal.dao.fn.FnLanguageDao;
import org.onap.portal.domain.db.ep.EpMicroserviceParameter;
import org.onap.portal.domain.db.ep.EpWidgetCatalog;
import org.onap.portal.domain.db.ep.EpWidgetCatalogParameter;
import org.onap.portal.domain.db.fn.FnLanguage;
import org.onap.portal.domain.db.fn.FnUser;
-import org.onap.portal.service.fn.FnLanguageService;
-import org.onap.portal.service.fn.FnUserService;
+import org.onap.portal.service.language.FnLanguageService;
+import org.onap.portal.service.microserviceParameter.EpMicroserviceParameterService;
+import org.onap.portal.service.user.FnUserService;
+import org.onap.portal.service.widgetCatalog.EpWidgetCatalogService;
+import org.onap.portal.service.widgetCatalogParameter.EpWidgetCatalogParameterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
@@ -77,7 +78,7 @@ class EpWidgetCatalogParameterServiceTest {
private final FnUserService fnUserService;
private final EpMicroserviceParameterService epMicroserviceParameterService;
private final EpWidgetCatalogService epWidgetCatalogService;
- private final FnLanguageDao fnLanguageDao;
+ private final FnLanguageService fnLanguageService;
@Autowired
public EpWidgetCatalogParameterServiceTest(
@@ -85,13 +86,13 @@ class EpWidgetCatalogParameterServiceTest {
WidgetsCatalogController widgetsCatalogController,
FnUserService fnUserService,
EpMicroserviceParameterService epMicroserviceParameterService,
- EpWidgetCatalogService epWidgetCatalogService, FnLanguageDao fnLanguageDao) {
+ EpWidgetCatalogService epWidgetCatalogService, FnLanguageService fnLanguageService) {
this.epWidgetCatalogParameterService = epWidgetCatalogParameterService;
this.widgetsCatalogController = widgetsCatalogController;
this.fnUserService = fnUserService;
this.epMicroserviceParameterService = epMicroserviceParameterService;
this.epWidgetCatalogService = epWidgetCatalogService;
- this.fnLanguageDao = fnLanguageDao;
+ this.fnLanguageService = fnLanguageService;
}
@Test
@@ -154,7 +155,7 @@ class EpWidgetCatalogParameterServiceTest {
}
private FnUser buildFnUser() {
- FnLanguage language = fnLanguageDao.getByLanguageAlias("EN");
+ FnLanguage language = fnLanguageService.getByLanguageAlias("EN");
return FnUser.builder()
.lastLoginDate(LocalDateTime.now())
.activeYn(true)
diff --git a/portal-BE/src/test/java/org/onap/portal/service/fn/FnUserRoleServiceTest.java b/portal-BE/src/test/java/org/onap/portal/service/fn/FnUserRoleServiceTest.java
index fbb09e15..68b1a80b 100644
--- a/portal-BE/src/test/java/org/onap/portal/service/fn/FnUserRoleServiceTest.java
+++ b/portal-BE/src/test/java/org/onap/portal/service/fn/FnUserRoleServiceTest.java
@@ -49,6 +49,8 @@ import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.onap.portal.domain.db.fn.FnUser;
import org.onap.portal.domain.dto.ecomp.EPUserAppCatalogRoles;
+import org.onap.portal.service.user.FnUserService;
+import org.onap.portal.service.userRole.FnUserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.TestPropertySource;
diff --git a/portal-BE/src/test/java/org/onap/portal/service/fn/FnUserServiceTest.java b/portal-BE/src/test/java/org/onap/portal/service/fn/FnUserServiceTest.java
index 56cbe815..49c018e7 100644
--- a/portal-BE/src/test/java/org/onap/portal/service/fn/FnUserServiceTest.java
+++ b/portal-BE/src/test/java/org/onap/portal/service/fn/FnUserServiceTest.java
@@ -48,10 +48,12 @@ import java.util.Arrays;
import java.util.List;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
-import org.onap.portal.dao.fn.FnLanguageDao;
+import org.onap.portal.service.language.FnLanguageService;
import org.onap.portal.domain.db.fn.FnLanguage;
import org.onap.portal.domain.db.fn.FnLuTimezone;
import org.onap.portal.domain.db.fn.FnUser;
+import org.onap.portal.service.luTimezone.FnLuTimezoneService;
+import org.onap.portal.service.user.FnUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
@@ -71,8 +73,6 @@ class FnUserServiceTest {
private FnLuTimezoneService fnLuTimezoneService;
@Autowired
private FnLanguageService fnLanguageService;
- @Autowired
- private FnLanguageDao fnLanguageDao;
@Test
void saveUser(){
@@ -96,7 +96,7 @@ class FnUserServiceTest {
expected.setCountryCd("US");
expected.setLanguageId(fnLanguageService.findById(1L).orElse(new FnLanguage()));
expected.setGuest(false);
- FnLanguage language = fnLanguageDao.getByLanguageAlias("EN");
+ FnLanguage language = fnLanguageService.getByLanguageAlias("EN");
expected.setLanguageId(language);
//When