pom, new modules changes 79/42579/3
authorKishore Reddy, Gujja (kg811t) <kg811t@research.att.com>
Thu, 12 Apr 2018 19:30:01 +0000 (15:30 -0400)
committerKishore Reddy, Gujja (kg811t) <kg811t@research.att.com>
Thu, 12 Apr 2018 20:21:28 +0000 (16:21 -0400)
Issue-ID: PORTAL-254

portal/SDK release 2.3.0, domain, sdk aaf modules

Change-Id: I4308550f295620d10d049fef3a88db3365a48a6f
Signed-off-by: Kishore Reddy, Gujja (kg811t) <kg811t@research.att.com>
150 files changed:
.gitignore
ecomp-sdk/epsdk-aaf/pom.xml [new file with mode: 0644]
ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessPerms.java [new file with mode: 0644]
ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessPermsDetail.java [new file with mode: 0644]
ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessRole.java [new file with mode: 0644]
ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessRolePerms.java [new file with mode: 0644]
ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessUser.java [new file with mode: 0644]
ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessUserRoleDetail.java [new file with mode: 0644]
ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAuthUserRole.java [new file with mode: 0644]
ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalRoleDescription.java [new file with mode: 0644]
ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/exception/UserNotFoundException.java [new file with mode: 0644]
ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/service/LoginExternalAuthService.java [new file with mode: 0644]
ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/service/LoginExternalAuthServiceImpl.java [new file with mode: 0644]
ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/service/UserApiService.java [new file with mode: 0644]
ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/service/UserApiServiceImpl.java [new file with mode: 0644]
ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/util/EcompExternalAuthProperties.java [new file with mode: 0644]
ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/util/EcompExternalAuthUtils.java [new file with mode: 0644]
ecomp-sdk/epsdk-analytics/pom.xml
ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/DateUtils.java
ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/FusionAdapter.java
ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/controller/WizardProcessorTest.java
ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/model/runtime/RaptorControllerAsyncTest.java
ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/xmlobj/ChartJSONHelperTest.java
ecomp-sdk/epsdk-app-common/db-scripts/EcompSdkDDLMySql_2_2_Common.sql
ecomp-sdk/epsdk-app-common/db-scripts/EcompSdkDMLMySql_2_2_Common.sql
ecomp-sdk/epsdk-app-common/db-scripts/EcompSdkMySql_Rollback_2_2_to_2_1_Common.sql
ecomp-sdk/epsdk-app-common/db-scripts/EcompSdkMySql_Upgrade_2_1_to_2_2_Common.sql
ecomp-sdk/epsdk-app-common/pom.xml
ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/FavoritesController.java
ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/FuncMenuController.java
ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/LogoutController.java
ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/BroadcastController.java
ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/service/OnBoardingApiServiceImpl.java
ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/core/AngularAdminControllerTest.java
ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/core/FnMenuControllerTest.java
ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/core/MenuListControllerTest.java
ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/core/ProfileSearchControllerTest.java
ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/core/RoleControllerTest.java
ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/core/RoleFunctionListControllerTest.java
ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/core/RoleListControllerTest.java
ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/core/UserProfileControllerTest.java
ecomp-sdk/epsdk-app-os/pom.xml
ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/login/LoginStrategyImpl.java
ecomp-sdk/epsdk-app-overlay/pom.xml
ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/defs/definitions.xml
ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-controller.js
ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-function-add.html
ecomp-sdk/epsdk-core/pom.xml
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/command/LoginBean.java
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/command/PostSearchBean.java
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/dao/support/FusionDao.java
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/exception/support/FusionException.java
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/interceptor/ResourceInterceptor.java
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/aspect/EELFLoggerAspect.java
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/menu/MenuBuilder.java
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/objectcache/support/FusionCacheManager.java
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/AuditServiceImpl.java
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/DataAccessServiceImpl.java
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LdapServiceImpl.java
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LoginServiceCentralizedImpl.java
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LoginServiceImpl.java
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/PostSearchServiceImpl.java
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ProfileServiceImpl.java
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/RoleServiceImpl.java
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserServiceCentalizedImpl.java
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/support/FusionService.java
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/util/SystemProperties.java
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/web/support/AppUtils.java
ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/dao/ProfileDaoImplTest.java
ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/domain/sessionmgt/TimeoutVOTest.java
ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/restful/client/PortalRestClientBaseTest.java
ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/restful/client/SharedContextRestClientTest.java
ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/service/DataAccessServiceImplTest.java
ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/service/UrlAccessImplTest.java
ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/service/UserProfileServiceImplTest.java
ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/service/UserServiceCentalizedImplTest.java
ecomp-sdk/epsdk-domain/.gitignore [new file with mode: 0644]
ecomp-sdk/epsdk-domain/pom.xml [new file with mode: 0644]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/App.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/App.java with 100% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/AuditLog.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/AuditLog.java with 100% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/BroadcastMessage.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/BroadcastMessage.java with 100% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/DomainVo.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/DomainVo.java with 100% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/FnMenu.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/FnMenu.java with 98% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/FusionObject.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/FusionObject.java with 99% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/FusionVo.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/FusionVo.java with 97% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/LoginBean.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LoginBean.java with 100% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/Lookup.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Lookup.java with 100% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/LuCountry.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LuCountry.java with 100% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/LuState.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LuState.java with 100% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/LuTimeZone.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LuTimeZone.java with 100% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/Menu.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Menu.java with 100% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/MenuData.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/MenuData.java with 100% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/Profile.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Profile.java with 98% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/Role.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Role.java with 100% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/RoleFunction.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/RoleFunction.java with 95% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/UrlsAccessible.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UrlsAccessible.java with 100% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/UrlsAccessibleKey.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UrlsAccessibleKey.java with 100% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/User.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/User.java with 98% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/UserApp.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UserApp.java with 100% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/UserAppId.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UserAppId.java with 100% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/support/Attribute.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Attribute.java with 100% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/support/CollaborateList.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/CollaborateList.java with 100% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/support/Container.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Container.java with 98% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/support/Domain.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Domain.java with 100% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/support/DomainVo.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/DomainVo.java with 94% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/support/Element.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Element.java with 100% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/support/ElementDetails.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/ElementDetails.java with 100% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/support/FusionCommand.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/FusionCommand.java with 97% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/support/Layout.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Layout.java with 100% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/support/NameValueId.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/NameValueId.java with 100% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/support/Position.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Position.java with 100% similarity]
ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/support/Size.java [moved from ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Size.java with 100% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/AppTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/domain/AppTest.java with 98% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/AuditLogTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/domain/AuditLogTest.java with 98% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/BroadcastMessageTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/domain/BroadcastMessageTest.java with 98% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/FnMenuTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/domain/FnMenuTest.java with 98% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/LoginBeanTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/domain/LoginBeanTest.java with 98% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/LookupTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/domain/LookupTest.java with 92% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/LuCountryTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/domain/LuCountryTest.java with 98% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/LuStateTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/domain/LuStateTest.java with 98% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/LuTimeZoneTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/domain/LuTimeZoneTest.java with 98% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/MenuDataTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/domain/MenuDataTest.java with 98% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/MenuTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/domain/MenuTest.java with 98% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/ProfileTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/domain/ProfileTest.java with 98% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/RoleFunctionTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/domain/RoleFunctionTest.java with 98% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/RoleTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/domain/RoleTest.java with 97% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/UrlsAccessibleKeyTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/domain/UrlsAccessibleKeyTest.java with 97% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/UrlsAccessibleTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/domain/UrlsAccessibleTest.java with 95% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/UserAppIdTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/domain/UserAppIdTest.java with 94% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/UserAppTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/domain/UserAppTest.java with 94% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/UserTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/domain/UserTest.java with 97% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/AttributeTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/domain/support/AttributeTest.java with 98% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/CollaborateListTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/domain/support/CollaborateListTest.java with 98% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/ContainerTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/domain/support/ContainerTest.java with 95% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/DomainTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/domain/support/DomainTest.java with 99% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/DomainVOTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/domain/support/DomainVOTest.java with 98% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/ElementDetailsTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/domain/support/ElementDetailsTest.java with 98% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/ElementTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/domain/support/ElementTest.java with 98% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/FusionCommandTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/domain/support/FusionCommandTest.java with 96% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/LayoutTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/domain/support/LayoutTest.java with 99% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/NameValueIdTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/domain/support/NameValueIdTest.java with 96% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/PositionTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/domain/support/PositionTest.java with 97% similarity]
ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/SizeTest.java [moved from ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/domain/support/SizeTest.java with 97% similarity]
ecomp-sdk/epsdk-fw/pom.xml
ecomp-sdk/epsdk-music/dependencies/org/onap/music/core/2.4.4.1/core-2.4.4.1.jar [new file with mode: 0644]
ecomp-sdk/epsdk-music/dependencies/org/onap/music/core/maven-metadata-local.xml
ecomp-sdk/epsdk-music/pom.xml
ecomp-sdk/epsdk-workflow/pom.xml
ecomp-sdk/epsdk-workflow/src/test/java/org/onap/portalsdk/workflow/models/WorkflowTest.java
ecomp-sdk/pom.xml

index dc5e313..c299635 100644 (file)
@@ -1,5 +1,6 @@
 .idea
 .project
