aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-services/src
diff options
context:
space:
mode:
authorayalaben <ayala.benzvi@amdocs.com>2018-04-10 13:43:01 +0300
committerOren Kleks <orenkle@amdocs.com>2018-04-12 07:15:06 +0000
commit8dfa832a4bbe276fdf898330325321a776ac253e (patch)
tree2ed00333197348dfb0b933f2c6935ca1c9db9122 /openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-services/src
parentfe35212bee3b89dcee98a11dd364218c587aa41a (diff)
User Permission items
Change-Id: Ice1d126dd29e9f49ca90ada7b1671c72545c9ee8 Issue-ID: SDC-1202 Signed-off-by: ayalaben <ayala.benzvi@amdocs.com>
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-services/src')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-services/src/main/java/org/openecomp/sdcrests/itempermissions/rest/services/ItemPermissionsImpl.java28
1 files changed, 21 insertions, 7 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-services/src/main/java/org/openecomp/sdcrests/itempermissions/rest/services/ItemPermissionsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-services/src/main/java/org/openecomp/sdcrests/itempermissions/rest/services/ItemPermissionsImpl.java
index 4fe93c20ac..213af650f7 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-services/src/main/java/org/openecomp/sdcrests/itempermissions/rest/services/ItemPermissionsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-services/src/main/java/org/openecomp/sdcrests/itempermissions/rest/services/ItemPermissionsImpl.java
@@ -1,9 +1,23 @@
-//package org.openecomp.sdcrests.itempermissions.rest.mapping.mapping.services;
+/*
+ * Copyright © 2016-2018 European Support Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.openecomp.sdcrests.itempermissions.rest.services;
-import org.openecomp.sdc.itempermissions.ItemPermissionsManager;
-import org.openecomp.sdc.itempermissions.ItemPermissionsManagerFactory;
+import org.openecomp.sdc.itempermissions.PermissionsManager;
+import org.openecomp.sdc.itempermissions.PermissionsManagerFactory;
import org.openecomp.sdcrests.itempermissions.rest.ItemPermissions;
import org.openecomp.sdcrests.itempermissions.rest.mapping.MapItemPermissionsToItemPermissionsDto;
import org.openecomp.sdcrests.itempermissions.types.ItemPermissionsDto;
@@ -24,8 +38,8 @@ import javax.ws.rs.core.Response;
@Scope(value = "prototype")
public class ItemPermissionsImpl implements ItemPermissions {
- private ItemPermissionsManager itemPermissionsManager =
- ItemPermissionsManagerFactory.getInstance().createInterface();
+ private PermissionsManager permissionsManager =
+ PermissionsManagerFactory.getInstance().createInterface();
@Override
public Response list(String itemId, String user) {
@@ -33,7 +47,7 @@ public class ItemPermissionsImpl implements ItemPermissions {
GenericCollectionWrapper<ItemPermissionsDto> results = new GenericCollectionWrapper<>();
MapItemPermissionsToItemPermissionsDto mapper = new MapItemPermissionsToItemPermissionsDto();
- itemPermissionsManager.listItemPermissions(itemId)
+ permissionsManager.listItemPermissions(itemId)
.forEach(itemPermission -> results.add(mapper.applyMapping
(itemPermission, ItemPermissionsDto.class)));
@@ -44,7 +58,7 @@ public class ItemPermissionsImpl implements ItemPermissions {
public Response updatePermissions(ItemPermissionsRequestDto request, String itemId,
String permission, String user) {
- itemPermissionsManager.updateItemPermissions(itemId,permission,request.getAddedUsersIds(),
+ permissionsManager.updateItemPermissions(itemId,permission,request.getAddedUsersIds(),
request.getRemovedUsersIds());
return Response.ok().build();