use of org.ballerinalang.connector.api.Annotation in project ballerina by ballerina-lang.
the class WebSubHttpResource method buildWebSubHttpResource.
/**
* Builds the WebSub HTTP resource representation for the resource.
*
* @param resource the resource of the service for which the HTTP resource is built
* @param httpService the HTTP service representation of the service
* @return the built HTTP resource
*/
static HttpResource buildWebSubHttpResource(Resource resource, HttpService httpService) {
WebSubHttpResource httpResource = new WebSubHttpResource(resource, httpService);
Annotation resourceConfigAnnotation = getResourceConfigAnnotation(resource);
if (resourceConfigAnnotation != null) {
throw new BallerinaException("resourceConfig annotation not allowed for WebSubSubscriber resource");
}
httpResource.setPath("/");
httpResource.prepareAndValidateSignatureParams();
return httpResource;
}
Aggregations