ro.isdc.wro.model.factory
Class AbstractWroModelFactory

java.lang.Object
  extended by ro.isdc.wro.model.factory.AbstractWroModelFactory
All Implemented Interfaces:
WroModelFactory, ObjectFactory<WroModel>
Direct Known Subclasses:
GroovyModelFactory, JsonModelFactory, SmartWroModelFactory, XmlModelFactory

public abstract class AbstractWroModelFactory
extends Object
implements WroModelFactory

To be used by the implementations which load the model from a resource provided as stream.

Since:
1.4.0
Author:
Alex Objelean

Constructor Summary
AbstractWroModelFactory()
           
 
Method Summary
 void destroy()
          Called to indicate that the factory is being taken out of service.
protected abstract  String getDefaultModelFilename()
           
protected  InputStream getModelResourceAsStream()
          Override this method, in order to provide different xml definition file name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ro.isdc.wro.util.ObjectFactory
create
 

Constructor Detail

AbstractWroModelFactory

public AbstractWroModelFactory()
Method Detail

getModelResourceAsStream

protected InputStream getModelResourceAsStream()
                                        throws IOException
Override this method, in order to provide different xml definition file name.

Returns:
stream of the xml representation of the model.
Throws:
IOException - if the stream couldn't be read.

getDefaultModelFilename

protected abstract String getDefaultModelFilename()
Returns:
the default name of the file describing the wro model.

destroy

public void destroy()
Called to indicate that the factory is being taken out of service.

Specified by:
destroy in interface WroModelFactory


Copyright © 2008-2013. All Rights Reserved.