Search in sources :

Example 1 with GluuOrganization

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);
    }
}
Also used : GluuOrganization(io.jans.as.persistence.model.GluuOrganization) Date(java.util.Date)

Example 2 with GluuOrganization

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);
    }
}
Also used : GluuOrganization(io.jans.as.persistence.model.GluuOrganization) Date(java.util.Date)

Example 3 with GluuOrganization

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();
}
Also used : GluuOrganization(io.jans.as.persistence.model.GluuOrganization) ProtectedApi(io.jans.configapi.core.rest.ProtectedApi)

Aggregations

GluuOrganization (io.jans.as.persistence.model.GluuOrganization)3 Date (java.util.Date)2 ProtectedApi (io.jans.configapi.core.rest.ProtectedApi)1