+ecomp-sdk/*/.settings
 /bin/
 ecomp-sdk/*/logs/
 ecomp-sdk/*/debug-logs/
diff --git a/ecomp-sdk/epsdk-aaf/pom.xml b/ecomp-sdk/epsdk-aaf/pom.xml
new file mode 100644 (file)
index 0000000..9faa113
--- /dev/null
@@ -0,0 +1,159 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+
+       <groupId>org.onap.portal.sdk</groupId>
+       <artifactId>epsdk-ext-auth</artifactId>
+       <version>2.3.0-SNAPSHOT</version>
+       <packaging>jar</packaging>
+
+       <name>ONAP Portal SDK External Authorization</name>
+
+       <properties>
+               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+               <springframework.version>4.2.0.RELEASE</springframework.version>
+       </properties>
+       <dependencies>
+               <!-- internal -->
+               <dependency>
+                       <groupId>org.onap.portal.sdk</groupId>
+                       <artifactId>epsdk-fw</artifactId>
+                       <version>${project.version}</version>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>commons-logging</groupId>
+                                       <artifactId>commons-logging</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+               <!-- internal -->
+               <dependency>
+                       <groupId>org.onap.portal.sdk</groupId>
+                       <artifactId>epsdk-core</artifactId>
+                       <version>${project.version}</version>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>commons-logging</groupId>
+                                       <artifactId>commons-logging</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+               <dependency>
+                       <groupId>com.att.eelf</groupId>
+                       <artifactId>eelf-core</artifactId>
+                       <version>1.0.0</version>
+               </dependency>
+               <!-- Spring -->
+               <dependency>
+                       <groupId>org.springframework</groupId>
+                       <artifactId>spring-core</artifactId>
+                       <version>${springframework.version}</version>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>commons-logging</groupId>
+                                       <artifactId>commons-logging</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework</groupId>
+                       <artifactId>spring-web</artifactId>
+                       <version>${springframework.version}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework</groupId>
+                       <artifactId>spring-webmvc</artifactId>
+                       <version>${springframework.version}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework</groupId>
+                       <artifactId>spring-context-support</artifactId>
+                       <version>${springframework.version}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework</groupId>
+                       <artifactId>spring-test</artifactId>
+                       <version>${springframework.version}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework</groupId>
+                       <artifactId>spring-aop</artifactId>
+                       <version>${springframework.version}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework.boot</groupId>
+                       <artifactId>spring-boot-starter</artifactId>
+                       <version>1.3.0.RELEASE</version>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>org.slf4j</groupId>
+                                       <artifactId>log4j-over-slf4j</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>ch.qos.logback</groupId>
+                                       <artifactId>logback-classic</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+               <!-- Mapper -->
+               <dependency>
+                       <groupId>com.fasterxml.jackson.core</groupId>
+                       <artifactId>jackson-annotations</artifactId>
+                       <version>2.6.3</version>
+               </dependency>
+               <dependency>
+                       <groupId>com.fasterxml.jackson.core</groupId>
+                       <artifactId>jackson-core</artifactId>
+                       <version>2.6.3</version>
+               </dependency>
+               <dependency>
+                       <groupId>com.fasterxml.jackson.core</groupId>
+                       <artifactId>jackson-databind</artifactId>
+                       <version>2.6.3</version>
+               </dependency>
+               <dependency>
+                       <groupId>junit</groupId>
+                       <artifactId>junit</artifactId>
+                       <version>3.8.1</version>
+                       <scope>test</scope>
+               </dependency>
+       </dependencies>
+       <profiles>
+               <!-- disable doclint, a new feature in Java 8, when generating javadoc -->
+               <profile>
+                       <id>doclint-java8-disable</id>
+                       <activation>
+                               <jdk>[1.8,)</jdk>
+                       </activation>
+                       <build>
+                               <plugins>
+                                       <plugin>
+                                               <groupId>org.apache.maven.plugins</groupId>
+                                               <artifactId>maven-javadoc-plugin</artifactId>
+                                               <version>2.10.4</version>
+                                               <configuration>
+                                                       <additionalparam>-Xdoclint:none</additionalparam>
+                                               </configuration>
+                                       </plugin>
+                               </plugins>
+                       </build>
+               </profile>
+       </profiles>
+       <build>
+               <!-- The war file name carries no version number -->
+               <finalName>epsdk-aaf</finalName>
+
+               <plugins>
+                       <!-- Compile to Java 1.8 class output format -->
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-compiler-plugin</artifactId>
+                               <version>3.1</version>
+                               <configuration>
+                                       <source>1.8</source>
+                                       <target>1.8</target>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+</project>
diff --git a/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessPerms.java b/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessPerms.java
new file mode 100644 (file)
index 0000000..80956e6
--- /dev/null
@@ -0,0 +1,178 @@
+/*-
+ * ============LICENSE_START==========================================
+ * ONAP Portal SDK
+ * ===================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ *
+ * 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============================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.portalsdk.external.authorization.domain;
+
+import java.io.Serializable;
+
+public class ExternalAccessPerms implements Serializable, Comparable {
+
+       /**
+        * 
+        */
+       private static final long serialVersionUID = -200964838466882602L;
+       private String type;
+       private String instance;
+       private String action;
+       private String description;
+
+       public ExternalAccessPerms() {
+               super();
+       }
+
+       public ExternalAccessPerms(String type, String instance, String action, String description) {
+               super();
+               this.type = type;
+               this.instance = instance;
+               this.action = action;
+               this.description = description;
+       }
+
+       public ExternalAccessPerms(String type, String instance, String action) {
+               super();
+               this.type = type;
+               this.instance = instance;
+               this.action = action;
+       }
+
+       /**
+        * @return the type
+        */
+       public String getType() {
+               return type;
+       }
+
+       /**
+        * @param type
+        *            the type to set
+        */
+       public void setType(String type) {
+               this.type = type;
+       }
+
+       /**
+        * @return the instance
+        */
+       public String getInstance() {
+               return instance;
+       }
+
+       /**
+        * @param instance
+        *            the instance to set
+        */
+       public void setInstance(String instance) {
+               this.instance = instance;
+       }
+
+       /**
+        * @return the action
+        */
+       public String getAction() {
+               return action;
+       }
+
+       /**
+        * @param action
+        *            the action to set
+        */
+       public void setAction(String action) {
+               this.action = action;
+       }
+
+       public String getDescription() {
+               return description;
+       }
+
+       public void setDescription(String description) {
+               this.description = description;
+       }
+
+       @Override
+       public int compareTo(Object obj) {
+               ExternalAccessPerms other = (ExternalAccessPerms) obj;
+
+               String c1 = getInstance();
+               String c2 = other.getInstance();
+
+               return (c1 == null || c2 == null) ? 1 : c1.compareTo(c2);
+       }
+
+       @Override
+       public int hashCode() {
+               final int prime = 31;
+               int result = 1;
+               result = prime * result + ((action == null) ? 0 : action.hashCode());
+               result = prime * result + ((description == null) ? 0 : description.hashCode());
+               result = prime * result + ((instance == null) ? 0 : instance.hashCode());
+               result = prime * result + ((type == null) ? 0 : type.hashCode());
+               return result;
+       }
+
+       @Override
+       public boolean equals(Object obj) {
+               if (this == obj)
+                       return true;
+               if (obj == null)
+                       return false;
+               if (getClass() != obj.getClass())
+                       return false;
+               ExternalAccessPerms other = (ExternalAccessPerms) obj;
+               if (action == null) {
+                       if (other.action != null)
+                               return false;
+               } else if (!action.equals(other.action))
+                       return false;
+               if (description == null) {
+                       if (other.description != null)
+                               return false;
+               } else if (!description.equals(other.description))
+                       return false;
+               if (instance == null) {
+                       if (other.instance != null)
+                               return false;
+               } else if (!instance.equals(other.instance))
+                       return false;
+               if (type == null) {
+                       if (other.type != null)
+                               return false;
+               } else if (!type.equals(other.type))
+                       return false;
+               return true;
+       }
+
+}
diff --git a/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessPermsDetail.java b/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessPermsDetail.java
new file mode 100644 (file)
index 0000000..fab7d2c
--- /dev/null
@@ -0,0 +1,127 @@
+/*-
+ * ============LICENSE_START==========================================
+ * ONAP Portal SDK
+ * ===================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ *
+ * 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============================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.portalsdk.external.authorization.domain;
+
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonRootName;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonRootName(value="perm")
+public class ExternalAccessPermsDetail {
+
+       private String type;
+       private String instance;
+       private String action;
+       private List<String> roles;
+       private String description;
+       
+       
+       
+       public ExternalAccessPermsDetail() {
+               super();
+       }
+
+       /**
+        * @param type
+        * @param instance
+        * @param action
+        * @param roles
+        * @param description
+        */
+       public ExternalAccessPermsDetail(String type, String instance, String action, List<String> roles,
+                       String description) {
+               super();
+               this.type = type;
+               this.instance = instance;
+               this.action = action;
+               this.roles = roles;
+               this.description = description;
+       }
+       
+       /**
+        * @param type
+        * @param instance
+        * @param action
+        * @param description
+        */
+       public ExternalAccessPermsDetail(String type, String instance, String action,
+                       String description) {
+               super();
+               this.type = type;
+               this.instance = instance;
+               this.action = action;
+               this.description = description;
+       }
+       
+       public String getType() {
+               return type;
+       }
+       public void setType(String type) {
+               this.type = type;
+       }
+       public String getInstance() {
+               return instance;
+       }
+       public void setInstance(String instance) {
+               this.instance = instance;
+       }
+       public String getAction() {
+               return action;
+       }
+       public void setAction(String action) {
+               this.action = action;
+       }
+       public List<String> getRoles() {
+               return roles;
+       }
+
+       public void setRoles(List<String> roles) {
+               this.roles = roles;
+       }
+
+       public String getDescription() {
+               return description;
+       }
+       public void setDescription(String description) {
+               this.description = description;
+       }
+       
+       
+}
diff --git a/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessRole.java b/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessRole.java
new file mode 100644 (file)
index 0000000..a14a4b5
--- /dev/null
@@ -0,0 +1,76 @@
+/*-
+ * ============LICENSE_START==========================================
+ * ONAP Portal SDK
+ * ===================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ *
+ * 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============================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.portalsdk.external.authorization.domain;
+
+import java.io.Serializable;
+
+public class ExternalAccessRole implements Serializable {
+
+       /**
+        * 
+        */
+       private static final long serialVersionUID = 3439986826362436339L;
+       public String name;
+       public String description;
+       
+       public ExternalAccessRole() {
+       
+       }
+       
+       public ExternalAccessRole(String name, String description) {
+               super();
+               this.name = name;
+               this.description = description;
+       }
+       
+       public String getName() {
+               return name;
+       }
+
+       public void setName(String name) {
+               this.name = name;
+       }
+
+       public String getDescription() {
+               return description;
+       }
+       public void setDescription(String description) {
+               this.description = description;
+       }
+       
+}
diff --git a/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessRolePerms.java b/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessRolePerms.java
new file mode 100644 (file)
index 0000000..f38b2f9
--- /dev/null
@@ -0,0 +1,66 @@
+/*-
+ * ============LICENSE_START==========================================
+ * ONAP Portal SDK
+ * ===================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ *
+ * 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============================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.portalsdk.external.authorization.domain;
+
+public class ExternalAccessRolePerms {
+       
+       private ExternalAccessPerms perm;       
+       private String role;
+       
+       
+       public ExternalAccessRolePerms(ExternalAccessPerms perm, String role) {
+               super();
+               this.perm = perm;
+               this.role = role;
+       }
+       
+       public ExternalAccessPerms getPerm() {
+               return perm;
+       }
+       public void setPerm(ExternalAccessPerms perm) {
+               this.perm = perm;
+       }
+       public String getRole() {
+               return role;
+       }
+       public void setRole(String role) {
+               this.role = role;
+       }
+       
+       
+}
diff --git a/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessUser.java b/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessUser.java
new file mode 100644 (file)
index 0000000..3ca8899
--- /dev/null
@@ -0,0 +1,65 @@
+/*-
+ * ============LICENSE_START==========================================
+ * ONAP Portal SDK
+ * ===================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ *
+ * 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============================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.portalsdk.external.authorization.domain;
+
+public class ExternalAccessUser {
+
+       private String user;
+       private String role;
+
+       public ExternalAccessUser(String user, String role) {
+               super();
+               this.user = user;
+               this.role = role;
+       }
+       
+       public String getUser() {
+               return user;
+       }
+       public void setUser(String user) {
+               this.user = user;
+       }
+       public String getRole() {
+               return role;
+       }
+       public void setRole(String role) {
+               this.role = role;
+       }
+       
+       
+}
diff --git a/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessUserRoleDetail.java b/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAccessUserRoleDetail.java
new file mode 100644 (file)
index 0000000..5106f38
--- /dev/null
@@ -0,0 +1,104 @@
+/*-
+ * ============LICENSE_START==========================================
+ * ONAP Portal SDK
+ * ===================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ *
+ * 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============================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.portalsdk.external.authorization.domain;
+
+public class ExternalAccessUserRoleDetail {
+               
+       private String name;
+       private ExternalRoleDescription description;
+       
+       
+       /**
+        * 
+        */
+       public ExternalAccessUserRoleDetail() {
+               super();
+       }
+
+       public ExternalAccessUserRoleDetail(String name, ExternalRoleDescription description) {
+               super();
+               this.name = name;
+               this.description = description;
+       }
+       
+       public String getName() {
+               return name;
+       }
+       public void setName(String name) {
+               this.name = name;
+       }
+       public ExternalRoleDescription getDescription() {
+               return description;
+       }
+       public void setDescription(ExternalRoleDescription description) {
+               this.description = description;
+       }
+
+       @Override
+       public int hashCode() {
+               final int prime = 31;
+               int result = 1;
+               result = prime * result + ((description == null) ? 0 : description.hashCode());
+               result = prime * result + ((name == null) ? 0 : name.hashCode());
+               return result;
+       }
+
+       @Override
+       public boolean equals(Object obj) {
+               if (this == obj)
+                       return true;
+               if (obj == null)
+                       return false;
+               if (getClass() != obj.getClass())
+                       return false;
+               ExternalAccessUserRoleDetail other = (ExternalAccessUserRoleDetail) obj;
+               if (description == null) {
+                       if (other.description != null)
+                               return false;
+               } else if (!description.equals(other.description))
+                       return false;
+               if (name == null) {
+                       if (other.name != null)
+                               return false;
+               } else if (!name.equals(other.name))
+                       return false;
+               return true;
+       }
+       
+       
+}
diff --git a/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAuthUserRole.java b/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalAuthUserRole.java
new file mode 100644 (file)
index 0000000..33e21f2
--- /dev/null
@@ -0,0 +1,74 @@
+/*-
+ * ============LICENSE_START==========================================
+ * ONAP Portal SDK
+ * ===================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ *
+ * 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============================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.portalsdk.external.authorization.domain;
+
+import java.io.Serializable;
+
+public class ExternalAuthUserRole implements Serializable{
+       
+       /**
+        * 
+        */ 
+       private static final long serialVersionUID = 5066251837431287376L;
+       
+       private String role;
+       private String user;
+       private String expiryDate;
+       
+       public String getRole() {
+               return role;
+       }
+       public void setRole(String role) {
+               this.role = role;
+       }
+       public String getUser() {
+               return user;
+       }
+       public void setUser(String user) {
+               this.user = user;
+       }
+       public String getExpiryDate() {
+               return expiryDate;
+       }
+       public void setExpiryDate(String expiryDate) {
+               this.expiryDate = expiryDate;
+       }
+       
+       
+
+}
diff --git a/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalRoleDescription.java b/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/domain/ExternalRoleDescription.java
new file mode 100644 (file)
index 0000000..d09db15
--- /dev/null
@@ -0,0 +1,150 @@
+/*-
+ * ============LICENSE_START==========================================
+ * ONAP Portal SDK
+ * ===================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ *
+ * 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============================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.portalsdk.external.authorization.domain;
+
+import java.util.List;
+
+public class ExternalRoleDescription {
+
+       private String id;
+       private String  name;
+    private String active;
+    private String priority;
+    private String appId;
+    private String appRoleId;
+    private List<ExternalAccessPerms> permissions;
+    
+       public String getId() {
+               return id;
+       }
+       public void setId(String id) {
+               this.id = id;
+       }
+       public String getName() {
+               return name;
+       }
+       public void setName(String name) {
+               this.name = name;
+       }
+       public String getActive() {
+               return active;
+       }
+       public void setActive(String active) {
+               this.active = active;
+       }
+       public String getPriority() {
+               return priority;
+       }
+       public void setPriority(String priority) {
+               this.priority = priority;
+       }
+       public String getAppId() {
+               return appId;
+       }
+       public void setAppId(String appId) {
+               this.appId = appId;
+       }
+       public String getAppRoleId() {
+               return appRoleId;
+       }
+       public void setAppRoleId(String appRoleId) {
+               this.appRoleId = appRoleId;
+       }
+       
+       public List<ExternalAccessPerms> getPermissions() {
+               return permissions;
+       }
+       public void setPermissions(List<ExternalAccessPerms> permissions) {
+               this.permissions = permissions;
+       }
+       @Override
+       public int hashCode() {
+               final int prime = 31;
+               int result = 1;
+               result = prime * result + ((active == null) ? 0 : active.hashCode());
+               result = prime * result + ((appId == null) ? 0 : appId.hashCode());
+               result = prime * result + ((appRoleId == null) ? 0 : appRoleId.hashCode());
+               result = prime * result + ((id == null) ? 0 : id.hashCode());
+               result = prime * result + ((name == null) ? 0 : name.hashCode());
+               result = prime * result + ((priority == null) ? 0 : priority.hashCode());
+               return result;
+       }
+       @Override
+       public boolean equals(Object obj) {
+               if (this == obj)
+                       return true;
+               if (obj == null)
+                       return false;
+               if (getClass() != obj.getClass())
+                       return false;
+               ExternalRoleDescription other = (ExternalRoleDescription) obj;
+               if (active == null) {
+                       if (other.active != null)
+                               return false;
+               } else if (!active.equals(other.active))
+                       return false;
+               if (appId == null) {
+                       if (other.appId != null)
+                               return false;
+               } else if (!appId.equals(other.appId))
+                       return false;
+               if (appRoleId == null) {
+                       if (other.appRoleId != null)
+                               return false;
+               } else if (!appRoleId.equals(other.appRoleId))
+                       return false;
+               if (id == null) {
+                       if (other.id != null)
+                               return false;
+               } else if (!id.equals(other.id))
+                       return false;
+               if (name == null) {
+                       if (other.name != null)
+                               return false;
+               } else if (!name.equals(other.name))
+                       return false;
+               if (priority == null) {
+                       if (other.priority != null)
+                               return false;
+               } else if (!priority.equals(other.priority))
+                       return false;
+               return true;
+       }
+    
+    
+}
diff --git a/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/exception/UserNotFoundException.java b/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/exception/UserNotFoundException.java
new file mode 100644 (file)
index 0000000..8d15b44
--- /dev/null
@@ -0,0 +1,47 @@
+/*-
+ * ============LICENSE_START==========================================
+ * ONAP Portal SDK
+ * ===================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ *
+ * 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============================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.portalsdk.external.authorization.exception;
+
+public class UserNotFoundException extends Exception {
+
+       private static final long serialVersionUID = 1616470595106815228L;
+
+       public UserNotFoundException(String msg) {
+               super(msg);
+       }
+}
diff --git a/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/service/LoginExternalAuthService.java b/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/service/LoginExternalAuthService.java
new file mode 100644 (file)
index 0000000..8f387f9
--- /dev/null
@@ -0,0 +1,80 @@
+/*-
+ * ============LICENSE_START==========================================
+ * ONAP Portal SDK
+ * ===================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ *
+ * 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============================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.portalsdk.external.authorization.service;
+
+import java.io.IOException;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.onap.portalsdk.core.command.LoginBean;
+import org.onap.portalsdk.core.domain.User;
+
+public interface LoginExternalAuthService {
+
+       /**
+        * validate user exists in the system
+        * @param bean
+        * @param menuPropertiesFilename
+        * @param additionalParams
+        * @return returns login user bean
+        * @throws IOException
+        */
+       @SuppressWarnings("rawtypes")
+       LoginBean findUser(LoginBean bean, String menuPropertiesFilename, Map additionalParams, HttpServletRequest request) throws Exception;
+
+       /**
+        * 
+        * @param bean
+        * @param menuPropertiesFilename
+        * @param additionalParams
+        * @param matchPassword
+        * @return returns login user bean
+        * @throws IOException
+        */
+       @SuppressWarnings("rawtypes")
+       LoginBean findUser(LoginBean bean, String menuPropertiesFilename, Map additionalParams, boolean matchPassword, HttpServletRequest request)
+                       throws Exception;
+       
+       /**
+        * 
+        * @param orgUserId
+        * @return
+        */
+        User findUserWithoutPwd(String orgUserId);
+}
diff --git a/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/service/LoginExternalAuthServiceImpl.java b/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/service/LoginExternalAuthServiceImpl.java
new file mode 100644 (file)
index 0000000..a0eee23
--- /dev/null
@@ -0,0 +1,251 @@
+/*-
+ * ============LICENSE_START==========================================
+ * ONAP Portal SDK
+ * ===================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ *
+ * 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============================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.portalsdk.external.authorization.service;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.onap.portalsdk.core.command.LoginBean;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.menu.MenuBuilder;
+import org.onap.portalsdk.core.service.DataAccessService;
+import org.onap.portalsdk.core.service.LoginServiceCentralizedImpl;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.onap.portalsdk.core.web.support.AppUtils;
+import org.onap.portalsdk.core.web.support.UserUtils;
+import org.onap.portalsdk.core.domain.Role;
+import org.onap.portalsdk.core.domain.User;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service("loginExternalAuthService")
+public class LoginExternalAuthServiceImpl implements LoginExternalAuthService {
+
+       private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(LoginServiceCentralizedImpl.class);
+
+       @Autowired
+       private DataAccessService dataAccessService;
+
+       @Autowired
+       private UserApiService userApiService;
+
+       @Override
+       public LoginBean findUser(LoginBean bean, String menuPropertiesFilename,
+                       @SuppressWarnings("rawtypes") Map additionalParams, HttpServletRequest request) throws Exception {
+               return findUser(bean, menuPropertiesFilename, additionalParams, true, request);
+       }
+
+       @Override
+       @SuppressWarnings("rawtypes")
+       public LoginBean findUser(LoginBean bean, String menuPropertiesFilename, Map additionalParams,
+                       boolean matchPassword, HttpServletRequest request) throws  Exception {
+
+               User user;
+               if (bean.getUserid() != null) {
+                       user = findUser(bean, request);
+               } else {
+                       if (matchPassword)
+                               user = findUser(bean.getLoginId(), bean.getLoginPwd());
+                       else
+                               user = findUserWithoutPwd(bean.getLoginId());
+               }
+
+               if (user != null) {
+                       if (AppUtils.isApplicationLocked()
+                                       && !UserUtils.hasRole(user, SystemProperties.getProperty(SystemProperties.SYS_ADMIN_ROLE_ID))) {
+                               bean.setLoginErrorMessage(SystemProperties.MESSAGE_KEY_LOGIN_ERROR_APPLICATION_LOCKED);
+                       }
+
+                       // raise an error if the user is inactive
+                       if (!user.getActive()) {
+                               bean.setLoginErrorMessage(SystemProperties.MESSAGE_KEY_LOGIN_ERROR_USER_INACTIVE);
+                       }
+
+                       if (!userHasActiveRoles(user)) {
+                               bean.setLoginErrorMessage(SystemProperties.MESSAGE_KEY_LOGIN_ERROR_USER_INACTIVE);
+                       }
+                       // only login the user if no errors have occurred
+                       if (bean.getLoginErrorMessage() == null) {
+
+                               // this will be a snapshot of the user's information as
+                               // retrieved from the database
+                               User userCopy = null;
+                               try {
+                                       userCopy = (User) user.clone();
+                               } catch (CloneNotSupportedException ex) {
+                                       // Never happens
+                                       logger.error(EELFLoggerDelegate.errorLogger, "findUser failed", ex);
+                               }
+
+                               User appuser = findUserWithoutPwd(user.getLoginId());
+
+                               if (appuser == null && userHasRoleFunctions(user)) {
+                                       createUserIfNecessary(user);
+                               } else {
+                                       appuser.setLastLoginDate(new Date());
+
+                                       // update the last logged in date for the user
+                                       dataAccessService.saveDomainObject(appuser, additionalParams);
+                               }
+                               // update the audit log of the user
+                               // Check for the client device type and set log attributes
+                               // appropriately
+
+                               // save the above changes to the User and their audit trail
+
+                               // create the application menu based on the user's privileges
+
+                               Set appMenu = getMenuBuilder().getMenu(
+                                               SystemProperties.getProperty(SystemProperties.APPLICATION_MENU_SET_NAME), dataAccessService);
+                               bean.setMenu(appMenu != null ? appMenu : new HashSet());
+                               Set businessDirectMenu = getMenuBuilder().getMenu(
+                                               SystemProperties.getProperty(SystemProperties.BUSINESS_DIRECT_MENU_SET_NAME),
+                                               dataAccessService);
+                               bean.setBusinessDirectMenu(businessDirectMenu != null ? businessDirectMenu : new HashSet());
+
+                               bean.setUser(userCopy);
+                       }
+               }
+
+               return bean;
+       }
+
+       private void createUserIfNecessary(User user) {
+               logger.debug(EELFLoggerDelegate.debugLogger, "createUser: " + user.getOrgUserId());
+               User user1 = new User();
+               user1.setEmail(user.getEmail());
+               user1.setEmail(user.getEmail());
+               user1.setFirstName(user.getFirstName());
+               user1.setHrid(user.getHrid());
+               user1.setJobTitle(user.getJobTitle());
+               user1.setLastName(user.getLastName());
+               user1.setLoginId(user.getLoginId());
+               user1.setOrgManagerUserId(user.getOrgManagerUserId());
+               user1.setMiddleInitial(user.getMiddleInitial());
+               user1.setOrgCode(user.getOrgCode());
+               user1.setOrgId(user.getOrgId());
+               user1.setPhone(user.getPhone());
+               user1.setOrgUserId(user.getOrgUserId());
+               user1.setActive(user.getActive());
+               user1.setLastLoginDate(new Date());
+
+               try {
+                       dataAccessService.saveDomainObject(user1, null);
+                       logger.debug(EELFLoggerDelegate.debugLogger, "createdUser Successfully: " + user.getOrgUserId());
+               } catch (Exception ex) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "createUserIfNecessary failed", ex);
+               }
+
+       }
+
+       private boolean userHasActiveRoles(User user) {
+               boolean hasActiveRole = false;
+               @SuppressWarnings("rawtypes")
+               Iterator roles = user.getRoles().iterator();
+               while (roles.hasNext()) {
+                       Role role = (Role) roles.next();
+                       if (role.getActive()) {
+                               hasActiveRole = true;
+                               break;
+                       }
+               }
+               return hasActiveRole;
+       }
+
+       private boolean userHasRoleFunctions(User user) {
+               boolean hasRoleFunctions = false;
+               @SuppressWarnings("rawtypes")
+               Iterator roles = user.getRoles().iterator();
+               while (roles.hasNext()) {
+                       Role role = (Role) roles.next();
+                       if (role.getActive() && role.getRoleFunctions() != null && !role.getRoleFunctions().isEmpty()) {
+                               hasRoleFunctions = true;
+                               break;
+                       }
+               }
+               return hasRoleFunctions;
+       }
+
+       private User findUser(LoginBean bean, HttpServletRequest request) throws Exception {
+               User user =  userApiService.getUser(bean.getUserid(), request);
+               user.setId(getUserIdByOrgUserId(user.getOrgUserId()));
+               logger.debug(EELFLoggerDelegate.debugLogger, "findUser: Returning final user roles and permissions", user.toString());
+               return user;
+       }
+       
+       private Long getUserIdByOrgUserId(String orgUserId) {
+               Map<String, String> params = new HashMap<>();
+               params.put("orgUserId", orgUserId);
+               @SuppressWarnings("rawtypes")
+               List list = dataAccessService.executeNamedQuery("getUserIdByorgUserId", params, null);
+               Long userId = null;
+               if (list != null && !list.isEmpty())
+                       userId = (Long) list.get(0);
+               return userId;
+       }
+
+       @SuppressWarnings("rawtypes")
+       private User findUser(String loginId, String password) {
+               Map<String, String> params = new HashMap<>();
+               params.put("login_id", loginId);
+               params.put("login_pwd", password);
+               List list = dataAccessService.executeNamedQuery("getUserByLoginIdLoginPwd", params, new HashMap());
+               return (list == null || list.isEmpty()) ? null : (User) list.get(0);
+       }
+
+       @SuppressWarnings("rawtypes")
+       @Override
+       public User findUserWithoutPwd(String loginId) {
+               Map<String, String> params = new HashMap<>();
+               params.put("org_user_id", loginId);
+               List list = dataAccessService.executeNamedQuery("getUserByOrgUserId", params, new HashMap());
+               return (list == null || list.isEmpty()) ? null : (User) list.get(0);
+       }
+
+       private MenuBuilder getMenuBuilder() {
+               return new MenuBuilder();
+       }
+
+}
diff --git a/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/service/UserApiService.java b/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/service/UserApiService.java
new file mode 100644 (file)
index 0000000..6eb312b
--- /dev/null
@@ -0,0 +1,66 @@
+/*-
+ * ============LICENSE_START==========================================
+ * ONAP Portal SDK
+ * ===================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ *
+ * 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============================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.portalsdk.external.authorization.service;
+
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.onap.portalsdk.core.domain.RoleFunction;
+import org.onap.portalsdk.core.domain.User;
+import org.onap.portalsdk.external.authorization.exception.UserNotFoundException;
+
+public interface UserApiService {
+       
+       /**
+        * Gets list of all roles associated to user from external system
+        * 
+        * @param orgUserId
+        * @return 
+        * @throws Exception 
+        */
+       User getUser(String orgUserId, HttpServletRequest request) throws UserNotFoundException;
+       
+       /**
+        * 
+        * @param OrgUserId
+        * @return
+        */
+       List<RoleFunction> getRoleFunctions(String orgUserId) throws Exception;
+       
+}
diff --git a/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/service/UserApiServiceImpl.java b/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/service/UserApiServiceImpl.java
new file mode 100644 (file)
index 0000000..cecab47
--- /dev/null
@@ -0,0 +1,308 @@
+/*-
+ * ============LICENSE_START==========================================
+ * ONAP Portal SDK
+ * ===================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ *
+ * 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============================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.portalsdk.external.authorization.service;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import java.util.TreeSet;
+
+import javax.naming.NamingException;
+import javax.servlet.http.HttpServletRequest;
+
+import org.json.JSONArray;
+import org.json.JSONObject;
+import org.onap.portalsdk.core.command.PostSearchBean;
+import org.onap.portalsdk.core.command.support.SearchResult;
+import org.onap.portalsdk.core.domain.App;
+import org.onap.portalsdk.core.domain.Role;
+import org.onap.portalsdk.core.domain.RoleFunction;
+import org.onap.portalsdk.core.domain.User;
+import org.onap.portalsdk.core.domain.UserApp;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.service.AppService;
+import org.onap.portalsdk.core.service.DataAccessService;
+import org.onap.portalsdk.core.service.LdapService;
+import org.onap.portalsdk.core.service.PostSearchService;
+import org.onap.portalsdk.external.authorization.domain.ExternalAccessPerms;
+import org.onap.portalsdk.external.authorization.domain.ExternalAccessUserRoleDetail;
+import org.onap.portalsdk.external.authorization.domain.ExternalRoleDescription;
+import org.onap.portalsdk.external.authorization.exception.UserNotFoundException;
+import org.onap.portalsdk.external.authorization.util.EcompExternalAuthProperties;
+import org.onap.portalsdk.external.authorization.util.EcompExternalAuthUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+import org.springframework.web.client.RestTemplate;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.type.TypeFactory;
+
+@Service("userApiService")
+public class UserApiServiceImpl implements UserApiService {
+
+       private static final String AAF_GET_USER_ROLES_ENDPOINT = "roles/user/";
+
+       private static final String AAF_GET_USER_PERMS_ENDPOINT = "perms/user/";
+
+       private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(UserApiServiceImpl.class);
+
+       @Autowired
+       private LoginExternalAuthService loginAAFService;
+
+       @Autowired
+       private LdapService ldapService;
+
+       @Autowired
+       private PostSearchService postSearchService;
+
+       @Autowired
+       private DataAccessService dataAccessService;
+
+       RestTemplate template = new RestTemplate();
+
+       @Autowired
+       private AppService appService;
+
+       @Override
+       public User getUser(String orgUserId, HttpServletRequest request)
+                       throws UserNotFoundException {
+               User user = null;
+               try {
+                       String namespace = EcompExternalAuthProperties.getProperty(EcompExternalAuthProperties.EXTERNAL_AUTH_NAMESPACE);
+                       HttpHeaders headers = EcompExternalAuthUtils.base64encodeKeyForAAFBasicAuth();
+                       HttpEntity<String> entity = new HttpEntity<>(headers);
+                       logger.debug(EELFLoggerDelegate.debugLogger, "getUserRoles: Connecting to external system for user {}",
+                                       orgUserId);
+                       String endPoint = AAF_GET_USER_ROLES_ENDPOINT + orgUserId
+                                       + EcompExternalAuthProperties.getProperty(EcompExternalAuthProperties.EXTERNAL_AUTH_USER_DOMAIN);
+                       ResponseEntity<String> getResponse = template.exchange(
+                                       EcompExternalAuthProperties.getProperty(EcompExternalAuthProperties.EXTERNAL_AUTH_URL) + endPoint, HttpMethod.GET, entity,
+                                       String.class);
+                       if (getResponse.getStatusCode().value() == 200) {
+                               logger.debug(EELFLoggerDelegate.debugLogger,
+                                               "getUserRoles: Finished GET unp ser roles from external system and body: {}",
+                                               getResponse.getBody());
+                       }
+                       String userRoles = getResponse.getBody();
+                       JSONObject userJsonObj = null;
+                       JSONArray userJsonArray = null;
+                       ObjectMapper mapper = new ObjectMapper();
+                       List<ExternalAccessUserRoleDetail> userRoleDetailList = new ArrayList<>();
+                       if (!userRoles.equals(EcompExternalAuthUtils.EXT_EMPTY_JSON_STRING)) {
+                               userJsonObj = new JSONObject(userRoles);
+                               userJsonArray = userJsonObj.getJSONArray(EcompExternalAuthUtils.EXT_ROLE_FIELD);
+                               ExternalAccessUserRoleDetail userRoleDetail = null;
+                               for (int i = 0; i < userJsonArray.length(); i++) {
+                                       JSONObject role = userJsonArray.getJSONObject(i);
+                                       if (!role.getString(EcompExternalAuthUtils.EXT_ROLE_FIELD_NAME).endsWith(EcompExternalAuthUtils.EXT_ROLE_FIELD_ADMIN)
+                                                       && !role.getString(EcompExternalAuthUtils.EXT_ROLE_FIELD_NAME)
+                                                                       .endsWith(EcompExternalAuthUtils.EXT_ROLE_FIELD_OWNER)
+                                                       && EcompExternalAuthUtils.checkNameSpaceMatching(role.getString(EcompExternalAuthUtils.EXT_ROLE_FIELD_NAME),
+                                                                       namespace)
+                                                       && role.has(EcompExternalAuthUtils.EXT_FIELD_DESCRIPTION)
+                                                       && EcompExternalAuthUtils.isJSONValid(role.getString(EcompExternalAuthUtils.EXT_FIELD_DESCRIPTION))) {
+                                               ExternalRoleDescription desc = mapper.readValue(
+                                                               role.getString(EcompExternalAuthUtils.EXT_FIELD_DESCRIPTION), ExternalRoleDescription.class);
+                                               JSONArray perms = role.getJSONArray(EcompExternalAuthUtils.EXT_FIELD_PERMS);
+                                               List<ExternalAccessPerms> permsList = mapper.readValue(perms.toString(), TypeFactory
+                                                               .defaultInstance().constructCollectionType(List.class, ExternalAccessPerms.class));
+                                               desc.setPermissions(permsList);
+                                               userRoleDetail = new ExternalAccessUserRoleDetail(
+                                                               role.getString(EcompExternalAuthUtils.EXT_ROLE_FIELD_NAME), desc);
+                                               userRoleDetailList.add(userRoleDetail);
+                                       }
+                               }
+                       } else {
+                               throw new UserNotFoundException("User roles not found!");
+                       }
+
+                       if (userRoleDetailList.isEmpty()) {
+                               throw new UserNotFoundException("User roles not found!");
+                       } else {
+                               user = convertAAFUserRolesToEcompSDKUser(userRoleDetailList, orgUserId, namespace, request);
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "getUser: Failed! ", e);
+               }
+               return user;
+
+       }
+
+       @SuppressWarnings({ "rawtypes", "unchecked" })
+       private User convertAAFUserRolesToEcompSDKUser(List<ExternalAccessUserRoleDetail> userRoleDetailList,
+                       String orgUserId, String namespace, HttpServletRequest request)
+                       throws Exception {
+               User user = loginAAFService.findUserWithoutPwd(orgUserId);
+               PostSearchBean postSearchBean = new PostSearchBean();
+               if (user == null) {
+                       postSearchBean.setOrgUserId(orgUserId);
+                       postSearchService.process(request, postSearchBean);
+                       postSearchBean.setSearchResult(loadSearchResultData(postSearchBean));
+                       user = (User) postSearchBean.getSearchResult().get(0);
+                       user.setActive(true);
+                       dataAccessService.saveDomainObject(user, null);
+               }
+               App app = appService.getApp(1l);
+               try {
+                       Set userApps = new TreeSet();
+                       for (ExternalAccessUserRoleDetail userRoleDetail : userRoleDetailList) {
+                               ExternalRoleDescription roleDesc = userRoleDetail.getDescription();
+                               UserApp userApp = new UserApp();
+                               Role role = new Role();
+                               Set roleFunctions = new TreeSet<>();
+                               if (roleDesc != null) {
+                                       role.setActive(Boolean.valueOf(roleDesc.getActive()));
+                                       role.setId(Long.valueOf(roleDesc.getAppRoleId()));
+                                       role.setName(roleDesc.getName());
+                                       if (!roleDesc.getPriority().equals(EcompExternalAuthUtils.EXT_NULL_VALUE)) {
+                                               role.setPriority(Integer.valueOf(roleDesc.getPriority()));
+                                       }
+                                       for (ExternalAccessPerms extPerm : roleDesc.getPermissions()) {
+                                               RoleFunction roleFunction = new RoleFunction();
+                                               roleFunction.setCode(extPerm.getInstance());
+                                               roleFunction.setAction(extPerm.getAction());
+                                               if (extPerm.getDescription() != null
+                                                               && EcompExternalAuthUtils.checkNameSpaceMatching(extPerm.getType(), namespace)) {
+                                                       roleFunction.setName(extPerm.getDescription());
+                                               } else if (extPerm.getDescription() == null
+                                                               && EcompExternalAuthUtils.checkNameSpaceMatching(extPerm.getType(), namespace)) {
+                                                       roleFunction.setName(extPerm.getType().substring(namespace.length() + 1) + "|"
+                                                                       + extPerm.getInstance() + "|" + extPerm.getAction());
+                                               } else if (extPerm.getDescription() == null
+                                                               && !EcompExternalAuthUtils.checkNameSpaceMatching(extPerm.getType(), namespace)) {
+                                                       roleFunction.setName(
+                                                                       extPerm.getType() + "|" + extPerm.getInstance() + "|" + extPerm.getAction());
+                                               }
+                                               if (EcompExternalAuthUtils.checkNameSpaceMatching(extPerm.getType(), namespace)) {
+                                                       roleFunction.setType(extPerm.getType().substring(namespace.length() + 1));
+                                               } else {
+                                                       roleFunction.setType(extPerm.getType());
+                                               }
+                                               roleFunctions.add(roleFunction);
+                                       }
+                               }
+                               role.setRoleFunctions(roleFunctions);
+                               userApp.setApp(app);
+                               userApp.setRole(role);
+                               userApp.setUserId(user.getId());
+                               userApps.add(userApp);
+                       }
+                       user.setUserApps(userApps);
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "createEPUser: createEPUser failed", e);
+                       throw e;
+               }
+
+               return user;
+       }
+
+       @Override
+       public List<RoleFunction> getRoleFunctions(String orgUserId) throws Exception {
+               ObjectMapper mapper = new ObjectMapper();
+               HttpHeaders headers = EcompExternalAuthUtils.base64encodeKeyForAAFBasicAuth();
+               HttpEntity<String> entity = new HttpEntity<>(headers);
+               logger.debug(EELFLoggerDelegate.debugLogger, "getRoleFunctions: Connecting to external system for user {}",
+                               orgUserId);
+               String endPoint = AAF_GET_USER_PERMS_ENDPOINT + orgUserId
+                               + EcompExternalAuthProperties.getProperty(EcompExternalAuthProperties.EXTERNAL_AUTH_USER_DOMAIN);
+               ResponseEntity<String> getResponse = template.exchange(
+                               EcompExternalAuthProperties.getProperty(EcompExternalAuthProperties.EXTERNAL_AUTH_URL) + endPoint, HttpMethod.GET, entity,
+                               String.class);
+               if (getResponse.getStatusCode().value() == 200) {
+                       logger.debug(EELFLoggerDelegate.debugLogger,
+                                       "getRoleFunctions: Finished GET user perms from external system and body: {}",
+                                       getResponse.getBody());
+               }
+               String userPerms = getResponse.getBody();
+               JSONObject userPermsJsonObj = null;
+               JSONArray userPermsJsonArray = null;
+               List<ExternalAccessPerms> extPermsList = new ArrayList<>();
+               if (!userPerms.equals(EcompExternalAuthUtils.EXT_EMPTY_JSON_STRING)) {
+                       userPermsJsonObj = new JSONObject(userPerms);
+                       userPermsJsonArray = userPermsJsonObj.getJSONArray(EcompExternalAuthUtils.EXT_PERM_FIELD);
+                       for (int i = 0; i < userPermsJsonArray.length(); i++) {
+                               JSONObject permJsonObj = userPermsJsonArray.getJSONObject(i);
+                               if (!permJsonObj.getString(EcompExternalAuthUtils.EXT_PERM_FIELD_TYPE).endsWith(EcompExternalAuthUtils.EXT_PERM_ACCESS)) {
+                                       ExternalAccessPerms perm = mapper.readValue(permJsonObj.toString(), ExternalAccessPerms.class);
+                                       extPermsList.add(perm);
+                               }
+                       }
+               }
+               return convertToRoleFunctionList(extPermsList);
+       }
+
+       private List<RoleFunction> convertToRoleFunctionList(List<ExternalAccessPerms> extPermsList) {
+               List<RoleFunction> roleFunctions = new ArrayList<>();
+               String namespace = EcompExternalAuthProperties.getProperty(EcompExternalAuthProperties.EXTERNAL_AUTH_NAMESPACE);
+               for (ExternalAccessPerms extPerm : extPermsList) {
+                       RoleFunction roleFunction = new RoleFunction();
+                       roleFunction.setCode(extPerm.getInstance());
+                       roleFunction.setAction(extPerm.getAction());
+                       if (extPerm.getDescription() != null
+                                       && EcompExternalAuthUtils.checkNameSpaceMatching(extPerm.getType(), namespace)) {
+                               roleFunction.setName(extPerm.getDescription());
+                       } else if (extPerm.getDescription() == null
+                                       && EcompExternalAuthUtils.checkNameSpaceMatching(extPerm.getType(), namespace)) {
+                               roleFunction.setName(extPerm.getType().substring(namespace.length() + 1) + "|" + extPerm.getInstance()
+                                               + "|" + extPerm.getAction());
+                       } else if (extPerm.getDescription() == null
+                                       && !EcompExternalAuthUtils.checkNameSpaceMatching(extPerm.getType(), namespace)) {
+                               roleFunction.setName(extPerm.getType() + "|" + extPerm.getInstance() + "|" + extPerm.getAction());
+                       }
+                       if (EcompExternalAuthUtils.checkNameSpaceMatching(extPerm.getType(), namespace)) {
+                               roleFunction.setType(extPerm.getType().substring(namespace.length() + 1));
+                       } else {
+                               roleFunction.setType(extPerm.getType());
+                       }
+                       roleFunctions.add(roleFunction);
+               }
+               return roleFunctions;
+       }
+
+       private SearchResult loadSearchResultData(PostSearchBean searchCriteria)
+                       throws NamingException {
+               return ldapService.searchPost(searchCriteria.getUser(), searchCriteria.getSortBy1(),
+                               searchCriteria.getSortBy2(), searchCriteria.getSortBy3(), searchCriteria.getPageNo(),
+                               searchCriteria.getNewDataSize(), 1);
+       }
+
+}
diff --git a/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/util/EcompExternalAuthProperties.java b/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/util/EcompExternalAuthProperties.java
new file mode 100644 (file)
index 0000000..a680a67
--- /dev/null
@@ -0,0 +1,123 @@
+/*-
+ * ============LICENSE_START==========================================
+ * ONAP Portal SDK
+ * ===================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ *
+ * 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============================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.portalsdk.external.authorization.util;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+
+
+public class EcompExternalAuthProperties {
+
+       public static final String EXTERNAL_AUTH_USER_NAME = "extern_auth_user_name";
+
+       public static final String EXTERNAL_AUTH_PASSWORD = "extern_auth_password";
+
+       public static final String EXTERNAL_AUTH_URL = "extern_auth_url";
+
+       public static final String EXTERNAL_AUTH_USER_DOMAIN = "extern_auth_user_domain";
+       
+       public static final String EXTERNAL_AUTH_NAMESPACE = "extern_auth_namespace";
+
+       private EcompExternalAuthProperties(){}
+       
+       private static Properties properties;
+       
+       private static String propertyFileName = "external-auth.properties";
+       
+       private static final Object lockObject = new Object();
+       
+       private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EcompExternalAuthProperties.class);
+       
+       /**
+        * Gets the property value for the specified key. If a value is found, leading
+        * and trailing space is trimmed.
+        *
+        * @param property
+        *            Property key
+        * @return Value for the named property; null if the property file was not
+        *         loaded or the key was not found.
+        */
+       public static String getProperty(String property) {
+               if (properties == null) {
+                       synchronized (lockObject) {
+                               try {
+                                       if (!initialize()) {
+                                               logger.error(EELFLoggerDelegate.errorLogger,"Failed to read property file " + propertyFileName);
+                                               return null;
+                                       }
+                               } catch (IOException e) {
+                                       logger.error(EELFLoggerDelegate.errorLogger,"Failed to read property file " + propertyFileName ,e);
+                                       return null;
+                               }
+                       }
+               }
+               String value = properties.getProperty(property);
+               if (value != null)
+                       value = value.trim();
+               return value;
+       }
+       
+       /**
+        * Reads properties from a portal.properties file on the classpath.
+        * 
+        * Clients do NOT need to call this method. Clients MAY call this method to test
+        * whether the properties file can be loaded successfully.
+        * 
+        * @return True if properties were successfully loaded, else false.
+        * @throws IOException
+        *             On failure
+        */
+       private static boolean initialize() throws IOException {
+               if (properties != null)
+                       return true;
+               InputStream in = EcompExternalAuthProperties.class.getClassLoader().getResourceAsStream(propertyFileName);
+               if (in == null)
+                       return false;
+               properties = new Properties();
+               try {
+                       properties.load(in);
+               } finally {
+                       in.close();
+               }
+               return true;
+       }
+       
+}
diff --git a/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/util/EcompExternalAuthUtils.java b/ecomp-sdk/epsdk-aaf/src/main/java/org/onap/portalsdk/external/authorization/util/EcompExternalAuthUtils.java
new file mode 100644 (file)
index 0000000..56b1527
--- /dev/null
@@ -0,0 +1,139 @@
+/*-
+ * ============LICENSE_START==========================================
+ * ONAP Portal SDK
+ * ===================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ *
+ * 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============================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.portalsdk.external.authorization.util;
+
+import java.io.IOException;
+
+import javax.xml.bind.DatatypeConverter;
+
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.onboarding.util.CipherUtil;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.MediaType;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class EcompExternalAuthUtils {
+
+       private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EcompExternalAuthUtils.class);
+
+       @Autowired
+       CipherUtil cipherUtil;
+       
+       public static final String EXT_EMPTY_JSON_STRING = "{}";
+       public static final String EXT_ROLE_FIELD = "role";
+       public static final String EXT_PERM_FIELD = "perm";
+       public static final String EXT_PERM_FIELD_TYPE = "type";
+       public static final String EXT_PERM_ACCESS = ".access";
+       public static final String EXT_ROLE_FIELD_NAME = "name";
+       public static final String EXT_NULL_VALUE = "null";
+       public static final String EXT_FIELD_DESCRIPTION = "description";
+       public static final String EXT_FIELD_PERMS = "perms";
+       public static final String EXT_ROLE_FIELD_OWNER = ".owner";
+       public static final String EXT_ROLE_FIELD_ADMIN = ".admin";
+
+       public static HttpHeaders base64encodeKeyForAAFBasicAuth() throws Exception {
+               String userName = EcompExternalAuthProperties.getProperty(EcompExternalAuthProperties.EXTERNAL_AUTH_USER_NAME);
+               String encryptedPass = EcompExternalAuthProperties.getProperty(EcompExternalAuthProperties.EXTERNAL_AUTH_PASSWORD);
+               String decryptedPass = decryptPass(encryptedPass);
+               String usernamePass = userName + ":" + decryptedPass;
+               String encToBase64 = String.valueOf((DatatypeConverter.printBase64Binary(usernamePass.getBytes())));
+               HttpHeaders headers = new HttpHeaders();
+               headers.add("Authorization", "Basic " + encToBase64);
+               headers.setContentType(MediaType.APPLICATION_JSON);
+               return headers;
+       }
+
+       private static String decryptPass(String encrypted) throws Exception {
+               String result = "";
+               if (encrypted != null && encrypted.length() > 0) {
+                       try {
+                               result = CipherUtil.decryptPKC(encrypted,
+                                               SystemProperties.getProperty(SystemProperties.Decryption_Key));
+                       } catch (Exception e) {
+                               logger.error(EELFLoggerDelegate.errorLogger,"decryptedPassword failed", e);
+                               throw e;
+                       }
+               }
+               return result;
+       }
+       
+       /**
+        * 
+        * It checks whether the namespace is matching or not
+        * 
+        * @param permTypeVal
+        * @param appNamespaceVal
+        * @return true or false
+        */
+       public static boolean checkNameSpaceMatching(String permTypeVal, String appNamespaceVal) {
+               String[] typeNamespace = permTypeVal.split("\\.");
+               String[] appNamespace = appNamespaceVal.split("\\.");
+               boolean isNamespaceMatching = true;
+               if (appNamespace.length <= typeNamespace.length) {
+                       for (int k = 0; k < appNamespace.length; k++) {
+                               if (!appNamespace[k].equals(typeNamespace[k]))
+                                       isNamespaceMatching = false;
+                       }
+
+               } else {
+                       isNamespaceMatching = false;
+               }
+               return isNamespaceMatching;
+       }
+       
+       /**
+        * 
+        * It validates whether given string is JSON or not
+        * 
+        * @param jsonInString
+        * @return true or false
+        */
+         public static boolean isJSONValid(String jsonInString ) {
+                   try {
+                      final ObjectMapper mapper = new ObjectMapper();
+                      mapper.readTree(jsonInString);
+                      return true;
+                   } catch (IOException e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "Failed to parse Json!", e);
+                      return false;
+                   }
+                 }
+}
index 2b79d54..35b3f32 100644 (file)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.portal.sdk</groupId>
                <artifactId>epsdk-project</artifactId>
