eu.europa.tmsearch.services.dao
Class ResourceDAOSupport

java.lang.Object
  extended by eu.europa.tmsearch.services.dao.ResourceDAOSupport
All Implemented Interfaces:
Cacheable, ResourceDAO, org.springframework.context.ApplicationContextAware

public abstract class ResourceDAOSupport
extends java.lang.Object
implements ResourceDAO, Cacheable, org.springframework.context.ApplicationContextAware

A DAO implementation for file system resources.


Constructor Summary
ResourceDAOSupport()
           
 
Method Summary
 java.util.Date getExpires(java.lang.String applicationNumber)
           
 java.util.Date getLastModified(java.lang.String resourcePath)
           
 byte[] getResource(java.lang.String resourcePath)
          Gets a resource from the underlying data store given a URI
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceDAOSupport

public ResourceDAOSupport()
Method Detail

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException

getResource

public byte[] getResource(java.lang.String resourcePath)
                   throws ResourceNotFoundException
Gets a resource from the underlying data store given a URI

Specified by:
getResource in interface ResourceDAO
Parameters:
resourcePath -
Returns:
A byte[] containing the file resource
Throws:
ResourceNotFoundException

getLastModified

public java.util.Date getLastModified(java.lang.String resourcePath)
                               throws ResourceNotFoundException
Specified by:
getLastModified in interface Cacheable
Throws:
ResourceNotFoundException

getExpires

public java.util.Date getExpires(java.lang.String applicationNumber)
Specified by:
getExpires in interface Cacheable


Copyright © 2009. All Rights Reserved.