Class ClassProcedureSource
- java.lang.Object
-
- net.officefloor.activity.impl.procedure.ClassProcedureSource
-
- All Implemented Interfaces:
ProcedureSource
public class ClassProcedureSource extends java.lang.Object implements ProcedureSource
ProcedureSource
forClass
.- Author:
- Daniel Sagenschneider
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SOURCE_NAME
Source name.
-
Constructor Summary
Constructors Constructor Description ClassProcedureSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getSourceName()
Name of this source.void
listProcedures(ProcedureListContext context)
Provides the availableProcedure
instances for the resource.java.lang.reflect.Method
loadMethod(ProcedureMethodContext context)
Loads theMethod
for theProcedure
.
-
-
-
Field Detail
-
SOURCE_NAME
public static final java.lang.String SOURCE_NAME
Source name.- See Also:
- Constant Field Values
-
-
Method Detail
-
getSourceName
public java.lang.String getSourceName()
Description copied from interface:ProcedureSource
Name of this source.
Note that this is the name used in configuration to identify this
ProcedureSource
. Therefore, it can not change without causing configurations to be updated.The reasons for using this logical name over
Class
names is:- Class names can be quite long
- Class names are not easily readable
- Enables swapping plugins for same logical service name
- Specified by:
getSourceName
in interfaceProcedureSource
- Returns:
- Name of this source.
-
listProcedures
public void listProcedures(ProcedureListContext context)
Description copied from interface:ProcedureSource
Provides the availableProcedure
instances for the resource.- Specified by:
listProcedures
in interfaceProcedureSource
- Parameters:
context
-ProcedureListContext
.
-
loadMethod
public java.lang.reflect.Method loadMethod(ProcedureMethodContext context) throws java.lang.Exception
Description copied from interface:ProcedureSource
Loads theMethod
for theProcedure
.- Specified by:
loadMethod
in interfaceProcedureSource
- Parameters:
context
-ProcedureMethodContext
.- Returns:
Method
for theProcedureSource
.- Throws:
java.lang.Exception
- If fails to load the method.
-
-