models
Class CacheEisObject

java.lang.Object
  extended by models.CacheFile
      extended by models.CacheEisObject

public class CacheEisObject
extends CacheFile

class for caching eis data

See Also:
CacheFile

Constructor Summary
CacheEisObject(byte[] file, java.lang.String fileName, java.lang.String contentType)
          constructor of class
CacheEisObject(java.lang.String fileUrl)
          constructor of class
 
Method Summary
 java.lang.String etag()
           
 java.lang.String getContentType()
           
 byte[] getFile()
           
 java.lang.String getFileName()
           
 java.lang.String getFileUrl()
           
static CacheEisObject getFromCache(java.lang.String uuid)
          get file from cache
 java.lang.Boolean getObjectAsUrl()
           
 void setContentType(java.lang.String contentType)
          set content type
 void setFile(byte[] file)
          set file data
 void setFileName(java.lang.String fileName)
          set file name
 void setFileUrl(java.lang.String fileUrl)
          url to object
 void setObjectAsUrl(java.lang.Boolean objectAsUrl)
          set is object located on a server
 
Methods inherited from class models.CacheFile
getContentType, getImageFormatName, md5, removeFromCache
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheEisObject

public CacheEisObject(byte[] file,
                      java.lang.String fileName,
                      java.lang.String contentType)
constructor of class

Parameters:
file - byte array of file
fileName - file name string
contentType - content type of file

CacheEisObject

public CacheEisObject(java.lang.String fileUrl)
constructor of class

Parameters:
fileUrl - url of file
Method Detail

getObjectAsUrl

public java.lang.Boolean getObjectAsUrl()
Returns:
if object located on a server return true otherwise return false

setObjectAsUrl

public void setObjectAsUrl(java.lang.Boolean objectAsUrl)
set is object located on a server

Parameters:
objectAsUrl - boolean value

getFile

public byte[] getFile()
Returns:
byte array of file data or null

setFile

public void setFile(byte[] file)
set file data

Parameters:
file - byte array

getFileUrl

public java.lang.String getFileUrl()
Returns:
url to object or empty string

setFileUrl

public void setFileUrl(java.lang.String fileUrl)
url to object

Parameters:
fileUrl - url string

getFileName

public java.lang.String getFileName()
Returns:
file name

setFileName

public void setFileName(java.lang.String fileName)
set file name

Parameters:
fileName - file name string

getContentType

public java.lang.String getContentType()
Returns:
content type of file

setContentType

public void setContentType(java.lang.String contentType)
set content type

Parameters:
contentType - content type string

etag

public java.lang.String etag()
Returns:
etag: md5 hash string of file byte array

getFromCache

public static CacheEisObject getFromCache(java.lang.String uuid)
get file from cache

Returns:
CacheEisObject object