Fires an abort event to all listeners.<p>

@param userId the id of the user that aborted the job
@param publishJob the publish job that is going to be aborted.
551876
protected void fireAbort(CmsUUID userId, CmsPublishJobEnqueued publishJob) {

        if (LOG.isDebugEnabled()) {
            LOG.debug(Messages.get().getBundle().key(Messages.LOG_PUBLISH_JOB_ABORT_0));
        }
        for (Iterator<I_CmsPublishEventListener> it = iterator(); it.hasNext();) {
            I_CmsPublishEventListener listener = it.next();
            try {
                listener.onAbort(userId, publishJob);
            } catch (Throwable t) {
                // catch every thing including runtime exceptions
                if (LOG.isErrorEnabled()) {
                    LOG.error(
                        Messages.get().getBundle().key(
                            Messages.ERR_PUBLISH_JOB_ABORT_ERROR_1,
                            listener.getClass().getName()),
                        t);
                }
                if (publishJob.m_publishJob.getPublishReport() != null) {
                    publishJob.m_publishJob.getPublishReport().println(t);
                }
            }
        }
        if ((userId != null) && userId.equals(publishJob.getUserId())) {
            // prevent showing messages if the owner aborted the job by himself
            return;
        }
        // popup the abort message
        String msgText = Messages.get().getBundle(publishJob.getLocale()).key(
            Messages.GUI_PUBLISH_JOB_ABORTED_2,
            new Long(publishJob.getEnqueueTime()),
            m_publishEngine.getUser(userId).getName());
        m_publishEngine.sendMessage(publishJob.getUserId(), msgText, true);
    }
345273
public void executeDirectly(String jobId) {

        final CmsScheduledJobInfo jobInfo = (CmsScheduledJobInfo)getJob(jobId).clone();
        if (jobInfo == null) {
            LOG.error(Messages.get().getBundle().key(Messages.LOG_INVALID_JOB_1, "null"));
            return;
        }
        Thread thread = new Thread() {

            /**
             * @see java.lang.Thread#run()
             */
            @Override
            public void run() {

                executeJob(jobInfo);
            }
        };
        thread.start();
    }
1270681
public static void fire(I_CmsHasToggleHandlers source, boolean isActivated) {

        if (TYPE != null) {
            CmsToggleEvent event = new CmsToggleEvent(isActivated);
            source.fireEvent(event);
        }
    }
462146
protected void doPublishEvent(final ApplicationEvent e) {
        if (applicationEventPublisher != null) {
            LOGGER.trace("Publishing [{}]", e);
            this.applicationEventPublisher.publishEvent(e);
        }
    }
529029
@Async
    public void fireEventAsync(Object publisher, FireAfterTransactionAsynchronous events) throws Exception {
        for (int i = 0; i < events.events().length; i++) {
            Class<? extends EventObject> event = events.events()[i];
            if (RootApplicationEvent.class.isAssignableFrom(event)) {
                LOGGER.debug("Sending event: [{}]", event);
                ctx.publishEvent((RootApplicationEvent) event.getConstructor(Object.class).newInstance(publisher));
            }
        }
    }
527503
public void blockUser(Integer userId) throws GitLabApiException {
        if (userId == null) {
            throw new RuntimeException("userId cannot be null");
        }

        if (isApiVersion(ApiVersion.V3)) {
            put(Response.Status.CREATED, null, "users", userId, "block");
        } else {
            post(Response.Status.CREATED, (Form) null, "users", userId, "block");
        }
    }
1166403
private void publishEvent(WSJobExecution objectToPublish, String eventToPublishTo) {
        if (getBatchEventsPublisher() != null) {
            getBatchEventsPublisher().publishJobExecutionEvent(objectToPublish, eventToPublishTo, correlationId);
        }
    }
1201940
void cancelAssignDistributionSetEvent(final Target target, final Long actionId) {
        afterCommit.afterCommit(
                () -> eventPublisher.publishEvent(new CancelTargetAssignmentEvent(target, actionId, bus.getId())));
    }
