use of io.apiman.manager.api.beans.summary.GatewayEndpointSummaryBean in project apiman by apiman.
the class GatewayResourceImpl method getGatewayEndpoint.
/**
* @see IGatewayResource#getGatewayEndpoint(java.lang.String)
*/
public GatewayEndpointSummaryBean getGatewayEndpoint(String gatewayId) throws GatewayNotFoundException {
// No permission check is needed
try {
GatewayBean gateway = storage.getGateway(gatewayId);
if (gateway == null) {
throw ExceptionFactory.gatewayNotFoundException(gatewayId);
} else {
// $NON-NLS-1$
LOGGER.debug(String.format("Got endpoint summary: %s", gateway));
}
IGatewayLink link = gatewayLinkFactory.create(gateway);
GatewayEndpoint endpoint = link.getGatewayEndpoint();
GatewayEndpointSummaryBean gatewayEndpoint = new GatewayEndpointSummaryBean();
gatewayEndpoint.setEndpoint(endpoint.getEndpoint());
return gatewayEndpoint;
} catch (AbstractRestException e) {
throw e;
} catch (Exception e) {
throw new SystemErrorException(e);
}
}
Aggregations