net.officefloor.compile.impl.governance
Class GovernanceLoaderImpl

java.lang.Object
  extended by net.officefloor.compile.impl.governance.GovernanceLoaderImpl
All Implemented Interfaces:
GovernanceLoader

public class GovernanceLoaderImpl
extends Object
implements GovernanceLoader

GovernanceLoader implementation.

Author:
Daniel Sagenschneider

Constructor Summary
GovernanceLoaderImpl(NodeContext nodeContext)
          Initiate from OfficeFloorCompiler.
GovernanceLoaderImpl(String officeLocation, String governanceName, NodeContext nodeContext)
          Initiate for building.
 
Method Summary
<I,F extends Enum<F>,GS extends GovernanceSource<I,F>>
GovernanceType<I,F>
loadGovernanceType(Class<GS> governanceSourceClass, PropertyList properties)
          Loads and returns the GovernanceType from the GovernanceSource class.
<I,F extends Enum<F>,GS extends GovernanceSource<I,F>>
PropertyList
loadSpecification(Class<GS> governanceSourceClass)
          Loads and returns the PropertyList from the GovernanceSourceSpecification for the GovernanceSource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GovernanceLoaderImpl

public GovernanceLoaderImpl(String officeLocation,
                            String governanceName,
                            NodeContext nodeContext)
Initiate for building.

Parameters:
officeLocation - Location of the Office.
governanceName - Name of the Governance.
nodeContext - NodeContext.

GovernanceLoaderImpl

public GovernanceLoaderImpl(NodeContext nodeContext)
Initiate from OfficeFloorCompiler.

Parameters:
nodeContext - NodeContext.
Method Detail

loadSpecification

public <I,F extends Enum<F>,GS extends GovernanceSource<I,F>> PropertyList loadSpecification(Class<GS> governanceSourceClass)
Description copied from interface: GovernanceLoader
Loads and returns the PropertyList from the GovernanceSourceSpecification for the GovernanceSource.

Specified by:
loadSpecification in interface GovernanceLoader
Parameters:
governanceSourceClass - Class of the GovernanceSource.
Returns:
PropertyList of the GovernanceSourceProperty instances of the GovernanceSourceSpecification or null if issue, which is reported to the CompilerIssues.

loadGovernanceType

public <I,F extends Enum<F>,GS extends GovernanceSource<I,F>> GovernanceType<I,F> loadGovernanceType(Class<GS> governanceSourceClass,
                                                                                                     PropertyList properties)
Description copied from interface: GovernanceLoader
Loads and returns the GovernanceType from the GovernanceSource class.

Specified by:
loadGovernanceType in interface GovernanceLoader
Parameters:
governanceSourceClass - Class of the GovernanceSource.
properties - PropertyList containing the properties to source the GovernanceType.
Returns:
GovernanceType or null if issues, which is reported to the CompilerIssues.


Copyright © 2005-2013. All Rights Reserved.