Class AbstractGovernanceSource<I,F extends java.lang.Enum<F>>
- java.lang.Object
-
- net.officefloor.compile.spi.governance.source.impl.AbstractGovernanceSource<I,F>
-
- All Implemented Interfaces:
GovernanceSource<I,F>
- Direct Known Subclasses:
ClassGovernanceSource
,SpringDataTransactionGovernanceSource
public abstract class AbstractGovernanceSource<I,F extends java.lang.Enum<F>> extends java.lang.Object implements GovernanceSource<I,F>
AbstractGovernanceSource
.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
AbstractGovernanceSource.Labeller
Provides the ability to label theFlow
.static interface
AbstractGovernanceSource.MetaDataContext<I,F extends java.lang.Enum<F>>
Context for theGovernanceSource.init(GovernanceSourceContext)
.static interface
AbstractGovernanceSource.SpecificationContext
Context for thegetSpecification()
.
-
Constructor Summary
Constructors Constructor Description AbstractGovernanceSource()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description GovernanceSourceSpecification
getSpecification()
Obtains the specification for this.GovernanceSourceMetaData<I,F>
init(GovernanceSourceContext context)
Initialises theGovernanceSource
.protected abstract void
loadMetaData(AbstractGovernanceSource.MetaDataContext<I,F> context)
Overridden to load meta-data.protected abstract void
loadSpecification(AbstractGovernanceSource.SpecificationContext context)
Overridden to load specification.
-
-
-
Method Detail
-
getSpecification
public GovernanceSourceSpecification getSpecification()
Description copied from interface:GovernanceSource
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 interfaceGovernanceSource<I,F extends java.lang.Enum<F>>
- Returns:
- Specification of this.
-
loadSpecification
protected abstract void loadSpecification(AbstractGovernanceSource.SpecificationContext context)
Overridden to load specification.- Parameters:
context
- Specifications.
-
init
public GovernanceSourceMetaData<I,F> init(GovernanceSourceContext context) throws java.lang.Exception
Description copied from interface:GovernanceSource
Initialises theGovernanceSource
.- Specified by:
init
in interfaceGovernanceSource<I,F extends java.lang.Enum<F>>
- Parameters:
context
-GovernanceSourceContext
to initialise this instance of theGovernanceSource
.- Returns:
- Meta-data to describe this.
- Throws:
java.lang.Exception
- Should theGovernanceSource
fail to configure itself from the input properties.
-
loadMetaData
protected abstract void loadMetaData(AbstractGovernanceSource.MetaDataContext<I,F> context) throws java.lang.Exception
Overridden to load meta-data.- Parameters:
context
- Meta-data.- Throws:
java.lang.Exception
- If fails to load the meta-data.
-
-