Coverage Report - org.trails.descriptor.extension.ITrailsBlob
 
Classes in this File Line Coverage Branch Coverage Complexity
ITrailsBlob
N/A 
N/A 
1
 
 1  
 package org.trails.descriptor.extension;
 2  
 
 3  
 import java.io.Serializable;
 4  
 
 5  
 /**
 6  
  * Represents an uploaded file.
 7  
  * It's kind of a Trails clone of {@link org.apache.tapestry.request.IUploadFile}
 8  
  *
 9  
  */
 10  
 public interface ITrailsBlob extends Serializable
 11  
 {
 12  
 
 13  
         /**
 14  
          * @return the name of the file that was uploaded. This is just the filename portion of the complete path.
 15  
          */
 16  
         String getFileName();
 17  
 
 18  
         void setFileName(String fileName);
 19  
 
 20  
         /**
 21  
          * @return the complete path, as reported by the client browser. Different browsers report different things here.
 22  
          */
 23  
         String getFilePath();
 24  
 
 25  
         void setFilePath(String filePath);
 26  
 
 27  
         /**
 28  
          * @return the MIME type specified when the file was uploaded. May return null if the content type is not known.
 29  
          */
 30  
         String getContentType();
 31  
 
 32  
         void setContentType(String contentType);
 33  
 
 34  
         /**
 35  
          * @return the actual file contents
 36  
          */
 37  
         byte[] getBytes();
 38  
 
 39  
         void setBytes(byte[] bytes);
 40  
 
 41  
         /**
 42  
          * Clean and reset the internal state to leave it as a newly created object.
 43  
          */
 44  
         void reset();
 45  
 
 46  
 }