This page discusses how to on-board Java-based web application to the ONAP Portal using (epsdk-fw-x.x.x.jar) library that is developed by the ONAP Portal development team (under repo - https://gerrit.onap.org/r/admin/repos/portal/sdk).
...
Configuration Key | Expected Value |
---|---|
ecomp_rest_url | Portal REST URL that is reachable by the application back-end. This is a value like https://portal.api.simpledemo.onap.org:30225/ONAPPORTAL/auxapi |
portal.api.impl.class | Java class name. No default value. Value must be like org.oransc.ric.portal.dashboard.portalapi.PortalRestCentralServiceImpl |
ecomp_redirect_url | Portal URL that is reachable by a user’s browser. This is a value like |
role_access_centralized | Selector for role access. No default value. Value must be remote. |
ueb_app_key | Unique key assigned by ONAP Portal to the onboarded application. No default value. |
...
The application developers must provide a Java class that implements the interface org.onap.portalsdk.core.onboarding.crossapi.IPortalRestCentralService as documented below. The implementation should throw a PortalAPIException if anything fails; e.g., an unknown role or user.
- public void pushUser(EcompUser user) throws PortalAPIException: The on-boarded application must implement this method to create the user provided in the argument. If any exception occurs (lets say user already exists), the onboarded application must throw PortalApiException. The FW library will catch the exception and send an appropriate response to Portal.
- public String getUserId(HttpServletRequest request) throws PortalAPIException: The on-boarded application must return the userId for the logged-in user. As a guideline for specific implementation, see the sample app - Sample code from RIC Dashboard app. Its a sample for on-boarded applications using EPSDK-FW. However, the apps can always choose to have their own implementation of this method if what's provided in the sample is not chosen. For Open-source implementation, for example, the app will have a totally different implementation for this method instead of the sample provided.
- public Map<String, String> getAppCredentials() throws PortalAPIException: Should return Map<String,String>., which includes username, password and appName of application . If any exception occurs, the application must throw PortalApiException. The FW library will catch the exception and send an appropriate response to Portal.
...