Class FeatureSourceAdminController
java.lang.Object
org.tailormap.api.controller.admin.FeatureSourceAdminController
-
Constructor Summary
ConstructorsConstructorDescriptionFeatureSourceAdminController(FeatureSourceRepository featureSourceRepository, TMFeatureSourceHelper tmFeatureSourceHelper, CatalogRepository catalogRepository, org.springframework.data.rest.webmvc.support.RepositoryEntityLinks repositoryEntityLinks) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<org.springframework.hateoas.EntityModel<TMFeatureSource>> createFeatureSource(@Valid TMFeatureSource featureSource, String catalogNodeId) Create a new feature source and attach it to a catalog node.org.springframework.http.ResponseEntity<?> handleException(org.springframework.web.server.ResponseStatusException ex) org.springframework.http.ResponseEntity<?> org.springframework.http.ResponseEntity<?> refreshCapabilities(Long id, jakarta.servlet.http.HttpServletResponse httpServletResponse)
-
Constructor Details
-
FeatureSourceAdminController
public FeatureSourceAdminController(FeatureSourceRepository featureSourceRepository, TMFeatureSourceHelper tmFeatureSourceHelper, CatalogRepository catalogRepository, org.springframework.data.rest.webmvc.support.RepositoryEntityLinks repositoryEntityLinks)
-
-
Method Details
-
handleException
@ExceptionHandler(org.springframework.web.server.ResponseStatusException.class) public org.springframework.http.ResponseEntity<?> handleException(org.springframework.web.server.ResponseStatusException ex) -
internalServerError
@ExceptionHandler(IOException.class) public org.springframework.http.ResponseEntity<?> internalServerError(Exception ex) -
refreshCapabilities
@PostMapping(path="${tailormap-api.admin.base-path}/feature-sources/{id}/refresh-capabilities") @Transactional public org.springframework.http.ResponseEntity<?> refreshCapabilities(@PathVariable Long id, jakarta.servlet.http.HttpServletResponse httpServletResponse) throws IOException - Throws:
IOException
-
createFeatureSource
@PostMapping(path="${tailormap-api.admin.base-path}/feature-sources/new") @Transactional public org.springframework.http.ResponseEntity<org.springframework.hateoas.EntityModel<TMFeatureSource>> createFeatureSource(@RequestBody @Valid @Valid TMFeatureSource featureSource, @RequestParam String catalogNodeId) throws IOException, org.springframework.orm.ObjectOptimisticLockingFailureException Create a new feature source and attach it to a catalog node.- Parameters:
featureSource- the feature source to createcatalogNodeId- the node this feature source is to be attached to- Returns:
- the created feature source as a HATEOAS resource with a link to the resource
- Throws:
IOException- if there is an error loading capabilitiesorg.springframework.orm.ObjectOptimisticLockingFailureException- if there is a concurrent modification likely of the catalog
-