1. Domino Brix
  2. Presenter lifecycle
  3. Activation & authorization

activate()

Activation starts when the route matches. Brix checks authorization, registers listeners, marks the presenter active, and attempts to reveal the view.

  • Authorization: getAuthorizer().isAuthorized(...); unauthorized calls reportUnAuthorizedAccess().
  • Listeners: slot listener (for reveal), event listener (for @ListenFor), navigation interceptor if the view confirms navigation.
  • Active flag: onActivated() fires, then auto-reveal runs if enabled.

Authorizers

Use built-ins or custom authorizers to control access.

			@Override
public Set<String> getRoles() { return Set.of("admin"); }

@Override
public Authorizer getAuthorizer() {
  return RolesAllowedAuthorizer.INSTANCE;
}

		

Branches

  • Slot not registered yet: activation completes, reveal waits until onSlotRegistered.
  • Child presenter: may defer until parent is active.
  • Disable activation entirely by overriding isEnabled() and returning false.

We are a group of passionate people who love what we do

Donate & Support Us