aboutsummaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules/service/src/main/java
diff options
context:
space:
mode:
authorMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>2018-12-20 11:16:31 -0500
committerMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>2018-12-20 11:16:31 -0500
commitd35235fd2ec0c9108594150c4f710622d59efc8a (patch)
treea43d95cf909bb39d76fd35905c56872111869968 /ms/controllerblueprints/modules/service/src/main/java
parentf882ac09e274f3bfdd7fa59da75745457cd92ef5 (diff)
Add modelType service reactive compatible.
Change-Id: I0058a8136fe9ad62781f3d4556d2b95d11507f3f Issue-ID: CCSDK-864 Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
Diffstat (limited to 'ms/controllerblueprints/modules/service/src/main/java')
-rw-r--r--ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ModelTypeService.java148
-rw-r--r--ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ResourceDictionaryService.java165
-rw-r--r--ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/domain/ModelType.java2
-rw-r--r--ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/repository/ModelTypeRepository.java107
-rw-r--r--ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ModelTypeRest.java10
-rw-r--r--ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ResourceDictionaryRest.java22
6 files changed, 17 insertions, 437 deletions
diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ModelTypeService.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ModelTypeService.java
deleted file mode 100644
index 925a6c49..00000000
--- a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ModelTypeService.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright © 2017-2018 AT&T Intellectual Property.
- * Modifications Copyright © 2018 IBM.
- *
- * 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.onap.ccsdk.apps.controllerblueprints.service;
-
-import com.google.common.base.Preconditions;
-import org.apache.commons.lang3.StringUtils;
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException;
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.ModelType;
-import org.onap.ccsdk.apps.controllerblueprints.service.repository.ModelTypeRepository;
-import org.onap.ccsdk.apps.controllerblueprints.service.validator.ModelTypeValidator;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.List;
-import java.util.Optional;
-
-/**
- * ModelTypeService.java Purpose: Provide ModelTypeService Service ModelTypeService
- *
- * @author Brinda Santh
- * @version 1.0
- */
-
-@Service
-@Transactional
-public class ModelTypeService {
-
- private ModelTypeRepository modelTypeRepository;
-
- /**
- * This is a ModelTypeService, used to save and get the model types stored in database
- *
- * @param modelTypeRepository modelTypeRepository
- */
- public ModelTypeService(ModelTypeRepository modelTypeRepository) {
- this.modelTypeRepository = modelTypeRepository;
- }
-
-
- /**
- * This is a getModelTypeByName service
- *
- * @param modelTypeName modelTypeName
- * @return ModelType
- */
- public ModelType getModelTypeByName(String modelTypeName) {
- ModelType modelType = null;
- Preconditions.checkArgument(StringUtils.isNotBlank(modelTypeName), "Model Name Information is missing.");
- Optional<ModelType> modelTypeOption = modelTypeRepository.findByModelName(modelTypeName);
- if (modelTypeOption.isPresent()) {
- modelType = modelTypeOption.get();
- }
- return modelType;
- }
-
-
- /**
- * This is a searchModelTypes service
- *
- * @param tags tags
- * @return List<ModelType>
- */
- public List<ModelType> searchModelTypes(String tags) {
- Preconditions.checkArgument(StringUtils.isNotBlank(tags), "No Search Information provide");
- return modelTypeRepository.findByTagsContainingIgnoreCase(tags);
- }
-
- /**
- * This is a saveModel service
- *
- * @param modelType modelType
- * @return ModelType
- * @throws BluePrintException BluePrintException
- */
- public ModelType saveModel(ModelType modelType) throws BluePrintException {
-
- Preconditions.checkNotNull(modelType, "Model Type Information is missing.");
-
- ModelTypeValidator.validateModelType(modelType);
-
- Optional<ModelType> dbModelType = modelTypeRepository.findByModelName(modelType.getModelName());
- if (dbModelType.isPresent()) {
- ModelType dbModel = dbModelType.get();
- dbModel.setDescription(modelType.getDescription());
- dbModel.setDefinition(modelType.getDefinition());
- dbModel.setDefinitionType(modelType.getDefinitionType());
- dbModel.setDerivedFrom(modelType.getDerivedFrom());
- dbModel.setTags(modelType.getTags());
- dbModel.setVersion(modelType.getVersion());
- dbModel.setUpdatedBy(modelType.getUpdatedBy());
- modelType = modelTypeRepository.save(dbModel);
- } else {
- modelType = modelTypeRepository.save(modelType);
- }
- return modelType;
- }
-
-
- /**
- * This is a deleteByModelName service
- *
- * @param modelName modelName
- */
- public void deleteByModelName(String modelName) {
- Preconditions.checkArgument(StringUtils.isNotBlank(modelName), "Model Name Information is missing.");
- modelTypeRepository.deleteByModelName(modelName);
-
- }
-
- /**
- * This is a getModelTypeByDefinitionType service
- *
- * @param definitionType definitionType
- * @return List<ModelType>
- */
- public List<ModelType> getModelTypeByDefinitionType(String definitionType) {
- Preconditions.checkArgument(StringUtils.isNotBlank(definitionType), "Model definitionType Information is missing.");
- return modelTypeRepository.findByDefinitionType(definitionType);
- }
-
- /**
- * This is a getModelTypeByDerivedFrom service
- *
- * @param derivedFrom derivedFrom
- * @return List<ModelType>
- */
- public List<ModelType> getModelTypeByDerivedFrom(String derivedFrom) {
- Preconditions.checkArgument(StringUtils.isNotBlank(derivedFrom), "Model derivedFrom Information is missing.");
- return modelTypeRepository.findByDerivedFrom(derivedFrom);
- }
-
-
-}
diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ResourceDictionaryService.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ResourceDictionaryService.java
deleted file mode 100644
index eacc9025..00000000
--- a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ResourceDictionaryService.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright © 2017-2018 AT&T Intellectual Property.
- * Modifications Copyright © 2018 IBM.
- *
- * 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.onap.ccsdk.apps.controllerblueprints.service;
-
-import com.google.common.base.Preconditions;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException;
-import org.onap.ccsdk.apps.controllerblueprints.core.data.PropertyDefinition;
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceDefinition;
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceSourceMapping;
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.factory.ResourceSourceMappingFactory;
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.service.ResourceDefinitionValidationService;
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.ResourceDictionary;
-import org.onap.ccsdk.apps.controllerblueprints.service.repository.ResourceDictionaryRepository;
-import org.onap.ccsdk.apps.controllerblueprints.service.validator.ResourceDictionaryValidator;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-import java.util.Optional;
-
-/**
- * ResourceDictionaryService.java Purpose: Provide DataDictionaryService Service
- * DataDictionaryService
- *
- * @author Brinda Santh
- * @version 1.0
- */
-@Service
-public class ResourceDictionaryService {
-
- private ResourceDictionaryRepository resourceDictionaryRepository;
-
- private ResourceDefinitionValidationService resourceDictionaryValidationService;
-
- /**
- * This is a DataDictionaryService, used to save and get the Resource Mapping stored in database
- *
- * @param dataDictionaryRepository dataDictionaryRepository
- * @param resourceDictionaryValidationService resourceDictionaryValidationService
- */
- public ResourceDictionaryService(ResourceDictionaryRepository dataDictionaryRepository,
- ResourceDefinitionValidationService resourceDictionaryValidationService) {
- this.resourceDictionaryRepository = dataDictionaryRepository;
- this.resourceDictionaryValidationService = resourceDictionaryValidationService;
- }
-
- /**
- * This is a getDataDictionaryByName service
- *
- * @param name name
- * @return DataDictionary
- * @throws BluePrintException BluePrintException
- */
- public ResourceDictionary getResourceDictionaryByName(String name) throws BluePrintException {
- Preconditions.checkArgument(StringUtils.isNotBlank(name), "Resource dictionary Name Information is missing.");
- Optional<ResourceDictionary> resourceDictionaryDb = resourceDictionaryRepository.findByName(name);
- if (resourceDictionaryDb.isPresent()) {
- return resourceDictionaryDb.get();
- } else {
- throw new BluePrintException(String.format("couldn't get resource dictionary for name (%s)", name));
- }
- }
-
- /**
- * This is a searchResourceDictionaryByNames service
- *
- * @param names names
- * @return List<ResourceDictionary>
- */
- public List<ResourceDictionary> searchResourceDictionaryByNames(List<String> names) {
- Preconditions.checkArgument(CollectionUtils.isNotEmpty(names), "No Search Information provide");
- return resourceDictionaryRepository.findByNameIn(names);
- }
-
- /**
- * This is a searchResourceDictionaryByTags service
- *
- * @param tags tags
- * @return List<ResourceDictionary>
- */
- public List<ResourceDictionary> searchResourceDictionaryByTags(String tags) {
- Preconditions.checkArgument(StringUtils.isNotBlank(tags), "No search tag information provide");
- return resourceDictionaryRepository.findByTagsContainingIgnoreCase(tags);
- }
-
- /**
- * This is a saveDataDictionary service
- *
- * @param resourceDictionary resourceDictionary
- * @return DataDictionary
- */
- public ResourceDictionary saveResourceDictionary(ResourceDictionary resourceDictionary) throws BluePrintException {
- Preconditions.checkNotNull(resourceDictionary, "Resource Dictionary information is missing");
- Preconditions.checkNotNull(resourceDictionary.getDefinition(), "Resource Dictionary definition information is missing");
-
- ResourceDefinition resourceDefinition = resourceDictionary.getDefinition();
- Preconditions.checkNotNull(resourceDefinition, "failed to get resource definition from content");
- // Validate the Resource Definitions
- resourceDictionaryValidationService.validate(resourceDefinition);
-
- resourceDictionary.setTags(resourceDefinition.getTags());
- resourceDefinition.setUpdatedBy(resourceDictionary.getUpdatedBy());
- // Set the Property Definitions
- PropertyDefinition propertyDefinition = resourceDefinition.getProperty();
- resourceDictionary.setDescription(propertyDefinition.getDescription());
- resourceDictionary.setDataType(propertyDefinition.getType());
- if (propertyDefinition.getEntrySchema() != null) {
- resourceDictionary.setEntrySchema(propertyDefinition.getEntrySchema().getType());
- }
-
- ResourceDictionaryValidator.validateResourceDictionary(resourceDictionary);
-
- Optional<ResourceDictionary> dbResourceDictionaryData =
- resourceDictionaryRepository.findByName(resourceDictionary.getName());
- if (dbResourceDictionaryData.isPresent()) {
- ResourceDictionary dbResourceDictionary = dbResourceDictionaryData.get();
-
- dbResourceDictionary.setName(resourceDictionary.getName());
- dbResourceDictionary.setDefinition(resourceDictionary.getDefinition());
- dbResourceDictionary.setDescription(resourceDictionary.getDescription());
- dbResourceDictionary.setTags(resourceDictionary.getTags());
- dbResourceDictionary.setUpdatedBy(resourceDictionary.getUpdatedBy());
- dbResourceDictionary.setDataType(resourceDictionary.getDataType());
- dbResourceDictionary.setEntrySchema(resourceDictionary.getEntrySchema());
- resourceDictionary = resourceDictionaryRepository.save(dbResourceDictionary);
- } else {
- resourceDictionary = resourceDictionaryRepository.save(resourceDictionary);
- }
-
- return resourceDictionary;
- }
-
- /**
- * This is a deleteResourceDictionary service
- *
- * @param name name
- */
- public void deleteResourceDictionary(String name) {
- Preconditions.checkArgument(StringUtils.isNotBlank(name), "Resource dictionary Name Information is missing.");
- resourceDictionaryRepository.deleteByName(name);
- }
-
- /**
- * This is a getResourceSourceMapping service
- */
- public ResourceSourceMapping getResourceSourceMapping() {
- return ResourceSourceMappingFactory.INSTANCE.getRegisterSourceMapping();
- }
-}
diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/domain/ModelType.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/domain/ModelType.java
index 33c7ae42..65a135c1 100644
--- a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/domain/ModelType.java
+++ b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/domain/ModelType.java
@@ -84,7 +84,7 @@ public class ModelType implements Serializable {
@Override
public String toString() {
- return "[" + ", modelName = " + modelName +
+ return "[" + "modelName = " + modelName +
", derivedFrom = " + derivedFrom +
", definitionType = " + definitionType +
", description = " + description +
diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/repository/ModelTypeRepository.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/repository/ModelTypeRepository.java
deleted file mode 100644
index 27823ef3..00000000
--- a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/repository/ModelTypeRepository.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright © 2017-2018 AT&T Intellectual Property.
- *
- * 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.onap.ccsdk.apps.controllerblueprints.service.repository;
-
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.ModelType;
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.stereotype.Repository;
-
-import java.util.List;
-import java.util.Optional;
-
-
-/**
- * ModelTypeRepository.java Purpose: Provide Configuration Generator ModelTypeRepository
- *
- * @author Brinda Santh
- * @version 1.0
- */
-@Repository
-public interface ModelTypeRepository extends JpaRepository<ModelType, String> {
-
-
- /**
- * This is a findByModelName method
- *
- * @param modelName Model Name
- * @return Optional<ModelType>
- */
- Optional<ModelType> findByModelName(String modelName);
-
- /**
- * This is a findByModelNameIn method
- *
- * @param modelNames Model Names
- * @return List<ModelType>
- */
- List<ModelType> findByModelNameIn(List<String> modelNames);
-
- /**
- * This is a findByDerivedFrom method
- *
- * @param derivedFrom Derived From
- * @return List<ModelType>
- */
- List<ModelType> findByDerivedFrom(String derivedFrom);
-
-
- /**
- * This is a findByDerivedFromIn method
- *
- * @param derivedFroms Derived Froms
- * @return List<ModelType>
- */
- @SuppressWarnings("unused")
- List<ModelType> findByDerivedFromIn(List<String> derivedFroms);
-
- /**
- * This is a findByDefinitionType method
- *
- * @param definitionType Definition Type
- * @return List<ModelType>
- */
- List<ModelType> findByDefinitionType(String definitionType);
-
- /**
- * This is a findByDefinitionTypeIn method
- *
- * @param definitionTypes Definition Types
- * @return List<ModelType>
- */
- @SuppressWarnings("unused")
- List<ModelType> findByDefinitionTypeIn(List<String> definitionTypes);
-
-
- /**
- * This is a findByTagsContainingIgnoreCase method
- *
- * @param tags Tags
- * @return Optional<ModelType>
- */
- List<ModelType> findByTagsContainingIgnoreCase(String tags);
-
-
- /**
- * This is a deleteByModelName method
- *
- * @param modelName ModelName
- */
- void deleteByModelName(String modelName);
-
-
-
-}
diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ModelTypeRest.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ModelTypeRest.java
index 69c20925..12ed0a57 100644
--- a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ModelTypeRest.java
+++ b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ModelTypeRest.java
@@ -18,8 +18,8 @@
package org.onap.ccsdk.apps.controllerblueprints.service.rs;
import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException;
-import org.onap.ccsdk.apps.controllerblueprints.service.ModelTypeService;
import org.onap.ccsdk.apps.controllerblueprints.service.domain.ModelType;
+import org.onap.ccsdk.apps.controllerblueprints.service.handler.ModelTypeHandler;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
@@ -29,18 +29,18 @@ import java.util.List;
* {@inheritDoc}
*/
@Deprecated
-@RestController
-@RequestMapping(value = "/api/v1/model-type")
+//@RestController
+//@RequestMapping(value = "/api/v1/model-type")
public class ModelTypeRest {
- private ModelTypeService modelTypeService;
+ private ModelTypeHandler modelTypeService;
/**
* This is a ModelTypeResourceImpl, used to save and get the model types stored in database
*
* @param modelTypeService Model Type Service
*/
- public ModelTypeRest(ModelTypeService modelTypeService) {
+ public ModelTypeRest(ModelTypeHandler modelTypeService) {
this.modelTypeService = modelTypeService;
}
diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ResourceDictionaryRest.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ResourceDictionaryRest.java
index 50442042..8b7a9577 100644
--- a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ResourceDictionaryRest.java
+++ b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ResourceDictionaryRest.java
@@ -19,8 +19,8 @@ package org.onap.ccsdk.apps.controllerblueprints.service.rs;
import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException;
import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceSourceMapping;
-import org.onap.ccsdk.apps.controllerblueprints.service.ResourceDictionaryService;
import org.onap.ccsdk.apps.controllerblueprints.service.domain.ResourceDictionary;
+import org.onap.ccsdk.apps.controllerblueprints.service.handler.ResourceDictionaryHandler;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
@@ -35,51 +35,51 @@ import java.util.List;
public class ResourceDictionaryRest {
- private ResourceDictionaryService resourceDictionaryService;
+ private ResourceDictionaryHandler resourceDictionaryHandler;
/**
* This is a DataDictionaryRestImpl, used to save and get the Resource Mapping stored in database
*
- * @param dataDictionaryService Data Dictionary Service
+ * @param resourceDictionaryHandler Data Dictionary Handler
*/
- public ResourceDictionaryRest(ResourceDictionaryService dataDictionaryService) {
- this.resourceDictionaryService = dataDictionaryService;
+ public ResourceDictionaryRest(ResourceDictionaryHandler resourceDictionaryHandler) {
+ this.resourceDictionaryHandler = resourceDictionaryHandler;
}
@PostMapping(path = "", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
public @ResponseBody
ResourceDictionary saveResourceDictionary(@RequestBody ResourceDictionary dataDictionary) throws BluePrintException {
- return resourceDictionaryService.saveResourceDictionary(dataDictionary);
+ return resourceDictionaryHandler.saveResourceDictionary(dataDictionary);
}
@DeleteMapping(path = "/{name}")
public void deleteResourceDictionaryByName(@PathVariable(value = "name") String name) {
- resourceDictionaryService.deleteResourceDictionary(name);
+ resourceDictionaryHandler.deleteResourceDictionary(name);
}
@GetMapping(path = "/{name}", produces = MediaType.APPLICATION_JSON_VALUE)
public @ResponseBody
ResourceDictionary getResourceDictionaryByName(@PathVariable(value = "name") String name) throws BluePrintException {
- return resourceDictionaryService.getResourceDictionaryByName(name);
+ return resourceDictionaryHandler.getResourceDictionaryByName(name);
}
@PostMapping(path = "/by-names", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
public @ResponseBody
List<ResourceDictionary> searchResourceDictionaryByNames(@RequestBody List<String> names) {
- return resourceDictionaryService.searchResourceDictionaryByNames(names);
+ return resourceDictionaryHandler.searchResourceDictionaryByNames(names);
}
@GetMapping(path = "/search/{tags}", produces = MediaType.APPLICATION_JSON_VALUE)
public @ResponseBody
List<ResourceDictionary> searchResourceDictionaryByTags(@PathVariable(value = "tags") String tags) {
- return resourceDictionaryService.searchResourceDictionaryByTags(tags);
+ return resourceDictionaryHandler.searchResourceDictionaryByTags(tags);
}
@GetMapping(path = "/source-mapping", produces = MediaType.APPLICATION_JSON_VALUE)
public @ResponseBody
ResourceSourceMapping getResourceSourceMapping() {
- return resourceDictionaryService.getResourceSourceMapping();
+ return resourceDictionaryHandler.getResourceSourceMapping();
}
}