2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
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 * ============LICENSE_END=========================================================
21 package org.openecomp.sdc.be.servlets;
23 import java.util.List;
25 import javax.inject.Singleton;
26 import javax.servlet.ServletContext;
27 import javax.servlet.http.HttpServletRequest;
28 import javax.ws.rs.Consumes;
29 import javax.ws.rs.DELETE;
30 import javax.ws.rs.GET;
31 import javax.ws.rs.HeaderParam;
32 import javax.ws.rs.POST;
33 import javax.ws.rs.PUT;
34 import javax.ws.rs.Path;
35 import javax.ws.rs.PathParam;
36 import javax.ws.rs.Produces;
37 import javax.ws.rs.QueryParam;
38 import javax.ws.rs.core.Context;
39 import javax.ws.rs.core.MediaType;
40 import javax.ws.rs.core.Response;
42 import org.codehaus.jackson.map.ObjectMapper;
43 import org.openecomp.sdc.be.components.impl.ComponentInstanceBusinessLogic;
44 import org.openecomp.sdc.be.components.impl.InputsBusinessLogic;
45 import org.openecomp.sdc.be.config.BeEcompErrorManager;
46 import org.openecomp.sdc.be.dao.api.ActionStatus;
47 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
48 import org.openecomp.sdc.be.impl.WebAppContextWrapper;
49 import org.openecomp.sdc.be.model.ComponentInstInputsMap;
50 import org.openecomp.sdc.be.model.ComponentInstanceInput;
51 import org.openecomp.sdc.be.model.ComponentInstanceProperty;
52 import org.openecomp.sdc.be.model.InputDefinition;
53 import org.openecomp.sdc.be.model.Resource;
54 import org.openecomp.sdc.be.model.User;
55 import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum;
56 import org.openecomp.sdc.common.api.Constants;
57 import org.openecomp.sdc.common.config.EcompErrorName;
58 import org.openecomp.sdc.common.datastructure.Wrapper;
59 import org.openecomp.sdc.exception.ResponseFormat;
60 import org.slf4j.Logger;
61 import org.slf4j.LoggerFactory;
62 import org.springframework.web.context.WebApplicationContext;
64 import com.jcabi.aspects.Loggable;
65 import com.wordnik.swagger.annotations.Api;
66 import com.wordnik.swagger.annotations.ApiOperation;
67 import com.wordnik.swagger.annotations.ApiParam;
68 import com.wordnik.swagger.annotations.ApiResponse;
69 import com.wordnik.swagger.annotations.ApiResponses;
71 import fj.data.Either;
73 @Loggable(prepend = true, value = Loggable.DEBUG, trim = false)
75 @Api(value = "Input Catalog", description = "Input Servlet")
77 public class InputsServlet extends AbstractValidationsServlet {
79 private static Logger log = LoggerFactory.getLogger(ProductServlet.class.getName());
82 @Path("/services/{componentId}/inputs")
83 @Consumes(MediaType.APPLICATION_JSON)
84 @Produces(MediaType.APPLICATION_JSON)
85 @ApiOperation(value = "Get Inputs only", httpMethod = "GET", notes = "Returns Inputs list", response = Resource.class)
86 @ApiResponses(value = { @ApiResponse(code = 200, message = "Component found"), @ApiResponse(code = 403, message = "Restricted operation"), @ApiResponse(code = 404, message = "Component not found") })
87 public Response getComponentInputs(@PathParam("componentType") final String componentType, @PathParam("componentId") final String componentId, @Context final HttpServletRequest request, @QueryParam("fromId") String fromName,
88 @QueryParam("amount") int amount, @HeaderParam(value = Constants.USER_ID_HEADER) String userId) {
90 ServletContext context = request.getSession().getServletContext();
91 String url = request.getMethod() + " " + request.getRequestURI();
92 log.debug("(get) Start handle request of {}", url);
93 Response response = null;
97 InputsBusinessLogic businessLogic = getInputBL(context);
99 Either<List<InputDefinition>, ResponseFormat> inputsResponse = businessLogic.getInputs(userId, componentId, fromName, amount);
100 if (inputsResponse.isRight()) {
101 log.debug("failed to get inputs {}", componentType);
102 return buildErrorResponse(inputsResponse.right().value());
104 Object inputs = RepresentationUtils.toRepresentation(inputsResponse.left().value());
105 return buildOkResponse(getComponentsUtils().getResponseFormat(ActionStatus.OK), inputs);
107 } catch (Exception e) {
108 BeEcompErrorManager.getInstance().processEcompError(EcompErrorName.BeRestApiGeneralError, "Get Component Instance Inputs" + componentType);
109 BeEcompErrorManager.getInstance().logBeRestApiGeneralError("Get Inputs " + componentType);
110 log.debug("getInputs failed with exception", e);
111 response = buildErrorResponse(getComponentsUtils().getResponseFormat(ActionStatus.GENERAL_ERROR));
119 @Path("/{containerComponentType}/{componentId}/update/inputs")
120 @Consumes(MediaType.APPLICATION_JSON)
121 @Produces(MediaType.APPLICATION_JSON)
122 @ApiOperation(value = "Update resource inputs", httpMethod = "POST", notes = "Returns updated input", response = Response.class)
123 @ApiResponses(value = { @ApiResponse(code = 200, message = "Input updated"), @ApiResponse(code = 403, message = "Restricted operation"), @ApiResponse(code = 400, message = "Invalid content / Missing content") })
124 public Response updateComponentInputs(
125 @ApiParam(value = "valid values: resources / services", allowableValues = ComponentTypeEnum.RESOURCE_PARAM_NAME + "," + ComponentTypeEnum.SERVICE_PARAM_NAME) @PathParam("containerComponentType") final String containerComponentType,
126 @PathParam("componentId") final String componentId,
127 @ApiParam(value = "json describe the input", required = true) String data, @Context final HttpServletRequest request) {
130 String url = request.getMethod() + " " + request.getRequestURI();
131 log.debug("Start handle request of {}", url);
132 String userId = request.getHeader(Constants.USER_ID_HEADER);
135 User modifier = new User();
136 modifier.setUserId(userId);
137 log.debug("modifier id is {}", userId);
139 Either<InputDefinition, ResponseFormat> inputEither = getComponentsUtils().convertJsonToObjectUsingObjectMapper(data, modifier, InputDefinition.class, AuditingActionEnum.UPDATE_RESOURCE_METADATA, ComponentTypeEnum.SERVICE);;
140 if(inputEither.isRight()){
141 log.debug("Failed to convert data to input definition. Status is {}", inputEither.right().value());
142 return buildErrorResponse(getComponentsUtils().getResponseFormat(ActionStatus.INVALID_CONTENT));
144 InputDefinition input = inputEither.left().value();
146 log.debug("Start handle request of updateResourceInstanceProperty. Received property is {}", input);
148 ServletContext context = request.getSession().getServletContext();
149 ComponentTypeEnum componentType = ComponentTypeEnum.findByParamName(containerComponentType);
151 InputsBusinessLogic businessLogic = getInputBL(context);
152 if (businessLogic == null) {
153 log.debug("Unsupported component type {}", containerComponentType);
154 return buildErrorResponse(getComponentsUtils().getResponseFormat(ActionStatus.UNSUPPORTED_ERROR));
157 Either<InputDefinition, ResponseFormat> actionResponse = businessLogic.updateInputValue(componentType, componentId, input, userId, true, false);
159 if (actionResponse.isRight()) {
160 return buildErrorResponse(actionResponse.right().value());
163 InputDefinition resourceInstanceProperty = actionResponse.left().value();
164 ObjectMapper mapper = new ObjectMapper();
165 String result = mapper.writeValueAsString(resourceInstanceProperty);
166 return buildOkResponse(getComponentsUtils().getResponseFormat(ActionStatus.OK), result);
168 } catch (Exception e) {
169 log.error("create and associate RI failed with exception: {}", e.getMessage(), e);
170 return buildErrorResponse(getComponentsUtils().getResponseFormat(ActionStatus.GENERAL_ERROR));
176 @Path("/{componentType}/{componentId}/componentInstances/{instanceId}/{originComponentUid}/inputs")
177 @Consumes(MediaType.APPLICATION_JSON)
178 @Produces(MediaType.APPLICATION_JSON)
179 @ApiOperation(value = "Get Inputs only", httpMethod = "GET", notes = "Returns Inputs list", response = Resource.class)
180 @ApiResponses(value = { @ApiResponse(code = 200, message = "Component found"), @ApiResponse(code = 403, message = "Restricted operation"), @ApiResponse(code = 404, message = "Component not found") })
181 public Response getComponentInstanceInputs(@PathParam("componentType") final String componentType, @PathParam("componentId") final String componentId, @PathParam("instanceId") final String instanceId,
182 @PathParam("originComponentUid") final String originComonentUid, @Context final HttpServletRequest request, @HeaderParam(value = Constants.USER_ID_HEADER) String userId) {
184 ServletContext context = request.getSession().getServletContext();
185 String url = request.getMethod() + " " + request.getRequestURI();
186 log.debug("(get) Start handle request of {}", url);
187 Response response = null;
190 InputsBusinessLogic businessLogic = getInputBL(context);
192 Either<List<ComponentInstanceInput>, ResponseFormat> inputsResponse = businessLogic.getComponentInstanceInputs(userId, componentId, instanceId);
193 if (inputsResponse.isRight()) {
194 log.debug("failed to get component instance inputs {}", componentType);
195 return buildErrorResponse(inputsResponse.right().value());
197 Object inputs = RepresentationUtils.toRepresentation(inputsResponse.left().value());
198 return buildOkResponse(getComponentsUtils().getResponseFormat(ActionStatus.OK), inputs);
200 } catch (Exception e) {
201 BeEcompErrorManager.getInstance().processEcompError(EcompErrorName.BeRestApiGeneralError, "Get Component Instance Inputs" + componentType);
202 BeEcompErrorManager.getInstance().logBeRestApiGeneralError("Get Inputs " + componentType);
203 log.debug("getInputs failed with exception", e);
204 response = buildErrorResponse(getComponentsUtils().getResponseFormat(ActionStatus.GENERAL_ERROR));
211 @Path("/{componentType}/{componentId}/componentInstances/{instanceId}/{inputId}/properties")
212 @Consumes(MediaType.APPLICATION_JSON)
213 @Produces(MediaType.APPLICATION_JSON)
214 @ApiOperation(value = "Get properties", httpMethod = "GET", notes = "Returns properties list", response = Resource.class)
215 @ApiResponses(value = { @ApiResponse(code = 200, message = "Component found"), @ApiResponse(code = 403, message = "Restricted operation"), @ApiResponse(code = 404, message = "Component not found") })
216 public Response getInputPropertiesForComponentInstance(@PathParam("componentType") final String componentType, @PathParam("componentId") final String componentId, @PathParam("instanceId") final String instanceId,
217 @PathParam("inputId") final String inputId, @Context final HttpServletRequest request, @HeaderParam(value = Constants.USER_ID_HEADER) String userId) {
219 ServletContext context = request.getSession().getServletContext();
220 String url = request.getMethod() + " " + request.getRequestURI();
221 log.debug("(GET) Start handle request of {}", url);
222 Response response = null;
225 InputsBusinessLogic businessLogic = getInputBL(context);
227 Either<List<ComponentInstanceProperty>, ResponseFormat> inputPropertiesRes = businessLogic.getComponentInstancePropertiesByInputId(userId, componentId, instanceId, inputId);
228 if (inputPropertiesRes.isRight()) {
229 log.debug("failed to get properties of input: {}, with instance id: {}", inputId, instanceId);
230 return buildErrorResponse(inputPropertiesRes.right().value());
232 Object properties = RepresentationUtils.toRepresentation(inputPropertiesRes.left().value());
233 return buildOkResponse(getComponentsUtils().getResponseFormat(ActionStatus.OK), properties);
235 } catch (Exception e) {
236 BeEcompErrorManager.getInstance().processEcompError(EcompErrorName.BeRestApiGeneralError, "Get properties by input id {}, for component instance {} ", inputId, instanceId);
237 BeEcompErrorManager.getInstance().logBeRestApiGeneralError("Get Properites by input id: " + inputId + " for instance with id: " + instanceId);
238 log.debug("getInputPropertiesForComponentInstance failed with exception", e);
239 response = buildErrorResponse(getComponentsUtils().getResponseFormat(ActionStatus.GENERAL_ERROR));
246 @Path("/{componentType}/{componentId}/inputs/{inputId}/inputs")
247 @Consumes(MediaType.APPLICATION_JSON)
248 @Produces(MediaType.APPLICATION_JSON)
249 @ApiOperation(value = "Get inputs", httpMethod = "GET", notes = "Returns inputs list", response = Resource.class)
250 @ApiResponses(value = { @ApiResponse(code = 200, message = "Component found"), @ApiResponse(code = 403, message = "Restricted operation"), @ApiResponse(code = 404, message = "Component not found") })
251 public Response getInputsForComponentInput(@PathParam("componentType") final String componentType, @PathParam("componentId") final String componentId, @PathParam("inputId") final String inputId, @Context final HttpServletRequest request,
252 @HeaderParam(value = Constants.USER_ID_HEADER) String userId) {
254 ServletContext context = request.getSession().getServletContext();
255 String url = request.getMethod() + " " + request.getRequestURI();
256 log.debug("(get) Start handle request of {}", url);
257 Response response = null;
260 InputsBusinessLogic businessLogic = getInputBL(context);
262 Either<List<ComponentInstanceInput>, ResponseFormat> inputsRes = businessLogic.getInputsForComponentInput(userId, componentId, inputId);
264 if (inputsRes.isRight()) {
265 log.debug("failed to get inputs of input: {}, with instance id: {}", inputId, componentId);
266 return buildErrorResponse(inputsRes.right().value());
268 Object properties = RepresentationUtils.toRepresentation(inputsRes.left().value());
269 return buildOkResponse(getComponentsUtils().getResponseFormat(ActionStatus.OK), properties);
271 } catch (Exception e) {
272 BeEcompErrorManager.getInstance().processEcompError(EcompErrorName.BeRestApiGeneralError, "Get inputs by input id {}, for component {} ", inputId, componentId);
273 BeEcompErrorManager.getInstance().logBeRestApiGeneralError("Get inputs by input id: " + inputId + " for component with id: " + componentId);
274 log.debug("getInputsForComponentInput failed with exception", e);
275 response = buildErrorResponse(getComponentsUtils().getResponseFormat(ActionStatus.GENERAL_ERROR));
282 @Path("/{componentType}/{componentId}/inputs/{inputId}")
283 @Consumes(MediaType.APPLICATION_JSON)
284 @Produces(MediaType.APPLICATION_JSON)
285 @ApiOperation(value = "Get inputs", httpMethod = "GET", notes = "Returns inputs list", response = Resource.class)
286 @ApiResponses(value = { @ApiResponse(code = 200, message = "Component found"), @ApiResponse(code = 403, message = "Restricted operation"), @ApiResponse(code = 404, message = "Component not found") })
287 public Response getInputsAndPropertiesForComponentInput(@PathParam("componentType") final String componentType, @PathParam("componentId") final String componentId, @PathParam("inputId") final String inputId, @Context final HttpServletRequest request,
288 @HeaderParam(value = Constants.USER_ID_HEADER) String userId) {
290 ServletContext context = request.getSession().getServletContext();
291 String url = request.getMethod() + " " + request.getRequestURI();
292 log.debug("(get) Start handle request of {}", url);
293 Response response = null;
296 InputsBusinessLogic businessLogic = getInputBL(context);
298 Either<InputDefinition, ResponseFormat> inputsRes = businessLogic.getInputsAndPropertiesForComponentInput(userId, componentId, inputId, false);
300 if (inputsRes.isRight()) {
301 log.debug("failed to get inputs of input: {}, with instance id: {}", inputId, componentId);
302 return buildErrorResponse(inputsRes.right().value());
304 Object properties = RepresentationUtils.toRepresentation(inputsRes.left().value());
305 return buildOkResponse(getComponentsUtils().getResponseFormat(ActionStatus.OK), properties);
307 } catch (Exception e) {
308 BeEcompErrorManager.getInstance().processEcompError(EcompErrorName.BeRestApiGeneralError, "Get inputs by input id {}, for component {} ", inputId, componentId);
309 BeEcompErrorManager.getInstance().logBeRestApiGeneralError("Get inputs by input id: " + inputId + " for component with id: " + componentId);
310 log.debug("getInputsForComponentInput failed with exception", e);
311 response = buildErrorResponse(getComponentsUtils().getResponseFormat(ActionStatus.GENERAL_ERROR));
317 public Either<ComponentInstInputsMap, ResponseFormat> parseToComponentInstanceMap(String serviceJson, User user) {
318 return getComponentsUtils().convertJsonToObjectUsingObjectMapper(serviceJson, user, ComponentInstInputsMap.class, AuditingActionEnum.CREATE_RESOURCE, ComponentTypeEnum.SERVICE);
322 @Path("/{componentType}/{componentId}/create/inputs")
323 @Consumes(MediaType.APPLICATION_JSON)
324 @Produces(MediaType.APPLICATION_JSON)
325 @ApiOperation(value = "Create inputs on service", httpMethod = "POST", notes = "Return inputs list", response = Resource.class)
326 @ApiResponses(value = { @ApiResponse(code = 200, message = "Component found"), @ApiResponse(code = 403, message = "Restricted operation"), @ApiResponse(code = 404, message = "Component not found") })
327 public Response createMultipleInputs(@PathParam("componentType") final String componentType, @PathParam("componentId") final String componentId, @Context final HttpServletRequest request,
328 @HeaderParam(value = Constants.USER_ID_HEADER) String userId, @ApiParam(value = "ComponentIns Inputs Object to be created", required = true) String componentInstInputsMapObj) {
330 ServletContext context = request.getSession().getServletContext();
331 String url = request.getMethod() + " " + request.getRequestURI();
332 log.debug("(get) Start handle request of {}", url);
333 Response response = null;
336 InputsBusinessLogic businessLogic = getInputBL(context);
339 User modifier = new User();
340 modifier.setUserId(userId);
341 log.debug("modifier id is {}", userId);
343 Either<ComponentInstInputsMap, ResponseFormat> componentInstInputsMapRes = parseToComponentInstanceMap(componentInstInputsMapObj, modifier);
344 if (componentInstInputsMapRes.isRight()) {
345 log.debug("failed to parse componentInstInputsMap");
346 response = buildErrorResponse(componentInstInputsMapRes.right().value());
350 ComponentTypeEnum componentTypeEnum = ComponentTypeEnum.findByParamName(componentType);
351 ComponentInstInputsMap componentInstInputsMap = componentInstInputsMapRes.left().value();
353 Either<List<InputDefinition>, ResponseFormat> inputPropertiesRes = businessLogic.createMultipleInputs(userId, componentId, componentTypeEnum, componentInstInputsMap, true, false);
354 if (inputPropertiesRes.isRight()) {
355 log.debug("failed to create inputs for service: {}", componentId);
356 return buildErrorResponse(inputPropertiesRes.right().value());
358 Object properties = RepresentationUtils.toRepresentation(inputPropertiesRes.left().value());
359 return buildOkResponse(getComponentsUtils().getResponseFormat(ActionStatus.OK), properties);
361 } catch (Exception e) {
362 BeEcompErrorManager.getInstance().processEcompError(EcompErrorName.BeRestApiGeneralError, "Create inputs for service with id: {}", componentId);
363 BeEcompErrorManager.getInstance().logBeRestApiGeneralError("Create inputs for service with id: " + componentId);
364 log.debug("createMultipleInputs failed with exception", e);
365 response = buildErrorResponse(getComponentsUtils().getResponseFormat(ActionStatus.GENERAL_ERROR));
374 @Path("/{componentType}/{componentId}/delete/{inputId}/input")
375 @Consumes(MediaType.APPLICATION_JSON)
376 @Produces(MediaType.APPLICATION_JSON)
377 @ApiOperation(value = "Delete input from service", httpMethod = "DELETE", notes = "Delete service input", response = Resource.class)
378 @ApiResponses(value = { @ApiResponse(code = 200, message = "Input deleted"), @ApiResponse(code = 403, message = "Restricted operation"), @ApiResponse(code = 404, message = "Input not found") })
379 public Response deleteInput (
380 @PathParam("componentType") final String componentType,
381 @PathParam("componentId") final String componentId,
382 @PathParam("inputId") final String inputId,
383 @Context final HttpServletRequest request,
384 @HeaderParam(value = Constants.USER_ID_HEADER) String userId,
385 @ApiParam(value = "Service Input to be deleted", required = true) String componentInstInputsMapObj) {
387 ServletContext context = request.getSession().getServletContext();
388 String url = request.getMethod() + " " + request.getRequestURI();
389 log.debug("(get) Start handle request of {}", url);
390 Response response = null;
393 InputsBusinessLogic businessLogic = getInputBL(context);
394 Either<InputDefinition, ResponseFormat> deleteInput = businessLogic.deleteInput(componentType, componentId, userId, inputId);
395 if (deleteInput.isRight()){
396 ResponseFormat deleteResponseFormat = deleteInput.right().value();
397 response = buildErrorResponse(deleteResponseFormat);
400 return buildOkResponse(getComponentsUtils().getResponseFormat(ActionStatus.OK), deleteInput.left().value());
401 } catch (Exception e){
402 BeEcompErrorManager.getInstance().processEcompError(EcompErrorName.BeRestApiGeneralError, "Delete input for service {} with id: {}", componentId, inputId);
403 BeEcompErrorManager.getInstance().logBeRestApiGeneralError("Delete input for service + " + componentId + " + with id: " + inputId);
404 log.debug("Delete input failed with exception", e);
405 response = buildErrorResponse(getComponentsUtils().getResponseFormat(ActionStatus.GENERAL_ERROR));
414 @Path("/{componentType}/{componentId}/edit/{inputId}/input")
415 @Consumes(MediaType.APPLICATION_JSON)
416 @Produces(MediaType.APPLICATION_JSON)
417 @ApiOperation(value = "Delete input from service", httpMethod = "DELETE", notes = "Delete service input", response = Resource.class)
418 @ApiResponses(value = { @ApiResponse(code = 200, message = "Input deleted"), @ApiResponse(code = 403, message = "Restricted operation"), @ApiResponse(code = 404, message = "Input not found") })
419 public Response editInputValue (
420 @PathParam("componentType") final String componentType,
421 @PathParam("componentId") final String componentId,
422 @PathParam("inputId") final String inputId,
423 @Context final HttpServletRequest request,
424 @HeaderParam(value = Constants.USER_ID_HEADER) String userId) {
426 ServletContext context = request.getSession().getServletContext();
427 String url = request.getMethod() + " " + request.getRequestURI();
428 log.debug("(get) Start handle request of {}", url);
429 Response response = null;
432 InputsBusinessLogic businessLogic = getInputBL(context);
433 Either<InputDefinition, ResponseFormat> deleteInput = businessLogic.deleteInput(componentType, componentId, userId, inputId);
434 if (deleteInput.isRight()){
435 ResponseFormat deleteResponseFormat = deleteInput.right().value();
436 response = buildErrorResponse(deleteResponseFormat);
439 return buildOkResponse(getComponentsUtils().getResponseFormat(ActionStatus.OK), deleteInput.left().value());
440 } catch (Exception e){
441 BeEcompErrorManager.getInstance().processEcompError(EcompErrorName.BeRestApiGeneralError, "Delete input for service {} with id: {}", componentId, inputId);
442 BeEcompErrorManager.getInstance().logBeRestApiGeneralError("Delete input for service + " + componentId + " + with id: " + inputId);
443 log.debug("Delete input failed with exception", e);
444 response = buildErrorResponse(getComponentsUtils().getResponseFormat(ActionStatus.GENERAL_ERROR));
450 protected InputsBusinessLogic getInputBL(ServletContext context) {
452 WebAppContextWrapper webApplicationContextWrapper = (WebAppContextWrapper) context.getAttribute(Constants.WEB_APPLICATION_CONTEXT_WRAPPER_ATTR);
453 WebApplicationContext webApplicationContext = webApplicationContextWrapper.getWebAppContext(context);
454 InputsBusinessLogic inputsBusinessLogic = webApplicationContext.getBean(InputsBusinessLogic.class);
455 return inputsBusinessLogic;