/** * Select xpath objects. @see Context.xpathSelect(xpath) * * @param xpath * xpath * * @return the object */ public static Object xpathSelect(String xpath) { return Context.getCurrentContext().xpathSelect(null, xpath); }
/** * Check if an id exists in current context. * * @param id * the id * @param searchParent * true to search the parent context, false not to. * @return true if exists, false if not. */ public static boolean hasConst(String id, boolean searchParent) { return Context.getCurrentContext().hasConstId(id, searchParent); }
/** * Get the current process id. * * @return the pid */ public static long getProcessId() { return Context.getCurrentContext().getProcessId(); }
@Override protected String convert(LoggingEvent event) { Context context = Context.getCurrentContext(); if (context == null) { return "?"; } else { return new Long(context.getProcessId()).toString(); } }
@Override protected String convert(LoggingEvent event) { Context context = Context.getCurrentContext(); if (context == null) { return "?"; } else { return new Long(context.getProcessId()).toString(); } }
/** * Check if an id exists in current context. * * @param id * the id * @param searchParent * true to search the parent context, false not to. * @return true if exists, false if not. */ public static boolean hasConst(String id, boolean searchParent) { return Context.getCurrentContext().hasConstId(id, searchParent); }
/** * Get the current process id. * * @return the pid */ public static long getProcessId() { return Context.getCurrentContext().getProcessId(); }
/** * Select xpath objects. @see Context.xpathSelect(xpath) * * @param xpath * xpath * * @return the object */ public static Object xpathSelect(String xpath) { return Context.getCurrentContext().xpathSelect(null, xpath); }
/** * Get a value with id from current context. NB, this will not cause * exception if the id doesn't exist! * * @param id * the id * @param searchParent * true to search the parent context, false not to. * @return true the value or null if not found. */ public static Object getConst(String id, boolean searchParent) { return Context.getCurrentContext().getConst(id, searchParent); }
/** * Get a value with id from current context. NB, this will not cause * exception if the id doesn't exist! * * @param id * the id * @param searchParent * true to search the parent context, false not to. * @return true the value or null if not found. */ public static Object getConst(String id, boolean searchParent) { return Context.getCurrentContext().getConst(id, searchParent); }
/** * Select xpath objects. @see Context.xpathSelect(from, xpath) * * @param from * from object * @param xpath * xpath * * @return the object */ public static Object xpathSelectFrom(Object from, String xpath) { return Context.getCurrentContext().xpathSelect(from, xpath); }
/** * Select xpath objects. @see Context.xpathSelect(xpath, alwaysList) * * @param xpath * xpath * @param alwaysList * always list * @return the object */ public static Object xpathSelect(String xpath, boolean alwaysList) { return Context.getCurrentContext().xpathSelect(null, xpath, alwaysList); }
/** * Get a copy of const ids for the current thread context. * * @return the copy */ public static Set<String> getConstIds() { return new HashSet<String>(Context.getCurrentContext().getConstIds()); }
/** * Get a copy of const ids for the current thread context. * * @return the copy */ public static Set<String> getConstIds() { return new HashSet<String>(Context.getCurrentContext().getConstIds()); }
/** * 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 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(); }
/** * Check if a tag name is callable. * * @param tagName * the name of the tag * @return true callable, false not */ public static boolean isCallable(String tagName) { return null != Context.getCurrentContext().getPaxml().getResourceLocator().getResource(tagName); }
/** * Check if a tag name is callable. * * @param tagName * the name of the tag * @return true callable, false not */ public static boolean isCallable(String tagName) { return null != Context.getCurrentContext().getPaxml().getResourceLocator().getResource(tagName); }