Search in sources :

Example 1 with JobByteCodeScanner

use of act.job.bytecode.JobByteCodeScanner in project actframework by actframework.

the class App method loadBuiltInScanners.

private void loadBuiltInScanners() {
    scannerManager.register(new GenieModuleScanner());
    scannerManager.register(new ClassInfoByteCodeScanner());
    scannerManager.register(new ClassFinderByteCodeScanner());
    scannerManager.register(new ControllerByteCodeScanner());
    scannerManager.register(new MailerByteCodeScanner());
    scannerManager.register(new JobByteCodeScanner());
    scannerManager.register(new Password.ByteCodeScanner());
    scannerManager.register(new SimpleBean.ByteCodeScanner());
    scannerManager.register(new SimpleEventListenerByteCodeScanner());
    scannerManager.register(new CommanderByteCodeScanner());
    scannerManager.register(new EntityInfoByteCodeScanner());
    scannerManager.register(new RythmTransformerScanner());
    scannerManager.register(new MetricContextScanner());
    scannerManager.register(new ImplicitVariableProvider.TemplateVariableScanner(this));
    scannerManager.register(new ConfigurationByteCodeScanner());
}
Also used : JobByteCodeScanner(act.job.bytecode.JobByteCodeScanner) ControllerByteCodeScanner(act.controller.bytecode.ControllerByteCodeScanner) MetricContextScanner(act.metric.MetricContextScanner) CommanderByteCodeScanner(act.cli.bytecode.CommanderByteCodeScanner) ConfigurationByteCodeScanner(act.conf.ConfigurationByteCodeScanner) GenieModuleScanner(act.inject.genie.GenieModuleScanner) ImplicitVariableProvider(act.view.ImplicitVariableProvider) RythmTransformerScanner(act.view.rythm.RythmTransformerScanner) EntityInfoByteCodeScanner(act.db.meta.EntityInfoByteCodeScanner) SimpleEventListenerByteCodeScanner(act.event.bytecode.SimpleEventListenerByteCodeScanner) MailerByteCodeScanner(act.mail.bytecode.MailerByteCodeScanner) Password(act.validation.Password)

Example 2 with JobByteCodeScanner

use of act.job.bytecode.JobByteCodeScanner in project actframework by actframework.

the class ControllerByteCodeScannerTest method setup.

@Before
public void setup() throws Exception {
    super.setup();
    controllerScanner = new ControllerByteCodeScanner();
    jobScanner = new JobByteCodeScanner();
    scannerManager = mock(AppCodeScannerManager.class);
    classInfoRepository = mock(ClassInfoRepository.class);
    eventBus = mock(EventBus.class);
    when(mockApp.eventBus()).thenReturn(eventBus);
    jobManager = new JobManager(mockApp);
    classLoader = new TestingAppClassLoader(mockApp);
    $.setProperty(classLoader, classInfoRepository, "classInfoRepository");
    when(mockApp.classLoader()).thenReturn(classLoader);
    infoSrc = classLoader.controllerClassMetaInfoManager();
    when(mockApp.classLoader()).thenReturn(classLoader);
    when(mockApp.scannerManager()).thenReturn(scannerManager);
    when(mockApp.jobManager()).thenReturn(jobManager);
    when(mockAppConfig.possibleControllerClass(anyString())).thenReturn(true);
    when(mockRouter.isActionMethod(anyString(), anyString())).thenReturn(false);
    C.List<AppByteCodeScanner> scanners = $.cast(C.listOf(controllerScanner, jobScanner));
    // C.List<AppByteCodeScanner> scanners = C.list(controllerScanner);
    when(scannerManager.byteCodeScanners()).thenReturn(scanners);
    paramValueLoaderManager = mock(ParamValueLoaderManager.class);
    when(mockApp.service(ParamValueLoaderManager.class)).thenReturn(paramValueLoaderManager);
    controllerScanner.setApp(mockApp);
    jobScanner.setApp(mockApp);
    base = new File("./target/test-classes");
}
Also used : AppCodeScannerManager(act.app.AppCodeScannerManager) C(org.osgl.util.C) AppByteCodeScanner(act.app.AppByteCodeScanner) JobByteCodeScanner(act.job.bytecode.JobByteCodeScanner) ParamValueLoaderManager(act.inject.param.ParamValueLoaderManager) TestingAppClassLoader(act.app.TestingAppClassLoader) EventBus(act.event.EventBus) JobManager(act.job.JobManager) ClassInfoRepository(act.util.ClassInfoRepository) File(java.io.File) Before(org.junit.Before)

Aggregations

JobByteCodeScanner (act.job.bytecode.JobByteCodeScanner)2 AppByteCodeScanner (act.app.AppByteCodeScanner)1 AppCodeScannerManager (act.app.AppCodeScannerManager)1 TestingAppClassLoader (act.app.TestingAppClassLoader)1 CommanderByteCodeScanner (act.cli.bytecode.CommanderByteCodeScanner)1 ConfigurationByteCodeScanner (act.conf.ConfigurationByteCodeScanner)1 ControllerByteCodeScanner (act.controller.bytecode.ControllerByteCodeScanner)1 EntityInfoByteCodeScanner (act.db.meta.EntityInfoByteCodeScanner)1 EventBus (act.event.EventBus)1 SimpleEventListenerByteCodeScanner (act.event.bytecode.SimpleEventListenerByteCodeScanner)1 GenieModuleScanner (act.inject.genie.GenieModuleScanner)1 ParamValueLoaderManager (act.inject.param.ParamValueLoaderManager)1 JobManager (act.job.JobManager)1 MailerByteCodeScanner (act.mail.bytecode.MailerByteCodeScanner)1 MetricContextScanner (act.metric.MetricContextScanner)1 ClassInfoRepository (act.util.ClassInfoRepository)1 Password (act.validation.Password)1 ImplicitVariableProvider (act.view.ImplicitVariableProvider)1 RythmTransformerScanner (act.view.rythm.RythmTransformerScanner)1 File (java.io.File)1