Skip to content

Commit

Permalink
Made synchronization interfaces more dynamic
Browse files Browse the repository at this point in the history
(no static parts of OpenMRS).
  • Loading branch information
volsch committed Feb 6, 2019
1 parent 3dddf84 commit 91af303
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public FhirServerSyncController( @Nonnull FhirServerResourceRepository resourceR
this.fhirResourceRepository = fhirResourceRepository;
}

@RequestMapping( path = "/{fhirServerId}/ws/fhir/{resourceType}/{resourceId}", method = RequestMethod.DELETE )
@RequestMapping( path = "/{fhirServerId}/**/{resourceType}/{resourceId}", method = RequestMethod.DELETE )
public ResponseEntity<byte[]> delete(
@PathVariable( "fhirServerId" ) UUID fhirServerId, @PathVariable( "resourceType" ) String resourceType, @PathVariable( "resourceId" ) String resourceId,
@RequestHeader( value = "Authorization", required = false ) String authorization )
Expand All @@ -95,7 +95,7 @@ public ResponseEntity<byte[]> delete(
return new ResponseEntity<>( HttpStatus.NO_CONTENT );
}

@RequestMapping( path = "/{fhirServerId}/ws/fhir/{resourceType}/{resourceId}", method = RequestMethod.GET )
@RequestMapping( path = "/{fhirServerId}/**/{resourceType}/{resourceId}", method = RequestMethod.GET )
public ResponseEntity<byte[]> getRemoteResource( @PathVariable( "fhirServerId" ) UUID fhirServerId,
@PathVariable( "resourceType" ) String resourceType, @PathVariable( "resourceId" ) String resourceId,
@RequestHeader( value = "Authorization", required = false ) String authorization )
Expand Down Expand Up @@ -132,7 +132,7 @@ public ResponseEntity<byte[]> getRemoteResource( @PathVariable( "fhirServerId" )
return new ResponseEntity<>( fhirResource.getBytes( Objects.requireNonNull( FHIR_JSON_MEDIA_TYPE.getCharset() ) ), headers, HttpStatus.OK );
}

@RequestMapping( path = "/{fhirServerId}/ws/fhir/{resourceType}/{resourceId}", method = { RequestMethod.POST, RequestMethod.PUT } )
@RequestMapping( path = "/{fhirServerId}/**/{resourceType}/{resourceId}", method = { RequestMethod.POST, RequestMethod.PUT } )
public ResponseEntity<byte[]> receiveWithPayload(
@PathVariable( "fhirServerId" ) UUID fhirServerId, @PathVariable( "resourceType" ) String resourceType, @PathVariable( "resourceId" ) String resourceId,
@RequestHeader( value = "Authorization", required = false ) String authorization, @Nonnull HttpEntity<byte[]> requestEntity )
Expand Down

0 comments on commit 91af303

Please sign in to comment.