Package org.mifosplatform.infrastructure.hooks.event

Examples of org.mifosplatform.infrastructure.hooks.event.HookEventSource


     
      final String authToken = ThreadLocalContextUtil.getAuthToken();
      final String tenantIdentifier = ThreadLocalContextUtil.getTenant().getTenantIdentifier();
      final AppUser appUser = this.context.authenticatedUser();
     
      final HookEventSource hookEventSource = new HookEventSource(entityName, actionName);
     
      final String serializedResult = this.toApiResultJsonSerializer.serialize(result);
     
      final HookEvent applicationEvent =
          new HookEvent(hookEventSource, serializedResult, tenantIdentifier, appUser, authToken);
View Full Code Here


    ThreadLocalContextUtil.setTenant(tenant);

    final AppUser appUser = event.getAppUser();
    final String authToken = event.getAuthToken();

    final HookEventSource hookEventSource = event.getSource();
    final String entityName = hookEventSource.getEntityName();
    final String actionName = hookEventSource.getActionName();
    final String payload = event.getPayload();
   
    final List<Hook> hooks = this.hookReadPlatformService
            .retrieveHooksByEvent(hookEventSource.getEntityName(),
                    hookEventSource.getActionName());

    for (final Hook hook : hooks) {
      final HookProcessor processor = this.hookProcessorProvider
          .getProcessor(hook);
      processor.process(hook, appUser, payload, entityName, actionName,
View Full Code Here

TOP

Related Classes of org.mifosplatform.infrastructure.hooks.event.HookEventSource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.