Class WebTemplateLoaderImpl
- java.lang.Object
-
- net.officefloor.web.template.build.AbstractWebTemplateFactory
-
- net.officefloor.web.template.type.WebTemplateLoaderImpl
-
- All Implemented Interfaces:
SourceIssues
,OfficeFloorCompilerRunnable<WebTemplateLoader>
,WebTemplateFactory
,WebTemplateLoader
public class WebTemplateLoaderImpl extends AbstractWebTemplateFactory implements OfficeFloorCompilerRunnable<WebTemplateLoader>, WebTemplateLoader, SourceIssues
WebTemplateLoader
implementation.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description WebTemplateLoaderImpl()
Instantiate forOfficeFloorCompilerRunnable
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompileError
addIssue(java.lang.String issueDescription)
Allows the source to add an issue.CompileError
addIssue(java.lang.String issueDescription, java.lang.Throwable cause)
Allows the source to add an issue along with its cause.protected WebTemplate
addTemplate(boolean isSecure, java.lang.String applicationPath, PropertyList properties)
Adds theWebTemplate
.protected PropertyList
createPropertyList()
Creates aPropertyList
.protected SourceIssues
getSourceIssues()
Obtains theSourceIssues
.protected boolean
isPathParameters(java.lang.String applicationPath)
Indicates if path parameters.WebTemplateType
loadWebTemplateType(WebTemplate webTemplate)
Loads theWebTemplateType
for theWebTemplate
.WebTemplateLoader
run(OfficeFloorCompiler compiler, java.lang.Object[] parameters)
Contains the runnable functionality.-
Methods inherited from class net.officefloor.web.template.build.AbstractWebTemplateFactory
addTemplate, addTemplate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.officefloor.web.template.build.WebTemplateFactory
addTemplate, addTemplate
-
-
-
-
Constructor Detail
-
WebTemplateLoaderImpl
public WebTemplateLoaderImpl()
Instantiate forOfficeFloorCompilerRunnable
.
-
-
Method Detail
-
run
public WebTemplateLoader run(OfficeFloorCompiler compiler, java.lang.Object[] parameters) throws java.lang.Exception
Description copied from interface:OfficeFloorCompilerRunnable
Contains the runnable functionality.- Specified by:
run
in interfaceOfficeFloorCompilerRunnable<WebTemplateLoader>
- Parameters:
compiler
-OfficeFloorCompiler
loaded with theClassLoader
.parameters
- Parameters. AsProxy
instances are used to bridgeClass
compatibility issues of using differentClassLoader
instances, parameters should only be referenced by their implementing interfaces.- Returns:
- Result from runnable.
- Throws:
java.lang.Exception
- If failure in running.
-
addIssue
public CompileError addIssue(java.lang.String issueDescription)
Description copied from interface:SourceIssues
Allows the source to add an issue.
This is available to report invalid configuration.
- Specified by:
addIssue
in interfaceSourceIssues
- Parameters:
issueDescription
- Description of the issue.- Returns:
CompileError
to be used inthrow
statement when addingCompilerIssue
to avoid further compiling.
-
addIssue
public CompileError addIssue(java.lang.String issueDescription, java.lang.Throwable cause)
Description copied from interface:SourceIssues
Allows the source to add an issue along with its cause.
This is available to report invalid configuration.
- Specified by:
addIssue
in interfaceSourceIssues
- Parameters:
issueDescription
- Description of the issue.cause
- Cause of the issue.- Returns:
CompileError
to be used inthrow
statement when addingCompilerIssue
to avoid further compiling.
-
createPropertyList
protected PropertyList createPropertyList()
Description copied from class:AbstractWebTemplateFactory
Creates aPropertyList
.- Specified by:
createPropertyList
in classAbstractWebTemplateFactory
- Returns:
- New
PropertyList
.
-
getSourceIssues
protected SourceIssues getSourceIssues()
Description copied from class:AbstractWebTemplateFactory
Obtains theSourceIssues
.- Specified by:
getSourceIssues
in classAbstractWebTemplateFactory
- Returns:
SourceIssues
.
-
isPathParameters
protected boolean isPathParameters(java.lang.String applicationPath)
Description copied from class:AbstractWebTemplateFactory
Indicates if path parameters.- Specified by:
isPathParameters
in classAbstractWebTemplateFactory
- Parameters:
applicationPath
- Application path.- Returns:
true
if path parameters.
-
addTemplate
protected WebTemplate addTemplate(boolean isSecure, java.lang.String applicationPath, PropertyList properties)
Description copied from class:AbstractWebTemplateFactory
Adds theWebTemplate
.- Specified by:
addTemplate
in classAbstractWebTemplateFactory
- Parameters:
isSecure
- Indicates if requires secureServerHttpConnection
to render theWebTemplate
.applicationPath
- Application path to theWebTemplate
. May contain path parameters.properties
- InitialProperties
for theWebTemplate
that should be further configured by the returnedWebTemplate
implementation.- Returns:
WebTemplate
.
-
loadWebTemplateType
public WebTemplateType loadWebTemplateType(WebTemplate webTemplate)
Description copied from interface:WebTemplateLoader
Loads theWebTemplateType
for theWebTemplate
.- Specified by:
loadWebTemplateType
in interfaceWebTemplateLoader
- Parameters:
webTemplate
- ConfiguredWebTemplate
to provide the type information.- Returns:
WebTemplateType
for theWebTemplate
.
-
-