org.efaps.ui.wicket.resources
Class AbstractEFapsResource.AbstractEFapsResourceStream

java.lang.Object
  extended by org.efaps.ui.wicket.resources.AbstractEFapsResource.AbstractEFapsResourceStream
All Implemented Interfaces:
Closeable, Serializable, org.apache.wicket.IClusterable, org.apache.wicket.util.resource.IResourceStream, org.apache.wicket.util.watch.IModifiable
Direct Known Subclasses:
XSLResource.XSLResourceStream
Enclosing class:
AbstractEFapsResource

protected abstract class AbstractEFapsResource.AbstractEFapsResourceStream
extends Object
implements org.apache.wicket.util.resource.IResourceStream

Abstract class implementing the IResourceStream. It is used to retreive an InputStream from Data based on an Object from the eFaps-DataBase.

See Also:
Serialized Form

Constructor Summary
AbstractEFapsResource.AbstractEFapsResourceStream()
          constructor that stores the time of the instanciation.
 
Method Summary
protected  void checkData(boolean _checkDuration)
          method that checks if the data was allready retrieved from the eFaps-DataBase or if it must be reloaded due to cache expire.
 void close()
          close the resource.
 InputStream getInputStream()
          get the underlying inputstream.
 Locale getLocale()
           
 org.apache.wicket.util.time.Time lastModifiedTime()
          Gets the last time this modifiable thing changed.
 long length()
          Gets the size of this resource in bytes.
protected  void setData()
          set the Data into the instance variable data.
 void setLocale(Locale _locale)
          This method shouldn't be used for the outside, It is used by the Loaders to set the resolved locale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.wicket.util.resource.IResourceStream
getContentType
 

Constructor Detail

AbstractEFapsResource.AbstractEFapsResourceStream

public AbstractEFapsResource.AbstractEFapsResourceStream()
constructor that stores the time of the instanciation.

Method Detail

close

public void close()
           throws IOException
close the resource.

Specified by:
close in interface Closeable
Specified by:
close in interface org.apache.wicket.util.resource.IResourceStream
Throws:
IOException - on error

getInputStream

public InputStream getInputStream()
                           throws org.apache.wicket.util.resource.ResourceStreamNotFoundException
get the underlying inputstream.

Specified by:
getInputStream in interface org.apache.wicket.util.resource.IResourceStream
Returns:
InputStream
Throws:
org.apache.wicket.util.resource.ResourceStreamNotFoundException - on error

getLocale

public Locale getLocale()
Specified by:
getLocale in interface org.apache.wicket.util.resource.IResourceStream
Returns:
The Locale where this stream did resolve to

length

public long length()
Gets the size of this resource in bytes.

Specified by:
length in interface org.apache.wicket.util.resource.IResourceStream
Returns:
The size of this resource in the number of bytes, or -1 if unknown

setLocale

public void setLocale(Locale _locale)
This method shouldn't be used for the outside, It is used by the Loaders to set the resolved locale.

Specified by:
setLocale in interface org.apache.wicket.util.resource.IResourceStream
Parameters:
_locale - The Locale where this stream did resolve to.

lastModifiedTime

public org.apache.wicket.util.time.Time lastModifiedTime()
Gets the last time this modifiable thing changed.

Specified by:
lastModifiedTime in interface org.apache.wicket.util.watch.IModifiable
Returns:
the last modification Time

checkData

protected void checkData(boolean _checkDuration)
method that checks if the data was allready retrieved from the eFaps-DataBase or if it must be reloaded due to cache expire.

Parameters:
_checkDuration - should be checked if the cache is expired or not

setData

protected void setData()
set the Data into the instance variable data.



Copyright © 2003-2011 The eFaps Team. All Rights Reserved.