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
Constructors Constructor Description PolicyExecutionPointController(de.fraunhofer.iese.mydata.IMyDataEnvironment myDataEnvironment, RestExposeHelper restExposeHelper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<de.fraunhofer.iese.mydata.component.ComponentId>
aliveCheck(String name)
Alive Check for a PxpService.org.springframework.http.ResponseEntity<?>
execute(String requestString, String path)
Executes a PXP Action that is defined in aPxpService
Annnotated Bean.org.springframework.http.ResponseEntity<de.fraunhofer.iese.mydata.component.health.HealthStatus>
getHealth(String name)
URL request mapping to check the component health status.
-
-
-
Constructor Detail
-
PolicyExecutionPointController
@Autowired public PolicyExecutionPointController(de.fraunhofer.iese.mydata.IMyDataEnvironment myDataEnvironment, RestExposeHelper restExposeHelper)
-
-
Method Detail
-
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.
-
-