-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.List;\r
-\r
-import org.openecomp.portalapp.portal.domain.AdminUserApplications;\r
-import org.openecomp.portalapp.portal.domain.AppIdAndNameTransportModel;\r
-import org.openecomp.portalapp.portal.domain.AppsResponse;\r
-import org.openecomp.portalapp.portal.domain.EPApp;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.domain.EcompApp;\r
-import org.openecomp.portalapp.portal.domain.UserRoles;\r
-import org.openecomp.portalapp.portal.ecomp.model.AppCatalogItem;\r
-import org.openecomp.portalapp.portal.transport.EPAppsManualPreference;\r
-import org.openecomp.portalapp.portal.transport.EPAppsSortPreference;\r
-import org.openecomp.portalapp.portal.transport.EPDeleteAppsManualSortPref;\r
-import org.openecomp.portalapp.portal.transport.EPWidgetsSortPreference;\r
-import org.openecomp.portalapp.portal.transport.FieldsValidator;\r
-import org.openecomp.portalapp.portal.transport.LocalRole;\r
-import org.openecomp.portalapp.portal.transport.OnboardingApp;\r
-\r
-public interface EPAppService {\r
-\r
- /**\r
- * Get all applications adminId is an admin\r
- * \r
- * @param adminId\r
- * - the admin\r
- * @return the admin's applications\r
- */\r
- List<EPApp> getUserAsAdminApps(EPUser user);\r
-\r
- List<EPApp> getUserByOrgUserIdAsAdminApps(String orgUserId);\r
-\r
- /**\r
- * Gets all rows and all fields from the fn_app table.\r
- * \r
- * @return list of EPApp objects\r
- */\r
- List<EPApp> getAppsFullList();\r
-\r
- /**\r
- * Gets all rows and most fields from the fn_app table.\r
- * \r
- * @return list of EcompApp objects.\r
- */\r
- List<EcompApp> getEcompAppAppsFullList();\r
-\r
- /**\r
- * Get apps with app app admins\r
- * \r
- * @return List of AdminUserApplications\r
- */\r
- List<AdminUserApplications> getAppsAdmins();\r
-\r
- /**\r
- * Get all apps from fn_app table (index, name, title only).\r
- * \r
- * @param all\r
- * If all is true, returns active and inactive apps; otherwise,\r
- * just active apps.\r
- * @return List of AppsResponse objects.\r
- */\r
- List<AppsResponse> getAllApps(Boolean all);\r
-\r
- UserRoles getUserProfile(String loginId);\r
-\r
- UserRoles getUserProfileNormalized(EPUser user);\r
-\r
- List<LocalRole> getAppRoles(Long appId);\r
-\r
- List<AppIdAndNameTransportModel> getAdminApps(EPUser user);\r
-\r
- List<AppIdAndNameTransportModel> getAppsForSuperAdminAndAccountAdmin(EPUser user);\r
-\r
- /**\r
- * Gets the applications accessible to the specified user, which includes\r
- * all enabled open applications, plus all enabled applications for which\r
- * the user has a defined role for that app.\r
- * \r
- * @param user\r
- * EPUser object with the user's ATT UID\r
- * @return the user's list of applications, which may be empty.\r
- */\r
- List<EPApp> getUserApps(EPUser user);\r
-\r
- /**\r
- * Gets the user-personalized list of applications for the Portal (super)\r
- * admin, which includes enabled open applications, enabled applications for\r
- * which the user has a defined role for that app, and/or enabled\r
- * applications which the user has chosen to show.\r
- * \r
- * @param user\r
- * EPUser object with the user's ATT UID\r
- * @return the user's personalized list of applications, which may be empty.\r
- */\r
- List<EPApp> getPersAdminApps(EPUser user);\r
-\r
- /**\r
- * Gets the user-personalized list of accessible applications, which\r
- * includes enabled open applications and/or enabled applications for which\r
- * the user has a defined role for that app. Personalization means the user\r
- * can indicate an accessible application should be excluded from this\r
- * result.\r
- * \r
- * @param user\r
- * EPUser object with the user's ATT UID\r
- * @return the user's personalized list of applications, which may be empty.\r
- */\r
- List<EPApp> getPersUserApps(EPUser user);\r
-\r
- /**\r
- * Gets the application catalog for the specified user who is a super admin.\r
- * This includes all enabled applications. Each item indicates whether the\r
- * user has access (open or via a role), and whether the application is\r
- * selected for showing in the user's home (applications) page. Admin sees\r
- * slightly different behavior - can force an app onto the home page using\r
- * the personalization feature (user-app-selection table).\r
- * \r
- * @param user\r
- * @return list of all enabled applications, which may be empty\r
- */\r
- List<AppCatalogItem> getAdminAppCatalog(EPUser user);\r
-\r
- /**\r
- * Gets the application catalog for the specified user, who is a regular\r
- * user. This includes all enabled applications. Each item indicates whether\r
- * the user has access (open or via a role), and whether the application is\r
- * selected for showing in the user's home (applications) page.\r
- * \r
- * @param user\r
- * @return list of all enabled applications, which may be empty\r
- */\r
- List<AppCatalogItem> getUserAppCatalog(EPUser user);\r
-\r
- List<OnboardingApp> getOnboardingApps();\r
-\r
- List<OnboardingApp> getEnabledNonOpenOnboardingApps();\r
-\r
- FieldsValidator modifyOnboardingApp(OnboardingApp modifiedOnboardingApp, EPUser user);\r
-\r
- FieldsValidator addOnboardingApp(OnboardingApp newOnboardingApp, EPUser user);\r
-\r
- /**\r
- * Deletes the specified application from all tables where the app_id is\r
- * used, and ultimately from the fn_app table.\r
- * \r
- * @param user\r
- * Must be Portal (super) administrator\r
- * @param onboardingAppId\r
- * ID of application to be deleted\r
- * @return Status code\r
- */\r
- FieldsValidator deleteOnboardingApp(EPUser user, Long onboardingAppId);\r
-\r
- List<EcompApp> transformAppsToEcompApps(List<EPApp> appsList);\r
-\r
- EPApp getApp(Long appId);\r
-\r
- EPApp getAppDetail(String appName);\r
-\r
- List<EPApp> getAppsOrderByName(EPUser user);\r
-\r
- FieldsValidator saveAppsSortPreference(EPAppsSortPreference appsSortPreference, EPUser user);\r
-\r
- FieldsValidator saveAppsSortManual(List<EPAppsManualPreference> appsSortManual, EPUser user);\r
-\r
- FieldsValidator saveWidgetsSortManual(List<EPWidgetsSortPreference> widgetsSortManual, EPUser user);\r
-\r
- /**\r
- * Deletes the sort order of user apps by sort manual preference\r
- * \r
- * @param delAppSortManual\r
- * User Apps Data\r
- * @param user\r
- * LoggedIn User Data\r
- * @return FieldsValidator\r
- */\r
- FieldsValidator deleteUserAppSortManual(EPDeleteAppsManualSortPref delAppSortManual, EPUser user);\r
-\r
- FieldsValidator deleteUserWidgetSortPref(List<EPWidgetsSortPreference> delWidgetSortPref, EPUser user);\r
-\r
- String getUserAppsSortTypePreference(EPUser user);\r
-\r
- List<EPApp> getAppsOrderByLastUsed(EPUser user);\r
-\r
- List<EPApp> getAppsOrderByMostUsed(EPUser user);\r
-\r
- List<EPApp> getAppsOrderByManual(EPUser user);\r
-\r
- List<EPApp> getUserRemoteApps(String id);\r
-\r
- void createOnboardingFromApp(EPApp app, OnboardingApp onboardingApp);\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file 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.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.List;
+
+import org.openecomp.portalapp.portal.domain.AdminUserApplications;
+import org.openecomp.portalapp.portal.domain.AppIdAndNameTransportModel;
+import org.openecomp.portalapp.portal.domain.AppsResponse;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.EcompApp;
+import org.openecomp.portalapp.portal.domain.UserRoles;
+import org.openecomp.portalapp.portal.ecomp.model.AppCatalogItem;
+import org.openecomp.portalapp.portal.transport.EPAppsManualPreference;
+import org.openecomp.portalapp.portal.transport.EPAppsSortPreference;
+import org.openecomp.portalapp.portal.transport.EPDeleteAppsManualSortPref;
+import org.openecomp.portalapp.portal.transport.EPWidgetsSortPreference;
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.transport.LocalRole;
+import org.openecomp.portalapp.portal.transport.OnboardingApp;
+
+public interface EPAppService {
+
+ /**
+ * Get all applications adminId is an admin
+ *
+ * @param user
+ * the admin user
+ * @return the admin's applications
+ */
+ List<EPApp> getUserAsAdminApps(EPUser user);
+
+ List<EPApp> getUserByOrgUserIdAsAdminApps(String orgUserId);
+
+ /**
+ * Gets all rows and all fields from the fn_app table.
+ *
+ * @return list of EPApp objects
+ */
+ List<EPApp> getAppsFullList();
+
+ /**
+ * Gets all rows and most fields from the fn_app table.
+ *
+ * @return list of EcompApp objects.
+ */
+ List<EcompApp> getEcompAppAppsFullList();
+
+ /**
+ * Get apps with app app admins
+ *
+ * @return List of AdminUserApplications
+ */
+ List<AdminUserApplications> getAppsAdmins();
+
+ /**
+ * Get all apps from fn_app table (index, name, title only).
+ *
+ * @param all
+ * If all is true, returns active and inactive apps; otherwise,
+ * just active apps.
+ * @return List of AppsResponse objects.
+ */
+ List<AppsResponse> getAllApps(Boolean all);
+
+ UserRoles getUserProfile(String loginId);
+
+ UserRoles getUserProfileNormalized(EPUser user);
+
+ List<LocalRole> getAppRoles(Long appId);
+
+ List<AppIdAndNameTransportModel> getAdminApps(EPUser user);
+
+ List<AppIdAndNameTransportModel> getAppsForSuperAdminAndAccountAdmin(EPUser user);
+
+ /**
+ * Gets the applications accessible to the specified user, which includes
+ * all enabled open applications, plus all enabled applications for which
+ * the user has a defined role for that app.
+ *
+ * @param user
+ * EPUser object with the user's Org User ID
+ * @return the user's list of applications, which may be empty.
+ */
+ List<EPApp> getUserApps(EPUser user);
+
+ /**
+ * Gets the user-personalized list of applications for the Portal (super)
+ * admin, which includes enabled open applications, enabled applications for
+ * which the user has a defined role for that app, and/or enabled
+ * applications which the user has chosen to show.
+ *
+ * @param user
+ * EPUser object with the user's Org User ID
+ * @return the user's personalized list of applications, which may be empty.
+ */
+ List<EPApp> getPersAdminApps(EPUser user);
+
+ /**
+ * Gets the user-personalized list of accessible applications, which
+ * includes enabled open applications and/or enabled applications for which
+ * the user has a defined role for that app. Personalization means the user
+ * can indicate an accessible application should be excluded from this
+ * result.
+ *
+ * @param user
+ * EPUser object with the user's Org User ID
+ * @return the user's personalized list of applications, which may be empty.
+ */
+ List<EPApp> getPersUserApps(EPUser user);
+
+ /**
+ * Gets the application catalog for the specified user who is a super admin.
+ * This includes all enabled applications. Each item indicates whether the
+ * user has access (open or via a role), and whether the application is
+ * selected for showing in the user's home (applications) page. Admin sees
+ * slightly different behavior - can force an app onto the home page using
+ * the personalization feature (user-app-selection table).
+ *
+ * @param user
+ * @return list of all enabled applications, which may be empty
+ */
+ List<AppCatalogItem> getAdminAppCatalog(EPUser user);
+
+ /**
+ * Gets the application catalog for the specified user, who is a regular
+ * user. This includes all enabled applications. Each item indicates whether
+ * the user has access (open or via a role), and whether the application is
+ * selected for showing in the user's home (applications) page.
+ *
+ * @param user
+ * @return list of all enabled applications, which may be empty
+ */
+ List<AppCatalogItem> getUserAppCatalog(EPUser user);
+
+ List<OnboardingApp> getOnboardingApps();
+
+ List<OnboardingApp> getEnabledNonOpenOnboardingApps();
+
+ FieldsValidator modifyOnboardingApp(OnboardingApp modifiedOnboardingApp, EPUser user);
+
+ FieldsValidator addOnboardingApp(OnboardingApp newOnboardingApp, EPUser user);
+
+ /**
+ * Deletes the specified application from all tables where the app_id is
+ * used, and ultimately from the fn_app table.
+ *
+ * @param user
+ * Must be Portal (super) administrator
+ * @param onboardingAppId
+ * ID of application to be deleted
+ * @return Status code
+ */
+ FieldsValidator deleteOnboardingApp(EPUser user, Long onboardingAppId);
+
+ List<EcompApp> transformAppsToEcompApps(List<EPApp> appsList);
+
+ EPApp getApp(Long appId);
+
+ EPApp getAppDetail(String appName);
+
+ List<EPApp> getAppsOrderByName(EPUser user);
+
+ FieldsValidator saveAppsSortPreference(EPAppsSortPreference appsSortPreference, EPUser user);
+
+ FieldsValidator saveAppsSortManual(List<EPAppsManualPreference> appsSortManual, EPUser user);
+
+ FieldsValidator saveWidgetsSortManual(List<EPWidgetsSortPreference> widgetsSortManual, EPUser user);
+
+ /**
+ * Deletes the sort order of user apps by sort manual preference
+ *
+ * @param delAppSortManual
+ * User Apps Data
+ * @param user
+ * LoggedIn User Data
+ * @return FieldsValidator
+ */
+ FieldsValidator deleteUserAppSortManual(EPDeleteAppsManualSortPref delAppSortManual, EPUser user);
+
+ FieldsValidator deleteUserWidgetSortPref(List<EPWidgetsSortPreference> delWidgetSortPref, EPUser user);
+
+ String getUserAppsSortTypePreference(EPUser user);
+
+ List<EPApp> getAppsOrderByLastUsed(EPUser user);
+
+ List<EPApp> getAppsOrderByMostUsed(EPUser user);
+
+ List<EPApp> getAppsOrderByManual(EPUser user);
+
+ List<EPApp> getUserRemoteApps(String id);
+
+ void createOnboardingFromApp(EPApp app, OnboardingApp onboardingApp);
+
+ UserRoles getUserProfileNormalizedForLeftMenu(EPUser user);
+
+ UserRoles getUserProfileForLeftMenu(String loginId);
+
+}