Package net.officefloor.woof.template
Class WoofTemplateExtensionLoaderImpl
- java.lang.Object
-
- net.officefloor.woof.template.WoofTemplateExtensionLoaderImpl
-
- All Implemented Interfaces:
WoofTemplateExtensionLoader
public class WoofTemplateExtensionLoaderImpl extends java.lang.Object implements WoofTemplateExtensionLoader
WoofTemplateExtensionLoader
implementation.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WoofTemplateExtensionLoaderImpl.LoadSpecification
static class
WoofTemplateExtensionLoaderImpl.RefactorTemplateExtension
OfficeFloorCompilerRunnable
to refactor theWoofTemplateExtensionSource
.
-
Constructor Summary
Constructors Constructor Description WoofTemplateExtensionLoaderImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
extendTemplate(WoofTemplateExtensionSource extensionSource, PropertyList properties, java.lang.String templatePath, WebTemplate template, OfficeArchitect officeArchitect, WebArchitect webArchitect, SourceContext sourceContext)
Extends theWebTemplate
with theWoofTemplateExtensionSource
.PropertyList
loadSpecification(java.lang.String woofTemplateExtensionSourceClassName, java.lang.ClassLoader classLoader, CompilerIssues issues)
Loads and returns thePropertyList
from theWoofTemplateExtensionSourceSpecification
for theWoofTemplateExtensionSource
.Change<?>
refactorTemplateExtension(java.lang.String woofTemplateExtensionSourceClassName, java.lang.String oldUri, SourceProperties oldProperties, java.lang.String newUri, SourceProperties newProperties, ConfigurationContext configurationContext, SourceContext sourceContext, WoofChangeIssues issues)
Refactors theWoofTemplateExtensionSource
for theWoofTemplateModel
.
-
-
-
Method Detail
-
loadSpecification
public PropertyList loadSpecification(java.lang.String woofTemplateExtensionSourceClassName, java.lang.ClassLoader classLoader, CompilerIssues issues)
Description copied from interface:WoofTemplateExtensionLoader
Loads and returns thePropertyList
from theWoofTemplateExtensionSourceSpecification
for theWoofTemplateExtensionSource
.- Specified by:
loadSpecification
in interfaceWoofTemplateExtensionLoader
- Parameters:
woofTemplateExtensionSourceClassName
-WoofTemplateExtensionSource
class name.classLoader
-ClassLoader
to use in loading the specification.issues
-CompilerIssues
to report any issues in attempting to obtain thePropertyList
.- Returns:
PropertyList
of theWoofTemplateExtensionSourceProperty
instances of theWoofTemplateExtensionSourceSpecification
ornull
if issue, which is reported to theCompilerIssues
.
-
refactorTemplateExtension
public Change<?> refactorTemplateExtension(java.lang.String woofTemplateExtensionSourceClassName, java.lang.String oldUri, SourceProperties oldProperties, java.lang.String newUri, SourceProperties newProperties, ConfigurationContext configurationContext, SourceContext sourceContext, WoofChangeIssues issues)
Description copied from interface:WoofTemplateExtensionLoader
Refactors theWoofTemplateExtensionSource
for theWoofTemplateModel
.- Specified by:
refactorTemplateExtension
in interfaceWoofTemplateExtensionLoader
- Parameters:
woofTemplateExtensionSourceClassName
-WoofTemplateExtensionSource
class name.oldUri
- Old URI. May benull
if addingWoofTemplateExtensionSource
.oldProperties
- OldSourceProperties
.newUri
- New URI. May benull
if removing theWoofTemplateExtensionSource
.newProperties
- NewSourceProperties
.configurationContext
-ConfigurationContext
.sourceContext
-SourceContext
.issues
-WoofChangeIssues
.- Returns:
Change
to refactor theWoofTemplateExtensionSource
for theWoofTemplateModel
.
-
extendTemplate
public void extendTemplate(WoofTemplateExtensionSource extensionSource, PropertyList properties, java.lang.String templatePath, WebTemplate template, OfficeArchitect officeArchitect, WebArchitect webArchitect, SourceContext sourceContext) throws WoofTemplateExtensionException
Description copied from interface:WoofTemplateExtensionLoader
Extends theWebTemplate
with theWoofTemplateExtensionSource
.- Specified by:
extendTemplate
in interfaceWoofTemplateExtensionLoader
- Parameters:
extensionSource
-WoofTemplateExtensionSource
.properties
-PropertyList
to configure theWoofTemplateExtensionSource
.templatePath
- Application path to theWebTemplate
.template
-WebTemplate
to be extended.officeArchitect
-OfficeArchitect
.webArchitect
-WebArchitect
.sourceContext
-SourceContext
.- Throws:
WoofTemplateExtensionException
- If fails to extend theWebTemplate
.
-
-