org.loom.resources
Class CachedWebResource

java.lang.Object
  extended by org.loom.resources.CachedWebResource

public class CachedWebResource
extends java.lang.Object

A web resource (javascript or css file) Typically this resource is the result of the concatenation of multiple files, and cached in a temp filesystem. This class is considered immutable.

Author:
icoloma

Constructor Summary
CachedWebResource(java.io.File resource)
          Create a web resource, calculate its MD5, and create the corresponding gzip file
 
Method Summary
 java.lang.String getCharset()
           
 java.io.File getGzippedResource()
           
 java.lang.String getMd5()
           
 java.io.File getResource()
           
 WebResourceType getType()
           
 void setCharset(java.lang.String charset)
           
 void setType(WebResourceType type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachedWebResource

public CachedWebResource(java.io.File resource)
                  throws java.io.IOException
Create a web resource, calculate its MD5, and create the corresponding gzip file

Parameters:
resource - the File with the resource contents
Throws:
java.io.IOException
Method Detail

getMd5

public java.lang.String getMd5()

getResource

public java.io.File getResource()

getGzippedResource

public java.io.File getGzippedResource()

getType

public WebResourceType getType()

setType

public void setType(WebResourceType type)

getCharset

public java.lang.String getCharset()

setCharset

public void setCharset(java.lang.String charset)


The Loom Framework 1.6-SNAPSHOT.
Licensed under the Apache License, Version 2.0 by Extrema Sistemas de Informacion S.L.