net.sourceforge.wurfl.core.resource
Class SpringResource

java.lang.Object
  extended by net.sourceforge.wurfl.core.resource.SpringResource
All Implemented Interfaces:
WURFLResource
Direct Known Subclasses:
SpringXMLResource

public abstract class SpringResource
extends Object
implements WURFLResource

Decorator of WURFLResource to build from Spring Resource.

Version:
$Id: SpringResource.java 432 2010-05-06 12:12:53Z filippo.deluca $
Author:
Fantayeneh Asres Gizaw, Filippo De Luca

Field Summary
protected  WURFLResource delegate
          Delegate WURFLResource
 
Constructor Summary
SpringResource(org.springframework.core.io.Resource resource)
          Build resource from Spring Resource.
 
Method Summary
protected abstract  WURFLResource createDelegate(org.springframework.core.io.Resource resource)
          Create delegate WURFLResource from Spring Resource.
 boolean equals(Object obj)
           
 ResourceData getData()
          Return ResourceData representing the data contained by the resource.
 String getInfo()
          Get info of this resource.
 int hashCode()
           
 void release()
          Release the resource.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

delegate

protected WURFLResource delegate
Delegate WURFLResource

Constructor Detail

SpringResource

public SpringResource(org.springframework.core.io.Resource resource)
Build resource from Spring Resource.

Parameters:
resource - The Spring Resource to build resource from.
Method Detail

createDelegate

protected abstract WURFLResource createDelegate(org.springframework.core.io.Resource resource)
Create delegate WURFLResource from Spring Resource.

Parameters:
resource - The Spring Resource from that build WURFLResource.
Returns:
WURFLResource delegate.

getData

public ResourceData getData()
Return ResourceData representing the data contained by the resource.

Specified by:
getData in interface WURFLResource
Returns:
ResourceData instance

getInfo

public String getInfo()
Get info of this resource.

Specified by:
getInfo in interface WURFLResource
Returns:
A String represent a info for this resource.

release

public void release()
Release the resource.

Specified by:
release in interface WURFLResource

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2008-2010 WURFL-Pro srl. All Rights Reserved.