Package de.fraunhofer.iese.mydata.pxp
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 Summary
ConstructorDescriptionPolicyExecutionPointController
(IMyDataEnvironment myDataEnvironment, RestExposeHelper restExposeHelper) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<de.fraunhofer.iese.mydata.component.ComponentId>
aliveCheck
(String name) Alive Check for a PxpService.org.springframework.http.ResponseEntity<?>
Executes a PXP Action that is defined in aPxpService
Annnotated Bean.org.springframework.http.ResponseEntity<de.fraunhofer.iese.mydata.component.health.HealthStatus>
URL request mapping to check the component health status.
-
Constructor Details
-
PolicyExecutionPointController
public PolicyExecutionPointController(IMyDataEnvironment myDataEnvironment, RestExposeHelper restExposeHelper)
-
-
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 aPxpService
Annnotated 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.
-