public class LoaderUtils<ModelProcessType extends ModelProcessIntf>
extends java.lang.Object
Constructor and Description |
---|
LoaderUtils(ModelProcessType loader) |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
arrayToCommaString(java.lang.String[] values) |
java.text.NumberFormat |
getFormater() |
ModelProcessType |
getLoader() |
int |
getUnitFieldLength() |
int |
getUpdateMode() |
static boolean |
isNotInternetEmail(java.lang.String value)
Quick heuristic to filter out values that are not Internet email addresses
Not guaranteed to filter all bad addresses, but won't eliminate any good ones
|
boolean |
isValidDomainName(java.lang.String name)
Validates that a domain name conforms to the widely accepted TLD format.
|
boolean |
isValidEmail(java.lang.String address) |
void |
logException(Page page,
ItemBase item,
java.lang.Throwable t) |
static java.lang.String |
messageFromException(java.lang.Throwable t) |
boolean |
setDateValue(MboRemote mbo,
java.lang.String attribute,
java.lang.String value,
ItemBase item) |
void |
setDescriptionValue(MboRemote mbo,
java.lang.String attribute,
java.lang.String value,
ItemBase item)
Sets an optional description field on any Mbo with check for null, logic for exception
handling, and warning message on failure.
|
boolean |
setDurationValue(MboRemote mbo,
java.lang.String attribute,
java.lang.String value,
ItemBase item) |
void |
setTimestamp(MboRemote mbo,
java.lang.String attribute,
ItemBase item) |
boolean |
setUnitValue(MboRemote mbo,
java.lang.String attribute,
java.lang.String value,
ItemBase item) |
boolean |
setUnitValue(MboRemote mbo,
java.lang.String attribute,
java.lang.String value,
ItemBase item,
boolean logError)
Sets an Mbo unit of measure value.
|
static boolean |
valueHasContent(java.lang.String value) |
public LoaderUtils(ModelProcessType loader)
public int getUpdateMode()
public ModelProcessType getLoader()
public java.text.NumberFormat getFormater()
public int getUnitFieldLength()
public boolean isValidDomainName(java.lang.String name)
Note: The formal definition of allowable domain names is much looser. This method uses the stricter definition in common practice for registered domains
name
- public boolean isValidEmail(java.lang.String address)
public boolean setDateValue(MboRemote mbo, java.lang.String attribute, java.lang.String value, ItemBase item)
public void setDescriptionValue(MboRemote mbo, java.lang.String attribute, java.lang.String value, ItemBase item)
mbo
- Target Mboattribute
- Attribute namevalue
- New value for fielditem
- The item that was the source of the value, Used for error reportingpublic boolean setDurationValue(MboRemote mbo, java.lang.String attribute, java.lang.String value, ItemBase item)
public boolean setUnitValue(MboRemote mbo, java.lang.String attribute, java.lang.String value, ItemBase item)
public boolean setUnitValue(MboRemote mbo, java.lang.String attribute, java.lang.String value, ItemBase item, boolean logError)
mbo
- attribute
- value
- item
- logError
- public static java.lang.String arrayToCommaString(java.lang.String[] values)
public static boolean isNotInternetEmail(java.lang.String value)
value
- public static java.lang.String messageFromException(java.lang.Throwable t)
public static boolean valueHasContent(java.lang.String value)