use of org.wso2.carbon.apimgt.common.analytics.exceptions.DataNotFoundException in project carbon-apimgt by wso2.
the class SynapseAnalyticsDataProvider method getApplication.
@Override
public Application getApplication() throws DataNotFoundException {
AuthenticationContext authContext = APISecurityUtils.getAuthenticationContext(messageContext);
if (authContext == null) {
throw new DataNotFoundException("Error occurred when getting Application information");
}
Application application = new Application();
application.setApplicationId(authContext.getApplicationUUID());
application.setApplicationName(authContext.getApplicationName());
application.setApplicationOwner(authContext.getSubscriber());
application.setKeyType(authContext.getKeyType());
return application;
}
Aggregations