-               <version>2.2.0-SNAPSHOT</version>
+               <version>2.3.0-SNAPSHOT</version>
        </parent>
        
        <!-- GroupId is inherited from parent -->
index ede3793..c1ca993 100644 (file)
@@ -45,7 +45,7 @@ import java.util.Date;
 import java.util.List;
 import java.util.TimeZone;
 
-import org.onap.portalsdk.core.FusionObject;
+import org.onap.portalsdk.core.domain.FusionObject;
 import org.onap.portalsdk.core.domain.User;
 import org.onap.portalsdk.core.service.DataAccessService;
 import org.onap.portalsdk.core.util.SystemProperties;
index adfc7d2..32634d0 100644 (file)
@@ -42,8 +42,7 @@ import java.util.Map;
 
 import javax.servlet.ServletContext;
 
-import org.onap.portalsdk.analytics.model.runtime.FormField;
-import org.onap.portalsdk.core.FusionObject;
+import org.onap.portalsdk.core.domain.FusionObject;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.springframework.beans.factory.annotation.Autowired;
 
index 7af4081..5c2ffcc 100644 (file)
 package org.onap.portalsdk.analytics.controller;
 
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertNotNull;
+
 import java.sql.ResultSet;
 import java.sql.ResultSetMetaData;
 import java.util.ArrayList;
 import java.util.List;
