55 log.trace(
"UMA - get scope's icon : id: {}",
id);
57 if (StringUtils.isNotBlank(
id)) {
59 if (scope != null && StringUtils.isNotBlank(scope.getFaviconImageAsXml())) {
60 final GluuImage gluuImage =
xmlService.getGluuImageFromXML(scope.getFaviconImageAsXml());
62 if (gluuImage != null && ArrayUtils.isNotEmpty(gluuImage.getData())) {
68 return Response.status(Response.Status.OK).entity(gluuImage.getData()).build();
72 }
catch (Exception e) {
73 log.error(e.getMessage(), e);
74 throw new WebApplicationException(Response.status(Response.Status.INTERNAL_SERVER_ERROR)
77 throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND)
XmlService xmlService
Definition: UmaScopeIconWS.java:49
ErrorResponseFactory errorResponseFactory
Definition: UmaScopeIconWS.java:43
UmaScopeService umaScopeService
Definition: UmaScopeIconWS.java:46
UmaScopeDescription getScope(String scopeId)
Definition: UmaScopeService.java:68
String getUmaJsonErrorResponse(IErrorType type)
Definition: ErrorResponseFactory.java:181
Logger log
Definition: UmaScopeIconWS.java:40