/*
 * Copyright 2012, Red Hat, Inc. and individual contributors
 * as indicated by the @author tags. See the copyright.txt file in the
 * distribution for a full listing of individual contributors.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
package org.zanata.rest;

import java.io.InputStream;
import java.io.Serializable;

import javax.ws.rs.FormParam;

import lombok.Getter;
import lombok.Setter;

import org.jboss.resteasy.annotations.providers.multipart.MultipartForm;
import org.jboss.resteasy.annotations.providers.multipart.PartType;

/**
 * Form for use in file uploads.
 * 
 * For upload of a document as a single chunk, 'first' and 'last' should both be
 * set to TRUE (uploadId is ignored). For chunked upload, send the first part
 * with first=TRUE, then send the returned uploadId from the first part with
 * subsequent parts. The document is parsed when the final part is sent with
 * last=TRUE.
 * 
 * Hash should always be set to the md5 hash of the entire document. For chunked
 * upload, the hash is checked against the complete document after the chunks
 * are joined.
 * 
 * @author David Mason, <a href="mailto:damason@redhat.com">damason@redhat.com</a>
 * @see MultipartForm
 */
public class DocumentFileUploadForm implements Serializable
{
   private static final long serialVersionUID = 1L;

   @FormParam("file")
   @PartType("application/octet-stream")
   @Getter
   @Setter
   private InputStream fileStream;

   @FormParam("type")
   @PartType("text/plain")
   @Getter
   @Setter
   private String fileType;

   @FormParam("uploadId")
   @PartType("text/plain")
   @Getter
   @Setter
   private Long uploadId;

   @FormParam("first")
   @PartType("text/plain")
   @Getter
   @Setter
   private Boolean first;

   @FormParam("last")
   @PartType("text/plain")
   @Getter
   @Setter
   private Boolean last;

   @FormParam("hash")
   @PartType("text/plain")
   @Getter
   @Setter
   private String hash;
}

@@ -1054,17 +1054,16 @@
 izable;%0A
-%0A
 import j
@@ -1089,53 +1089,8 @@
 m;%0A%0A
-import lombok.Getter;%0Aimport lombok.Setter;%0A%0A
 impo
@@ -2064,38 +2064,16 @@
 tream%22)%0A
-   @Getter%0A   @Setter%0A
    priva
@@ -2149,38 +2149,16 @@
 plain%22)%0A
-   @Getter%0A   @Setter%0A
    priva
@@ -2231,38 +2231,16 @@
 plain%22)%0A
-   @Getter%0A   @Setter%0A
    priva
@@ -2308,38 +2308,16 @@
 plain%22)%0A
-   @Getter%0A   @Setter%0A
    priva
@@ -2384,38 +2384,16 @@
 plain%22)%0A
-   @Getter%0A   @Setter%0A
    priva
@@ -2463,30 +2463,8 @@
 n%22)%0A
-   @Getter%0A   @Setter%0A
    p
@@ -2482,11 +2482,879 @@
 ng hash;
+%0A%0A   public InputStream getFileStream()%0A   %7B%0A      return fileStream;%0A   %7D%0A%0A   public void setFileStream(InputStream fileStream)%0A   %7B%0A      this.fileStream = fileStream;%0A   %7D%0A%0A   public String getFileType()%0A   %7B%0A      return fileType;%0A   %7D%0A%0A   public void setFileType(String fileType)%0A   %7B%0A      this.fileType = fileType;%0A   %7D%0A%0A   public Long getUploadId()%0A   %7B%0A      return uploadId;%0A   %7D%0A%0A   public void setUploadId(Long uploadId)%0A   %7B%0A      this.uploadId = uploadId;%0A   %7D%0A%0A   public Boolean getFirst()%0A   %7B%0A      return first;%0A   %7D%0A%0A   public void setFirst(Boolean first)%0A   %7B%0A      this.first = first;%0A   %7D%0A%0A   public Boolean getLast()%0A   %7B%0A      return last;%0A   %7D%0A%0A   public void setLast(Boolean last)%0A   %7B%0A      this.last = last;%0A   %7D%0A%0A   public String getHash()%0A   %7B%0A      return hash;%0A   %7D%0A%0A   public void setHash(String hash)%0A   %7B%0A      this.hash = hash;%0A   %7D
 %0A%7D%0A

Remove use of lombok annotations.