+
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpSession;
-import org.onap.portalsdk.analytics.system.fusion.AppUtils;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -64,6 +65,7 @@ import org.onap.portalsdk.analytics.model.runtime.ReportRuntime;
 import org.onap.portalsdk.analytics.system.DbUtils;
 import org.onap.portalsdk.analytics.system.Globals;
 import org.onap.portalsdk.analytics.system.IAppUtils;
+import org.onap.portalsdk.analytics.system.fusion.AppUtils;
 import org.onap.portalsdk.analytics.util.AppConstants;
 import org.onap.portalsdk.analytics.util.DataSet;
 import org.onap.portalsdk.analytics.xmlobj.ChartAdditionalOptions;
index c28d8bf..0e2d6e6 100644 (file)
@@ -54,7 +54,6 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.InjectMocks;
@@ -74,9 +73,6 @@ import org.onap.portalsdk.analytics.model.base.ReportWrapper;
 import org.onap.portalsdk.analytics.model.definition.ReportDefinition;
 import org.onap.portalsdk.analytics.model.definition.wizard.ColumnJSON;
 import org.onap.portalsdk.analytics.model.definition.wizard.DefinitionJSON;
-import org.onap.portalsdk.analytics.model.definition.wizard.ImportJSON;
-import org.onap.portalsdk.analytics.model.definition.wizard.MessageJSON;
-import org.onap.portalsdk.analytics.model.definition.wizard.QueryJSON;
 import org.onap.portalsdk.analytics.system.AppUtils;
 import org.onap.portalsdk.analytics.system.ConnectionUtils;
 import org.onap.portalsdk.analytics.system.DbUtils;
