void postEvent(final AbstractLifecycleEvent<Object> event, final Object pojo) { event.setSource(pojo); eventBusService.post(event); } //endregion
/** * Whether or not this link type is supported. * * <p> * Allows users of this module to be able to turn off/on contributions. * </p> */ public boolean supportsLink(final PR polymorphicReference) { final E event = instantiateEvent(eventSource, null, polymorphicReference); eventBusService.post(event); final Class<? extends L> subtype = event.getSubtype(); return subtype != null; }
/** * Installs all {{@link #addFixture(Object) added fixtures} fixtures (ie as * returned by {@link #getFixtures()}). * * <p> * The set of fixtures (as per {@link #getFixtures()}) is <i>not</i> cleared * after installation; the intention being to allow the * {@link org.apache.isis.core.runtime.fixtures.FixturesInstallerAbstract} to be * reused across multiple tests (REVIEW: does that make sense?) */ public void installFixtures() { final IsisConfiguration configuration = getConfiguration(); final boolean fireEvents = configuration.getBoolean("isis.fixtures.fireEvents", true); final EventBusService eventBusService = getEventBusService(); try { if(fireEvents) { eventBusService.post(new FixturesInstallingEvent(this)); } installFixtures(Collections.unmodifiableList(fixtures)); } finally { if(fireEvents) { eventBusService.post(new FixturesInstalledEvent(this)); } } }
@Action( restrictTo = RestrictTo.PROTOTYPING ) @MemberOrder(sequence="10") @Override public List<FixtureResult> runFixtureScript( final FixtureScript fixtureScript, @ParameterLayout( named = "Parameters", describedAs = "Script-specific parameters (if any). The format depends on the script implementation (eg key=value, CSV, JSON, XML etc)", multiLine = 10) @Parameter(optionality = Optionality.OPTIONAL) final String parameters) { try { eventBusService.post(new FixturesInstallingEvent(this)); return super.runFixtureScript(fixtureScript, parameters); } finally { eventBusService.post(new FixturesInstalledEvent(this)); } }
eventBusService.post(event);