use of org.qi4j.bootstrap.EntityDeclaration in project qi4j-sdk by Qi4j.
the class SchedulerAssembler method assemble.
@Override
public void assemble(ModuleAssembly assembly) throws AssemblyException {
assembly.services(ScheduleFactory.class);
assembly.entities(Schedules.class);
EntityDeclaration scheduleEntities = assembly.entities(CronSchedule.class, OnceSchedule.class);
ValueDeclaration scheduleValues = assembly.values(CronSchedule.class, OnceSchedule.class);
ServiceDeclaration schedulerDeclaration = assembly.services(SchedulerService.class).visibleIn(visibility()).instantiateOnStartup();
if (timeline) {
scheduleEntities.withTypes(Timeline.class).withMixins(TimelineScheduleMixin.class).withConcerns(TimelineForScheduleConcern.class);
scheduleValues.withTypes(Timeline.class).withMixins(TimelineScheduleMixin.class).withConcerns(TimelineForScheduleConcern.class);
// Internal
assembly.values(TimelineRecord.class);
schedulerDeclaration.withTypes(Timeline.class).withMixins(TimelineSchedulerServiceMixin.class);
}
if (hasConfig()) {
configModule().entities(SchedulerConfiguration.class).visibleIn(configVisibility());
}
}
Aggregations