2 * ================================================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ================================================================================
20 package org.openecomp.portalsdk.core.onboarding.rest;
23 * Provides a convenience method for fetching the functional menu for a user
24 * from the ECOMP Portal via UEB.
26 public class FunctionalMenuClient {
29 * Fetches the functional menu data from the configured ECOMP Portal
33 * userId for the user to whom the menu will be shown
35 * Application name for logging etc.
37 * 128-bit UUID value to uniquely identify the transaction; if
38 * null, a new one is generated.
40 * REST API user name, used by Portal to authenticate the request
42 * REST API password (in the clear, not encrypted), used by
43 * Portal to authenticate the request
44 * @return JSON with functional menu
48 public static String getFunctionalMenu(String userId, String appName, String requestId, String appUserName,
49 String appPassword) throws Exception {
50 return RestWebServiceClient.getInstance().getPortalContent("/functionalMenuItemsForUser", userId, appName,
51 requestId, appUserName, appPassword);