This project has retired. For details please refer to its Attic page.
MockDefinitionsReader (Tiles 2 2.1.4 Test API)

org.apache.tiles.definition
Class MockDefinitionsReader

Package class diagram package MockDefinitionsReader
java.lang.Object
  extended by org.apache.tiles.definition.MockDefinitionsReader
All Implemented Interfaces:
DefinitionsReader

public class MockDefinitionsReader
extends Object
implements DefinitionsReader

Mock Defintions Reader implementation. Stubs out all functionality.

Version:
$Rev: 784982 $ $Date: 2009-06-15 23:12:59 +0200 (lun, 15 giu 2009) $

Constructor Summary
MockDefinitionsReader()
          Creates a new instance of MockDefinitionsReader.
 
Method Summary
static int getInstanceCount()
          Hokey way to verify that this class was created.
 void init(Map<String,String> params)
          Initializes the DefinitionsReader object.
 Map<String,Definition> read(Object source)
          Reads Definition objects from a source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockDefinitionsReader

public MockDefinitionsReader()
Creates a new instance of MockDefinitionsReader.

Method Detail

getInstanceCount

public static int getInstanceCount()
Hokey way to verify that this class was created.

Returns:
The number of created instances.

read

public Map<String,Definition> read(Object source)
Reads Definition objects from a source. Implementations should publish what type of source object is expected.

Specified by:
read in interface DefinitionsReader
Parameters:
source - The source from which definitions will be read.
Returns:
a Map of Definition objects read from the source.
Throws:
DefinitionsFactoryException - if the source is invalid or an error occurs when reading definitions.

init

public void init(Map<String,String> params)
Initializes the DefinitionsReader object. This method must be called before the read(java.lang.Object) method is called.

Specified by:
init in interface DefinitionsReader
Parameters:
params - A map of properties used to set up the reader.
Throws:
DefinitionsFactoryException - if required properties are not passed in or the initialization fails.


Copyright © 2001-2009 Apache Software Foundation. All Rights Reserved.