public class Util
extends java.lang.Object
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<java.lang.Object> |
array2list(java.lang.Object[] array)
from an array to a list
|
static java.util.List<java.lang.String> |
array2listString(java.lang.String[] array)
from an array to a list
|
static AttributeDataImpl |
attrArray(java.lang.String name,
java.lang.Object... value)
Array (list) attribute
|
static AttributeDataImpl |
attrBlob(java.lang.String name,
BlobObject value)
Blob Attribute
|
static AttributeDataImpl |
attrBlob(java.lang.String name,
java.lang.String folder,
java.lang.String filename,
java.lang.String value)
Blob Attribute
|
static AttributeDataImpl |
attrString(java.lang.String name,
java.lang.String value)
String attribute
|
static AttributeDataImpl |
attrStruct(java.lang.String name,
java.util.Map<java.lang.String,java.lang.Object> value)
Struct (map) attribute
|
static AttributeDataImpl |
attrStructKV(java.lang.String name,
java.lang.String value)
Structure default arguments
|
static java.lang.Class<?>[] |
classesFromResource(java.lang.String site,
java.lang.String resourceName)
Return a class list read from a list of resources
|
static java.lang.String |
dumpAssetData(AssetData data) |
static java.lang.String |
getResource(java.lang.String res)
Get a resource from the classpath
|
static java.util.Properties |
getResourceProperties(java.lang.String res)
Get a resource property file from the classpath
|
static java.lang.String |
hexDump(java.lang.String s)
Hexadecimal dump of a string
|
static java.util.List |
list(java.lang.Object... objs)
Create a list from multiple arguments
|
static java.util.List<AssetData> |
listData(AssetData... objs)
Create a list from multiple arguments
|
static java.util.List<java.lang.String> |
listString(java.lang.String... objs)
Create a list from multiple arguments
|
static java.lang.String |
normalizedName(java.lang.String site,
java.lang.String name)
Normalize Asset Name: ensure there is the site prefix in the name, and
only once.
|
static java.lang.Object |
readAttributeConfig(java.lang.String attribute,
Config config)
Read a configuration attribute
|
public static java.util.List list(java.lang.Object... objs)
objs
- public static java.util.List<java.lang.String> listString(java.lang.String... objs)
objs
- public static java.util.List<AssetData> listData(AssetData... objs)
objs
- public static java.util.List<java.lang.Object> array2list(java.lang.Object[] array)
array
- public static java.util.List<java.lang.String> array2listString(java.lang.String[] array)
array
- public static java.lang.String dumpAssetData(AssetData data)
public static AttributeDataImpl attrString(java.lang.String name, java.lang.String value)
name
- value
- public static AttributeDataImpl attrBlob(java.lang.String name, BlobObject value)
name
- value
- public static AttributeDataImpl attrStructKV(java.lang.String name, java.lang.String value)
name
- value
- public static AttributeDataImpl attrStruct(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> value)
name
- value
- public static AttributeDataImpl attrArray(java.lang.String name, java.lang.Object... value)
name
- value
- public static AttributeDataImpl attrBlob(java.lang.String name, java.lang.String folder, java.lang.String filename, java.lang.String value)
name
- value
- public static java.lang.Class<?>[] classesFromResource(java.lang.String site, java.lang.String resourceName)
site
- resourceName
- public static java.lang.String getResource(java.lang.String res)
res
- public static java.util.Properties getResourceProperties(java.lang.String res)
res
- public static java.lang.Object readAttributeConfig(java.lang.String attribute, Config config)
name
- config
- public static java.lang.String hexDump(java.lang.String s)
s
- public static java.lang.String normalizedName(java.lang.String site, java.lang.String name)