Package net.officefloor.web.compile
Class CompileWebContextImpl
- java.lang.Object
-
- net.officefloor.web.compile.CompileWebContextImpl
-
- All Implemented Interfaces:
CompileOfficeContext,CompileWebContext
public class CompileWebContextImpl extends java.lang.Object implements CompileWebContext
CompileWebContextimplementation.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description CompileWebContextImpl(CompileOfficeContext officeContext, WebArchitect webArchitect)Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OfficeManagedObjectaddManagedObject(java.lang.String managedObjectName, java.lang.Class<?> managedObjectClass, ManagedObjectScope scope)Adds anOfficeManagedObjectforClassManagedObjectSource.OfficeSectionaddSection(java.lang.String sectionName, java.lang.Class<?> sectionClass)Adds anOfficeSectionforClassSectionSource.OfficeArchitectgetOfficeArchitect()Obtains theOfficeArchitect.OfficeSectiongetOfficeSection()Obtains theOfficeSection.OfficeSourceContextgetOfficeSourceContext()Obtains theOfficeSourceContext.WebArchitectgetWebArchitect()Obtains theWebArchitect.HttpUrlContinuationlink(boolean isSecure, java.lang.String applicationPath, java.lang.Class<?> sectionClass)Convenience method to link a URI to theservicemethod of theClass.HttpInputlink(boolean isSecure, java.lang.String httpMethodName, java.lang.String applicationPath, java.lang.Class<?> sectionClass)Convenience method to link a URL to theservicemethod of theClass.OfficeSectionoverrideSection(java.lang.Class<? extends SectionSource> sectionSourceClass, java.lang.String sectionLocation)Overrides the defaultOfficeSection.<T> voidvariable(java.lang.String qualifier, java.lang.Class<T> type, java.util.function.Consumer<Var<T>> compileVar)Listens to a variable.
-
-
-
Constructor Detail
-
CompileWebContextImpl
public CompileWebContextImpl(CompileOfficeContext officeContext, WebArchitect webArchitect)
Instantiate.- Parameters:
officeContext-CompileOfficeContext.webArchitect-WebArchitect.
-
-
Method Detail
-
getWebArchitect
public WebArchitect getWebArchitect()
Description copied from interface:CompileWebContextObtains theWebArchitect.- Specified by:
getWebArchitectin interfaceCompileWebContext- Returns:
WebArchitect.
-
getOfficeArchitect
public OfficeArchitect getOfficeArchitect()
Description copied from interface:CompileOfficeContextObtains theOfficeArchitect.- Specified by:
getOfficeArchitectin interfaceCompileOfficeContext- Returns:
OfficeArchitect.
-
getOfficeSourceContext
public OfficeSourceContext getOfficeSourceContext()
Description copied from interface:CompileOfficeContextObtains theOfficeSourceContext.- Specified by:
getOfficeSourceContextin interfaceCompileOfficeContext- Returns:
OfficeSourceContext.
-
addManagedObject
public OfficeManagedObject addManagedObject(java.lang.String managedObjectName, java.lang.Class<?> managedObjectClass, ManagedObjectScope scope)
Description copied from interface:CompileOfficeContextAdds anOfficeManagedObjectforClassManagedObjectSource.- Specified by:
addManagedObjectin interfaceCompileOfficeContext- Parameters:
managedObjectName- Name of theOfficeManagedObject.managedObjectClass-Classfor theClassManagedObjectSource.scope-ManagedObjectScope.- Returns:
OfficeManagedObject.
-
addSection
public OfficeSection addSection(java.lang.String sectionName, java.lang.Class<?> sectionClass)
Description copied from interface:CompileOfficeContextAdds anOfficeSectionforClassSectionSource.- Specified by:
addSectionin interfaceCompileOfficeContext- Parameters:
sectionName- Name of theOfficeSection.sectionClass-Classfor theClassSectionSource.- Returns:
OfficeSection.
-
variable
public <T> void variable(java.lang.String qualifier, java.lang.Class<T> type, java.util.function.Consumer<Var<T>> compileVar)Description copied from interface:CompileOfficeContextListens to a variable.- Specified by:
variablein interfaceCompileOfficeContext- Type Parameters:
T- Variable type.- Parameters:
qualifier- Qualifier for variable. May benull.type- Type for variable.compileVar- TypicalCompileVarto handle value. May, however, be anyConsumerfor the createdVar.
-
getOfficeSection
public OfficeSection getOfficeSection()
Description copied from interface:CompileOfficeContextObtains theOfficeSection.- Specified by:
getOfficeSectionin interfaceCompileOfficeContext- Returns:
OfficeSection.
-
overrideSection
public OfficeSection overrideSection(java.lang.Class<? extends SectionSource> sectionSourceClass, java.lang.String sectionLocation)
Description copied from interface:CompileOfficeContextOverrides the defaultOfficeSection.- Specified by:
overrideSectionin interfaceCompileOfficeContext- Parameters:
sectionSourceClass-SectionSourceClass.sectionLocation- Location of theOfficeSection.- Returns:
- Overridden
OfficeSection.
-
link
public HttpInput link(boolean isSecure, java.lang.String httpMethodName, java.lang.String applicationPath, java.lang.Class<?> sectionClass)
Description copied from interface:CompileWebContextConvenience method to link a URL to theservicemethod of theClass.- Specified by:
linkin interfaceCompileWebContext- Parameters:
isSecure- Indicates if secure.httpMethodName- Name of theHttpMethod.applicationPath- Application path.sectionClass-Classcontaining aservicemethod.- Returns:
HttpInput.
-
link
public HttpUrlContinuation link(boolean isSecure, java.lang.String applicationPath, java.lang.Class<?> sectionClass)
Description copied from interface:CompileWebContextConvenience method to link a URI to theservicemethod of theClass.- Specified by:
linkin interfaceCompileWebContext- Parameters:
isSecure- Indicates if secure.applicationPath- Application path.sectionClass-Classcontaining aservicemethod.- Returns:
HttpUrlContinuation.
-
-