org.jasig.resource.aggr
Class ResourcesDaoImpl

java.lang.Object
  extended by org.jasig.resource.aggr.ResourcesDaoImpl
All Implemented Interfaces:
ResourcesDao

public class ResourcesDaoImpl
extends Object
implements ResourcesDao

Version:
$Revision: 21797 $
Author:
Eric Dalquist

Nested Class Summary
 class ResourcesDaoImpl.CssResourceLoadCallback
           
 class ResourcesDaoImpl.JsResourceLoadCallback
           
static interface ResourcesDaoImpl.ResourceLoadCallback<T extends BasicInclude>
           
 
Field Summary
static String DEFAULT_ENCODING
           
protected  org.apache.commons.logging.Log logger
           
 
Fields inherited from interface org.jasig.resource.aggr.ResourcesDao
AGGREGATED_SKIN_SUB_SUFFIX
 
Constructor Summary
ResourcesDaoImpl()
           
ResourcesDaoImpl(org.apache.commons.logging.Log logger, String encoding)
           
ResourcesDaoImpl(String encoding)
           
 
Method Summary
 String getAggregatedSkinName(String skinXmlName)
           
 boolean isAbsolute(BasicInclude include)
           
 boolean isConditional(BasicInclude include)
           
protected
<T extends BasicInclude>
void
loadIncludes(File resourcesParentDir, List<T> resources, ResourcesDaoImpl.ResourceLoadCallback<T> callback)
           
 Resources readResources(File resourcesXml)
          Load the specified XML file into a Resources object.
 Resources readResources(File resourcesXml, Included scope)
          Load the specified XML file into a Resources and filter its contents based on the specified scope
 void setLoadedResources(Map<File,Resources> loadedResources)
          Map used to cache loaded resources, must be thread-safe
 void writeResources(Resources resources, File file)
          Write the specified Resources object to the specified File as XML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_ENCODING

public static final String DEFAULT_ENCODING
See Also:
Constant Field Values

logger

protected final org.apache.commons.logging.Log logger
Constructor Detail

ResourcesDaoImpl

public ResourcesDaoImpl()

ResourcesDaoImpl

public ResourcesDaoImpl(String encoding)

ResourcesDaoImpl

public ResourcesDaoImpl(org.apache.commons.logging.Log logger,
                        String encoding)
Method Detail

setLoadedResources

public void setLoadedResources(Map<File,Resources> loadedResources)
Map used to cache loaded resources, must be thread-safe


writeResources

public void writeResources(Resources resources,
                           File file)
Description copied from interface: ResourcesDao
Write the specified Resources object to the specified File as XML

Specified by:
writeResources in interface ResourcesDao

readResources

public Resources readResources(File resourcesXml,
                               Included scope)
Description copied from interface: ResourcesDao
Load the specified XML file into a Resources and filter its contents based on the specified scope

Specified by:
readResources in interface ResourcesDao

readResources

public Resources readResources(File resourcesXml)
Description copied from interface: ResourcesDao
Load the specified XML file into a Resources object.

Specified by:
readResources in interface ResourcesDao

getAggregatedSkinName

public String getAggregatedSkinName(String skinXmlName)
Specified by:
getAggregatedSkinName in interface ResourcesDao

isAbsolute

public boolean isAbsolute(BasicInclude include)
Specified by:
isAbsolute in interface ResourcesDao

isConditional

public boolean isConditional(BasicInclude include)
Specified by:
isConditional in interface ResourcesDao

loadIncludes

protected <T extends BasicInclude> void loadIncludes(File resourcesParentDir,
                                                     List<T> resources,
                                                     ResourcesDaoImpl.ResourceLoadCallback<T> callback)


Copyright © 2010 Jasig. All Rights Reserved.