public abstract class JaloTools
extends java.lang.Object
| Constructor and Description |
|---|
JaloTools() |
| Modifier and Type | Method and Description |
|---|---|
static PriceValue |
convertPriceIfNecessary(PriceValue pv,
boolean toNet,
Currency toCurrency,
java.util.Collection taxValues)
converts a PriceValue object into a double matching the target currency and net/gross - state if necessary.
|
static java.lang.String |
encodeJAVA(java.lang.String input)
Encodes JAVA entities ('\"`, '\'', '\n').
|
static void |
exportSystem(JaloSession session,
XMLOutputter xmlDef,
java.lang.String extensionName) |
static void |
exportTypeLocalization(java.util.Collection types,
java.io.Writer wr,
java.lang.String extensionName,
boolean ignoreExtensionName)
export all localisations for the given extension and type
|
static void |
exportTypeLocalizations(JaloSession jaloSession,
java.io.Writer wr,
java.lang.String extensionName)
exports all type localisations (AtomicType, CollectionType, EnumerationType, MapType, RelationType,
ItemTypesOrdered) for a given extension
|
static boolean |
getTypedPrimitiveBoolean(java.lang.Object value,
boolean defValue)
Returns primitive boolean value from Boolean value object
|
static byte |
getTypedPrimitiveByte(java.lang.Object value,
byte defValue)
Returns primitive byte value from Byte value object
|
static char |
getTypedPrimitiveChar(java.lang.Object value,
char defValue)
Returns primitive char value from Character value object
|
static double |
getTypedPrimitiveDouble(java.lang.Object value,
double defValue)
Returns primitive double value from Dobule value object
|
static float |
getTypedPrimitiveFloat(java.lang.Object value,
float defValue)
Returns primitive float value from Float value object
|
static int |
getTypedPrimitiveInteger(java.lang.Object value,
int defValue)
Returns primitive int value from Integer value object
|
static long |
getTypedPrimitiveLong(java.lang.Object value,
long defValue)
Returns primitive long value from Long value object
|
static short |
getTypedPrimitiveShort(java.lang.Object value,
short defValue)
Returns primitive short value from Short value object
|
public static double getTypedPrimitiveDouble(java.lang.Object value,
double defValue)
throws JaloInvalidParameterException
value - - Double objectdefValue - - if value is null then it returns this defValueJaloInvalidParameterException - if value object isnt't instance of Doublepublic static boolean getTypedPrimitiveBoolean(java.lang.Object value,
boolean defValue)
throws JaloInvalidParameterException
value - - Boolean objectdefValue - - if value is null then it returns this defValueJaloInvalidParameterException - if value object isnt't instance of Booleanpublic static long getTypedPrimitiveLong(java.lang.Object value,
long defValue)
throws JaloInvalidParameterException
value - - Long objectdefValue - - if value is null then it returns this defValueJaloInvalidParameterException - if value object isnt't instance of Longpublic static int getTypedPrimitiveInteger(java.lang.Object value,
int defValue)
throws JaloInvalidParameterException
value - - Integer objectdefValue - - if value is null then it returns this defValueJaloInvalidParameterException - if value object isnt't instance of Integerpublic static byte getTypedPrimitiveByte(java.lang.Object value,
byte defValue)
throws JaloInvalidParameterException
value - - Byte objectdefValue - - if value is null then it returns this defValueJaloInvalidParameterException - if value object isnt't instance of Bytepublic static char getTypedPrimitiveChar(java.lang.Object value,
char defValue)
throws JaloInvalidParameterException
value - - Character objectdefValue - - if value is null then it returns this defValueJaloInvalidParameterException - if value object isnt't instance of Characterpublic static float getTypedPrimitiveFloat(java.lang.Object value,
float defValue)
throws JaloInvalidParameterException
value - - Float objectdefValue - - if value is null then it returns this defValueJaloInvalidParameterException - if value object isnt't instance of Floatpublic static short getTypedPrimitiveShort(java.lang.Object value,
short defValue)
throws JaloInvalidParameterException
value - - Short objectdefValue - - if value is null then it returns this defValueJaloInvalidParameterException - if value object isnt't instance of Shortpublic static PriceValue convertPriceIfNecessary(PriceValue pv, boolean toNet, Currency toCurrency, java.util.Collection taxValues)
pv - the base price to converttoNet - the target net/gross statetoCurrency - the target currencytaxValues - the collection of tax values which apply to this pricepublic static void exportSystem(JaloSession session, XMLOutputter xmlDef, java.lang.String extensionName)
public static void exportTypeLocalizations(JaloSession jaloSession, java.io.Writer wr, java.lang.String extensionName)
jaloSession - the (current) jaloSessionwr - the output writerextensionName - the name of the extension which should be exported, for core the String is nullpublic static void exportTypeLocalization(java.util.Collection types,
java.io.Writer wr,
java.lang.String extensionName,
boolean ignoreExtensionName)
types - the typewr - the output writerextensionName - the name of the extension which should be exported, for core the String is nullignoreExtensionName - public static final java.lang.String encodeJAVA(java.lang.String input)
Copyright © 2018 SAP SE. All Rights Reserved.