Class ClassGovernance
- java.lang.Object
-
- net.officefloor.plugin.governance.clazz.ClassGovernance
-
- All Implemented Interfaces:
Governance<java.lang.Object,Indexed>
public class ClassGovernance extends java.lang.Object implements Governance<java.lang.Object,Indexed>
Class
Governance
.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description ClassGovernance(java.lang.Object instance, java.lang.reflect.Method governMethod, java.lang.reflect.Method enforceMethod, java.lang.reflect.Method disregardMethod)
Initiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
disregardGovernance(GovernanceContext<Indexed> context)
DisregardGovernance
of theManagedObject
instances.void
enforceGovernance(GovernanceContext<Indexed> context)
void
governManagedObject(java.lang.Object extensionInterface, GovernanceContext<Indexed> context)
Registers theManagedObject
forGovernance
.
-
-
-
Constructor Detail
-
ClassGovernance
public ClassGovernance(java.lang.Object instance, java.lang.reflect.Method governMethod, java.lang.reflect.Method enforceMethod, java.lang.reflect.Method disregardMethod)
Initiate.- Parameters:
instance
- Instance of theClass
.governMethod
-Method
for governing theManagedObject
.enforceMethod
-Method
to enforce theGovernance
.disregardMethod
-Method
to disregard theGovernance
. May benull
if no functionality required for disregarding.
-
-
Method Detail
-
governManagedObject
public void governManagedObject(java.lang.Object extensionInterface, GovernanceContext<Indexed> context) throws java.lang.Throwable
Description copied from interface:Governance
Registers theManagedObject
forGovernance
.- Specified by:
governManagedObject
in interfaceGovernance<java.lang.Object,Indexed>
- Parameters:
extensionInterface
- Extension of theManagedObject
to enableGovernance
.context
-GovernanceContext
.- Throws:
java.lang.Throwable
- If fails to govern theManagedObject
.
-
enforceGovernance
public void enforceGovernance(GovernanceContext<Indexed> context) throws java.lang.Throwable
Description copied from interface:Governance
- Specified by:
enforceGovernance
in interfaceGovernance<java.lang.Object,Indexed>
- Parameters:
context
-GovernanceContext
.- Throws:
java.lang.Throwable
- If fails to enforceGovernance
.
-
disregardGovernance
public void disregardGovernance(GovernanceContext<Indexed> context) throws java.lang.Throwable
Description copied from interface:Governance
DisregardGovernance
of theManagedObject
instances.- Specified by:
disregardGovernance
in interfaceGovernance<java.lang.Object,Indexed>
- Parameters:
context
-GovernanceContext
.- Throws:
java.lang.Throwable
- If fails to disregardGovernance
.
-
-