<scope>compile</scope>
</dependency>
<dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-annotations</artifactId>
- <version>2.0.0-rc2</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-annotations</artifactId>
- <version>2.0.0-rc2</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-annotations</artifactId>
- <version>1.5.20</version>
- </dependency>
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-annotations</artifactId>
- <version>2.0.0-rc2</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-annotations</artifactId>
- <version>1.5.20</version>
- </dependency>
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-annotations</artifactId>
- <version>2.0.0-rc2</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-annotations</artifactId>
- <version>2.0.0-rc2</version>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-rs-client</artifactId>
+ <version>3.3.4</version>
<scope>compile</scope>
</dependency>
+ <dependency>
+ <groupId>org.hibernate.validator</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <version>6.0.18.Final</version>
+ <scope>compile</scope>
+ </dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
- <version>1.5.20</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-rs-client</artifactId>
- <version>3.3.4</version>
+ <version>1.5.13</version>
<scope>compile</scope>
</dependency>
</dependencies>
@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) {
@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");
}
}
- @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");
}
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) {
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));
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
.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
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
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
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
List<EpMicroservice> epMicroservices = new ArrayList<>(Arrays.asList(epMicroservice1, epMicroservice2, epMicroservice3, epMicroservice4));
- epMicroserviceDao.saveAll(epMicroservices);
+ epMicroserviceService.saveAll(epMicroservices);
// ep_microservice_parameter table
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?
List<EpWidgetCatalog> epWidgetCatalogs = new ArrayList<>(Arrays.asList(epWidgetCatalog1, epWidgetCatalog2, epWidgetCatalog3, epWidgetCatalog4));
- epWidgetCatalogDao.saveAll(epWidgetCatalogs);
+ epWidgetCatalogService.saveAll(epWidgetCatalogs);
// ep_widget_catalog_files table
//TODO
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
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?
fnDisplayText18, fnDisplayText19, fnDisplayText20, fnDisplayText21, fnDisplayText22, fnDisplayText23, fnDisplayText24,
fnDisplayText25, fnDisplayText26));
- fnDisplayTextDao.saveAll(fnDisplayTexts);
+ fnDisplayTextService.saveAll(fnDisplayTexts);
// fn_function table
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
activity16, activity17, activity18, activity19, activity20, activity21, activity22, activity23, activity24, activity25,
tabAccess, activity27, activity28));
- fnLuActivityDao.saveAll(luActivities);
+ fnLuActivityService.saveAll(luActivities);
//fn_lu_alert_method table
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
List<FnLuPriority> priorities = new ArrayList<>(Arrays.asList(low, normal, high, urgent, fatal));
- fnLuPriorityDao.saveAll(priorities);
+ fnLuPriorityService.saveAll(priorities);
// fn_lu_timezone table
List<FnLuTimezone> timezones = new ArrayList<>(Arrays.asList(USEastern, USCentral, USMountain, USArizona, USPacific, USAlaska, USHawaii));
- fnLuTimezoneDao.saveAll(timezones);
+ fnLuTimezoneService.saveAll(timezones);
// fn_menu table
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
menuFunctional313, menuFunctional316, menuFunctional148, menuFunctional317, menuFunctional318, menuFunctional319));
- fnMenuFunctionalDao.saveAll(menuFunctionals);
+ fnMenuFunctionalService.saveAll(menuFunctionals);
// fn_menu_functional_ancestors table
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
functionalRoles22, functionalRoles23, functionalRoles24, functionalRoles25, functionalRoles26, functionalRoles27,
functionalRoles39, functionalRoles40, functionalRoles42, functionalRoles43));
- fnMenuFunctionalRolesDao.saveAll(functionalRoles);
+ fnMenuFunctionalRolesService.saveAll(functionalRoles);
// fn_qz_job_details table
List<FnQzJobDetails> jobDetails = new ArrayList<>(Arrays.asList(fnQzJobDetails1, fnQzJobDetails2));
- fnQzJobDetailsDao.saveAll(jobDetails);
+ fnQzJobDetailsService.saveAll(jobDetails);
// fn_qz_locks table
List<FnQzLocks> locks = new ArrayList<>(Arrays.asList(fnQzLocks1, fnQzLocks2));
- fnQzLocksDao.saveAll(locks);
+ fnQzLocksService.saveAll(locks);
// fn_qz_scheduler_state table
.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
List<FnQzTriggers> fnQzTriggers = new ArrayList<>(Arrays.asList(trigger1, trigger2));
- // fnQzTriggersDao.saveAll(fnQzTriggers);
+ // fnQzTriggersService.saveAll(fnQzTriggers);
// fn_qz_cron_triggers table
//TODO
List<FnQzCronTriggers> cronTriggers = new ArrayList<>(Arrays.asList(cronTrigger1, cronTrigger2));
- //fnQzCronTriggersDao.saveAll(cronTriggers);
+ //fnQzCronTriggersService.saveAll(cronTriggers);
// fn_restricted_url table
//TODO
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
roleFunction23, roleFunction24, roleFunction25, roleFunction26, roleFunction27, roleFunction28, roleFunction29,
roleFunction30, roleFunction31, roleFunction32, roleFunction33, roleFunction34));
- fnRoleFunctionDao.saveAll(roleFunctions);
+ fnRoleFunctionService.saveAll(roleFunctions);
// fn_shared_context table
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
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
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
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
List<FnPersUserAppSel> appSels = new ArrayList<>(Arrays.asList(appSel1, appSel2, appSel3, appSel4));
- fnPersUserAppSelDao.saveAll(appSels);
+ fnPersUserAppSelService.saveAll(appSels);
// fn_audit_log table
List<FnAuditLog> auditLogs = new ArrayList<>(Arrays.asList(fnAuditLog1, fnAuditLog2, fnAuditLog3, fnAuditLog4, fnAuditLog5, fnAuditLog6, fnAuditLog7));
- fnAuditLogDao.saveAll(auditLogs);
+ fnAuditLogService.saveAll(auditLogs);
// fn_user_role table
userRole25, userRole26, userRole27, userRole28, userRole29, userRole30, userRole31, userRole32, userRole33, userRole34,
userRole35, userRole36, userRole37, userRole38, userRole39));
- fnUserRoleDao.saveAll(userRoles);
+ fnUserRoleService.saveAll(userRoles);
}
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;
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;
@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
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;
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;
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;
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;
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;
package org.onap.portal.domain.dto.transport;
-
-import javax.validation.constraints.Email;
-import javax.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
+import org.hibernate.validator.constraints.Email;
+import org.hibernate.validator.constraints.NotBlank;
@Setter
@Getter
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;
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;
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;
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) {
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;
*
*
*/
-package org.onap.portal.service.fn.old;
+package org.onap.portal.service;
import java.util.HashMap;
import java.util.HashSet;
public class EPRoleFunctionService {
@Autowired
private DataAccessService dataAccessService;
-
-
public DataAccessService getDataAccessService() {
return dataAccessService;
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;
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;
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) {
}
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()
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.app;
import java.util.List;
import org.onap.portal.domain.db.fn.FnApp;
@Repository
@Transactional
-public interface FnAppDao extends JpaRepository<FnApp, Long> {
+interface FnAppDao extends JpaRepository<FnApp, Long> {
@Query
List<FnApp> getByUebKey(final @Param("uebKey") String uebKey);
*
*/
-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;
private final EntityManager entityManager;
@Autowired
- public FnAppService(final FnAppDao fnAppDao, EntityManager entityManager) {
+ public FnAppService(FnAppDao fnAppDao, EntityManager entityManager) {
this.fnAppDao = fnAppDao;
this.entityManager = entityManager;
}
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 != ")
List<FnApp> adminApps = query.getResultList();*/
return new ArrayList<>();
}
+
+ public List<FnApp> saveAll(List<FnApp> fnApps) {
+ return fnAppDao.saveAll(fnApps);
+ }
}
*
*/
-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;
@Transactional
@Repository
-public interface FnAppContactUsDao extends JpaRepository<FnAppContactUs, Long> {
+interface FnAppContactUsDao extends JpaRepository<FnAppContactUs, Long> {
}
--- /dev/null
+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);
+ }
+}
*
*/
-package org.onap.portal.dao.ep;
+package org.onap.portal.service.appFunction;
import java.util.List;
import org.onap.portal.domain.db.ep.EpAppFunction;
@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);
*
*/
-package org.onap.portal.service.ep;
+package org.onap.portal.service.appFunction;
import java.util.ArrayList;
import java.util.List;
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;
List<Object> seen = new ArrayList<>();
return t -> seen.add(keyExtractor.apply(t));
}
+
+ public List<EpAppFunction> saveAll(List<EpAppFunction> epAppFunctions) {
+ return epAppFunctionDao.saveAll(epAppFunctions);
+ }
}
*
*/
-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;
@Repository
@Transactional
-public interface EpAppRoleFunctionDao extends JpaRepository<EpAppRoleFunction, Integer> {
+interface EpAppRoleFunctionDao extends JpaRepository<EpAppRoleFunction, Integer> {
}
--- /dev/null
+/*
+ * ============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);
+ }
+}
*
*/
-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;
@Repository
@Transactional
-public interface FnAuditLogDao extends JpaRepository<FnAuditLog, Integer> {
+interface FnAuditLogDao extends JpaRepository<FnAuditLog, Integer> {
}
--- /dev/null
+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);
+ }
+}
*
*/
-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;
@Transactional
@Repository
-public interface EpBasicAuthAccountDao extends JpaRepository<EpBasicAuthAccount, Long> {
+interface EpBasicAuthAccountDao extends JpaRepository<EpBasicAuthAccount, Long> {
}
--- /dev/null
+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);
+ }
+}
*
*/
-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;
@Repository
@Transactional
-public interface FnCommonWidgetDataDao extends JpaRepository<FnCommonWidgetData, Long> {
+interface FnCommonWidgetDataDao extends JpaRepository<FnCommonWidgetData, Long> {
}
--- /dev/null
+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);
+ }
+}
*
*/
-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;
@Transactional
@Repository
-public interface FnDisplayTextDao extends JpaRepository<FnDisplayText, Long> {
+interface FnDisplayTextDao extends JpaRepository<FnDisplayText, Long> {
}
--- /dev/null
+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);
+ }
+}
*
*/
-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;
@Transactional
@Repository
-public interface FnFunctionDao extends JpaRepository<FnFunction, String> {
+interface FnFunctionDao extends JpaRepository<FnFunction, String> {
}
--- /dev/null
+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);
+ }
+}
*
*/
-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;
@Repository
@Transactional
-public interface FnLanguageDao extends JpaRepository<FnLanguage, Long> {
+interface FnLanguageDao extends JpaRepository<FnLanguage, Long> {
@Query
FnLanguage getByLanguageAlias(final @Param("alias") String alias);
*
*/
-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;
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);
+ }
}
*
*/
-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;
@Transactional
@Repository
-public interface FnLuActivityDao extends JpaRepository<FnLuActivity, String> {
+interface FnLuActivityDao extends JpaRepository<FnLuActivity, String> {
}
--- /dev/null
+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);
+ }
+}
*
*/
-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;
@Transactional
@Repository
-public interface FnLuAlertMethodDao extends JpaRepository<FnLuAlertMethod, String> {
+interface FnLuAlertMethodDao extends JpaRepository<FnLuAlertMethod, String> {
}
--- /dev/null
+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);
+ }
+}
*
*/
-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;
@Repository
@Transactional
-public interface FnLuMenuSetDao extends JpaRepository<FnLuMenuSet, String> {
+interface FnLuMenuSetDao extends JpaRepository<FnLuMenuSet, String> {
}
--- /dev/null
+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);
+ }
+}
*
*/
-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;
@Repository
@Transactional
-public interface FnLuPriorityDao extends JpaRepository<FnLuPriority, Long> {
+interface FnLuPriorityDao extends JpaRepository<FnLuPriority, Long> {
}
--- /dev/null
+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);
+ }
+}
*
*/
-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;
@Repository
@Transactional
-public interface FnLuTabSetDao extends JpaRepository<FnLuTabSet, String> {
+interface FnLuTabSetDao extends JpaRepository<FnLuTabSet, String> {
}
--- /dev/null
+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);
+ }
+}
*
*/
-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;
@Repository
@Transactional
-public interface FnLuTimezoneDao extends JpaRepository<FnLuTimezone, Long> {
+interface FnLuTimezoneDao extends JpaRepository<FnLuTimezone, Long> {
}
*
*/
-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;
public Optional<FnLuTimezone> getById(Long id){
return fnLuTimezoneDao.findById(id);
}
+
+ public List<FnLuTimezone> saveAll(List<FnLuTimezone> timezones) {
+ return fnLuTimezoneDao.saveAll(timezones);
+ }
}
*
*/
-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;
@Repository
@Transactional
-public interface FnMenuDao extends JpaRepository<FnMenu, Integer> {
+interface FnMenuDao extends JpaRepository<FnMenu, Integer> {
}
--- /dev/null
+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);
+ }
+}
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.menuFunctional;
import java.util.List;
import org.onap.portal.domain.db.fn.FnMenuFunctional;
@Transactional
@Repository
-public interface FnMenuFunctionalDao extends JpaRepository<FnMenuFunctional, Long> {
+interface FnMenuFunctionalDao extends JpaRepository<FnMenuFunctional, Long> {
@Query
List<FnMenuFunctional> retrieveByMenuId(final @Param("menuId") Long menuId);
}
*
*/
-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;
return Optional.of(fnMenuFunctionalDao.retrieveByMenuId(menuId)).orElse(new ArrayList<>());
}
+ public List<FnMenuFunctional> saveAll(List<FnMenuFunctional> menuFunctionals) {
+ return fnMenuFunctionalDao.saveAll(menuFunctionals);
+ }
}
*
*/
-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;
@Transactional
@Repository
-public interface FnMenuFunctionalAncestorsDao extends JpaRepository<FnMenuFunctionalAncestors, Integer> {
+interface FnMenuFunctionalAncestorsDao extends JpaRepository<FnMenuFunctionalAncestors, Integer> {
}
--- /dev/null
+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);
+ }
+}
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.menuFunctionalRoles;
import java.util.List;
import org.onap.portal.domain.db.fn.FnMenuFunctionalRoles;
@Transactional
@Repository
-public interface FnMenuFunctionalRolesDao extends JpaRepository<FnMenuFunctionalRoles, Long> {
+interface FnMenuFunctionalRolesDao extends JpaRepository<FnMenuFunctionalRoles, Long> {
@Query
List<FnMenuFunctionalRoles> retrieveByRoleId(final @Param("roleId") Long roleId);
*
*/
-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;
return Optional.of(fnMenuFunctionalRolesDao.retrieveByMenuId(menuId)).orElse(new ArrayList<>());
}
+ public List<FnMenuFunctionalRoles> saveAll(List<FnMenuFunctionalRoles> functionalRoles) {
+ return fnMenuFunctionalRolesDao.saveAll(functionalRoles);
+ }
}
*
*/
-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;
@Transactional
@Repository
-public interface EpMicroserviceDao extends JpaRepository<EpMicroservice, Long> {
+interface EpMicroserviceDao extends JpaRepository<EpMicroservice, Long> {
}
--- /dev/null
+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);
+ }
+}
*
*/
-package org.onap.portal.dao.ep;
+package org.onap.portal.service.microserviceParameter;
import java.util.List;
import org.onap.portal.domain.db.ep.EpMicroserviceParameter;
@Repository
@Transactional
-public interface EpMicroserviceParameterDao extends JpaRepository<EpMicroserviceParameter, Long> {
+interface EpMicroserviceParameterDao extends JpaRepository<EpMicroserviceParameter, Long> {
@Query
void deleteByServiceId(@Param("SERVICEID") Long userId);
*
*/
-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;
return false;
}
}
+
+ public List<EpMicroserviceParameter> saveAll(List<EpMicroserviceParameter> epMicroserviceParameters) {
+ return epMicroserviceParameterDao.saveAll(epMicroserviceParameters);
+ }
}
*
*/
-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;
@Repository
@Transactional
-public interface FnPersUserAppSelDao extends JpaRepository<FnPersUserAppSel, Long> {
+interface FnPersUserAppSelDao extends JpaRepository<FnPersUserAppSel, Long> {
}
--- /dev/null
+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);
+ }
+}
*
*/
-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;
@Repository
@Transactional
-public interface EpPersUserAppSortDao extends JpaRepository<EpPersUserAppSort, Long> {
+interface EpPersUserAppSortDao extends JpaRepository<EpPersUserAppSort, Long> {
}
--- /dev/null
+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);
+ }
+}
*
*/
-package org.onap.portal.dao.ep;
+package org.onap.portal.service.persUserWidgetSel;
import java.util.List;
import java.util.Optional;
@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);
--- /dev/null
+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);
+ }
+}
*
*/
-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;
@Repository
@Transactional
-public interface FnQzCronTriggersDao extends JpaRepository<FnQzCronTriggers, FnQzTriggersId> {
+interface FnQzCronTriggersDao extends JpaRepository<FnQzCronTriggers, FnQzTriggersId> {
}
--- /dev/null
+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;
+ }
+}
*
*/
-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;
@Repository
@Transactional
-public interface FnQzJobDetailsDao extends JpaRepository<FnQzJobDetails, FnQzJobDetailsID> {
+interface FnQzJobDetailsDao extends JpaRepository<FnQzJobDetails, FnQzJobDetailsID> {
}
--- /dev/null
+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);
+ }
+}
*
*/
-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;
@Repository
@Transactional
-public interface FnQzLocksDao extends JpaRepository<FnQzLocks, FnQzLocksID> {
+interface FnQzLocksDao extends JpaRepository<FnQzLocks, FnQzLocksID> {
}
--- /dev/null
+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);
+ }
+}
*
*/
-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;
@Repository
@Transactional
-public interface FnQzSchedulerStateDao extends JpaRepository<FnQzSchedulerState, FnQzSchedulerStateID> {
+interface FnQzSchedulerStateDao extends JpaRepository<FnQzSchedulerState, FnQzSchedulerStateID> {
}
--- /dev/null
+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);
+ }
+}
*
*/
-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;
@Repository
@Transactional
-public interface FnQzTriggersDao extends JpaRepository<FnQzTriggers, FnQzTriggersId> {
+interface FnQzTriggersDao extends JpaRepository<FnQzTriggers, FnQzTriggersId> {
}
--- /dev/null
+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;
+ }
+}
*
*/
-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;
@Repository
@Transactional
-public interface FnRestrictedUrlDao extends JpaRepository<FnRestrictedUrl, FnRestrictedUrlId> {
-
+interface FnRestrictedUrlDao extends JpaRepository<FnRestrictedUrl, FnRestrictedUrlId> {
}
--- /dev/null
+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;
+ }
+}
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.role;
import java.util.List;
import org.onap.portal.domain.db.fn.FnRole;
@Repository
@Transactional
-public interface FnRoleDao extends JpaRepository<FnRole, Long> {
+interface FnRoleDao extends JpaRepository<FnRole, Long> {
@Query
List<FnRole> retrieveAppRoleByAppRoleIdAndByAppId(final @Param("appId") Long appId,
*
*/
-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;
private final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FnRoleService.class);
-
private final FnRoleDao fnRoleDao;
@Autowired
public FnRole saveOne(final FnRole role){
return fnRoleDao.save(role);
}
+
+ public List<FnRole> saveAll(List<FnRole> fnRoles) {
+ return fnRoleDao.saveAll(fnRoles);
+ }
}
*
*/
-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;
@Repository
@Transactional
-public interface FnRoleCompositeDao extends JpaRepository<FnRoleComposite, FnRoleCompositeId> {
+interface FnRoleCompositeDao extends JpaRepository<FnRoleComposite, FnRoleCompositeId> {
}
--- /dev/null
+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;
+ }
+}
*
*/
-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;
@Transactional
@Repository
-public interface FnRoleFunctionDao extends JpaRepository<FnRoleFunction, Long> {
+interface FnRoleFunctionDao extends JpaRepository<FnRoleFunction, Long> {
}
--- /dev/null
+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);
+ }
+}
*
*/
-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;
@Repository
@Transactional
-public interface FnSharedContextDao extends JpaRepository<FnSharedContext, Long> {
+interface FnSharedContextDao extends JpaRepository<FnSharedContext, Long> {
}
--- /dev/null
+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);
+ }
+}
*
*/
-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;
@Repository
@Transactional
-public interface FnTabDao extends JpaRepository<FnTab, String> {
+interface FnTabDao extends JpaRepository<FnTab, String> {
}
--- /dev/null
+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);
+ }
+}
*
*/
-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;
@Repository
@Transactional
-public interface FnTabSelectedDao extends JpaRepository<FnTabSelected, FnTabSelectedId> {
+interface FnTabSelectedDao extends JpaRepository<FnTabSelected, FnTabSelectedId> {
}
--- /dev/null
+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;
+ }
+}
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.user;
import java.util.List;
import java.util.Optional;
@Repository
@Transactional
-public interface FnUserDao extends JpaRepository<FnUser, Long> {
+interface FnUserDao extends JpaRepository<FnUser, Long> {
@Query
Optional<FnUser> findByLoginId(final @Param("loginId") String username);
*
*/
-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;
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<>());
}
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
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.userRole;
import java.util.List;
import java.util.Optional;
@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);
*
*/
-package org.onap.portal.service.fn;
+package org.onap.portal.service.userRole;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationFeature;
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;
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;
}
return rolesInAppForUser;
}
+
+ public List<FnUserRole> saveAll(List<FnUserRole> userRoles) {
+ return fnUserRoleDao.saveAll(userRoles);
+ }
}
*
*/
-package org.onap.portal.dao.ep;
+package org.onap.portal.service.userRolesRequest;
import java.util.List;
import org.onap.portal.domain.db.ep.EpUserRolesRequest;
@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);
}
*
*/
-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;
*
*/
-package org.onap.portal.dao.ep;
+package org.onap.portal.service.userRolesRequestDet;
import java.util.List;
import org.onap.portal.domain.db.ep.EpUserRolesRequestDet;
@Repository
@Transactional
-public interface EpUserRolesRequestDetDao extends JpaRepository<EpUserRolesRequestDet, Long> {
+interface EpUserRolesRequestDetDao extends JpaRepository<EpUserRolesRequestDet, Long> {
@Query
List<EpUserRolesRequestDet> appRolesRequestDetailList(final @Param("reqId") Long reqId);
*
*/
-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;
*
*/
-package org.onap.portal.dao.fn;
+package org.onap.portal.service.widget;
import java.util.List;
import java.util.Optional;
@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);
*
*/
-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;
*
*/
-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> {
}
-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 {
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);
+ }
}
-package org.onap.portal.dao.ep;
+package org.onap.portal.service.widgetCatalogParameter;
import java.util.List;
import java.util.Optional;
@Repository
@Transactional
-public interface EpWidgetCatalogParameterDao extends JpaRepository<EpWidgetCatalogParameter, Long> {
+interface EpWidgetCatalogParameterDao extends JpaRepository<EpWidgetCatalogParameter, Long> {
@Query
Optional<List<EpWidgetCatalogParameter>> retrieveByParamId(@Param("PARAMID") Long paramId);
*
*/
-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;
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;
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;
@Autowired
private LanguageController languageController;
@Autowired
- private FnLanguageDao fnLanguageDao;
+ private FnLanguageService fnLanguageService;
@Autowired
private FnUserService fnUserService;
assertEquals(expected.getMessage(), actual.getMessage());
assertEquals(expected.getStatus(), actual.getStatus());
//Clean up
- fnLanguageDao.delete(fnLanguage);
+ fnLanguageService.delete(fnLanguage);
}
@Test
assertEquals(expected.getMessage(), actual.getMessage());
assertEquals(expected.getStatus(), actual.getStatus());
//Clean up
- fnLanguageDao.delete(fnLanguage);
+ fnLanguageService.delete(fnLanguage);
}
@Test
//Clean up
- fnLanguageDao.delete(fnLanguage);
+ fnLanguageService.delete(fnLanguage);
}
@Test
//Clean up
- fnLanguageDao.delete(fnLanguage);
+ fnLanguageService.delete(fnLanguage);
}
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;
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;
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;
private EpMicroserviceParameterService epMicroserviceParameterService;
@Autowired
private EpWidgetCatalogService epWidgetCatalogService;
- @Autowired
- private FnLanguageDao fnLanguageDao;
@Test
public void getUserWidgetCatalog() {
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()
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;
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;
@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;
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
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");
.getOnboardingWidgets(notQuestprincipal, request, response);
assertEquals(expected, actual);
- fnUserDao.delete(notQuestUser);
+ fnUserService.delete(notQuestUser);
}
@Test
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()
@Test
public void putOnboardingWidgetAOP() {
//Given
- fnUserDao.save(notQuestUser);
+ fnUserService.save(notQuestUser);
when(request.getHeader("X-Widgets-Type")).thenReturn("managed");
OnboardingWidget onboardingWidget = OnboardingWidget.builder()
@Test
public void putOnboardingWidgetAOPXSSTest() {
//Given
- fnUserDao.save(notQuestUser);
+ fnUserService.save(notQuestUser);
when(request.getHeader("X-Widgets-Type")).thenReturn("managed");
OnboardingWidget onboardingWidget = OnboardingWidget.builder()
@Test
public void postOnboardingWidgetXSS() {
//Given
- fnUserDao.save(notQuestUser);
+ fnUserService.save(notQuestUser);
when(request.getHeader("X-Widgets-Type")).thenReturn("managed");
OnboardingWidget onboardingWidget = OnboardingWidget.builder()
@Test
public void postOnboardingWidget() {
//Given
- fnUserDao.save(notQuestUser);
+ fnUserService.save(notQuestUser);
when(request.getHeader("X-Widgets-Type")).thenReturn("managed");
OnboardingWidget onboardingWidget = OnboardingWidget.builder()
@Test
public void deleteOnboardingWidgetSCFORBIDDEN() {
//Given
- fnUserDao.save(notQuestUser);
+ fnUserService.save(notQuestUser);
when(request.getHeader("X-Widgets-Type")).thenReturn("managed");
OnboardingWidget onboardingWidget = OnboardingWidget.builder()
--- /dev/null
+/*
+ * ============LICENSE_START==========================================
+ * ONAP Portal
+ * ===================================================================
+ * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Modifications Copyright (c) 2019 IBM
+ * ===================================================================
+ *
+ * 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.exception;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class NotValidDataExceptionTest {
+
+
+ @Test
+ public void TestException2() {
+ String s1 = "Value1";
+ String s2 = "value2";
+ try {
+ if (!s1.equalsIgnoreCase(s2)) {
+ throw new NotValidDataException("Exception occured..");
+ }
+ } catch (NotValidDataException mde) {
+ assertEquals(mde.getMessage(),"Exception occured..");
+ }
+
+ }
+}
*/
package org.onap.portal.framework;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mockito;
+import org.springframework.test.context.junit4.SpringRunner;
+
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mockito;
-import org.mockito.runners.MockitoJUnitRunner;
-@RunWith(MockitoJUnitRunner.class)
+@RunWith(SpringRunner.class)
public class MockitoTestSuite {
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;
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;
private final FnUserService fnUserService;
private final EpMicroserviceParameterService epMicroserviceParameterService;
private final EpWidgetCatalogService epWidgetCatalogService;
- private final FnLanguageDao fnLanguageDao;
+ private final FnLanguageService fnLanguageService;
@Autowired
public 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
}
private FnUser buildFnUser() {
- FnLanguage language = fnLanguageDao.getByLanguageAlias("EN");
+ FnLanguage language = fnLanguageService.getByLanguageAlias("EN");
return FnUser.builder()
.lastLoginDate(LocalDateTime.now())
.activeYn(true)
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;
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;
private FnLuTimezoneService fnLuTimezoneService;
@Autowired
private FnLanguageService fnLanguageService;
- @Autowired
- private FnLanguageDao fnLanguageDao;
@Test
void saveUser(){
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