class NotifierInfoCatalogResource {

    @POST
    @Consumes(MediaType.MULTIPART_FORM_DATA)
    @Path("/notifiers")
    @Timed
    public Response addNotifier(@FormDataParam("notifierJarFile") final InputStream inputStream,
                                @FormDataParam("notifierJarFile") final FormDataContentDisposition contentDispositionHeader,
                                @FormDataParam("notifierConfig") final FormDataBodyPart notifierConfig,
                                @Context SecurityContext securityContext) throws IOException {
        SecurityUtil.checkRole(authorizer, securityContext, Roles.ROLE_NOTIFIER_ADMIN);
        MediaType mediaType = notifierConfig.getMediaType();
        LOG.debug("Media type {}", mediaType);
        if (!mediaType.equals(MediaType.APPLICATION_JSON_TYPE)) {
            throw new UnsupportedMediaTypeException(mediaType.toString());
        }
        Notifier notifier = notifierConfig.getValueAs(Notifier.class);
        Collection<Notifier> existing = null;
        existing = catalogService.listNotifierInfos(Collections.singletonList(new QueryParam(Notifier.NOTIFIER_NAME, notifier.getName())));
        if (existing != null && !existing.isEmpty()) {
            LOG.warn("Received a post request for an already registered notifier. Not creating entity for " + notifier);
            return WSUtils.respondEntity(notifier, CONFLICT);
        }
        String jarFileName = uploadJar(inputStream, notifier.getName());
        notifier.setJarFileName(jarFileName);
        Notifier createdNotifier = catalogService.addNotifierInfo(notifier);
        SecurityUtil.addAcl(authorizer, securityContext, Notifier.NAMESPACE, createdNotifier.getId(),
                EnumSet.allOf(Permission.class));
        return WSUtils.respondEntity(createdNotifier, CREATED);
    }

    public  NotifierInfoCatalogResource(StreamlineAuthorizer authorizer, StreamCatalogService catalogService, FileStorage fileStorage);

}