1122639
protected void checkPublishQueue() {

        // check the publish manager if the current thread is still active
        try {
            CmsPublishManager publishManager = OpenCms.getPublishManager();
            if (publishManager == null) {
                // this can happen during shutdown
                return;
            }
            // get the current publish job
            CmsPublishJobRunning publishJob = publishManager.getCurrentPublishJob();
            if (publishJob == null) {
                // try to start next job
                publishManager.checkCurrentPublishJobThread();
                return;
            }
            // get the thread id of the current publish job
            CmsUUID uid = publishJob.getThreadUUID();
            if ((uid == null) || (uid.isNullUUID())) {
                return;
            }
            // find the thread
            A_CmsReportThread thread = m_threads.get(uid);
            if (thread == null) {
                return;
            }
            // check if the report still has output and so is active
            if ((System.currentTimeMillis() - thread.getLastEntryTime()) > (UPDATE_MINUTES_INTERVAL
                * ONE_MINUTE_IN_MILLIS)) {
                // remove it
                m_threads.remove(thread);
                // abandon thread
                publishManager.abandonThread();
            }
        } catch (Throwable t) {
            LOG.error(Messages.get().getBundle().key(Messages.LOG_THREADSTORE_CHECK_PUBLISH_THREAD_ERROR_0), t);
        }
    }
837483
protected void fireTCAbortUser(Dialog tcapDialog, MAPUserAbortChoice mapUserAbortChoice,
            MAPExtensionContainer mapExtensionContainer, boolean returnMessageOnError) throws MAPException {

        if (this.getTCAPProvider().getPreviewMode()) {
            return;
        }

        if (tcapDialog.getApplicationContextName() == null) // MAP V1
            this.fireTCAbortV1(tcapDialog, returnMessageOnError);

        TCUserAbortRequest tcUserAbort = this.getTCAPProvider().getDialogPrimitiveFactory().createUAbort(tcapDialog);

        MAPUserAbortInfoImpl mapUserAbortInfoImpl = new MAPUserAbortInfoImpl();
        mapUserAbortInfoImpl.setMAPUserAbortChoice(mapUserAbortChoice);
        mapUserAbortInfoImpl.setExtensionContainer(mapExtensionContainer);

        AsnOutputStream localasnOs = new AsnOutputStream();
        mapUserAbortInfoImpl.encodeAll(localasnOs);

        UserInformation userInformation = TcapFactory.createUserInformation();

        userInformation.setOid(true);
        userInformation.setOidValue(MAPDialogueAS.MAP_DialogueAS.getOID());

        userInformation.setAsn(true);
        userInformation.setEncodeType(localasnOs.toByteArray());
        if (returnMessageOnError)
            tcUserAbort.setReturnMessageOnError(true);

        tcUserAbort.setUserInformation(userInformation);

        try {
            tcapDialog.send(tcUserAbort);
        } catch (TCAPSendException e) {
            throw new MAPException(e.getMessage(), e);
        }

    }
1178266
protected void fireEnqueued(CmsPublishJobBase publishJob) {

        if (LOG.isDebugEnabled()) {
            LOG.debug(Messages.get().getBundle().key(Messages.LOG_PUBLISH_JOB_ENQUEUE_0));
        }
        for (Iterator<I_CmsPublishEventListener> it = iterator(); it.hasNext();) {
            I_CmsPublishEventListener listener = it.next();
            try {
                listener.onEnqueue(publishJob);
            } catch (Throwable t) {
                // catch every thing including runtime exceptions
                if (LOG.isErrorEnabled()) {
                    LOG.error(
                        Messages.get().getBundle().key(
                            Messages.ERR_PUBLISH_JOB_ENQUEUE_ERROR_1,
                            listener.getClass().getName()),
                        t);
                }
                if (publishJob.m_publishJob.getPublishReport() != null) {
                    publishJob.m_publishJob.getPublishReport().println(t);
                }
            }
        }
    }
1161800
public void setMuted(long userId, boolean muted) {
        if (muted) {
            this.muted.add(userId);
        } else {
            this.muted.remove(userId);
        }
    }
