Class PolicyExecutionPointController

java.lang.Object
de.fraunhofer.iese.mydata.pxp.PolicyExecutionPointController

@RestController @ConditionalOnProperty(prefix="mydata", name="external-server-url") public class PolicyExecutionPointController extends Object
Default Controller for the channel from PDP to PolicyExecutionPoints. Calls the relevant method of one @PxpService.
  • Constructor Details

  • Method Details

    • execute

      @PostMapping(value="/#{beanFactory.getBean(T(de.fraunhofer.iese.mydata.autoconfiguration.MyDataConfigurationProperties)).component.path}/pxp/{path}/execute", produces="application/json") public org.springframework.http.ResponseEntity<?> execute(@RequestBody String requestString, @PathVariable(name="path") String path)
      Executes a PXP Action that is defined in a PxpServiceAnnnotated Bean.
      Parameters:
      requestString - Action that should be executed.
      path -
      Returns:
      A ResponseEntity containing the result or exception.
    • aliveCheck

      @GetMapping(value="/#{beanFactory.getBean(T(de.fraunhofer.iese.mydata.autoconfiguration.MyDataConfigurationProperties)).component.path}/pxp/{name}/component-id", produces="application/json") public org.springframework.http.ResponseEntity<de.fraunhofer.iese.mydata.component.ComponentId> aliveCheck(@PathVariable("name") String name)
      Alive Check for a PxpService.
      Parameters:
      name - Name of the PxpService to check.
      Returns:
      The component_id of the PxpService
    • getHealth

      @GetMapping(value="/#{beanFactory.getBean(T(de.fraunhofer.iese.mydata.autoconfiguration.MyDataConfigurationProperties)).component.path}/pxp/{name}/health", produces="application/json") public org.springframework.http.ResponseEntity<de.fraunhofer.iese.mydata.component.health.HealthStatus> getHealth(@PathVariable("name") String name)
      URL request mapping to check the component health status. Checks if a Method HealthStatus health() is provided by the PXP. In case this method is not found, SERVICE_UNAVAILABLE is returned.
      Parameters:
      name -
      Returns:
      process result wrapped in ResponseEntity with appropriate response code.