summaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest')
-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();