protected PaxmlResource getDisplayResource() { return entity.getResource(); }
log.info("Starting process " + processId + " to execute scenario: " + entity.getResource().getPath()); Object result = entity.execute(context); return result; } catch (Throwable e) {
|| cached.isModified()) { root.close(false); if (entity != null && entity.isCachable() && StringUtils.isNotBlank(resource.getName())) { resourceLocator.getCachedPaxmlEntities().put(resource, entity);
/** * Call a tag. * * @param name * the tag name * @param args * the arguments map * @return the result */ public static Object call(String name, Map<String, Object> args) { final Context context = Context.getCurrentContext(); final IEntity tag = context.getPaxml().getEntity(name); if (tag == null) { throw new PaxmlRuntimeException("No tag defined as: " + name); } final Context subContext = new Context(context); subContext.setAsCurrentThreadContext(); try { if (args != null) { for (Map.Entry<String, Object> entry : args.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); subContext.addConst(key, key, value, false); } } return tag.execute(subContext); } finally { context.setAsCurrentThreadContext(); } }
/** * {@inheritDoc} */ @Override protected Object doInvoke(Context context) { Object val = getValue(); String entityName = val == null ? null : val.toString().trim(); if (StringUtils.isBlank(entityName)) { val = getEntity().printTree(0); } else { ResourceLocator locator = getResourceLocator(); PaxmlResource res = locator.getResource(entityName); val = getResourceLocator().getEntity(entityName, null); } return val; }
log.info("Starting process " + processId + " to execute scenario: " + entity.getResource().getPath()); Object result = entity.execute(context); return result; } catch (Throwable e) {
if (forceRefresh || (cached = this.resourceLocator.getCachedPaxmlEntities().get(resource)) == null || cached.isModified()) { root.close(false); if (entity != null && entity.isCachable() && StringUtils.isNotBlank(resource.getName())) { resourceLocator.getCachedPaxmlEntities().put(resource, entity);
/** * Call a tag. * * @param name * the tag name * @param args * the arguments map * @return the result */ public static Object call(String name, Map<String, Object> args) { final Context context = Context.getCurrentContext(); final IEntity tag = context.getPaxml().getEntity(name); if (tag == null) { throw new PaxmlRuntimeException("No tag defined as: " + name); } final Context subContext = new Context(context); subContext.setAsCurrentThreadContext(); try { if (args != null) { for (Map.Entry<String, Object> entry : args.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); subContext.addConst(key, key, value, false); } } return tag.execute(subContext); } finally { context.setAsCurrentThreadContext(); } }
/** * {@inheritDoc} */ @Override protected Object doInvoke(Context context) { Object val = getValue(); String entityName = val == null ? null : val.toString().trim(); if (StringUtils.isBlank(entityName)) { val = getEntity().printTree(0); } else { ResourceLocator locator = getResourceLocator(); PaxmlResource res = locator.getResource(entityName); val = getResourceLocator().getEntity(entityName, null); } return val; }
protected PaxmlResource getDisplayResource() { return entity.getResource(); }
/** * {@inheritDoc} */ @Override protected Object invoke(Context subContext) throws Exception { // the target resource should have been parsed during "factory time", // just find it with no parser context IEntity paxml = getResourceLocator().getEntity(targetResource.getName(), null); if (paxml != null) { final Object existingResult = subContext.getInvocationResult(); Object result = paxml.execute(subContext); subContext.setInvocationResult(existingResult); return result; } else { throw new PaxmlRuntimeException("Target resource not found: " + targetResource.getName()); } }
@Override public boolean onItem(IEntity entity, ITag tag) { String name = entity.getResource().getName(); if (StringUtils.isBlank(name)) { name = "?"; } sb.insert(0, " > ").insert(0, tag.getLineNumber()).insert(0, "@").insert(0, name); return fullStack; } });
/** * {@inheritDoc} */ @Override protected Object invoke(Context subContext) throws Exception { // the target resource should have been parsed during "factory time", // just find it with no parser context IEntity paxml = getResourceLocator().getEntity(targetResource.getName(), null); if (paxml != null) { final Object existingResult = subContext.getInvocationResult(); Object result = paxml.execute(subContext); subContext.setInvocationResult(existingResult); return result; } else { throw new PaxmlRuntimeException("Target resource not found: " + targetResource.getName()); } }
@Override public boolean onItem(IEntity entity, ITag tag) { String name = entity.getResource().getName(); if (StringUtils.isBlank(name)) { name = "?"; } sb.insert(0, " > ").insert(0, tag.getLineNumber()).insert(0, "@").insert(0, name); return fullStack; } });
/** * Get the current paxml resource. * * @return the resource */ public static PaxmlResource getCurrentyResource() { return Context.getCurrentContext().getCurrentEntity().getResource(); }
/** * Get the caller's paxml resource. * * @return the resource */ public static PaxmlResource getCallerResource() { return Context.getCurrentContext().findCallerEntity().getResource(); }
/** * Get the current paxml resource. * * @return the resource */ public static PaxmlResource getCurrentyResource() { return Context.getCurrentContext().getCurrentEntity().getResource(); }
/** * Get the caller's paxml resource. * * @return the resource */ public static PaxmlResource getCallerResource() { return Context.getCurrentContext().findCallerEntity().getResource(); }
/** * {@inheritDoc} */ @Override protected Object doInvoke(Context context) { Object value = getValue(); PaxmlResource res = getEntity().getResource(); String msg = includeResourceName ? ((fullResourceName ? res.getPath() : res.getName()) + ": " + value) : String .valueOf(value); if (level == Level.ERROR) { log.error(msg); } else if (level == Level.WARN) { log.warn(msg); } else if (level == Level.DEBUG) { log.debug(msg); } else { log.info(msg); } return value; }
/** * {@inheritDoc} */ @Override protected Object doInvoke(Context context) { Object value = getValue(); PaxmlResource res = getEntity().getResource(); String msg = includeResourceName ? ((fullResourceName ? res.getPath() : res.getName()) + ": " + value) : String .valueOf(value); if (level == Level.ERROR) { log.error(msg); } else if (level == Level.WARN) { log.warn(msg); } else if (level == Level.DEBUG) { log.debug(msg); } else { log.info(msg); } return value; }