Class AbstractWoofTemplateExtensionSource
- java.lang.Object
-
- net.officefloor.woof.template.impl.AbstractWoofTemplateExtensionSource
-
- All Implemented Interfaces:
WoofTemplateExtensionSource
public abstract class AbstractWoofTemplateExtensionSource extends java.lang.Object implements WoofTemplateExtensionSource
AbstractWoofTemplateExtensionSource
.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
AbstractWoofTemplateExtensionSource.SpecificationContext
Context for theWoofTemplateExtensionSource.getSpecification()
.
-
Constructor Summary
Constructors Constructor Description AbstractWoofTemplateExtensionSource()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Change<?>
createConfigurationChange(WoofTemplateExtensionChangeContext context)
This is only invoked by the WoOF editor to enable managing configuration for theWoofTemplateExtensionSource
.WoofTemplateExtensionSourceSpecification
getSpecification()
Obtains the specification for this.protected abstract void
loadSpecification(AbstractWoofTemplateExtensionSource.SpecificationContext context)
Overridden to load specifications.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.officefloor.woof.template.WoofTemplateExtensionSource
extendTemplate
-
-
-
-
Method Detail
-
getSpecification
public WoofTemplateExtensionSourceSpecification getSpecification()
Description copied from interface:WoofTemplateExtensionSource
Obtains the specification for this.
This will be called before any other methods, therefore this method must be able to return the specification immediately after a default constructor instantiation.
- Specified by:
getSpecification
in interfaceWoofTemplateExtensionSource
- Returns:
- Specification of this.
-
loadSpecification
protected abstract void loadSpecification(AbstractWoofTemplateExtensionSource.SpecificationContext context)
Overridden to load specifications.- Parameters:
context
- Specifications.
-
createConfigurationChange
public Change<?> createConfigurationChange(WoofTemplateExtensionChangeContext context)
Description copied from interface:WoofTemplateExtensionSource
This is only invoked by the WoOF editor to enable managing configuration for the
WoofTemplateExtensionSource
. It is not used during extension of theWebTemplate
.This method is to create a potential
Change
to the configuration necessary for theWoofTemplateExtensionSource
. Should noChange
be required it should returnnull
.WoofTemplateExtensionSource
implementations may require configuration by extra files within the application. This method allows theWoofTemplateExtensionSource
to create/update/delete the files within theConfigurationContext
(i.e. Java raw source project).Note that all actions must be undertaken by the returned
Change
as this method may be invoked to validate configuration. This is to avoid side effects by the WoOF editor.Should configuration of the
WoofTemplateExtensionSource
be invalid, this method should return aChange
with aConflict
instance explaining the reason the configuration is invalid.- Specified by:
createConfigurationChange
in interfaceWoofTemplateExtensionSource
- Parameters:
context
-WoofTemplateExtensionChangeContext
.- Returns:
Change
ornull
if no change is necessary.
-
-