use of org.drools.core.command.EntryPointCreator in project drools by kiegroup.
the class GetEntryPointCommand method execute.
public EntryPoint execute(Context context) {
KieSession ksession = ((RegistryContext) context).lookup(KieSession.class);
EntryPoint ep = ksession.getEntryPoint(name);
if (ep == null) {
return null;
}
EntryPointCreator epCreator = (EntryPointCreator) context.get(EntryPointCreator.class.getName());
return epCreator != null ? epCreator.getEntryPoint(name) : ep;
}
use of org.drools.core.command.EntryPointCreator in project drools by kiegroup.
the class GetEntryPointsCommand method execute.
public Collection<? extends EntryPoint> execute(Context context) {
KieSession ksession = ((RegistryContext) context).lookup(KieSession.class);
Collection<? extends EntryPoint> eps = ksession.getEntryPoints();
EntryPointCreator epCreator = (EntryPointCreator) context.get(EntryPointCreator.class.getName());
if (epCreator == null) {
return eps;
}
Collection<EntryPoint> result = new ArrayList<EntryPoint>();
for (EntryPoint ep : eps) {
result.add(epCreator.getEntryPoint(ep.getEntryPointId()));
}
return result;
}
Aggregations