19 package org.turro.parser;
21 import org.turro.actor.Actors;
22 import org.turro.annotation.ElephantHelper;
23 import org.turro.config.Configurator;
24 import org.turro.elephant.context.ElephantContext;
25 import org.turro.elephant.impl.util.Parser;
26 import org.turro.entities.IElephantEntity;
27 import org.turro.formatter.NumberReducer;
28 import org.turro.html.HtmlContent;
29 import org.turro.i18n.I_;
30 import org.turro.marker.IElephantHelper;
31 import org.turro.parser.wiki.WikiCompiler;
32 import org.turro.plugin.contacts.IContact;
33 import org.turro.script.Scripting;
34 import org.turro.string.Strings;
55 public String
trunc(String text,
int max) {
56 return Strings.truncate(text, max);
60 return HtmlContent.truncate(
html, max);
64 return HtmlContent.plain(
html, max);
70 return NumberReducer.reduce(value);
74 return NumberReducer.expand(value);
79 public String
i(String value) {
83 public String
i(String value,
int count) {
84 return I_.
get(value, count);
87 public String
f(String value, Object... arguments) {
100 return Configurator.instance();
103 public String
cfgs(String key) {
104 return Configurator.instance().asString(key);
107 public Integer
cfgi(String key) {
108 return Configurator.instance().asInteger(key);
112 return Configurator.instance().asLong(key);
115 public Double
cfgd(String key) {
116 return Configurator.instance().asDouble(key);
119 public Boolean
cfgb(String key) {
120 return Configurator.instance().asBoolean(key);
133 public static boolean isActorFor(Object entity, String actor) {
151 public static boolean eval(String value) {
159 public static boolean evalFor(Object entity, String value) {
static boolean isActorFor(Object entity, String actor)
static boolean isActor(String actor)
static String getRootWebPath()
static String format(String msg, Object... arguments)
static String get(String msg)
String f(String value, Object... arguments)
static boolean eval(IContact contact, String value)
static boolean isActor(IContact contact, String actor)
String html(String html, int max)
long expand(String value)
static boolean eval(String value)
static boolean evalFor(IElephantEntity iee, String value)
static boolean isActorFor(IContact contact, IElephantEntity iee, String actor)
static boolean evalFor(IContact contact, IElephantEntity iee, String value)
static boolean isActorFor(IElephantEntity iee, String actor)
Configurator configurator()
String trunc(String text, int max)
static boolean isActor(String actor)
String htmlPlain(String html, int max)
String reduce(long value)
String compile(String wiki)
static boolean evalFor(Object entity, String value)
static boolean isActorFor(Object entity, String actor)
static boolean evalFor(IContact contact, Object entity, String value)
String i(String value, int count)
static boolean isActorFor(IContact contact, Object entity, String actor)
static boolean evalFor(Object entity, String value)
static boolean eval(String value)