Class GovernanceLoaderImpl
- java.lang.Object
-
- net.officefloor.compile.impl.governance.GovernanceLoaderImpl
-
- All Implemented Interfaces:
GovernanceLoader
,IssueTarget
public class GovernanceLoaderImpl extends java.lang.Object implements GovernanceLoader, IssueTarget
GovernanceLoader
implementation.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description GovernanceLoaderImpl(Node node, OfficeNode officeNode, NodeContext nodeContext, boolean isLoadingType)
Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addIssue(java.lang.String issueDescription)
Adds the issue.void
addIssue(java.lang.String issueDescription, java.lang.Throwable cause)
Adds the issue.<I,F extends java.lang.Enum<F>,GS extends GovernanceSource<I,F>>
GovernanceType<I,F>loadGovernanceType(GS governanceSource, PropertyList properties)
Loads and returns theGovernanceType
from theGovernanceSource
.<I,F extends java.lang.Enum<F>,GS extends GovernanceSource<I,F>>
GovernanceType<I,F>loadGovernanceType(java.lang.Class<GS> governanceSourceClass, PropertyList properties)
Loads and returns theGovernanceType
from theGovernanceSource
class.<I,F extends java.lang.Enum<F>,GS extends GovernanceSource<I,F>>
PropertyListloadSpecification(java.lang.Class<GS> governanceSourceClass)
-
-
-
Constructor Detail
-
GovernanceLoaderImpl
public GovernanceLoaderImpl(Node node, OfficeNode officeNode, NodeContext nodeContext, boolean isLoadingType)
Instantiate.- Parameters:
node
-Node
requiring theGovernance
.officeNode
-OfficeNode
. May benull
if not loading withinOfficeNode
.nodeContext
-NodeContext
.isLoadingType
- Indicates using for loading type.
-
-
Method Detail
-
loadSpecification
public <I,F extends java.lang.Enum<F>,GS extends GovernanceSource<I,F>> PropertyList loadSpecification(java.lang.Class<GS> governanceSourceClass)
Description copied from interface:GovernanceLoader
- Specified by:
loadSpecification
in interfaceGovernanceLoader
- Type Parameters:
I
- Extension interface type.F
- Flow key type.GS
-GovernanceSource
type.- Parameters:
governanceSourceClass
- Class of theGovernanceSource
.- Returns:
PropertyList
of theGovernanceSourceProperty
instances of theGovernanceSourceSpecification
ornull
if issue, which is reported to theCompilerIssues
.
-
loadGovernanceType
public <I,F extends java.lang.Enum<F>,GS extends GovernanceSource<I,F>> GovernanceType<I,F> loadGovernanceType(java.lang.Class<GS> governanceSourceClass, PropertyList properties)
Description copied from interface:GovernanceLoader
Loads and returns theGovernanceType
from theGovernanceSource
class.- Specified by:
loadGovernanceType
in interfaceGovernanceLoader
- Type Parameters:
I
- Extension interface type.F
- Flow key type.GS
-GovernanceSource
type.- Parameters:
governanceSourceClass
- Class of theGovernanceSource
.properties
-PropertyList
containing the properties to source theGovernanceType
.- Returns:
GovernanceType
ornull
if issues, which is reported to theCompilerIssues
.
-
loadGovernanceType
public <I,F extends java.lang.Enum<F>,GS extends GovernanceSource<I,F>> GovernanceType<I,F> loadGovernanceType(GS governanceSource, PropertyList properties)
Description copied from interface:GovernanceLoader
Loads and returns theGovernanceType
from theGovernanceSource
.- Specified by:
loadGovernanceType
in interfaceGovernanceLoader
- Type Parameters:
I
- Extension interface type.F
- Flow key type.GS
-GovernanceSource
type.- Parameters:
governanceSource
-GovernanceSource
.properties
-PropertyList
containing the properties to source theGovernanceType
.- Returns:
GovernanceType
ornull
if issues, which is reported to theCompilerIssues
.
-
addIssue
public void addIssue(java.lang.String issueDescription)
Description copied from interface:IssueTarget
Adds the issue.- Specified by:
addIssue
in interfaceIssueTarget
- Parameters:
issueDescription
- Description of the issue.
-
addIssue
public void addIssue(java.lang.String issueDescription, java.lang.Throwable cause)
Description copied from interface:IssueTarget
Adds the issue.- Specified by:
addIssue
in interfaceIssueTarget
- Parameters:
issueDescription
- Description of the issue.cause
- Cause of the issue.
-
-