use of io.jans.as.persistence.model.GluuOrganization in project jans by JanssenProject.
the class LogoServlet method doGet.
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) {
response.setContentType("/image/jpg");
response.setDateHeader("Expires", new Date().getTime() + 1000L * 1800);
GluuOrganization organization = organizationService.getOrganization();
boolean hasSucceed = readCustomLogo(response, organization);
if (!hasSucceed) {
readDefaultLogo(response);
}
}
use of io.jans.as.persistence.model.GluuOrganization in project jans by JanssenProject.
the class FaviconServlet method doGet.
@Override
protected void doGet(HttpServletRequest httpServletRequest, HttpServletResponse response) throws ServletException, IOException {
response.setContentType("image/x-icon");
response.setDateHeader("Expires", new Date().getTime() + 1000L * 1800);
GluuOrganization organization = organizationService.getOrganization();
boolean hasSucceed = readCustomFavicon(response, organization);
if (!hasSucceed) {
readDefaultFavicon(response);
}
}
use of io.jans.as.persistence.model.GluuOrganization in project jans by JanssenProject.
the class OrganizationResource method patchOrganization.
@PATCH
@Consumes(MediaType.APPLICATION_JSON_PATCH_JSON)
@ProtectedApi(scopes = { ApiAccessConstants.ORG_CONFIG_WRITE_ACCESS })
public Response patchOrganization(@NotNull String pathString) throws JsonPatchException, IOException {
log.trace("Organization patch request - pathString:{} ", pathString);
GluuOrganization organization = organizationService.getOrganization();
organization = Jackson.applyPatch(pathString, organization);
organizationService.updateOrganization(organization);
return Response.ok(organizationService.getOrganization()).build();
}
Aggregations