scriptella.configuration
Class ContentEl

java.lang.Object
  extended by scriptella.configuration.XmlConfigurableBase
      extended by scriptella.configuration.ContentEl
All Implemented Interfaces:
XmlConfigurable, Resource
Direct Known Subclasses:
FallbackEl

public class ContentEl
extends XmlConfigurableBase
implements Resource

TODO: Add documentation

Version:
1.0
Author:
Fyodor Kupolov

Field Summary
static Resource NULL_CONTENT
          Null-Object to use instead of null if necessary
 
Constructor Summary
ContentEl()
           
ContentEl(XmlElement element)
           
 
Method Summary
 void configure(XmlElement element)
          Configures the class using specified XML element.
 java.util.List<Resource> getResources()
          Returns resources represented by this content.
 java.io.Reader open()
          Opens a resource and returns a content reader.
 java.lang.String toString()
           
 
Methods inherited from class scriptella.configuration.XmlConfigurableBase
assertRequiredFieldPresent, assertRequiredFieldPresent, findGetter, findSetter, getLocation, load, loadClass, setLocation, setLocation, setPatternProperty, setPatternProperty, setProperty, setProperty, setRequiredProperty, setRequiredProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL_CONTENT

public static final Resource NULL_CONTENT
Null-Object to use instead of null if necessary

Constructor Detail

ContentEl

public ContentEl()

ContentEl

public ContentEl(XmlElement element)
Method Detail

open

public java.io.Reader open()
                    throws java.io.IOException
Description copied from interface: Resource
Opens a resource and returns a content reader.

The returned reader implementation should be effective enough to allow usage without extra buffering, etc.

Specified by:
open in interface Resource
Returns:
resource content reader
Throws:
java.io.IOException - if I/O error occurs.

configure

public void configure(XmlElement element)
Description copied from interface: XmlConfigurable
Configures the class using specified XML element.

Specified by:
configure in interface XmlConfigurable
Parameters:
element - XML element.

getResources

public java.util.List<Resource> getResources()
Returns resources represented by this content.

Returns:
list of resources represented by this content.

toString

public java.lang.String toString()
Specified by:
toString in interface Resource
Overrides:
toString in class java.lang.Object
Returns:
location of content or meaningful description.


Copyright © Copyright 2006-2009 The Scriptella Project Team.