1020672
public void removeUserEventListener(UserEventListener listener)
   {
      SecurityHelper.validateSecurityPermission(PermissionConstants.MANAGE_LISTENERS);
      listeners.remove(listener);
   }
212113
public function delete($userid)
	{
		$event = new Event('onPlatformUserDelete');
		$event->addArgument('userid', $userid);
		$event->addArgument('activePlugin', $this->activePlugin);

		Factory::getDispatcher()->triggerEvent($event);

		$debug = $event->getArgument('debug', null);
		if ($debug) {
			$this->debug[] = $debug;
		}

		$error = $event->getArgument('error', null);
		if ($error) {
			$this->error[] = $error;
		}
	}
822909
public static void fire(final HasHiddenHandlers source) {
        if (TYPE != null) {
            HiddenEvent event = new HiddenEvent();
            source.fireEvent(event);
        }
    }
720733
public void onPost(final GitHubTriggerEvent event) {
        if (Objects.isNull(job)) {
            return; // nothing to do
        }

        Job<?, ?> currentJob = notNull(job, "Job can't be null");

        final String pushBy = event.getTriggeredByUser();
        DescriptorImpl d = getDescriptor();
        d.checkThreadPoolSizeAndUpdateIfNecessary();
        d.queue.execute(new Runnable() {
            private boolean runPolling() {
                try {
                    StreamTaskListener listener = new StreamTaskListener(getLogFileForJob(currentJob));

                    try {
                        PrintStream logger = listener.getLogger();

                        long start = System.currentTimeMillis();
                        logger.println("Started on " + DateFormat.getDateTimeInstance().format(new Date()));
                        if (event.getOrigin() != null) {
                            logger.format("Started by event from %s on %tc%n", event.getOrigin(), event.getTimestamp());
                        }
                        SCMTriggerItem item = SCMTriggerItems.asSCMTriggerItem(currentJob);
                        if (null == item) {
                            throw new IllegalStateException("Job is not an SCMTriggerItem: " + currentJob);
                        }
                        boolean result = item.poll(listener).hasChanges();
                        logger.println("Done. Took " + Util.getTimeSpanString(System.currentTimeMillis() - start));
                        if (result) {
                            logger.println("Changes found");
                        } else {
                            logger.println("No changes");
                        }
                        return result;
                    } catch (Error e) {
                        e.printStackTrace(listener.error("Failed to record SCM polling"));
                        LOGGER.error("Failed to record SCM polling", e);
                        throw e;
                    } catch (RuntimeException e) {
                        e.printStackTrace(listener.error("Failed to record SCM polling"));
                        LOGGER.error("Failed to record SCM polling", e);
                        throw e;
                    } finally {
                        listener.close();
                    }
                } catch (IOException e) {
                    LOGGER.error("Failed to record SCM polling", e);
                }
                return false;
            }

            public void run() {
                if (runPolling()) {
                    GitHubPushCause cause;
                    try {
                        cause = new GitHubPushCause(getLogFileForJob(currentJob), pushBy);
                    } catch (IOException e) {
                        LOGGER.warn("Failed to parse the polling log", e);
                        cause = new GitHubPushCause(pushBy);
                    }

                    if (asParameterizedJobMixIn(currentJob).scheduleBuild(cause)) {
                        LOGGER.info("SCM changes detected in " + currentJob.getFullName()
                                + ". Triggering #" + currentJob.getNextBuildNumber());
                    } else {
                        LOGGER.info("SCM changes detected in " + currentJob.getFullName()
                                + ". Job is already in the queue");
                    }
                }
            }
        });
    }
125375
public void cancelFaxJob(FaxJob faxJob)
    {
        //validate fax job ID
        this.invokeFaxJobIDValidation(faxJob);
        
        //invoke action
        this.cancelFaxJobImpl(faxJob);
        
        //fire event
        this.fireFaxEvent(FaxClientActionEventID.CANCEL_FAX_JOB,faxJob);
    }