Package de.fraunhofer.iese.mydata.pip
Class PolicyInformationPointController
java.lang.Object
de.fraunhofer.iese.mydata.pip.PolicyInformationPointController
@RestController
@ConditionalOnProperty(prefix="mydata",
name="external-server-url")
public class PolicyInformationPointController
extends Object
Default Controller for the channel from PDP to PolicyInformationPoints. Calls the relevant method
of one @PipService.
-
Constructor Summary
ConstructorDescriptionPolicyInformationPointController
(IMyDataEnvironment myDataEnvironment, RestExposeHelper restExposeHelper) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<de.fraunhofer.iese.mydata.component.ComponentId>
aliveCheck
(String name) * Url request mapping for GET PIP component Id.Url Request mapping for all POST PIP request.org.springframework.http.ResponseEntity<de.fraunhofer.iese.mydata.component.health.HealthStatus>
URL request mapping to check the component health status.
-
Constructor Details
-
PolicyInformationPointController
public PolicyInformationPointController(IMyDataEnvironment myDataEnvironment, RestExposeHelper restExposeHelper)
-
-
Method Details
-
execute
@PostMapping(value="/#{beanFactory.getBean(T(de.fraunhofer.iese.mydata.autoconfiguration.MyDataConfigurationProperties)).component.path}/pip/{path}/execute", produces="application/json") public Object execute(@RequestBody String requestString, @PathVariable(name="path") String path, javax.servlet.http.HttpServletResponse response) Url Request mapping for all POST PIP request. and will be dispatched to particular function annotated with @PipService
- Parameters:
requestString
- PIP request as JsonStringpath
-response
-- Returns:
- process result wrapped in ResponseEntity with appropriate response code.
-
aliveCheck
@GetMapping(value="/#{beanFactory.getBean(T(de.fraunhofer.iese.mydata.autoconfiguration.MyDataConfigurationProperties)).component.path}/pip/{name}/component-id", produces="application/json") public org.springframework.http.ResponseEntity<de.fraunhofer.iese.mydata.component.ComponentId> aliveCheck(@PathVariable("name") String name) * Url request mapping for GET PIP component Id.- Parameters:
name
- the name- Returns:
- the string
-
getHealth
@GetMapping(value="/#{beanFactory.getBean(T(de.fraunhofer.iese.mydata.autoconfiguration.MyDataConfigurationProperties)).component.path}/pip/{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 PIP. In case this method is not found, SERVICE_UNAVAILABLE is returned.- Parameters:
name
-- Returns:
- process result wrapped in ResponseEntity with appropriate response code.
-