For IntelliJ IDEA,
Android Studio or Eclipse



protected ContentMarshallerContext getMarshallerContext(String deploymentId, String processId) { DeployedUnit deployedUnit = deploymentService.getDeployedUnit(deploymentId); if (deployedUnit == null) { return new ContentMarshallerContext(); } InternalRuntimeManager manager = (InternalRuntimeManager) deployedUnit.getRuntimeManager(); return new ContentMarshallerContext(manager.getEnvironment().getEnvironment(), manager.getEnvironment().getClassLoader()); }
@Override public AuditService getAuditService() { if (auditService == null) { boolean usePersistence = ((InternalRuntimeManager)manager).getEnvironment().usePersistence(); if (usePersistence) { auditService = new JPAAuditLogService(getKieSession().getEnvironment()); } else { throw new UnsupportedOperationException("AuditService was not configured, supported only with persistence"); } } return auditService; }
protected ClassLoader getClassLoader(String deploymentId) { ClassLoader cl = Thread.currentThread().getContextClassLoader(); if (deploymentId == null) { return cl; } InternalRuntimeManager manager = ((InternalRuntimeManager)RuntimeManagerRegistry.get().getManager(deploymentId)); if (manager != null && manager.getEnvironment().getClassLoader() != null) { cl = manager.getEnvironment().getClassLoader(); } return cl; }
@Override public void signalEvent(String deploymentId, String signalName, Object event) { DeployedUnit deployedUnit = deploymentService.getDeployedUnit(deploymentId); if (deployedUnit == null) { throw new DeploymentNotFoundException("No deployments available for " + deploymentId); } RuntimeManager manager = deployedUnit.getRuntimeManager(); event = process(event, ((InternalRuntimeManager) manager).getEnvironment().getClassLoader()); manager.signalEvent(signalName, event); }
protected Map<String, Object> getParametersMap(InternalRuntimeManager runtimeManager) { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("runtimeManager", runtimeManager); parameters.put("classLoader", runtimeManager.getEnvironment().getClassLoader()); parameters.put("entityManagerFactory", ((SimpleRuntimeEnvironment)runtimeManager.getEnvironment()).getEmf()); parameters.put("kieContainer", runtimeManager.getKieContainer()); return parameters; } }
protected ContentMarshallerContext getMarshallerContext(String deploymentId, String processId) { DeployedUnit deployedUnit = deploymentService.getDeployedUnit(deploymentId); if (deployedUnit == null) { return new ContentMarshallerContext(); } InternalRuntimeManager manager = (InternalRuntimeManager) deployedUnit.getRuntimeManager(); return new ContentMarshallerContext(manager.getEnvironment().getEnvironment(), manager.getEnvironment().getClassLoader()); }
@Override public AuditService getAuditService() { if (auditService == null) { boolean usePersistence = ((InternalRuntimeManager)manager).getEnvironment().usePersistence(); if (usePersistence) { auditService = new JPAAuditLogService(getKieSession().getEnvironment()); } else { throw new UnsupportedOperationException("AuditService was not configured, supported only with persistence"); } } return auditService; }
protected ClassLoader getClassLoader(String deploymentId) { ClassLoader cl = Thread.currentThread().getContextClassLoader(); if (deploymentId == null) { return cl; } InternalRuntimeManager manager = ((InternalRuntimeManager)RuntimeManagerRegistry.get().getManager(deploymentId)); if (manager != null && manager.getEnvironment().getClassLoader() != null) { cl = manager.getEnvironment().getClassLoader(); } return cl; }
@Override public AuditService getAuditService() { if (auditService == null) { boolean usePersistence = ((InternalRuntimeManager)manager).getEnvironment().usePersistence(); if (usePersistence) { auditService = new JPAAuditLogService(getKieSession().getEnvironment()); } else { throw new UnsupportedOperationException("AuditService was not configured, supported only with persistence"); } } return auditService; }
protected ClassLoader getClassLoader(String deploymentId) { ClassLoader cl = Thread.currentThread().getContextClassLoader(); if (deploymentId == null) { return cl; } InternalRuntimeManager manager = ((InternalRuntimeManager)RuntimeManagerRegistry.get().getManager(deploymentId)); if (manager != null && manager.getEnvironment().getClassLoader() != null) { cl = manager.getEnvironment().getClassLoader(); } return cl; }
protected ContentMarshallerContext getMarshallerContext(String deploymentId, String processId) { DeployedUnit deployedUnit = deploymentService.getDeployedUnit(deploymentId); if (deployedUnit == null) { return new ContentMarshallerContext(); } InternalRuntimeManager manager = (InternalRuntimeManager) deployedUnit.getRuntimeManager(); return new ContentMarshallerContext(manager.getEnvironment().getEnvironment(), manager.getEnvironment().getClassLoader()); }
@Override public void signalEvent(String deploymentId, String signalName, Object event) { DeployedUnit deployedUnit = deploymentService.getDeployedUnit(deploymentId); if (deployedUnit == null) { throw new DeploymentNotFoundException("No deployments available for " + deploymentId); } RuntimeManager manager = deployedUnit.getRuntimeManager(); event = process(event, ((InternalRuntimeManager) manager).getEnvironment().getClassLoader()); manager.signalEvent(signalName, event); }
protected Map<String, Object> getParametersMap(InternalRuntimeManager runtimeManager) { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("runtimeManager", runtimeManager); parameters.put("classLoader", runtimeManager.getEnvironment().getClassLoader()); parameters.put("entityManagerFactory", ((SimpleRuntimeEnvironment)runtimeManager.getEnvironment()).getEmf()); parameters.put("kieContainer", runtimeManager.getKieContainer()); return parameters; } }
protected ContentMarshallerContext getMarshallerContext(String deploymentId, String processId) { DeployedUnit deployedUnit = deploymentService.getDeployedUnit(deploymentId); if (deployedUnit == null) { return new ContentMarshallerContext(); } InternalRuntimeManager manager = (InternalRuntimeManager) deployedUnit.getRuntimeManager(); return new ContentMarshallerContext(manager.getEnvironment().getEnvironment(), manager.getEnvironment().getClassLoader()); }
@Override public AuditService getAuditService() { if (auditService == null) { boolean usePersistence = ((InternalRuntimeManager)manager).getEnvironment().usePersistence(); if (usePersistence) { auditService = new JPAAuditLogService(getKieSession().getEnvironment()); } else { throw new UnsupportedOperationException("AuditService was not configured, supported only with persistence"); } } return auditService; }