2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Copyright (C) 2018 IBM.
8 * ================================================================================
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 * ============LICENSE_END=========================================================
23 package org.onap.so.adapters.catalogdb.rest;
27 import java.util.ArrayList;
28 import java.util.List;
30 import javax.ws.rs.GET;
31 import javax.ws.rs.Path;
32 import javax.ws.rs.PathParam;
33 import javax.ws.rs.Produces;
34 import javax.ws.rs.QueryParam;
35 import javax.ws.rs.core.GenericEntity;
36 import javax.ws.rs.core.HttpHeaders;
37 import javax.ws.rs.core.MediaType;
38 import javax.ws.rs.core.Response;
40 import org.apache.http.HttpStatus;
41 import org.onap.so.adapters.catalogdb.catalogrest.CatalogQuery;
42 import org.onap.so.adapters.catalogdb.catalogrest.CatalogQueryException;
43 import org.onap.so.adapters.catalogdb.catalogrest.CatalogQueryExceptionCategory;
44 import org.onap.so.adapters.catalogdb.catalogrest.QueryAllottedResourceCustomization;
45 import org.onap.so.adapters.catalogdb.catalogrest.QueryResourceRecipe;
46 import org.onap.so.adapters.catalogdb.catalogrest.QueryServiceCsar;
47 import org.onap.so.adapters.catalogdb.catalogrest.QueryServiceMacroHolder;
48 import org.onap.so.adapters.catalogdb.catalogrest.QueryServiceNetworks;
49 import org.onap.so.adapters.catalogdb.catalogrest.QueryServiceVnfs;
50 import org.onap.so.adapters.catalogdb.catalogrest.QueryVfModule;
51 import org.onap.so.db.catalog.beans.AllottedResource;
52 import org.onap.so.db.catalog.beans.AllottedResourceCustomization;
53 import org.onap.so.db.catalog.beans.NetworkResource;
54 import org.onap.so.db.catalog.beans.NetworkResourceCustomization;
55 import org.onap.so.db.catalog.beans.Recipe;
56 import org.onap.so.db.catalog.beans.Service;
57 import org.onap.so.db.catalog.beans.ToscaCsar;
58 import org.onap.so.db.catalog.beans.VfModule;
59 import org.onap.so.db.catalog.beans.VfModuleCustomization;
60 import org.onap.so.db.catalog.beans.VnfResource;
61 import org.onap.so.db.catalog.beans.VnfResourceCustomization;
62 import org.onap.so.db.catalog.data.repository.AllottedResourceCustomizationRepository;
63 import org.onap.so.db.catalog.data.repository.AllottedResourceRepository;
64 import org.onap.so.db.catalog.data.repository.ArRecipeRepository;
65 import org.onap.so.db.catalog.data.repository.NetworkRecipeRepository;
66 import org.onap.so.db.catalog.data.repository.NetworkResourceCustomizationRepository;
67 import org.onap.so.db.catalog.data.repository.NetworkResourceRepository;
68 import org.onap.so.db.catalog.data.repository.ServiceRepository;
69 import org.onap.so.db.catalog.data.repository.ToscaCsarRepository;
70 import org.onap.so.db.catalog.data.repository.VFModuleRepository;
71 import org.onap.so.db.catalog.data.repository.VnfCustomizationRepository;
72 import org.onap.so.db.catalog.data.repository.VnfRecipeRepository;
73 import org.onap.so.db.catalog.data.repository.VnfResourceRepository;
74 import org.onap.so.db.catalog.rest.beans.ServiceMacroHolder;
75 import org.slf4j.Logger;
76 import org.slf4j.LoggerFactory;
77 import org.springframework.beans.factory.annotation.Autowired;
78 import org.springframework.stereotype.Component;
79 import org.springframework.transaction.annotation.Transactional;
82 @Path("/{version: v[0-9]+}")
84 public class CatalogDbAdapterRest {
85 protected static Logger logger = LoggerFactory.getLogger(CatalogDbAdapterRest.class);
86 private static final boolean IS_ARRAY = true;
87 private static final String NETWORK_SERVICE = "network service";
90 private VnfCustomizationRepository vnfCustomizationRepo;
93 private ServiceRepository serviceRepo;
96 private NetworkResourceCustomizationRepository networkCustomizationRepo;
99 private NetworkResourceRepository networkResourceRepo;
102 private AllottedResourceCustomizationRepository allottedCustomizationRepo;
105 private ToscaCsarRepository toscaCsarRepo;
108 private VFModuleRepository vfModuleRepo;
111 private VnfRecipeRepository vnfRecipeRepo;
114 private NetworkRecipeRepository networkRecipeRepo;
117 private ArRecipeRepository arRecipeRepo;
120 private VnfResourceRepository vnfResourceRepo;
123 private AllottedResourceRepository arResourceRepo;
125 private static final String NO_MATCHING_PARAMETERS = "no matching parameters";
127 public Response respond(String version, int respStatus, boolean isArray, CatalogQuery qryResp) {
130 .entity(qryResp.toJsonString(version, isArray))
131 .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
136 @Path("vnfResources/{vnfModelCustomizationUuid}")
137 @Transactional( readOnly = true)
138 @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
139 public Response serviceVnfs (
140 @PathParam("version") String version,
141 @PathParam("vnfModelCustomizationUuid") String vnfUuid
143 return serviceVnfsImpl (version, !IS_ARRAY, vnfUuid, null, null, null, null);
148 @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
149 @Transactional( readOnly = true)
150 public Response serviceVnfs(
151 @PathParam("version") String version,
152 @QueryParam("vnfModelCustomizationUuid") String vnfUuid,
153 @QueryParam("serviceModelUuid") String smUuid,
154 @QueryParam("serviceModelInvariantUuid") String smiUuid,
155 @QueryParam("serviceModelVersion") String smVer,
156 @QueryParam("serviceModelName") String smName
158 return serviceVnfsImpl (version, IS_ARRAY, vnfUuid, smUuid, smiUuid, smVer, smName);
161 public Response serviceVnfsImpl(String version, boolean isArray, String vnfUuid, String serviceModelUUID, String smiUuid, String smVer, String smName) {
162 QueryServiceVnfs qryResp = null;
163 int respStatus = HttpStatus.SC_OK;
164 List<VnfResourceCustomization> ret = new ArrayList<>();
165 Service service = null;
167 if (vnfUuid != null && !"".equals(vnfUuid))
168 ret = vnfCustomizationRepo.findByModelCustomizationUUID(vnfUuid);
169 else if (serviceModelUUID != null && !"".equals(serviceModelUUID))
170 service = serviceRepo.findFirstOneByModelUUIDOrderByModelVersionDesc(serviceModelUUID);
171 else if (smiUuid != null && !"".equals(smiUuid))
172 if (smVer != null && !"".equals(smVer))
173 service = serviceRepo.findFirstByModelVersionAndModelInvariantUUID(smVer,smiUuid);
175 service = serviceRepo.findFirstByModelInvariantUUIDOrderByModelVersionDesc(smiUuid);
176 else if (smName != null && !"".equals(smName)) {
177 if (smVer != null && !"".equals(smVer))
178 service = serviceRepo.findByModelNameAndModelVersion(smName, smVer);
180 service = serviceRepo.findFirstByModelNameOrderByModelVersionDesc(smName);
183 throw(new Exception(NO_MATCHING_PARAMETERS));
186 if (service == null && ret.isEmpty()) {
187 respStatus = HttpStatus.SC_NOT_FOUND;
188 qryResp = new QueryServiceVnfs();
189 }else if( service == null && !ret.isEmpty()){
190 qryResp = new QueryServiceVnfs(ret);
191 } else if (service != null) {
192 qryResp = new QueryServiceVnfs(service.getVnfCustomizations());
194 logger.debug ("serviceVnfs qryResp= {}", qryResp);
195 return respond(version, respStatus, isArray, qryResp);
196 } catch (Exception e) {
197 logger.error("Exception - queryServiceVnfs", e);
198 CatalogQueryException excResp = new CatalogQueryException(e.getMessage(), CatalogQueryExceptionCategory.INTERNAL, Boolean.FALSE, null);
200 .status(HttpStatus.SC_INTERNAL_SERVER_ERROR)
201 .entity(new GenericEntity<CatalogQueryException>(excResp) {})
207 @Path("networkResources/{networkModelCustomizationUuid}")
208 @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
209 @Transactional( readOnly = true)
210 public Response serviceNetworks (
211 @PathParam("version") String version,
212 @PathParam("networkModelCustomizationUuid") String nUuid
214 return serviceNetworksImpl (version, !IS_ARRAY, nUuid, null, null, null, null);
218 @Path("serviceNetworks")
219 @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
220 @Transactional( readOnly = true)
221 public Response serviceNetworks (
222 @PathParam("version") String version,
223 @QueryParam("networkModelCustomizationUuid") String networkModelCustomizationUuid,
224 @QueryParam("networkType") String networkType,
225 @QueryParam("networkModelName") String networkModelName,
226 @QueryParam("serviceModelUuid") String serviceModelUuid,
227 @QueryParam("serviceModelInvariantUuid") String serviceModelInvariantUuid,
228 @QueryParam("serviceModelVersion") String serviceModelVersion,
229 @QueryParam("networkModelVersion") String networkModelVersion
231 if (networkModelName != null && !"".equals(networkModelName)) {
232 networkType = networkModelName;
234 return serviceNetworksImpl (version, IS_ARRAY, networkModelCustomizationUuid, networkType, serviceModelUuid, serviceModelInvariantUuid, serviceModelVersion);
237 public Response serviceNetworksImpl (String version, boolean isArray, String networkModelCustomizationUuid, String networkType, String serviceModelUuid, String serviceModelInvariantUuid, String serviceModelVersion) {
238 QueryServiceNetworks qryResp;
239 int respStatus = HttpStatus.SC_OK;
241 List<NetworkResourceCustomization> ret = new ArrayList<>();
242 Service service = null;
245 if (networkModelCustomizationUuid != null && !"".equals(networkModelCustomizationUuid)) {
246 uuid = networkModelCustomizationUuid;
247 ret = networkCustomizationRepo.findByModelCustomizationUUID(networkModelCustomizationUuid);
248 }else if (networkType != null && !"".equals(networkType)) {
250 NetworkResource networkResources = networkResourceRepo.findFirstByModelNameOrderByModelVersionDesc(networkType);
251 if(networkResources != null)
252 ret=networkResources.getNetworkResourceCustomization();
254 else if (serviceModelInvariantUuid != null && !"".equals(serviceModelInvariantUuid)) {
255 uuid = serviceModelInvariantUuid;
256 if (serviceModelVersion != null && !"".equals(serviceModelVersion)) {
257 service = serviceRepo.findFirstByModelVersionAndModelInvariantUUID(serviceModelVersion, uuid);
260 service = serviceRepo.findFirstByModelInvariantUUIDOrderByModelVersionDesc(uuid);
262 }else if (serviceModelUuid != null && !"".equals(serviceModelUuid)) {
263 uuid = serviceModelUuid;
264 service = serviceRepo.findOneByModelUUID(serviceModelUuid);
267 throw(new Exception(NO_MATCHING_PARAMETERS));
271 ret = service.getNetworkCustomizations();
273 if (ret == null || ret.isEmpty()) {
274 logger.debug ("serviceNetworks not found");
275 respStatus = HttpStatus.SC_NOT_FOUND;
276 qryResp = new QueryServiceNetworks();
278 qryResp = new QueryServiceNetworks(ret);
279 logger.debug ("serviceNetworks found qryResp= {}", qryResp);
281 return respond(version, respStatus, isArray, qryResp);
282 } catch (Exception e) {
283 logger.error ("Exception - queryServiceNetworks", e);
284 CatalogQueryException excResp = new CatalogQueryException(e.getMessage(), CatalogQueryExceptionCategory.INTERNAL, Boolean.FALSE, null);
286 .status(HttpStatus.SC_INTERNAL_SERVER_ERROR)
287 .entity(new GenericEntity<CatalogQueryException>(excResp) {})
293 @Path("serviceResources")
294 @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
295 @Transactional(readOnly = true)
296 public Response serviceResources(
297 @PathParam("version") String version,
298 @QueryParam("serviceModelUuid") String modelUUID,
299 @QueryParam("serviceModelInvariantUuid") String modelInvariantUUID,
300 @QueryParam("serviceModelVersion") String modelVersion) {
301 QueryServiceMacroHolder qryResp;
302 int respStatus = HttpStatus.SC_OK;
304 ServiceMacroHolder ret = new ServiceMacroHolder();
307 if (modelUUID != null && !"".equals(modelUUID)) {
309 logger.debug ("Query serviceMacroHolder getAllResourcesByServiceModelUuid serviceModelUuid: {}" , uuid);
310 Service serv =serviceRepo.findOneByModelUUID(uuid);
313 ret.setNetworkResourceCustomizations(new ArrayList(serv.getNetworkCustomizations()));
314 ret.setVnfResourceCustomizations(new ArrayList(serv.getVnfCustomizations()));
315 ret.setAllottedResourceCustomizations(new ArrayList(serv.getAllottedCustomizations()));
317 ret.setService(serv);
319 else if (modelInvariantUUID != null && !"".equals(modelInvariantUUID)) {
320 uuid = modelInvariantUUID;
321 if (modelVersion != null && !"".equals(modelVersion)) {
322 logger.debug ("Query serviceMacroHolder getAllResourcesByServiceModelInvariantUuid serviceModelInvariantUuid: {} serviceModelVersion: {}",uuid, modelVersion);
323 Service serv = serviceRepo.findFirstByModelVersionAndModelInvariantUUID(modelVersion, uuid);
325 ret.setService(serv);
328 logger.debug ("Query serviceMacroHolder getAllResourcesByServiceModelInvariantUuid serviceModelUuid: {}" , uuid);
329 Service serv = serviceRepo.findFirstByModelInvariantUUIDOrderByModelVersionDesc(uuid);
330 ret.setService(serv);
334 throw(new Exception(NO_MATCHING_PARAMETERS));
337 if (ret.getService() == null) {
338 logger.debug ("serviceMacroHolder not found");
339 respStatus = HttpStatus.SC_NOT_FOUND;
340 qryResp = new QueryServiceMacroHolder();
342 qryResp = new QueryServiceMacroHolder(ret);
343 logger.debug ("serviceMacroHolder qryResp= {}", qryResp);
345 return respond(version, respStatus, IS_ARRAY, qryResp);
346 } catch (Exception e) {
347 logger.error ("Exception - queryServiceMacroHolder", e);
348 CatalogQueryException excResp = new CatalogQueryException(e.getMessage(), CatalogQueryExceptionCategory.INTERNAL, Boolean.FALSE, null);
350 .status(HttpStatus.SC_INTERNAL_SERVER_ERROR)
351 .entity(new GenericEntity<CatalogQueryException>(excResp){} )
358 @Path("allottedResources/{arModelCustomizationUuid}")
359 @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
360 @Transactional( readOnly = true)
361 public Response serviceAllottedResources (
362 @PathParam("version") String version,
363 @PathParam("arModelCustomizationUuid") String aUuid
365 return serviceAllottedResourcesImpl(version, !IS_ARRAY, aUuid, null, null, null);
369 @Path("serviceAllottedResources")
370 @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
371 @Transactional( readOnly = true)
372 public Response serviceAllottedResources(
373 @PathParam("version") String version,
374 @QueryParam("serviceModelUuid") String smUuid,
375 @QueryParam("serviceModelInvariantUuid") String smiUuid,
376 @QueryParam("serviceModelVersion") String smVer,
377 @QueryParam("arModelCustomizationUuid") String aUuid
379 return serviceAllottedResourcesImpl(version, IS_ARRAY, aUuid, smUuid, smiUuid, smVer);
382 public Response serviceAllottedResourcesImpl(String version, boolean isArray, String aUuid, String smUuid, String serviceModelInvariantUuid, String smVer) {
383 QueryAllottedResourceCustomization qryResp;
384 int respStatus = HttpStatus.SC_OK;
386 List<AllottedResourceCustomization> ret = new ArrayList<>();
387 Service service = null;
389 if (smUuid != null && !"".equals(smUuid)) {
391 service = serviceRepo.findFirstOneByModelUUIDOrderByModelVersionDesc(uuid);
393 else if (serviceModelInvariantUuid != null && !"".equals(serviceModelInvariantUuid)) {
394 uuid = serviceModelInvariantUuid;
395 if (smVer != null && !"".equals(smVer)) {
396 service = serviceRepo.findFirstByModelVersionAndModelInvariantUUID(smVer, uuid);
399 service = serviceRepo.findFirstByModelInvariantUUIDOrderByModelVersionDesc(uuid);
402 else if (aUuid != null && !"".equals(aUuid)) {
404 ret = allottedCustomizationRepo.findByModelCustomizationUUID(uuid);
407 throw(new Exception(NO_MATCHING_PARAMETERS));
411 ret=service.getAllottedCustomizations();
413 if (ret == null || ret.isEmpty()) {
414 logger.debug ("AllottedResourceCustomization not found");
415 respStatus = HttpStatus.SC_NOT_FOUND;
416 qryResp = new QueryAllottedResourceCustomization();
418 qryResp = new QueryAllottedResourceCustomization(ret);
419 logger.debug ("AllottedResourceCustomization qryResp= {}", qryResp);
421 return respond(version, respStatus, isArray, qryResp);
422 } catch (Exception e) {
423 logger.error ("Exception - queryAllottedResourceCustomization", e);
424 CatalogQueryException excResp = new CatalogQueryException(e.getMessage(), CatalogQueryExceptionCategory.INTERNAL, Boolean.FALSE, null);
426 .status(HttpStatus.SC_INTERNAL_SERVER_ERROR)
427 .entity(new GenericEntity<CatalogQueryException>(excResp) {})
434 @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
435 @Transactional( readOnly = true)
436 public Response vfModules(@QueryParam("vfModuleModelName") String vfModuleModelName) {
437 QueryVfModule qryResp;
438 int respStatus = HttpStatus.SC_OK;
439 List<VfModuleCustomization> ret = null;
441 if(vfModuleModelName != null && !"".equals(vfModuleModelName)){
442 VfModule vfModule = vfModuleRepo.findFirstByModelNameOrderByModelVersionDesc(vfModuleModelName);
444 ret = vfModule.getVfModuleCustomization();
446 throw(new Exception(NO_MATCHING_PARAMETERS));
449 if(ret == null || ret.isEmpty()){
450 logger.debug ("vfModules not found");
451 respStatus = HttpStatus.SC_NOT_FOUND;
452 qryResp = new QueryVfModule();
454 qryResp = new QueryVfModule(ret);
455 if(logger.isDebugEnabled())
456 logger.debug ("vfModules tojsonstring is: {}", qryResp.JSON2(false, false));
460 .entity(qryResp.JSON2(false, false))
461 .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
464 logger.error ("Exception during query VfModules by vfModuleModuleName: ", e);
465 CatalogQueryException excResp = new CatalogQueryException(e.getMessage(), CatalogQueryExceptionCategory.INTERNAL, Boolean.FALSE, null);
467 .status(HttpStatus.SC_INTERNAL_SERVER_ERROR)
468 .entity(new GenericEntity<CatalogQueryException>(excResp) {})
473 * Get the tosca csar info from catalog
476 * @param smUuid service model uuid
477 * @return the tosca csar information of the serivce.
478 * @since ONAP Beijing Release
481 @Path("serviceToscaCsar")
482 @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
483 public Response serviceToscaCsar(@QueryParam("serviceModelUuid") String smUuid) {
484 int respStatus = HttpStatus.SC_OK;
487 if (smUuid != null && !"".equals(smUuid)) {
488 logger.debug("Query Csar by service model uuid: {}",smUuid);
490 Service service = serviceRepo.findFirstOneByModelUUIDOrderByModelVersionDesc(smUuid);
492 if (service != null) {
493 ToscaCsar toscaCsar = service.getCsar();
494 if (toscaCsar != null) {
495 QueryServiceCsar serviceCsar = new QueryServiceCsar(toscaCsar);
496 entity = serviceCsar.JSON2(false, false);
498 respStatus = HttpStatus.SC_NOT_FOUND;
501 respStatus = HttpStatus.SC_NOT_FOUND;
505 throw (new Exception("Incoming parameter is null or blank"));
510 .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
512 } catch (Exception e) {
513 logger.error("Exception during query csar by service model uuid: ", e);
514 CatalogQueryException excResp = new CatalogQueryException(e.getMessage(),
515 CatalogQueryExceptionCategory.INTERNAL, Boolean.FALSE, null);
517 .status(HttpStatus.SC_INTERNAL_SERVER_ERROR)
518 .entity(new GenericEntity<CatalogQueryException>(excResp) {
525 * Get the resource recipe info from catalog
528 * @param rmUuid resource model uuid
529 * @return the recipe information of the resource.
530 * @since ONAP Beijing Release
533 @Path("resourceRecipe")
534 @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
535 public Response resourceRecipe(@QueryParam("resourceModelUuid") String rmUuid, @QueryParam("action") String action) {
536 int respStatus = HttpStatus.SC_OK;
539 if (rmUuid != null && !"".equals(rmUuid)) {
540 logger.debug("Query recipe by resource model uuid: {}", rmUuid);
541 //check vnf and network and ar, the resource could be any resource.
542 Recipe recipe = null;
544 VnfResource vnf = vnfResourceRepo.findResourceByModelUUID(rmUuid);
546 recipe = vnfRecipeRepo.findFirstVnfRecipeByNfRoleAndActionAndVersionStr(vnf.getModelName(), action, vnf.getModelVersion());
548 // for network service fetch the default recipe
549 if (recipe == null && vnf.getSubCategory().equalsIgnoreCase(NETWORK_SERVICE)) {
550 recipe = vnfRecipeRepo.findFirstVnfRecipeByNfRoleAndAction("NS_DEFAULT", action);
555 if (null == recipe) {
556 NetworkResource nResource = networkResourceRepo.findResourceByModelUUID(rmUuid);
558 if(nResource != null) {
559 recipe = networkRecipeRepo.findFirstByModelNameAndActionAndVersionStr(nResource.getModelName(), action, nResource.getModelVersion());
561 // for network fetch the default recipe
562 if (recipe == null) {
563 recipe = networkRecipeRepo.findFirstByModelNameAndAction("SDNC_DEFAULT", action);
568 if (null == recipe) {
569 AllottedResource arResource = arResourceRepo.findResourceByModelUUID(rmUuid);
570 if (arResource != null) {
571 recipe = arRecipeRepo.findByModelNameAndActionAndVersion(arResource.getModelName(), action, arResource.getModelVersion());
574 if (recipe != null) {
575 QueryResourceRecipe resourceRecipe = new QueryResourceRecipe(recipe);
576 entity = resourceRecipe.JSON2(false, false);
578 respStatus = HttpStatus.SC_NOT_FOUND;
581 throw new Exception("Incoming parameter is null or blank");
586 .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
588 } catch (Exception e) {
589 logger.error("Exception during query recipe by resource model uuid: ", e);
590 CatalogQueryException excResp = new CatalogQueryException(e.getMessage(),
591 CatalogQueryExceptionCategory.INTERNAL, Boolean.FALSE, null);
593 .status(HttpStatus.SC_INTERNAL_SERVER_ERROR)
594 .entity(new GenericEntity<CatalogQueryException>(excResp) {