fnug.resource
Interface ResourceCollection

All Superinterfaces:
AggregatedResource, HasBundle, HasLastModifiedBytes, Resource
All Known Implementing Classes:
DefaultResourceCollection

public interface ResourceCollection
extends AggregatedResource, HasBundle

Collection of resources that are associated with a Bundle. Returned by Bundle.getResourceCollections(). The resource is an aggregation of all files found in BundleConfig.files() and all dependencies discovered looking for @ requires tags. The collection is specifically an aggregation only of the discovered javascript and css.

Author:
Martin Algesten

Method Summary
 Resource getCompressedCss()
          Returns a resource that is the compressed version of the getCss().
 Resource getCompressedJs()
          Returns a resource that is the compressed version of the getJs() .
 byte[] getCss()
          Returns the dependent css files, concatenated in dependency order.
 List<Resource> getExistingCssAggregates()
          Returns the discovered dependent css files that actually exists (doesn't return -1 for Resource.getLastModified()).
 List<Resource> getExistingJsAggregates()
          Returns the discovered dependent javascript files that actually exists (doesn't return -1 for Resource.getLastModified()).
 byte[] getJs()
          Returns the dependent javascript files, concatenated in dependency order.
 
Methods inherited from interface fnug.resource.AggregatedResource
getAggregates, getBasePath, getDependencies
 
Methods inherited from interface fnug.resource.Resource
checkModified, findRequiresTags, getBytes, getContentType, getFullPath, getLastModified, getPath, isCss, isJs
 
Methods inherited from interface fnug.resource.HasBundle
getBundle
 

Method Detail

getJs

byte[] getJs()
Returns the dependent javascript files, concatenated in dependency order. This is the same as calling Resource.getBytes() on the resource.

Returns:
the uncompressed bytes of all the javascript resources.

getCss

byte[] getCss()
Returns the dependent css files, concatenated in dependency order.

Returns:
the uncompressed bytes of all the css resources.

getCompressedJs

Resource getCompressedJs()
Returns a resource that is the compressed version of the getJs() .

Returns:
compressed resource.

getCompressedCss

Resource getCompressedCss()
Returns a resource that is the compressed version of the getCss().

Returns:
compressed resource.

getExistingJsAggregates

List<Resource> getExistingJsAggregates()
Returns the discovered dependent javascript files that actually exists (doesn't return -1 for Resource.getLastModified()).

Returns:
existing dependent javascript files.

getExistingCssAggregates

List<Resource> getExistingCssAggregates()
Returns the discovered dependent css files that actually exists (doesn't return -1 for Resource.getLastModified()).

Returns:
existing dependent css files.


Copyright © 2012. All Rights Reserved.