Package dev.dsf.fhir.webservice.impl
Class StructureDefinitionServiceImpl
java.lang.Object
dev.dsf.fhir.webservice.base.AbstractBasicService
dev.dsf.fhir.webservice.impl.AbstractResourceServiceImpl<StructureDefinitionDao,org.hl7.fhir.r4.model.StructureDefinition>
dev.dsf.fhir.webservice.impl.StructureDefinitionServiceImpl
- All Implemented Interfaces:
BasicService,BasicResourceService<org.hl7.fhir.r4.model.StructureDefinition>,StructureDefinitionService,org.springframework.beans.factory.InitializingBean
public class StructureDefinitionServiceImpl
extends AbstractResourceServiceImpl<StructureDefinitionDao,org.hl7.fhir.r4.model.StructureDefinition>
implements StructureDefinitionService
-
Field Summary
Fields inherited from class dev.dsf.fhir.webservice.impl.AbstractResourceServiceImpl
authorizationRuleProvider, dao, defaultPageCount, eventGenerator, eventHandler, exceptionHandler, historyService, parameterConverter, referenceCleaner, referenceExtractor, referenceResolver, resourceType, resourceTypeName, responseGenerator, serverBase, validatorFields inherited from class dev.dsf.fhir.webservice.base.AbstractBasicService
currentIdentityProvider -
Constructor Summary
ConstructorsConstructorDescriptionStructureDefinitionServiceImpl(String path, String serverBase, int defaultPageCount, StructureDefinitionDao dao, ResourceValidator validator, EventHandler eventHandler, ExceptionHandler exceptionHandler, EventGenerator eventGenerator, ResponseGenerator responseGenerator, ParameterConverter parameterConverter, ReferenceExtractor referenceExtractor, ReferenceResolver referenceResolver, ReferenceCleaner referenceCleaner, AuthorizationRuleProvider authorizationRuleProvider, StructureDefinitionDao structureDefinitionSnapshotDao, SnapshotGenerator sanapshotGenerator, HistoryService historyService) -
Method Summary
Modifier and TypeMethodDescriptionvoidjakarta.ws.rs.core.ResponsegetSnapshotExisting(String snapshotPath, String id, jakarta.ws.rs.core.UriInfo uri, jakarta.ws.rs.core.HttpHeaders headers) jakarta.ws.rs.core.ResponsegetSnapshotNew(String snapshotPath, jakarta.ws.rs.core.UriInfo uri, jakarta.ws.rs.core.HttpHeaders headers) jakarta.ws.rs.core.ResponsepostSnapshotExisting(String snapshotPath, String id, jakarta.ws.rs.core.UriInfo uri, jakarta.ws.rs.core.HttpHeaders headers) jakarta.ws.rs.core.ResponsepostSnapshotNew(String snapshotPath, org.hl7.fhir.r4.model.Parameters parameters, jakarta.ws.rs.core.UriInfo uri, jakarta.ws.rs.core.HttpHeaders headers) protected Consumer<org.hl7.fhir.r4.model.StructureDefinition>preCreate(org.hl7.fhir.r4.model.StructureDefinition resource) Override to modify the given resource before db insert, throwWebApplicationExceptionto interrupt the normal flowOverride to perform actions pre delete, throwWebApplicationExceptionto interrupt the normal flow.protected Consumer<org.hl7.fhir.r4.model.StructureDefinition>preUpdate(org.hl7.fhir.r4.model.StructureDefinition resource) Override to modify the given resource before db update, throwWebApplicationExceptionto interrupt the normal flow.Methods inherited from class dev.dsf.fhir.webservice.impl.AbstractResourceServiceImpl
checkReferenceAfterCreate, checkReferenceAfterUpdate, create, delete, delete, deletePermanently, getMediaTypeForRead, getMediaTypeForVRead, history, history, read, search, update, update, vreadMethods inherited from class dev.dsf.fhir.webservice.base.AbstractBasicService
getCurrentIdentity, setCurrentIdentityProviderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.dsf.fhir.webservice.specification.BasicResourceService
create, delete, delete, deletePermanently, history, history, read, search, update, update, vreadMethods inherited from interface dev.dsf.fhir.webservice.base.BasicService
setCurrentIdentityProvider
-
Constructor Details
-
StructureDefinitionServiceImpl
public StructureDefinitionServiceImpl(String path, String serverBase, int defaultPageCount, StructureDefinitionDao dao, ResourceValidator validator, EventHandler eventHandler, ExceptionHandler exceptionHandler, EventGenerator eventGenerator, ResponseGenerator responseGenerator, ParameterConverter parameterConverter, ReferenceExtractor referenceExtractor, ReferenceResolver referenceResolver, ReferenceCleaner referenceCleaner, AuthorizationRuleProvider authorizationRuleProvider, StructureDefinitionDao structureDefinitionSnapshotDao, SnapshotGenerator sanapshotGenerator, HistoryService historyService)
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Overrides:
afterPropertiesSetin classAbstractResourceServiceImpl<StructureDefinitionDao,org.hl7.fhir.r4.model.StructureDefinition> - Throws:
Exception
-
preCreate
protected Consumer<org.hl7.fhir.r4.model.StructureDefinition> preCreate(org.hl7.fhir.r4.model.StructureDefinition resource) throws jakarta.ws.rs.WebApplicationException Description copied from class:AbstractResourceServiceImplOverride to modify the given resource before db insert, throwWebApplicationExceptionto interrupt the normal flow- Overrides:
preCreatein classAbstractResourceServiceImpl<StructureDefinitionDao,org.hl7.fhir.r4.model.StructureDefinition> - Parameters:
resource- notnull- Returns:
- if not null, the returned
Consumerwill be called after the create operation and before returning to the client, theConsumercan throw aWebApplicationExceptionto interrupt the normal flow, theConsumerwill be called with the created resource - Throws:
jakarta.ws.rs.WebApplicationException- if the normal flow should be interrupted
-
preUpdate
protected Consumer<org.hl7.fhir.r4.model.StructureDefinition> preUpdate(org.hl7.fhir.r4.model.StructureDefinition resource) Description copied from class:AbstractResourceServiceImplOverride to modify the given resource before db update, throwWebApplicationExceptionto interrupt the normal flow. Path id vs. resource.id.idPart is checked before this method is called- Overrides:
preUpdatein classAbstractResourceServiceImpl<StructureDefinitionDao,org.hl7.fhir.r4.model.StructureDefinition> - Parameters:
resource- notnull- Returns:
- if not null, the returned
Consumerwill be called after the update operation and before returning to the client, theConsumercan throw aWebApplicationExceptionto interrupt the normal flow, theConsumerwill be called with the updated resource
-
preDelete
Description copied from class:AbstractResourceServiceImplOverride to perform actions pre delete, throwWebApplicationExceptionto interrupt the normal flow.- Overrides:
preDeletein classAbstractResourceServiceImpl<StructureDefinitionDao,org.hl7.fhir.r4.model.StructureDefinition> - Parameters:
id- of the resource to be deleted- Returns:
- if not null, the returned
Consumerwill be called after the create operation and before returning to the client, theConsumercan throw aWebApplicationExceptionto interrupt the normal flow, theConsumerwill be called with the id (IdType.getIdPart()) of the deleted resource
-
postSnapshotNew
public jakarta.ws.rs.core.Response postSnapshotNew(String snapshotPath, org.hl7.fhir.r4.model.Parameters parameters, jakarta.ws.rs.core.UriInfo uri, jakarta.ws.rs.core.HttpHeaders headers) - Specified by:
postSnapshotNewin interfaceStructureDefinitionService
-
getSnapshotNew
public jakarta.ws.rs.core.Response getSnapshotNew(String snapshotPath, jakarta.ws.rs.core.UriInfo uri, jakarta.ws.rs.core.HttpHeaders headers) - Specified by:
getSnapshotNewin interfaceStructureDefinitionService
-
postSnapshotExisting
public jakarta.ws.rs.core.Response postSnapshotExisting(String snapshotPath, String id, jakarta.ws.rs.core.UriInfo uri, jakarta.ws.rs.core.HttpHeaders headers) - Specified by:
postSnapshotExistingin interfaceStructureDefinitionService
-
getSnapshotExisting
public jakarta.ws.rs.core.Response getSnapshotExisting(String snapshotPath, String id, jakarta.ws.rs.core.UriInfo uri, jakarta.ws.rs.core.HttpHeaders headers) - Specified by:
getSnapshotExistingin interfaceStructureDefinitionService
-