Class SmartWroModelFactory
java.lang.Object
ro.isdc.wro.model.factory.AbstractWroModelFactory
ro.isdc.wro.extensions.model.factory.SmartWroModelFactory
- All Implemented Interfaces:
WroModelFactory,ObjectFactory<WroModel>
When used, this factory will make it possible to migrate easily from xml to groovy (or json) DSL seamlessly.
- Since:
- 1.4.0
- Author:
- Alex Objelean
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate()static SmartWroModelFactoryUse this factory method when you want to use theSmartWroModelFactoryin standalone (maven plugin) context.protected StringgetClassName(Class<? extends WroModelFactory> factoryClass) protected Stringprotected InputStreamprotected List<WroModelFactory>setAutoDetectWroFile(boolean autoDetectWroFile) In order to keep backward compatibility for building the model .setFactoryList(List<WroModelFactory> factoryList) setWroFile(File wroFile) The file to use for creating model.Methods inherited from class ro.isdc.wro.model.factory.AbstractWroModelFactory
destroy
-
Field Details
-
ALIAS
Alias for this model factory used by provider.- See Also:
-
-
Constructor Details
-
SmartWroModelFactory
public SmartWroModelFactory()
-
-
Method Details
-
createFromStandaloneContext
Use this factory method when you want to use theSmartWroModelFactoryin standalone (maven plugin) context. The autoDetect flag is set to true if the wroFile path is the same as the default wro file name. -
setWroFile
The file to use for creating model. It is not required to set this field, but if you set, do not set a null object.- Parameters:
wroFile- the wroFile to set
-
newWroModelFactoryFactoryList
- Returns:
- default list of factories to be used by
SmartWroModelFactory.
-
create
-
getClassName
- Returns:
- string representation of the factory name.
-
setFactoryList
- Parameters:
factoryList- the factoryList to set
-
setAutoDetectWroFile
In order to keep backward compatibility for building the model . The idea is if this field is false, then the exact file will be used to create the model, otherwise, wro model file is auto-detected based on the parent folder where the wroFile is located.- Parameters:
autoDetectWroFile- the autoDetectWroFile to set
-
getDefaultModelFilename
- Specified by:
getDefaultModelFilenamein classAbstractWroModelFactory
-
getModelResourceAsStream
- Overrides:
getModelResourceAsStreamin classAbstractWroModelFactory- Throws:
IOException
-