Ejemplo n.º 1
0
  protected void callDeleteTeamListeners(TeamModel team) {
    if (pluginManager == null || team == null) {
      return;
    }

    for (UserTeamLifeCycleListener listener :
        pluginManager.getExtensions(UserTeamLifeCycleListener.class)) {
      try {
        listener.onDeletion(team);
      } catch (Throwable t) {
        logger.error(String.format("failed to call plugin.onDeletion %s", team.name), t);
      }
    }
  }
Ejemplo n.º 2
0
  protected void callCreateUserListeners(UserModel user) {
    if (pluginManager == null || user == null) {
      return;
    }

    for (UserTeamLifeCycleListener listener :
        pluginManager.getExtensions(UserTeamLifeCycleListener.class)) {
      try {
        listener.onCreation(user);
      } catch (Throwable t) {
        logger.error(String.format("failed to call plugin.onCreation%s", user.username), t);
      }
    }
  }