@@ -87,12 +83,9 @@ import org.onap.portalsdk.analytics.util.DataSet;
 import org.onap.portalsdk.analytics.util.Utils;
 import org.onap.portalsdk.analytics.util.XSSFilter;
 import org.onap.portalsdk.analytics.view.ReportData;
-import org.onap.portalsdk.analytics.xmlobj.ChartAdditionalOptions;
 import org.onap.portalsdk.analytics.xmlobj.CustomReportType;
-import org.onap.portalsdk.analytics.xmlobj.DataColumnList;
 import org.onap.portalsdk.analytics.xmlobj.DataColumnType;
 import org.onap.portalsdk.analytics.xmlobj.DataSourceList;
-import org.onap.portalsdk.analytics.xmlobj.DataSourceType;
 import org.onap.portalsdk.analytics.xmlobj.FormFieldList;
 import org.onap.portalsdk.analytics.xmlobj.FormFieldType;
 import org.onap.portalsdk.analytics.xmlobj.MockRunTimeReport;
@@ -102,7 +95,6 @@ import org.onap.portalsdk.core.service.DataAccessService;
 import org.onap.portalsdk.core.util.SecurityCodecUtil;
 import org.onap.portalsdk.core.web.support.UserUtils;
 import org.owasp.esapi.ESAPI;
-import org.owasp.esapi.Encoder;
 import org.owasp.esapi.codecs.Codec;
 import org.powermock.api.mockito.PowerMockito;
 import org.powermock.core.classloader.annotations.PrepareForTest;
index 1e40cf3..5715bc2 100644 (file)
  */
 package org.onap.portalsdk.analytics.xmlobj;
 
-import static org.junit.Assert.*;
-import javax.xml.namespace.QName;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
 
-import java.io.IOException;
 import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.Reader;
 import java.io.StringReader;
-import java.io.Writer;
-import java.sql.Clob;
 import java.sql.Connection;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.ResultSetMetaData;
-import java.sql.SQLException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
 import javax.xml.bind.Marshaller;
 import javax.xml.bind.Unmarshaller;
+import javax.xml.namespace.QName;
 
-import org.hibernate.Session;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -76,15 +73,12 @@ import org.onap.portalsdk.analytics.error.RaptorException;
 import org.onap.portalsdk.analytics.model.ReportLoader;
 import org.onap.portalsdk.analytics.model.base.ReportWrapper;
 import org.onap.portalsdk.analytics.model.runtime.ChartJSONHelper;
-import org.onap.portalsdk.analytics.model.runtime.FormField;
-import org.onap.portalsdk.analytics.model.runtime.ReportFormFields;
 import org.onap.portalsdk.analytics.model.runtime.ReportRuntime;
 import org.onap.portalsdk.analytics.system.AppUtils;
 import org.onap.portalsdk.analytics.system.DbUtils;
 import org.onap.portalsdk.analytics.system.Globals;
 import org.onap.portalsdk.analytics.util.AppConstants;
 import org.onap.portalsdk.analytics.util.DataSet;
-import org.onap.portalsdk.analytics.xmlobj.CustomReportType;
 import org.onap.portalsdk.core.domain.User;
 import org.onap.portalsdk.core.restful.domain.EcompRole;
 import org.onap.portalsdk.core.web.support.UserUtils;
