Class AnnotationBasedProcessFactory

java.lang.Object
org.adempiere.base.AnnotationBasedFactory
org.adempiere.base.AnnotationBasedProcessFactory
All Implemented Interfaces:
IProcessFactory
Direct Known Subclasses:
DefaultAnnotationBasedProcessFactory, ProcessFactoryImpl

public abstract class AnnotationBasedProcessFactory extends AnnotationBasedFactory implements IProcessFactory
Scan, discover and register process classes.
Process class will be registered using class name. You can use the optional Process annotation to register a process class with an additional name (for e.g to replace a core process class).
Author:
hengsin
  • Constructor Details

    • AnnotationBasedProcessFactory

      public AnnotationBasedProcessFactory()
  • Method Details

    • getPackages

      protected abstract String[] getPackages()
      Subclasses must override this method in order to provide packages to scan, discover and register process classes
      Returns:
      array of packages to be accepted during class scanning
      See Also:
      • ClassGraph.acceptPackagesNonRecursive(String...)
    • activate

      public void activate(org.osgi.service.component.ComponentContext context) throws ClassNotFoundException
      Scan annotation upon activation of component
      Parameters:
      context -
      Throws:
      ClassNotFoundException
    • newProcessInstance

      public ProcessCall newProcessInstance(String className)
      Description copied from interface: IProcessFactory
      Create new process instance
      Specified by:
      newProcessInstance in interface IProcessFactory
      Returns:
      new ProcessCall instance