import org.openecomp.sdc.be.components.impl.ResourceBusinessLogic;
import org.openecomp.sdc.be.components.impl.ResourceImportManager;
import org.openecomp.sdc.be.components.impl.ServiceBusinessLogic;
-import org.openecomp.sdc.be.components.impl.aaf.AafPermission;
-import org.openecomp.sdc.be.components.impl.aaf.PermissionAllowed;
import org.openecomp.sdc.be.components.impl.exceptions.ComponentException;
import org.openecomp.sdc.be.components.lifecycle.LifecycleBusinessLogic;
import org.openecomp.sdc.be.components.lifecycle.LifecycleChangeInfoBase;
import org.openecomp.sdc.be.resources.data.auditing.model.ResourceCommonInfo;
import org.openecomp.sdc.be.servlets.AbstractValidationsServlet;
import org.openecomp.sdc.be.servlets.RepresentationUtils;
-import org.openecomp.sdc.be.user.UserBusinessLogic;
import org.openecomp.sdc.be.utils.CommonBeUtils;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.datastructure.Wrapper;
private HttpServletRequest request;
@Inject
- public CrudExternalServlet(UserBusinessLogic userBusinessLogic, ComponentInstanceBusinessLogic componentInstanceBL,
+ public CrudExternalServlet(ComponentInstanceBusinessLogic componentInstanceBL,
ComponentsUtils componentsUtils, ServletUtils servletUtils, ResourceImportManager resourceImportManager,
ElementBusinessLogic elementBusinessLogic, AssetMetadataConverter assetMetadataUtils,
LifecycleBusinessLogic lifecycleBusinessLogic, ResourceBusinessLogic resourceBusinessLogic,
ServiceBusinessLogic serviceBusinessLogic) {
- super(userBusinessLogic, componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
+ super(componentInstanceBL, componentsUtils, servletUtils, resourceImportManager);
this.elementBusinessLogic = elementBusinessLogic;
this.assetMetadataUtils = assetMetadataUtils;
this.lifecycleBusinessLogic = lifecycleBusinessLogic;
@ApiResponse(responseCode = "400", description = "Create VFCMT request: VFCMT name exceeds character limit - SVC4073"),
@ApiResponse(responseCode = "400", description = "Invalid Content. Missing PROJECT_CODE number - SVC4129"),
@ApiResponse(responseCode = "409", description = "Error: %1 (Service) with name '%2' already exists. - SVC4050")})
- @PermissionAllowed(AafPermission.PermNames.WRITE_VALUE)
public Response createComponentExternal(
@Parameter(description = "Determines the format of the body of the request", required = true) @HeaderParam(value = Constants.CONTENT_TYPE_HEADER) String contentType,
@Parameter(description = "The user id", required = true) @HeaderParam(value = Constants.USER_ID_HEADER) final String userId,
@ApiResponse(responseCode = "500", description = "The GET request failed either due to internal SDC problem. ECOMP Component should continue the attempts to get the needed information - POL5000"),
@ApiResponse(responseCode = "403", description = "Asset is already checked-out by another user - SVC4085"),
@ApiResponse(responseCode = "403", description = "Asset is being edited by different user. Only one user can checkout and edit an asset on given time. The asset will be available for checkout after the other user will checkin the asset - SVC4080")})
- @PermissionAllowed(AafPermission.PermNames.WRITE_VALUE)
public Response changeResourceStateExternal(
@Parameter(description = "Determines the format of the body of the request", required = true) @HeaderParam(value = Constants.CONTENT_TYPE_HEADER) String contentType,
@Parameter(description = "The user id", required = true) @HeaderParam(value = Constants.USER_ID_HEADER) final String userId,
ResponseFormat responseFormat;
Response response;
Either<? extends AssetMetadata, ResponseFormat> resMetadata = assetMetadataUtils
- .convertToSingleAssetMetadata(resource, request.getRequestURL().toString(), true);
+ .convertToSingleAssetMetadata(resource, request.getRequestURL().toString(), true, null);
if (resMetadata.isRight()) {
log.debug("Asset conversion Failed");
responseFormat = resMetadata.right().value();