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
WebTemplateLoaderimplementation.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description WebTemplateLoaderImpl()Instantiate forOfficeFloorCompilerRunnable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompileErroraddIssue(java.lang.String issueDescription)Allows the source to add an issue.CompileErroraddIssue(java.lang.String issueDescription, java.lang.Throwable cause)Allows the source to add an issue along with its cause.protected WebTemplateaddTemplate(boolean isSecure, java.lang.String applicationPath, PropertyList properties)Adds theWebTemplate.protected PropertyListcreatePropertyList()Creates aPropertyList.protected SourceIssuesgetSourceIssues()Obtains theSourceIssues.protected booleanisPathParameters(java.lang.String applicationPath)Indicates if path parameters.WebTemplateTypeloadWebTemplateType(WebTemplate webTemplate)Loads theWebTemplateTypefor theWebTemplate.WebTemplateLoaderrun(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:OfficeFloorCompilerRunnableContains the runnable functionality.- Specified by:
runin interfaceOfficeFloorCompilerRunnable<WebTemplateLoader>- Parameters:
compiler-OfficeFloorCompilerloaded with theClassLoader.parameters- Parameters. AsProxyinstances are used to bridgeClasscompatibility issues of using differentClassLoaderinstances, 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:SourceIssuesAllows the source to add an issue.
This is available to report invalid configuration.
- Specified by:
addIssuein interfaceSourceIssues- Parameters:
issueDescription- Description of the issue.- Returns:
CompileErrorto be used inthrowstatement when addingCompilerIssueto avoid further compiling.
-
addIssue
public CompileError addIssue(java.lang.String issueDescription, java.lang.Throwable cause)
Description copied from interface:SourceIssuesAllows the source to add an issue along with its cause.
This is available to report invalid configuration.
- Specified by:
addIssuein interfaceSourceIssues- Parameters:
issueDescription- Description of the issue.cause- Cause of the issue.- Returns:
CompileErrorto be used inthrowstatement when addingCompilerIssueto avoid further compiling.
-
createPropertyList
protected PropertyList createPropertyList()
Description copied from class:AbstractWebTemplateFactoryCreates aPropertyList.- Specified by:
createPropertyListin classAbstractWebTemplateFactory- Returns:
- New
PropertyList.
-
getSourceIssues
protected SourceIssues getSourceIssues()
Description copied from class:AbstractWebTemplateFactoryObtains theSourceIssues.- Specified by:
getSourceIssuesin classAbstractWebTemplateFactory- Returns:
SourceIssues.
-
isPathParameters
protected boolean isPathParameters(java.lang.String applicationPath)
Description copied from class:AbstractWebTemplateFactoryIndicates if path parameters.- Specified by:
isPathParametersin classAbstractWebTemplateFactory- Parameters:
applicationPath- Application path.- Returns:
trueif path parameters.
-
addTemplate
protected WebTemplate addTemplate(boolean isSecure, java.lang.String applicationPath, PropertyList properties)
Description copied from class:AbstractWebTemplateFactoryAdds theWebTemplate.- Specified by:
addTemplatein classAbstractWebTemplateFactory- Parameters:
isSecure- Indicates if requires secureServerHttpConnectionto render theWebTemplate.applicationPath- Application path to theWebTemplate. May contain path parameters.properties- InitialPropertiesfor theWebTemplatethat should be further configured by the returnedWebTemplateimplementation.- Returns:
WebTemplate.
-
loadWebTemplateType
public WebTemplateType loadWebTemplateType(WebTemplate webTemplate)
Description copied from interface:WebTemplateLoaderLoads theWebTemplateTypefor theWebTemplate.- Specified by:
loadWebTemplateTypein interfaceWebTemplateLoader- Parameters:
webTemplate- ConfiguredWebTemplateto provide the type information.- Returns:
WebTemplateTypefor theWebTemplate.
-
-