index 48c5117..31d8be4 100644 (file)
@@ -470,8 +470,9 @@ create table fn_datasource (
 create table fn_function (
     FUNCTION_CD CHARACTER VARYING(30) NOT NULL PRIMARY KEY,
     FUNCTION_NAME CHARACTER VARYING(50) NOT NULL,
-    TYPE VARCHAR(20) NULL DEFAULT NULL,
-    ACTION VARCHAR(20) NULL DEFAULT NULL
+    TYPE VARCHAR(20) NOT NULL,
+    ACTION VARCHAR(20) NOT NULL,
+    UNIQUE KEY function (FUNCTION_CD,TYPE,ACTION)
 );
 
 --
index 067ec92..5022161 100644 (file)
@@ -8,46 +8,45 @@ SET FOREIGN_KEY_CHECKS=1;
 USE ecomp_sdk;
 
 -- fn_function
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_process','Process List');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_job','Job Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_job_create','Job Create');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_job_designer','Process in Designer view');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_task','Task Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_task_search','Task Search');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_map','Map Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_sample','Sample Pages Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('login','Login');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_home','Home Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_customer','Customer Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_reports','Reports Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_profile','Profile Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_admin','Admin Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_feedback','Feedback Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_help','Help Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_logout','Logout Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_notes','Notes Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_ajax','Ajax Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_customer_create','Customer Create');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_profile_create','Profile Create');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_profile_import','Profile Import');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_tab','Sample Tab Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('view_reports','View Raptor reports');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_process','Process List','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_job','Job Menu','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_job_create','Job Create','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_job_designer','Process in Designer view','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_task','Task Menu','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_task_search','Task Search','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_map','Map Menu','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_sample','Sample Pages Menu','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('login','Login','url','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_home','Home Menu','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_customer','Customer Menu','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_reports','Reports Menu','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_profile','Profile Menu','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_admin','Admin Menu','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_feedback','Feedback Menu','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_help','Help Menu','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_logout','Logout Menu','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_notes','Notes Menu','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_ajax','Ajax Menu','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_customer_create','Customer Create','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_profile_create','Profile Create','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_profile_import','Profile Import','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_tab','Sample Tab Menu','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('view_reports','View Raptor reports','menu','*');
 
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_itracker_admin','Itracker Admin/Support menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('quantum_bd','Big Data Function');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('1','test role function');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_hiveconfig','Hive Configuration');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_mapreduce_create','Map Reduce Configuration Create');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_mapreduce_search','Map Reduce Configuration Search');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_hiveconfig_search','Hive Configuration Search');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_hiveconfig_create','Hive Configuration Create');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_test','Test Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_doclib','Document Library Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('doclib','Document Library');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('doclib_admin','Document Library Admin');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_concept','CoNCEPT');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_itracker','iTracker Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_mapreduce','Map Reduce Configuration');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_itracker_admin','Itracker Admin/Support menu','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('quantum_bd','Big Data Function','url','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_hiveconfig','Hive Configuration','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_mapreduce_create','Map Reduce Configuration Create','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_mapreduce_search','Map Reduce Configuration Search','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_hiveconfig_search','Hive Configuration Search','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_hiveconfig_create','Hive Configuration Create','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_test','Test Menu','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_doclib','Document Library Menu','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('doclib','Document Library','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('doclib_admin','Document Library Admin','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_concept','CoNCEPT','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_itracker','iTracker Menu','menu','*');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME,TYPE,ACTION) values ('menu_mapreduce','Map Reduce Configuration','menu','*');
 
 -- fn_lu_activity
 Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('add_role','add_role');
index f8a7fbc..627d30f 100644 (file)
@@ -1,10 +1,10 @@
 use ecomp_sdk;
 
+ALTER TABLE fn_function DROP INDEX function;
 
 ALTER TABLE fn_function
 DROP COLUMN type;
 
-
 ALTER TABLE fn_function
 DROP COLUMN action;
 
index 32540c6..474a6b8 100644 (file)
@@ -3,10 +3,53 @@ use ecomp_sdk;
 SET FOREIGN_KEY_CHECKS=0;
 
 alter table fn_function
-add type VARCHAR(20) NULL DEFAULT NULL;
-
+add type VARCHAR(20) NOT NULL;
 
 alter table fn_function
-add action VARCHAR(20) NULL DEFAULT NULL;
+add action VARCHAR(20) NOT NULL;
+
+ALTER TABLE fn_function
+ADD CONSTRAINT function UNIQUE (FUNCTION_CD,TYPE,ACTION);
+
+delete from fn_function where function_cd='1';
 
+update fn_function set type = 'menu' , action = '*'  where function_cd = 'menu_process';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_job';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_job_create';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_job_designer';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_task';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_task_search';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_map';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_sample';
+update fn_function set type = 'url' , action = '*' where function_cd = 'login';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_home';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_customer';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_reports';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_profile';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_admin';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_feedback';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_help';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_logout';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_notes';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_ajax';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_customer_create';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_profile_create';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_profile_import';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_tab';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'view_reports';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_itracker_admin';
+update fn_function set type = 'url' , action = '*' where function_cd = 'quantum_bd';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_hiveconfig';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_mapreduce_create';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_mapreduce_search';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_hiveconfig_search';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_hiveconfig_create';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_test';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_doclib';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'doclib';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'doclib_admin';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_concept';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_itracker';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_mapreduce';
+    
 commit;
\ No newline at end of file
index f31aa79..60c0d8f 100644 (file)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.portal.sdk</groupId>
                <artifactId>epsdk-project</artifactId>
-               <version>2.2.0-SNAPSHOT</version>
+               <version>2.3.0-SNAPSHOT</version>
        </parent>
 
        <!-- GroupId is inherited from parent -->
                <groupId>commons-httpclient</groupId>
             <artifactId>commons-httpclient</artifactId>
                </exclusion>
-        <exclusion> 
-               <groupId>xerces</groupId> 
-            <artifactId>xercesImpl</artifactId> 
-               </exclusion> 
-        <exclusion> 
-               <groupId>commons-collections</groupId> 
-            <artifactId>commons-collections</artifactId> 
+               <exclusion>
+               <groupId>xerces</groupId>
+            <artifactId>xercesImpl</artifactId>
+               </exclusion>
+        <exclusion>
+               <groupId>commons-collections</groupId>
+            <artifactId>commons-collections</artifactId>
                </exclusion>
            <exclusion>
                <groupId>org.beanshell</groupId>
                <artifactId>xstream</artifactId>
                <version>1.4.10</version>
                </dependency>
-               <dependency>
-               <groupId>org.apache.wicket</groupId>
-               <artifactId>wicket-core</artifactId>
-               <version>1.5.16</version>
-               </dependency>
                <dependency>
                        <groupId>ch.qos.logback</groupId>
                        <artifactId>logback-core</artifactId>
                <artifactId>commons-beanutils</artifactId>
                <version>1.9.3</version>
                </dependency>
-               
                <dependency>
                        <groupId>org.apache.httpcomponents</groupId>
                        <artifactId>httpclient</artifactId>
                <version>2.7.2</version>
                </dependency>
                <dependency>
-
-               <groupId>xerces</groupId> 
-               <artifactId>xercesImpl</artifactId> 
-               <version>2.11.0.SP5</version> 
-               </dependency> 
-               <dependency> 
-               <groupId>commons-collections</groupId> 
-               <artifactId>commons-collections</artifactId> 
-               <version>3.2.2</version> 
+               <groupId>xerces</groupId>
+               <artifactId>xercesImpl</artifactId>
+               <version>2.11.0.SP5</version>
+               </dependency>
+               <dependency>
+               <groupId>commons-collections</groupId>
+               <artifactId>commons-collections</artifactId>
+               <version>3.2.2</version>
                </dependency>
        </dependencies>
 </project>
index 82c13f1..c8634f4 100644 (file)
@@ -49,7 +49,6 @@ import org.onap.portalsdk.core.controller.RestrictedBaseController;
 import org.onap.portalsdk.core.domain.App;
 import org.onap.portalsdk.core.domain.User;
 import org.onap.portalsdk.core.logging.aspect.AuditLog;
-import org.onap.portalsdk.core.logging.format.AlarmSeverityEnum;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.onap.portalsdk.core.onboarding.rest.FavoritesClient;
 import org.onap.portalsdk.core.onboarding.util.CipherUtil;
index 716f8e0..53a3b4b 100644 (file)
@@ -50,7 +50,6 @@ import org.onap.portalsdk.core.controller.RestrictedBaseController;
 import org.onap.portalsdk.core.domain.App;
 import org.onap.portalsdk.core.domain.User;
 import org.onap.portalsdk.core.logging.aspect.AuditLog;
-import org.onap.portalsdk.core.logging.format.AlarmSeverityEnum;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.onap.portalsdk.core.onboarding.rest.FunctionalMenuClient;
 import org.onap.portalsdk.core.onboarding.ueb.UebException;
index ba490d5..8997e59 100644 (file)
@@ -41,6 +41,7 @@ import javax.servlet.http.HttpServletRequest;
 
 import org.onap.portalsdk.core.controller.UnRestrictedBaseController;
 import org.onap.portalsdk.core.domain.User;
+import org.onap.portalsdk.core.logging.aspect.MetricsLog;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.onap.portalsdk.core.onboarding.util.PortalApiConstants;
 import org.onap.portalsdk.core.onboarding.util.PortalApiProperties;
@@ -51,7 +52,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.context.request.RequestContextHolder;
 import org.springframework.web.context.request.ServletRequestAttributes;
 import org.springframework.web.servlet.ModelAndView;
-import org.onap.portalsdk.core.logging.aspect.MetricsLog;
 
 @Controller
 @RequestMapping("/")
index c4f0d43..9a4f3ed 100644 (file)
@@ -45,7 +45,6 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import org.json.JSONObject;
-import org.onap.portalapp.util.SecurityXssValidator;
 import org.onap.portalsdk.core.controller.RestrictedBaseController;
 import org.onap.portalsdk.core.domain.BroadcastMessage;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
index f19a14b..ad9df11 100644 (file)
@@ -37,7 +37,6 @@
  */
 package org.onap.portalapp.service;
 
-import java.io.IOException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -67,7 +66,6 @@ import org.onap.portalsdk.core.onboarding.util.PortalApiProperties;
 import org.onap.portalsdk.core.restful.domain.EcompRole;
 import org.onap.portalsdk.core.restful.domain.EcompUser;
 import org.onap.portalsdk.core.service.AppService;
-import org.onap.portalsdk.core.service.AppServiceImpl;
 import org.onap.portalsdk.core.service.RestApiRequestBuilder;
 import org.onap.portalsdk.core.service.RoleService;
 import org.onap.portalsdk.core.service.UserProfileService;
index 2ae922a..84b95b0 100644 (file)
  */
 package org.onap.portalapp.controller.core;
 
-import static org.junit.Assert.*;
-
-import java.util.HashMap;
-import java.util.Map;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -50,7 +48,6 @@ import org.junit.Test;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
-import org.onap.portalapp.controller.core.AngularAdminController;
 import org.onap.portalapp.framework.MockitoTestSuite;
 import org.onap.portalsdk.core.domain.User;
 import org.onap.portalsdk.core.web.support.UserUtils;
index d82e1ed..c7f1c04 100644 (file)
@@ -76,7 +76,6 @@ import org.onap.portalsdk.core.web.support.UserUtils;
 import org.powermock.api.mockito.PowerMockito;
 import org.powermock.core.classloader.annotations.PrepareForTest;
 import org.powermock.modules.junit4.PowerMockRunner;
-import org.springframework.mock.web.MockHttpServletRequest;
 
 import com.fasterxml.jackson.databind.ObjectMapper;
 
index c4b6e5a..97458f2 100644 (file)
@@ -37,7 +37,7 @@
  */
 package org.onap.portalapp.controller.core;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
 
 import java.io.IOException;
 import java.io.PrintWriter;
@@ -48,7 +48,6 @@ import java.util.List;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.drools.core.command.assertion.AssertEquals;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.InjectMocks;
index 81bbaee..edfaadf 100644 (file)
@@ -37,7 +37,8 @@
  */
 package org.onap.portalapp.controller.core;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
 
 import java.io.BufferedReader;
 import java.io.IOException;
index 9a57676..5bd9a8f 100644 (file)
@@ -38,7 +38,8 @@
 
 package org.onap.portalapp.controller.core;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
 
 import java.io.BufferedReader;
 import java.io.IOException;
@@ -64,7 +65,6 @@ import org.onap.portalsdk.core.service.RoleService;
 import org.onap.portalsdk.core.web.support.UserUtils;
 import org.springframework.web.bind.ServletRequestUtils;
 import org.springframework.web.servlet.ModelAndView;
-import org.onap.portalapp.controller.core.RoleListController;
 
 import com.fasterxml.jackson.databind.ObjectMapper;
 
index d904d68..9bc3c05 100644 (file)
@@ -10,7 +10,7 @@
        <parent>
                <groupId>org.onap.portal.sdk</groupId>
                <artifactId>epsdk-project</artifactId>
-               <version>2.2.0-SNAPSHOT</version>
+               <version>2.3.0-SNAPSHOT</version>
        </parent>
 
        <!-- GroupId is inherited from parent -->
index b0826f6..729cfd1 100644 (file)
@@ -103,7 +103,7 @@ public class LoginStrategyImpl extends LoginStrategy {
                        if (!SystemProperties.containsProperty(SystemProperties.Decryption_Key))
                                throw new IllegalStateException("Failed to find property " + SystemProperties.Decryption_Key);
                        final String decryptionKey = SystemProperties.getProperty(SystemProperties.Decryption_Key);
-                       userId = CipherUtil.decryptPKC(cookieValue, decryptionKey);
+                       userId = CipherUtil.decrypt(cookieValue, decryptionKey);
                        logger.debug(EELFLoggerDelegate.debugLogger, "getUserIdFromCookie: decrypted as {}", userId);
                }
                return userId;
index 53147a8..96f9022 100644 (file)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.portal.sdk</groupId>
                <artifactId>epsdk-project</artifactId>
-               <version>2.2.0-SNAPSHOT</version>
+               <version>2.3.0-SNAPSHOT</version>
        </parent>
 
        <!-- GroupId is inherited from parent -->
index 4906487..05556d2 100644 (file)
@@ -47,8 +47,9 @@
                <put-attribute name="viewName" value="elastic_search"></put-attribute>
        </definition>
 
-       <definition name="error" template="/WEB-INF/jsp/error.jsp"></definition>
-
+       <definition name="error" template="/WEB-INF/jsp/error.jsp">
+               
+       </definition>
        
        <!-- <definition name="notebook"
                template="app/fusion/notebook-integration/scripts/view-models/notebook.htm" /> -->
index 0d95e72..a8b8975 100644 (file)
@@ -1,4 +1,4 @@
-appDS2.controller('adminController', function($scope, $http,AdminService, $modal, $routeParams, $rootScope){
+appDS2.controller('adminController', function($scope, $http,AdminService,  $modal, $routeParams, $rootScope){
 
        $scope.totalPages = 5;
        $scope.viewPerPage = 8;
@@ -71,8 +71,63 @@ appDS2.controller('adminController', function($scope, $http,AdminService, $modal
                        
                });
        }
-    
     $scope.addRoleFunction = function(roleData){
+               if(/[^a-zA-Z0-9\-\.\_]/.test(roleData.type)){
+                       errorMsg =  'Type can only contain alphanumeric characters, dots(.) and underscores(_)';
+                       var modalInstance = $modal.open({
+                               templateUrl: 'app/fusion/scripts/DS2-modal/error_modal.html',
+                               controller: ModalInstanceCtrl,
+                               sizeClass: 'modal-small', 
+                               resolve: {
+                                       items: function () {
+                                               return errorMsg;
+                                       }
+                       }
+                       });
+                       return;
+               }       
+               if(roleData.action !== '*' && /[^a-zA-Z0-9\-\.\_]/.test(roleData.action)){
+                       errorMsg =  'Action can only contain alphanumeric characters, hyphens(-), dots(.) and underscores(_) and single asterisk character(*)';
+                       var modalInstance = $modal.open({
+                               templateUrl: 'app/fusion/scripts/DS2-modal/error_modal.html',
+                               controller: ModalInstanceCtrl,
+                               sizeClass: 'modal-small', 
+                               resolve: {
+                                       items: function () {
+                                               return errorMsg;
+                                       }
+                       }
+                       });
+                       return;
+               }
+               if(/[^a-zA-Z0-9\-\:\_\./*]/.test(roleData.code)){
+                       errorMsg =  'Code can only contain alphanumeric characters, hyphens(-), dots(.), colons(:), forwardSlash(/) , asterisk(*) and underscores(_)';
+                       var modalInstance = $modal.open({
+                               templateUrl: 'app/fusion/scripts/DS2-modal/error_modal.html',
+                               controller: ModalInstanceCtrl,
+                               sizeClass: 'modal-small', 
+                               resolve: {
+                                       items: function () {
+                                               return errorMsg;
+                                       }
+                       }
+                       });
+                       return;
+               }
+               if(/[^a-zA-Z0-9\-\_ \.]/.test(roleData.name)){
+                       errorMsg =  'Name can only contain alphanumeric characters, spaces, hyphens(-), dots(.) and underscores(_)';
+                       var modalInstance = $modal.open({
+                               templateUrl: 'app/fusion/scripts/DS2-modal/error_modal.html',
+                               controller: ModalInstanceCtrl,
+                               sizeClass: 'modal-small', 
+                               resolve: {
+                                       items: function () {
+                                               return errorMsg;
+                                       }
+                       }
+                       });
+                       return;
+               }
                AdminService.addRoleFunctionList(roleData).then(function(msg){  
                        var message = msg;
                        if(message.data!=null && message.data!=''){
@@ -100,6 +155,22 @@ appDS2.controller('adminController', function($scope, $http,AdminService, $modal
                $scope.roleFun=items;
                $scope.msg=items;
                
+                $scope.ngRepeatDemo = [
+                       {id: 'menuradiobutton1', value: 'menu', labelvalue: 'menu'},
+                       {id: 'urlradiobutton2', value: 'url', labelvalue: 'url'},
+                       {id: 'otherradiobutton3', value: 'other', labelvalue: 'other'}
+                   ]
+                $scope.selectedvalueradioButtonGroup = {
+                               type: 'menu'
+                           }
+                $scope.roleFun = {
+                               action: '*'
+                           }
+                
+                $scope.selectedvalueradioButtonOther = {
+                               type: ''
+                           }
+               
                // remove role function associated to a role on Role Edit page
                $scope.roleFunRemoveRole = function (roleFunction) {
                        AdminService.removeRoleFunction(roleFunction, $routeParams.roleId).then(function(msg){  
@@ -324,7 +395,12 @@ appDS2.controller('adminController', function($scope, $http,AdminService, $modal
                        });
                }
                
-           $scope.save = function (data) {
+           $scope.save = function (data,type) {
+                       if(type !== 'other'){
+                                       data.type = type ; 
+                       } else{
+                               data.type = $scope.selectedvalueradioButtonOther.type ; 
+                       }
                $modalInstance.close(data);
            };
 
@@ -419,8 +495,8 @@ appDS2.controller('adminController', function($scope, $http,AdminService, $modal
                }
                });
                
-               modalInstance.result.then(function (data) {
-              $scope.addRoleFunction(data);
+               modalInstance.result.then(function (data,type) {
+              $scope.addRoleFunction(data,type);
         });
        }
        
index 5752a27..ad3d538 100644 (file)
@@ -1,4 +1,4 @@
-<div>
+<div class = "ng-scope" style= "height: 710px"" >
        <div class="b2b-modal-header ng-scope in">
                <h2 id="myModalLabel" modal-title="">Role Function Create</h2>
                <div class="corner-button in">
@@ -6,13 +6,14 @@
                                ng-click="$dismiss('cancel')"></button>
                </div>
        </div>
-       
+
        <div class="b2b-modal-body ng-scope ng-isolate-scope in" tabindex="0"
                role="region" aria-label="Modal header text content"
                style="height: 280px;">
 
                <div class="field-group">
-                       <span ID="required" style="color: Red;" visible="false"> *</span>Name <input id="textinputID-2a" ddh-reset ng-model="roleFun['name']"
+                       <span ID="required" style="color: Red;" visible="false"> *</span>Name
+                       <input id="textinputID-2a" ddh-reset ng-model="roleFun['name']"
                                placeholder="Name" class="span12" type="text">
                </div>
                <div class="error-container"
                </div>
                <br>
                <div class="field-group">
-                       <span ID="required" style="color: Red;" visible="false"> *</span>Code <input id="textinputID-2a" ddh-reset ng-model="roleFun['code']"
+                       <span ID="required" style="color: Red;" visible="false"> *</span>Code
+                       <input id="textinputID-2a" ddh-reset ng-model="roleFun['code']"
                                placeholder="Code" class="span12" type="text">
 
                </div>
                <div class="error-container"
                        ng-show="!roleFun['code']||roleFun['code']==0">
-                       <small id="code-required" class="err-message">Code is Required</small>
+                       <small id="code-required" class="err-message">Code is
+                               Required</small>
                </div>
-                       <br>
+               <br>
                <div class="field-group">
-                       Type <input id="textinputID-2b" ddh-reset ng-model="roleFun['type']"
-                               placeholder="Type" class="span12" type="text">
+                       <span ID="required" style="color: Red;" visible="false"> *</span>
+                       Type
+                       <div ng-repeat="radioObj in ngRepeatDemo" class="form-row"
+                               role="radio">
+
+                               <label for="{{radioObj.id}}" class="radio"> <input
+                                       type="radio" ng-model="selectedvalueradioButtonGroup.type"
+                                       ng-disabled="disableCd" name="nameradioButton"
+                                       value="{{radioObj.value}}" id="{{radioObj.id}}"
+                                       name="nameradioButton" ddh-reset> <i class="skin"></i> <span>{{radioObj.labelvalue}}</span>
+                               </label> <br>
+                       </div>
+                       <br> <input
+                               ng-show="selectedvalueradioButtonGroup.type === 'other'"
+                               id="type-property-input" class="adminForm-name-property-input"
+                               ng-model= "selectedvalueradioButtonOther.type" ng-disabled="disableCd" type="text"
+                               maxlength="30" />
+               </div>
+               <div class="error-container"
+                       ng-show="selectedvalueradioButtonGroup.type === 'other'">
+                       <small id="microservices-details-input-url-required"
+                               class="err-message">Type is Required</small>
                </div>
                <br>
                <div class="field-group">
-                       Action <input id="textinputID-2c" ddh-reset ng-model="roleFun['action']"
+                       <span ID="required" style="color: Red;" visible="false"> *</span>Action
+                       <input id="textinputID-2c" ddh-reset ng-model="roleFun['action']"
                                placeholder="Action" class="span12" type="text">
                </div>
-               
+               <div class="error-container"
+                       ng-show="!roleFun['action']||roleFun['action']==0">
+                       <small id="action-required" class="err-message">Action is Required</small>
+               </div>
        </div>
        <br>
-       <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
+
+       <div class="b2b-modal-footer ng-scope ng-isolate-scope in" style = "top: 200px">
                <div class="cta-button-group in">
-                       <button class="btn btn-alt btn-medium" type="button" ng-disabled= "(!roleFun['name']||roleFun['name']==0)|| (!roleFun['code']||roleFun['code']==0)"
-                               ng-click="save(roleFun);">Create</button>
+                       <button class="btn btn-alt btn-medium" type="button" ng-disabled= "(!roleFun['name']||roleFun['name']==0)|| (!roleFun['code']||roleFun['code']==0) || (!selectedvalueradioButtonGroup.type||selectedvalueradioButtonGroup.type.length==0)||(selectedvalueradioButtonGroup.type ==='other'&&(!selectedvalueradioButtonOther.type||selectedvalueradioButtonOther.type.length==0)) || (!roleFun['action']||roleFun['action']==0)"
+                               ng-click="save(roleFun,selectedvalueradioButtonGroup.type)">Create</button>
                        <button class="btn btn-medium" type="button"
                                ng-click="$dismiss('cancel')">Cancel</button>
                </div>
index 1bdb149..5d371e5 100644 (file)
@@ -1,11 +1,12 @@
 <?xml version="1.0"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
-       
+
        <parent>
                <groupId>org.onap.portal.sdk</groupId>
                <artifactId>epsdk-project</artifactId>
-               <version>2.2.0-SNAPSHOT</version>
+               <version>2.3.0-SNAPSHOT</version>
        </parent>
 
        <!-- GroupId is inherited from parent -->
@@ -20,7 +21,7 @@
        <properties>
                <drools.version>6.4.0.Final</drools.version>
        </properties>
-       
+
        <!-- repositories are inherited from parent -->
 
        <build>
                                        </systemPropertyVariables>
                                </configuration>
                        </plugin>
-                       
+
                </plugins>
        </build>
 
        <dependencies>
 
-               <!--  internal -->
+               <!-- internal -->
                <dependency>
                        <groupId>org.onap.portal.sdk</groupId>
                        <artifactId>epsdk-fw</artifactId>
                        </exclusions>
                </dependency>
 
+               <!-- internal -->
+               <dependency>
+                       <groupId>org.onap.portal.sdk</groupId>
+                       <artifactId>epsdk-domain</artifactId>
+                       <version>${project.version}</version>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>commons-logging</groupId>
+                                       <artifactId>commons-logging</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
                <!-- Drools -->
                <dependency>
                        <groupId>org.drools</groupId>
                        <version>${springframework.version}</version>
                </dependency>
                <dependency>
-               <groupId>org.springframework</groupId>
-                   <artifactId>spring-aop</artifactId>
-               <version>${springframework.version}</version>
+                       <groupId>org.springframework</groupId>
+                       <artifactId>spring-aop</artifactId>
+                       <version>${springframework.version}</version>
                </dependency>
                <dependency>
                        <groupId>org.springframework.boot</groupId>
                                </exclusion>
                        </exclusions>
                </dependency>
-               
+
                <dependency>
-                   <groupId>org.aspectj</groupId>
-               <artifactId>aspectjrt</artifactId>
-               <version>1.8.9</version>
+                       <groupId>org.aspectj</groupId>
+                       <artifactId>aspectjrt</artifactId>
+                       <version>1.8.9</version>
                </dependency>
-               
+
                <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjweaver</artifactId>
                        <version>1.8.9</version>
                </dependency>
-               
+
 
                <!-- Hibernate -->
                <dependency>
                        <version>2.3.1</version>
                </dependency>
                <dependency>
-               <groupId>org.apache.taglibs</groupId>
-               <artifactId>taglibs-standard-spec</artifactId>
-               <version>1.2.5</version>
+                       <groupId>org.apache.taglibs</groupId>
+                       <artifactId>taglibs-standard-spec</artifactId>
+                       <version>1.2.5</version>
                </dependency>
                <dependency>
-               <groupId>org.apache.taglibs</groupId>
-               <artifactId>taglibs-standard-impl</artifactId>
-               <version>1.2.5</version>
+                       <groupId>org.apache.taglibs</groupId>
+                       <artifactId>taglibs-standard-impl</artifactId>
+                       <version>1.2.5</version>
                </dependency>
                <dependency>
-               <groupId>org.apache.taglibs</groupId>
-               <artifactId>taglibs-standard-spec</artifactId>
-               <version>1.2.5</version>
+                       <groupId>org.apache.taglibs</groupId>
+                       <artifactId>taglibs-standard-spec</artifactId>
+                       <version>1.2.5</version>
                </dependency>
                <dependency>
-               <groupId>org.apache.taglibs</groupId>
-               <artifactId>taglibs-standard-impl</artifactId>
-               <version>1.2.5</version>
+                       <groupId>org.apache.taglibs</groupId>
+                       <artifactId>taglibs-standard-impl</artifactId>
+                       <version>1.2.5</version>
                </dependency>
                <dependency>
-               <groupId>org.apache.taglibs</groupId>
-                       <artifactId>taglibs-standard-jstlel</artifactId>
-               <version>1.2.5</version>
+                       <groupId>org.apache.taglibs</groupId>
+                       <artifactId>taglibs-standard-jstlel</artifactId>
+                       <version>1.2.5</version>
                </dependency>
                <!-- bridge to implement commons-logging using slf4j -->
                <dependency>
                                </exclusion>
                        </exclusions>
                </dependency>
-               
+
                <dependency>
-                       <groupId>com.att.eelf</groupId> 
-                       <artifactId>eelf-core</artifactId> 
-                       <version>1.0.0</version> 
+                       <groupId>com.att.eelf</groupId>
+                       <artifactId>eelf-core</artifactId>
+                       <version>1.0.0</version>
                </dependency>
 
        <dependency>
                <groupId>org.owasp.esapi</groupId>
                <artifactId>esapi</artifactId>
                <version>2.1.0.1</version>
-           <exclusions>
-               <exclusion>
-               <groupId>commons-beanutils</groupId>
-               <artifactId>commons-beanutils-core</artifactId>
-               </exclusion>
-        <exclusion>
-               <groupId>commons-httpclient</groupId>
-            <artifactId>commons-httpclient</artifactId>
-               </exclusion>
-           <exclusion>
-               <groupId>xerces</groupId>
-            <artifactId>xercesImpl</artifactId>
+               <exclusions>
+                       <exclusion>
+                               <groupId>commons-beanutils</groupId>
+                               <artifactId>commons-beanutils-core</artifactId>
+                       </exclusion>
+                       <exclusion>
+                               <groupId>commons-httpclient</groupId>
+                               <artifactId>commons-httpclient</artifactId>
+                       </exclusion>
+                       <exclusion>
+                               <groupId>xerces</groupId>
+                               <artifactId>xercesImpl</artifactId>
                        </exclusion>
-           <exclusion>
-               <groupId>org.beanshell</groupId>
-            <artifactId>bsh-core</artifactId>
-               </exclusion>
-        </exclusions>
+                       <exclusion>
+                               <groupId>org.beanshell</groupId>
+                               <artifactId>bsh-core</artifactId>
+                       </exclusion>
+               </exclusions>
        </dependency>
 
+
                <!-- UEB was originally named Cambria -->
                <dependency>
                        <groupId>com.att.nsa</groupId>
                        <classifier>runtime</classifier>
                </dependency>
                <dependency>
-               <groupId>com.thoughtworks.xstream</groupId>
-               <artifactId>xstream</artifactId>
-               <version>1.4.10</version>
+                       <groupId>org.apache.lucene</groupId>
+                       <artifactId>lucene-queryparser</artifactId>
+                       <version>7.2.1</version>
                </dependency>
                <dependency>
-               <groupId>org.apache.wicket</groupId>
-               <artifactId>wicket-core</artifactId>
-               <version>1.5.16</version>
+                       <groupId>com.thoughtworks.xstream</groupId>
+                       <artifactId>xstream</artifactId>
+                       <version>1.4.10</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.wicket</groupId>
+                       <artifactId>wicket-core</artifactId>
+                       <version>1.5.16</version>
                </dependency>
                <dependency>
                        <groupId>ch.qos.logback</groupId>
                        <version>1.3.3</version>
                </dependency>
                <dependency>
-               <groupId>commons-beanutils</groupId>
-               <artifactId>commons-beanutils</artifactId>
-               <version>1.9.3</version>
+                       <groupId>commons-beanutils</groupId>
+                       <artifactId>commons-beanutils</artifactId>
+                       <version>1.9.2</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.poi</groupId>
+                       <artifactId>poi</artifactId>
+                       <version>3.17</version>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>commons-logging</groupId>
+                                       <artifactId>commons-logging</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>log4j</groupId>
+                                       <artifactId>log4j</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.poi</groupId>
+                       <artifactId>poi-ooxml</artifactId>
+                       <version>3.17</version>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>commons-logging</groupId>
+                                       <artifactId>commons-logging</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>log4j</groupId>
+                                       <artifactId>log4j</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.poi</groupId>
+                       <artifactId>poi-scratchpad</artifactId>
+                       <version>3.17</version>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>commons-logging</groupId>
+                                       <artifactId>commons-logging</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>log4j</groupId>
+                                       <artifactId>log4j</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.poi</groupId>
+                       <artifactId>poi-contrib</artifactId>
+                       <version>3.5-FINAL</version>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>commons-logging</groupId>
+                                       <artifactId>commons-logging</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>log4j</groupId>
+                                       <artifactId>log4j</artifactId>
+                               </exclusion>
+                       </exclusions>
                </dependency>
                <dependency>
                        <groupId>org.apache.httpcomponents</groupId>
                        <version>4.5.3</version>
                </dependency>
                <dependency>
-               <groupId>xalan</groupId>
-               <artifactId>xalan</artifactId>
-               <version>2.7.2</version>
+                       <groupId>xalan</groupId>
+                       <artifactId>xalan</artifactId>
+                       <version>2.7.2</version>
                </dependency>
-               <dependency>
-               <groupId>xerces</groupId>
-               <artifactId>xercesImpl</artifactId>
-               <version>2.11.0.SP5</version>
-               </dependency>                   
        </dependencies>
-       
+
 </project>
index dc6806a..12f65ff 100644 (file)
@@ -215,4 +215,13 @@ public class LoginBean extends FusionCommand {
                this.userid = userid;
        }
 
+       @Override
+       public String toString() {
+               return "LoginBean [loginId=" + loginId + ", loginPwd=" + loginPwd + ", hrid=" + hrid + ", userid=" + userid
+                               + ", siteAccess=" + siteAccess + ", loginErrorMessage=" + loginErrorMessage + ", user=" + user
+                               + ", menu=" + menu + ", businessDirectMenu=" + businessDirectMenu + "]";
+       }
+       
+       
+
 }
index b18cfc9..948498c 100644 (file)
@@ -41,6 +41,7 @@ import java.util.List;
 
 import org.onap.portalsdk.core.command.support.SearchBase;
 import org.onap.portalsdk.core.domain.User;
+import org.onap.portalsdk.core.domain.FusionObject.Utilities;
 
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 
index 3ff2e47..7966b72 100644 (file)
@@ -38,7 +38,7 @@
 package org.onap.portalsdk.core.dao.support;
 
 import org.hibernate.SessionFactory;
-import org.onap.portalsdk.core.FusionObject;
+import org.onap.portalsdk.core.domain.FusionObject;
 
 public class FusionDao implements FusionObject {
        private SessionFactory sessionFactory;
index f3b2704..00acba0 100644 (file)
@@ -37,7 +37,7 @@
  */
 package org.onap.portalsdk.core.exception.support;
 
-import org.onap.portalsdk.core.FusionObject;
+import org.onap.portalsdk.core.domain.FusionObject;
 
 public interface FusionException extends FusionObject {
 }
index de65775..5fb925f 100644 (file)
@@ -42,7 +42,6 @@ import java.util.List;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
 
 import org.onap.portalsdk.core.controller.FusionBaseController;
 import org.onap.portalsdk.core.domain.App;
index 0e23a36..ed7c1e0 100644 (file)
@@ -41,9 +41,9 @@ import org.aspectj.lang.ProceedingJoinPoint;
 import org.aspectj.lang.annotation.Around;
 import org.aspectj.lang.annotation.Aspect;
 import org.aspectj.lang.annotation.Pointcut;
-import org.onap.portalsdk.core.util.SystemProperties.SecurityEventTypeEnum;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.onap.portalsdk.core.logging.aspect.MetricsLog;
+import org.onap.portalsdk.core.util.SystemProperties.SecurityEventTypeEnum;
 
 @Aspect
 @org.springframework.context.annotation.Configuration
index 9bd8f44..94adae2 100644 (file)
@@ -44,7 +44,7 @@ import java.util.Set;
 
 import javax.servlet.http.HttpServletRequest;
 
-import org.onap.portalsdk.core.FusionObject;
+import org.onap.portalsdk.core.domain.FusionObject;
 import org.onap.portalsdk.core.domain.MenuData;
 import org.onap.portalsdk.core.service.DataAccessService;
 import org.onap.portalsdk.core.util.SystemProperties;
index af8b24b..9378f9e 100644 (file)
@@ -39,7 +39,7 @@ package org.onap.portalsdk.core.objectcache.support;
 
 import java.io.IOException;
 
-import org.onap.portalsdk.core.FusionObject;
+import org.onap.portalsdk.core.domain.FusionObject;
 
 public interface FusionCacheManager extends FusionObject {
 
index 68cbe11..17e6954 100644 (file)
@@ -40,10 +40,10 @@ package org.onap.portalsdk.core.service;
 import java.util.Map;
 
 import org.onap.portalsdk.core.domain.AuditLog;
+import org.onap.portalsdk.core.logging.aspect.MetricsLog;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-import org.onap.portalsdk.core.logging.aspect.MetricsLog;
 
 @Service("auditService")
 @Transactional
index 8fce7e8..95b1575 100644 (file)
@@ -65,6 +65,7 @@ import org.springframework.transaction.annotation.Transactional;
 /**
  * Provides implementations of methods in {@link DataAccessService}.
  */
+@SuppressWarnings("deprecation")
 @Transactional
 public class DataAccessServiceImpl extends FusionService implements DataAccessService {
 
index 9f07840..741f2e1 100644 (file)
@@ -51,6 +51,7 @@ import javax.naming.directory.SearchControls;
 import org.onap.portalsdk.core.command.support.SearchResult;
 import org.onap.portalsdk.core.domain.User;
 import org.onap.portalsdk.core.domain.support.DomainVo;
+import org.onap.portalsdk.core.logging.aspect.MetricsLog;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.onap.portalsdk.core.service.support.FusionService;
 import org.onap.portalsdk.core.service.support.ServiceLocator;
@@ -58,7 +59,6 @@ import org.onap.portalsdk.core.util.SystemProperties;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-import org.onap.portalsdk.core.logging.aspect.MetricsLog;
 
 @Service("ldapService")
 @Transactional
index 4b31596..b7d0036 100644 (file)
@@ -71,7 +71,7 @@ public class LoginServiceCentralizedImpl extends FusionService implements LoginS
 
        @Autowired
        private UserService userService;
-       
+
        private static String portalApiVersion = "/v1";
 
        @Override
@@ -159,7 +159,6 @@ public class LoginServiceCentralizedImpl extends FusionService implements LoginS
                logger.debug(EELFLoggerDelegate.debugLogger, "createUser: " + user.getOrgUserId());
                User user1 = new User();
                user1.setEmail(user.getEmail());
-               user1.setEmail(user.getEmail());
                user1.setFirstName(user.getFirstName());
                user1.setHrid(user.getHrid());
                user1.setJobTitle(user.getJobTitle());
@@ -212,7 +211,8 @@ public class LoginServiceCentralizedImpl extends FusionService implements LoginS
        }
 
        private User findUser(LoginBean bean) throws IOException {
-               String repsonse = restApiRequestBuilder.getViaREST(portalApiVersion+"/user/" + bean.getUserid(), true, bean.getUserid());
+                       String repsonse = restApiRequestBuilder.getViaREST(portalApiVersion + "/user/" + bean.getUserid(), true,
+                                       bean.getUserid());
                User user = userService.userMapper(repsonse);
                user.setId(getUserIdByOrgUserId(user.getOrgUserId()));
                return user;
index 840c606..6452590 100644 (file)
@@ -48,6 +48,7 @@ import java.util.Set;
 import org.onap.portalsdk.core.command.LoginBean;
 import org.onap.portalsdk.core.domain.Role;
 import org.onap.portalsdk.core.domain.User;
+import org.onap.portalsdk.core.logging.aspect.MetricsLog;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.onap.portalsdk.core.menu.MenuBuilder;
 import org.onap.portalsdk.core.service.support.FusionService;
@@ -56,7 +57,6 @@ import org.onap.portalsdk.core.web.support.AppUtils;
 import org.onap.portalsdk.core.web.support.UserUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
-import org.onap.portalsdk.core.logging.aspect.MetricsLog;
 
 @Transactional
 @MetricsLog
index 1f2a3e8..9a01d02 100644 (file)
@@ -43,11 +43,11 @@ import java.util.List;
 
 import javax.servlet.http.HttpServletRequest;
 
-import org.onap.portalsdk.core.FusionObject.Parameters;
 import org.onap.portalsdk.core.command.PostSearchBean;
 import org.onap.portalsdk.core.domain.Lookup;
 import org.onap.portalsdk.core.domain.Role;
 import org.onap.portalsdk.core.domain.User;
+import org.onap.portalsdk.core.domain.FusionObject.Parameters;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.onap.portalsdk.core.util.SystemProperties;
 import org.springframework.beans.factory.annotation.Autowired;
index f91cf2e..5c646a9 100644 (file)
@@ -42,9 +42,9 @@ import java.util.List;
 import org.onap.portalsdk.core.dao.ProfileDao;
 import org.onap.portalsdk.core.domain.Profile;
 import org.onap.portalsdk.core.domain.User;
+import org.onap.portalsdk.core.logging.aspect.MetricsLog;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
-import org.onap.portalsdk.core.logging.aspect.MetricsLog;
 
 @Transactional
 @MetricsLog
index cfb1c34..38607e2 100644 (file)
@@ -49,10 +49,10 @@ import javax.sql.DataSource;
 
 import org.onap.portalsdk.core.domain.Role;
 import org.onap.portalsdk.core.domain.RoleFunction;
+import org.onap.portalsdk.core.logging.aspect.MetricsLog;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
-import org.onap.portalsdk.core.logging.aspect.MetricsLog;
 
 @Transactional
 @MetricsLog
index 646581a..6f9cba5 100644 (file)
@@ -51,7 +51,6 @@ import org.onap.portalsdk.core.domain.Role;
 import org.onap.portalsdk.core.domain.RoleFunction;
 import org.onap.portalsdk.core.domain.User;
 import org.onap.portalsdk.core.domain.UserApp;
-import org.onap.portalsdk.core.web.support.UserUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
index da04382..32045a8 100644 (file)
@@ -37,7 +37,7 @@
  */
 package org.onap.portalsdk.core.service.support;
 
-import org.onap.portalsdk.core.FusionObject;
+import org.onap.portalsdk.core.domain.FusionObject;
 
 public class FusionService implements FusionObject {
        /** Logger for this class and subclasses */
index b6b03a4..b6b2cf4 100644 (file)
@@ -264,6 +264,10 @@ public class SystemProperties {
        public static final String LEFT_MENU_PARENT = "parentList";
        public static final String LEFT_MENU_CHILDREND = "childItemList";
        public static final String COOKIE_DOMAIN = "cookie_domain";
+       
+       // eCOMP Portal  host name
+       public static final String ECOMP_PORTAL_HOST_NAME = "ecomp_portal_host_name"; 
+       public static final String ECOMP_PORTAL_SERVER_PORT = "ecomp_portal_server_port"; 
 
 
        public enum RESULT_ENUM {
index 135fb4c..c20c6af 100644 (file)
@@ -45,6 +45,7 @@ import javax.servlet.http.HttpSession;
 import javax.sql.DataSource;
 
 import org.hibernate.Session;
+import org.onap.portalsdk.core.domain.Lookup;
 import org.onap.portalsdk.core.exception.SessionExpiredException;
 import org.onap.portalsdk.core.objectcache.AbstractCacheManager;
 import org.onap.portalsdk.core.service.DataAccessService;
@@ -160,13 +161,13 @@ public class AppUtils {
                        return "";
                }
 
-               List<org.onap.portalsdk.core.domain.Lookup> lstResult = getLookupListNoCache(dbTable, dbValueCol, dbLabelCol,
+               List<Lookup> lstResult = getLookupListNoCache(dbTable, dbValueCol, dbLabelCol,
                                dbLabelCol + "='" + label.replaceAll("'", "''") + "'", "");
                if (lstResult == null) {
                        return "";
                }
                if (!lstResult.isEmpty()) {     
-                       return ((org.onap.portalsdk.core.domain.Lookup) lstResult.toArray()[0]).getValue();
+                       return ((Lookup) lstResult.toArray()[0]).getValue();
                } else {
                        return "";
                }
@@ -180,7 +181,7 @@ public class AppUtils {
 
                Iterator i = lookupList.iterator();
                while (i.hasNext()) {
-                       org.onap.portalsdk.core.domain.Lookup lookup = (org.onap.portalsdk.core.domain.Lookup) i.next();
+                       Lookup lookup = (Lookup) i.next();
                        if (lookup.getLabel().equals(label)) {
                                return lookup.getValue();
                        }
index 3de08cb..9423018 100644 (file)
@@ -43,7 +43,6 @@ import java.util.List;
 import org.hibernate.Criteria;
 import org.hibernate.Session;
 import org.hibernate.SessionFactory;
-import org.hibernate.criterion.Restrictions;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
index 30dfa08..6726876 100644 (file)
  */
 package org.onap.portalsdk.core.domain.sessionmgt;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
 
 import org.junit.Test;
-import org.onap.portalsdk.core.domain.support.DomainVo;
 
 public class TimeoutVOTest {
        
index 056a119..0dc259e 100644 (file)
@@ -54,7 +54,6 @@ import org.onap.portalsdk.core.domain.App;
 import org.onap.portalsdk.core.onboarding.util.CipherUtil;
 import org.onap.portalsdk.core.onboarding.util.PortalApiConstants;
 import org.onap.portalsdk.core.onboarding.util.PortalApiProperties;
-import org.onap.portalsdk.core.restful.client.PortalRestClientBase;
 import org.onap.portalsdk.core.service.AppService;
 import org.powermock.api.mockito.PowerMockito;
 import org.powermock.core.classloader.annotations.PrepareForTest;
index db6cde7..06fe521 100644 (file)
@@ -56,7 +56,6 @@ import org.onap.portalsdk.core.onboarding.util.CipherUtil;
 import org.onap.portalsdk.core.onboarding.util.PortalApiConstants;
 import org.onap.portalsdk.core.onboarding.util.PortalApiProperties;
 import org.onap.portalsdk.core.restful.domain.SharedContext;
-import org.onap.portalsdk.core.scheduler.CoreRegister;
 import org.onap.portalsdk.core.service.AppService;
 import org.powermock.api.mockito.PowerMockito;
 import org.powermock.core.classloader.annotations.PrepareForTest;
index 7f179f6..092585c 100644 (file)
@@ -56,7 +56,7 @@ import org.junit.runner.RunWith;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.Mockito;
-import org.onap.portalsdk.core.FusionObject.Parameters;
+import org.onap.portalsdk.core.domain.FusionObject.Parameters;
 import org.onap.portalsdk.core.domain.support.DomainVo;
 import org.onap.portalsdk.core.util.SystemProperties;
 import org.powermock.api.mockito.PowerMockito;
index f3cd7bb..42f7260 100644 (file)
@@ -40,8 +40,6 @@ package org.onap.portalsdk.core.service;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.hibernate.criterion.Criterion;
-import org.hibernate.criterion.Restrictions;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
index 565142d..c73343d 100644 (file)
  */
 package org.onap.portalsdk.core.service;
 
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
-import org.mockito.Mockito;
 import org.onap.portalsdk.core.domain.User;
-import org.onap.portalsdk.core.domain.support.CollaborateList;
 import org.powermock.modules.junit4.PowerMockRunner;
 
 
diff --git a/ecomp-sdk/epsdk-domain/.gitignore b/ecomp-sdk/epsdk-domain/.gitignore
new file mode 100644 (file)
index 0000000..b83d222
--- /dev/null
@@ -0,0 +1 @@
+/target/
diff --git a/ecomp-sdk/epsdk-domain/pom.xml b/ecomp-sdk/epsdk-domain/pom.xml
new file mode 100644 (file)
index 0000000..6c9f821
--- /dev/null
@@ -0,0 +1,82 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+
+       <groupId>org.onap.portal.sdk</groupId>
+       <artifactId>epsdk-domain</artifactId>
+       <version>2.3.0-SNAPSHOT</version>
+       <packaging>jar</packaging>
+       <name>ONAP Portal SDK Domain</name>
+
+       <properties>
+               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+       </properties>
+
+       <dependencies>
+               <dependency>
+                       <groupId>org.onap.portal.sdk</groupId>
+                       <artifactId>epsdk-fw</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+               <!-- Mapper -->
+               <dependency>
+                       <groupId>com.fasterxml.jackson.core</groupId>
+                       <artifactId>jackson-annotations</artifactId>
+                       <version>2.8.10</version>
+               </dependency>
+               <dependency>
+                       <groupId>com.fasterxml.jackson.core</groupId>
+                       <artifactId>jackson-core</artifactId>
+                       <version>2.8.10</version>
+               </dependency>
+               <dependency>
+                       <groupId>com.fasterxml.jackson.core</groupId>
+                       <artifactId>jackson-databind</artifactId>
+                       <version>2.8.10</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.mockito</groupId>
+                       <artifactId>mockito-core</artifactId>
+                       <version>1.10.19</version>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>junit</groupId>
+                       <artifactId>junit</artifactId>
+                       <version>4.12</version>
+                       <scope>test</scope>
+               </dependency>
+       </dependencies>
+       <build>
+               <plugins>
+
+                       <!-- some plugins inherited from parent -->
+
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-jar-plugin</artifactId>
+                               <version>2.6</version>
+                               <configuration>
+                                       <archive>
+                                               <manifestEntries>
+                                                       <archive-version>${project.version}</archive-version>
+                                                       <internal-version>${sdk-internal.version}</internal-version>
+                                               </manifestEntries>
+                                       </archive>
+                               </configuration>
+                       </plugin>
+
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-compiler-plugin</artifactId>
+                               <version>3.7.0</version>
+                               <configuration>
+                                       <source>1.8</source>
+                                       <target>1.8</target>
+                               </configuration>
+                       </plugin>
+
+               </plugins>
+
+       </build>
+</project>
@@ -37,8 +37,6 @@
  */
 package org.onap.portalsdk.core.domain;
 
-import org.onap.portalsdk.core.FusionObject;
-
 public class FusionVo implements FusionObject {
        public FusionVo() {
                // No-argument constructor
@@ -37,8 +37,6 @@
  */
 package org.onap.portalsdk.core.domain;
 
-import org.onap.portalsdk.core.domain.support.DomainVo;
-
 public class Profile extends DomainVo {
 
        private static final long serialVersionUID = 3409056457412656883L;
@@ -40,7 +40,6 @@ package org.onap.portalsdk.core.domain;
 import org.onap.portalsdk.core.domain.support.DomainVo;
 
 import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
 
 /**
  * <p>
@@ -105,4 +104,10 @@ public class RoleFunction extends DomainVo {
                return (c1 == null || c2 == null) ? 1 : c1.compareTo(c2);
        }
 
+       @Override
+       public String toString() {
+               return "RoleFunction [code=" + code + ", name=" + name + ", type=" + type + ", action=" + action + "]";
+       }
+
+       
 }
@@ -591,4 +591,11 @@ public class User extends DomainVo {
                return c1.compareTo(c2);
        }
 
+       @Override
+       public String toString() {
+               return "User [orgUserId=" + orgUserId + ", userApps=" + userApps + ", pseudoRoles=" + pseudoRoles + "]";
+       }
+       
+       
+
 }
@@ -40,12 +40,8 @@ package org.onap.portalsdk.core.domain.support;
 import java.util.List;
 import java.util.Map;
 
-import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
-
 public class Container {
 
-       private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(Container.class);
-
        String id;
 
        String name;
@@ -172,7 +168,6 @@ public class Container {
        }
 
        public Size computeSize() {
-               logger.debug("computeSize: name is {}", getName());
                Size size = new Size();
                double width = 0;
                double height = 0;
@@ -46,12 +46,13 @@ import java.util.Date;
 import java.util.Set;
 
 import org.onap.portalsdk.core.domain.FusionVo;
-import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
 
 /* Super class from which all data objects descend */
+@SuppressWarnings("rawtypes")
 public class DomainVo extends FusionVo implements Serializable, Cloneable, Comparable {
 
-       private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(DomainVo.class);
+//     TODO: Remove after the EELFLoggerImpl
+//     private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(DomainVo.class);
 
        private static final long serialVersionUID = 1L;
        protected Long id;
@@ -157,7 +158,9 @@ public class DomainVo extends FusionVo implements Serializable, Cloneable, Compa
                        }
 
                } catch (Exception e) {
-                       logger.error(EELFLoggerDelegate.errorLogger, "copy failed", e);
+                       
+//     TODO: Remove after the EELFLoggerImpl           logger.error(EELFLoggerDelegate.errorLogger, "copy failed", e);
+                       e.printStackTrace();
                }
 
                return newVo;
  */
 package org.onap.portalsdk.core.domain;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
 
 import org.junit.Test;
+import org.onap.portalsdk.core.domain.App;
 
 public class AppTest {
 
  */
 package org.onap.portalsdk.core.domain;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 
 import org.junit.Test;
+import org.onap.portalsdk.core.domain.Lookup;
 import org.onap.portalsdk.core.domain.support.NameValueId;
 
 public class LookupTest {
@@ -40,6 +40,9 @@ package org.onap.portalsdk.core.domain;
 import static org.junit.Assert.*;
 
 import org.junit.Test;
+import org.onap.portalsdk.core.domain.UrlsAccessible;
+import org.onap.portalsdk.core.domain.UrlsAccessibleKey;
+import org.onap.portalsdk.core.domain.User;
 
 public class UrlsAccessibleTest {
 
@@ -40,6 +40,10 @@ package org.onap.portalsdk.core.domain;
 import static org.junit.Assert.*;
 
 import org.junit.Test;
+import org.onap.portalsdk.core.domain.App;
+import org.onap.portalsdk.core.domain.Role;
+import org.onap.portalsdk.core.domain.User;
+import org.onap.portalsdk.core.domain.UserAppId;
 
 public class UserAppIdTest {
        
@@ -40,6 +40,10 @@ package org.onap.portalsdk.core.domain;
 import static org.junit.Assert.*;
 
 import org.junit.Test;
+import org.onap.portalsdk.core.domain.App;
+import org.onap.portalsdk.core.domain.Role;
+import org.onap.portalsdk.core.domain.User;
+import org.onap.portalsdk.core.domain.UserApp;
 
 public class UserAppTest {
 
@@ -44,6 +44,10 @@ import java.util.SortedSet;
 import java.util.TreeSet;
 
 import org.junit.Test;
+import org.onap.portalsdk.core.domain.App;
+import org.onap.portalsdk.core.domain.Role;
+import org.onap.portalsdk.core.domain.User;
+import org.onap.portalsdk.core.domain.UserApp;
 
 public class UserTest {
 
@@ -35,7 +35,7 @@
  *
  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
  */
-package org.onap.portalsdk.domain.support;
+package org.onap.portalsdk.core.domain.support;
 
 import static org.junit.Assert.assertEquals;
 
@@ -47,23 +47,18 @@ import java.util.Map;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.InjectMocks;
-import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 import org.onap.portalsdk.core.domain.User;
 import org.onap.portalsdk.core.domain.support.Container;
 import org.onap.portalsdk.core.domain.support.Element;
 import org.onap.portalsdk.core.domain.support.Position;
 import org.onap.portalsdk.core.domain.support.Size;
-import org.onap.portalsdk.core.restful.client.SharedContextRestClient;
-import org.onap.portalsdk.core.web.support.UserUtils;
 
 public class ContainerTest {
        
        @InjectMocks
        Container container = new Container();
        
-       @Mock
-       private SharedContextRestClient sharedContextRestClient;
                 
        @Before
        public void setup() {
@@ -76,9 +71,6 @@ public class ContainerTest {
        
        User user = new User();
        
-       @Mock
-       UserUtils userUtils = new UserUtils();
-       
        private static final double DELTA = 1e-15;
        
        public Container mockContainer(){
@@ -35,9 +35,9 @@
  *
  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
  */
-package org.onap.portalsdk.domain.support;
+package org.onap.portalsdk.core.domain.support;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
 
 import org.junit.Test;
 import org.onap.portalsdk.core.domain.support.FusionCommand;
  *
  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
  */
-package org.onap.portalsdk.domain.support;
+package org.onap.portalsdk.core.domain.support;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
 import org.junit.Test;
-import org.onap.portalsdk.core.domain.support.DomainVo;
 import org.onap.portalsdk.core.domain.support.NameValueId;
 
 public class NameValueIdTest {
index 55f6874..8b63b53 100644 (file)
@@ -6,7 +6,7 @@
        <parent>
                <groupId>org.onap.portal.sdk</groupId>
                <artifactId>epsdk-project</artifactId>
-               <version>2.2.0-SNAPSHOT</version>
+               <version>2.3.0-SNAPSHOT</version>
        </parent>
 
        <!-- GroupId is inherited from parent -->
                                        <artifactId>log4j</artifactId>
                                </exclusion>
                                <exclusion>
-                                       <groupId>xerces</groupId>
-                                       <artifactId>xercesImpl</artifactId>
+                               <groupId>xerces</groupId>
+                       <artifactId>xercesImpl</artifactId>
                                </exclusion>
                                <exclusion>
-                                       <groupId>xalan</groupId>
-                                       <artifactId>xalan</artifactId>
+                               <groupId>xalan</groupId>
+                       <artifactId>xalan</artifactId>
                                </exclusion>
                                <exclusion>
-                                       <groupId>commons-beanutils</groupId>
-                                       <artifactId>commons-beanutils-core</artifactId>
+                               <groupId>commons-beanutils</groupId>
+                       <artifactId>commons-beanutils-core</artifactId>
                                </exclusion>
                                <exclusion>
-                                       <groupId>commons-httpclient</groupId>
-                                       <artifactId>commons-httpclient</artifactId>
+                               <groupId>commons-httpclient</groupId>
+                       <artifactId>commons-httpclient</artifactId>
                                </exclusion>
                        <exclusion>
                                <groupId>org.beanshell</groupId>
diff --git a/ecomp-sdk/epsdk-music/dependencies/org/onap/music/core/2.4.4.1/core-2.4.4.1.jar b/ecomp-sdk/epsdk-music/dependencies/org/onap/music/core/2.4.4.1/core-2.4.4.1.jar
new file mode 100644 (file)
index 0000000..c87ed1c
Binary files /dev/null and b/ecomp-sdk/epsdk-music/dependencies/org/onap/music/core/2.4.4.1/core-2.4.4.1.jar differ
index 2d8fd03..9e95356 100644 (file)
@@ -3,10 +3,10 @@
   <groupId>org.onap.music</groupId>
   <artifactId>core</artifactId>
   <versioning>
-    <release>2.4.4.2</release>
+    <release>2.4.4.1</release>
     <versions>
-      <version>2.4.4.2</version>
+      <version>2.4.4.1</version>
     </versions>
-    <lastUpdated>20180302803455</lastUpdated>
+    <lastUpdated>20180302703455</lastUpdated>
   </versioning>
 </metadata>
index 6429518..7036c09 100644 (file)
@@ -2,15 +2,9 @@
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
 
-       <parent>
-               <groupId>org.onap.portal.sdk</groupId>
-               <artifactId>epsdk-project</artifactId>
-               <version>2.2.0-SNAPSHOT</version>
-       </parent>
-
        <groupId>org.onap.portal.sdk</groupId>
        <artifactId>epsdk-music</artifactId>
-       <version>2.2.0-SNAPSHOT</version>
+       <version>2.3.0-SNAPSHOT</version>
        <packaging>jar</packaging>
 
        <name>ONAP Portal SDK Music</name>
                <dependency>
                        <groupId>org.onap.music</groupId>
                        <artifactId>core</artifactId>
-                       <version>2.4.4.2</version>
+                       <version>2.4.4.1</version>
                </dependency>  
+               <!-- <dependency>
+                       <groupId>org.onap.music</groupId>
+                       <artifactId>dependency</artifactId>
+                       <version>2.4.4</version>
+               </dependency>   -->
 
                <!-- Mapper -->
                <dependency>
index 0a81785..b40a8c1 100644 (file)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.portal.sdk</groupId>
                <artifactId>epsdk-project</artifactId>
-               <version>2.2.0-SNAPSHOT</version>
+               <version>2.3.0-SNAPSHOT</version>
        </parent>
        
        <!-- GroupId is inherited from parent -->
index c0e988e..4d0e59a 100644 (file)
  */
 package org.onap.portalsdk.workflow.models;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 
 import org.junit.Test;
-import org.onap.portalsdk.core.domain.support.NameValueId;
 
 public class WorkflowTest {
        
index e3db8a9..da248a8 100644 (file)
@@ -14,7 +14,7 @@
        <!-- Portal SDK Maven parent project -->
        <groupId>org.onap.portal.sdk</groupId>
        <artifactId>epsdk-project</artifactId>
-       <version>2.2.0-SNAPSHOT</version>
+       <version>2.3.0-SNAPSHOT</version>
        <packaging>pom</packaging>
        <name>portal-sdk</name>
        <url>https://wiki.onap.org/display/DW/Portal</url>
@@ -23,6 +23,7 @@
                <module>epsdk-fw</module>
                <module>epsdk-core</module>
                <module>epsdk-analytics</module>
+               <module>epsdk-domain</module>
                <module>epsdk-music</module>
                <module>epsdk-workflow</module>
                <module>epsdk-app-common</module>