private void fireContractRejectedEvent(UserBean rejector, String rejectionReason, ContractBean contract, OrganizationBean orgC,
                                           ClientVersionBean cvb, OrganizationBean orgA, ApiVersionBean avb, PlanVersionBean plan) {
        ApimanEventHeaders headers = ApimanEventHeaders
                .builder()
                .setId(UUID.randomUUID().toString().substring(8))
                .setSource(URI.create("/apiman/events/contracts/approvals"))
                .setSubject("rejection")
                .build();

        var event = ContractApprovalEvent
                .builder()
                .setApprover(userMapper.toDto(rejector))
                .setApproved(false)
                .setRejectionReason(rejectionReason)
                .setHeaders(headers)
                .setClientOrgId(orgC.getId())
                .setClientId(cvb.getClient().getId())
                .setClientVersion(cvb.getVersion())
                .setApiOrgId(orgA.getId())
                .setApiId(avb.getApi().getId())
                .setApiVersion(avb.getVersion())
                .setContractId(String.valueOf(contract.getId()))
                .setPlanId(plan.getPlan().getId())
                .setPlanVersion(plan.getVersion())
                .build();

        LOGGER.debug("Sending contract rejected response event: {0}", event);
        eventService.fireEvent(event);
    }
Actions like publish, register, re-register, etc.

NB: Might fold this into respective services later.

@author Marc Savy {@literal <marc@blackparrotlabs.io>}
manager/api/rest-impl/src/main/java/io/apiman/manager/api/service/ActionService.java