[PORTAL-16 PORTAL-18] Widget ms; staging
[portal.git] / ecomp-portal-BE-common / src / main / java / org / openecomp / portalapp / portal / service / WidgetParameterService.java
1 /*-
2  * ================================================================================
3  * ECOMP Portal
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
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
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  * ================================================================================
19  */
20 package org.openecomp.portalapp.portal.service;
21
22 import java.util.List;
23
24 import org.openecomp.portalapp.portal.domain.WidgetCatalogParameter;
25
26 public interface WidgetParameterService {
27         
28         /**
29          * Saves the specified user-defined widget parameters to the table ep_widget_parameters
30          * 
31          * @param newParameter
32          */
33         void saveUserParameter(WidgetCatalogParameter newParameter);
34         
35         /**
36          * Gets the specified user-defined widget parameter where paramId is used from all users 
37          * 
38          * @param paramId
39          * @return
40          * List of widget parameters
41          */
42         List<WidgetCatalogParameter> getUserParameterById(Long paramId);
43         
44         
45         /**
46          * Deletes the specified user-defined widget parameters from ep_widget_parameters table 
47          * where paramId is used
48          * 
49          * @param paramId
50          */
51         void deleteUserParameterById(Long paramId);
52
53         
54         /**
55          * Gets the specified user-defined widget parameter where paramId is used from the specified
56          * user with userId 
57          * @param widgetId
58          * @param userId
59          * @param paramId
60          * @return WidgetCatalogParameter
61          */
62         WidgetCatalogParameter getUserParamById(Long widgetId, Long userId, Long paramId);
63         
64 }