ro.isdc.wro.model.factory
Class FallbackAwareWroModelFactory

java.lang.Object
  extended by ro.isdc.wro.util.AbstractDecorator<WroModelFactory>
      extended by ro.isdc.wro.model.factory.WroModelFactoryDecorator
          extended by ro.isdc.wro.model.factory.FallbackAwareWroModelFactory
All Implemented Interfaces:
WroModelFactory, ObjectDecorator<WroModelFactory>, ObjectFactory<WroModel>

public class FallbackAwareWroModelFactory
extends WroModelFactoryDecorator

An XmlModelFactory that handles the situation when the wro model cannot be loaded at some point (resource cannot be located or the model is invalid). It holds the last known good model and reuse it until a new valid instance of model is available.

Author:
Alex Objelean

Constructor Summary
FallbackAwareWroModelFactory(WroModelFactory decorated)
           
 
Method Summary
 WroModel create()
          
 
Methods inherited from class ro.isdc.wro.model.factory.WroModelFactoryDecorator
destroy
 
Methods inherited from class ro.isdc.wro.util.AbstractDecorator
getDecoratedObject, getOriginalDecoratedObject, getOriginalDecoratedObject, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FallbackAwareWroModelFactory

public FallbackAwareWroModelFactory(WroModelFactory decorated)
Parameters:
decorated - WroModelFactory to decorated.
Method Detail

create

public WroModel create()

Specified by:
create in interface ObjectFactory<WroModel>
Overrides:
create in class WroModelFactoryDecorator


Copyright © 2008-2013. All Rights Reserved.