@@ -0,0 +1,1006 @@
+package com.coding4people.mosquitoreport.api.buckets;%0A%0Aimport java.io.InputStream;%0A%0Aimport javax.annotation.PostConstruct;%0Aimport javax.inject.Inject;%0A%0Aimport com.amazonaws.services.s3.AmazonS3Client;%0Aimport com.amazonaws.services.s3.model.ObjectMetadata;%0Aimport com.amazonaws.services.s3.model.PutObjectRequest;%0A%0Aabstract public class Bucket %7B%0A    @Inject AmazonS3Client amazonS3Client;%0A    %0A    abstract protected String getBucketName();%0A    %0A    @PostConstruct%0A    protected void postConstruct() %7B%0A        createBucket();%0A        postCreateBucket();%0A    %7D%0A    %0A    public void put(String path, InputStream fileInputStream, Long contentLenght) %7B%0A        ObjectMetadata meta = new ObjectMetadata();%0A        meta.setContentLength(contentLenght);%0A        %0A        amazonS3Client.putObject(new PutObjectRequest(getBucketName(), path, fileInputStream, meta));%0A    %7D%0A    %0A    protected void postCreateBucket() %7B%0A    %7D%0A    %0A    protected void createBucket() %7B%0A        //TODO create bucket on construct%0A    %7D%0A%0A%7D%0A

Create base bucket