public class Api
extends java.lang.Object
Constructor and Description |
---|
Api() |
Modifier and Type | Method and Description |
---|---|
static Arg |
arg(java.lang.String name,
java.lang.String value)
Create an arg holder
|
static Args |
args(java.lang.String name,
java.lang.String... values)
Create list of args
|
static Arg[] |
argv(java.lang.String... args)
Create an array of Arg from a list of strings in the form key=value
|
static java.lang.String |
call(java.lang.String name,
Arg... args)
Create an encoded call
|
static java.lang.String |
call(java.lang.String name,
java.util.List<Arg> args)
Create an encoded call from a list of args
|
static java.lang.String |
dumpIList(IList ilist)
Convenience method to dump an IList
|
static java.lang.String |
dumpStream(java.lang.String html)
Convenience method to dump the stream resulting of the picker
|
static Env |
env(ICS ics)
Access to the env in a JSP
|
static java.lang.String |
ex2str(java.lang.Throwable ex)
Stream an exceptions in a string
|
static Log |
getLog(java.lang.Class<?> clazz)
Get a logger by class
|
static Log |
getLog(java.lang.String className)
Get a logger by name
|
static Id |
id(java.lang.String c,
java.lang.Long cid)
Create an id
|
static java.lang.Object |
ifn(java.lang.Object obj,
java.lang.Object alt)
If null returns the alternative otherwise the object
|
static Model |
model(Arg... args)
Create a Model
|
static Model |
model(Model m,
Arg... args)
Create a Model
|
static java.lang.String |
nn(java.lang.String s)
Guarantee a string will never be null, if parameters is null then it will
be returned as the empty string.
|
static void |
out(Content... contents)
Print on standard output some contents
|
static void |
out(Content content,
java.lang.String name)
Print on standard output a content attributes
|
static void |
out(java.lang.String message,
Content... contents)
Print on standard output some contents
|
static void |
out(java.lang.String message,
Content content,
java.lang.String name)
Print on standard output a content attributes
|
static void |
out(java.lang.String message,
java.lang.Object... args)
Print on standard output
|
static java.lang.String |
tmp()
Generate an unique temporary var name.
|
static java.util.Date |
toDate(java.lang.String s)
Convert as a date, eventually the day 0 of the epoch if you cannot
convert
|
static java.lang.Integer |
toInt(java.lang.String l)
Convert in a int, 0 if erros
|
static java.lang.Long |
toLong(java.lang.String l)
Convert in a long, 0l if errors
|
public static Env env(ICS ics)
public static java.lang.String tmp()
public static Arg arg(java.lang.String name, java.lang.String value)
name
- value
- public static Args args(java.lang.String name, java.lang.String... values)
name
- value
- public static Arg[] argv(java.lang.String... args)
name
- value
- public static Id id(java.lang.String c, java.lang.Long cid)
name
- value
- public static java.lang.String call(java.lang.String name, Arg... args)
public static java.lang.String call(java.lang.String name, java.util.List<Arg> args)
public static java.lang.String nn(java.lang.String s)
s
- public static java.lang.Object ifn(java.lang.Object obj, java.lang.Object alt)
obj
- alt
- public static java.util.Date toDate(java.lang.String s)
public static java.lang.Long toLong(java.lang.String l)
l
- public static java.lang.Integer toInt(java.lang.String l)
l
- public static java.lang.String dumpStream(java.lang.String html)
public static java.lang.String dumpIList(IList ilist)
public static java.lang.String ex2str(java.lang.Throwable ex)
public static void out(java.lang.String message, java.lang.Object... args)
public static void out(java.lang.String message, Content... contents)
public static void out(Content... contents)
public static void out(java.lang.String message, Content content, java.lang.String name)
public static void out(Content content, java.lang.String name)
public static Log getLog(java.lang.String className)
clazz
- public static Log getLog(java.lang.Class<?> clazz)
clazz
-