public abstract class JaloTools extends Object
| Constructor and Description |
|---|
JaloTools() |
| Modifier and Type | Method and Description |
|---|---|
static PriceValue |
convertPriceIfNecessary(PriceValue pv,
boolean toNet,
Currency toCurrency,
Collection taxValues)
converts a PriceValue object into a double matching the target currency and net/gross - state if necessary.
|
static String |
encodeJAVA(String input)
Encodes JAVA entities ('\"`, '\'', '\n').
|
static void |
exportSystem(JaloSession session,
XMLOutputter xmlDef,
String extensionName) |
static void |
exportTypeLocalization(Collection types,
Writer wr,
String extensionName,
boolean ignoreExtensionName)
export all localisations for the given extension and type
|
static void |
exportTypeLocalizations(JaloSession jaloSession,
Writer wr,
String extensionName)
exports all type localisations (AtomicType, CollectionType, EnumerationType, MapType, RelationType,
ItemTypesOrdered) for a given extension
|
static boolean |
getTypedPrimitiveBoolean(Object value,
boolean defValue)
Returns primitive boolean value from Boolean value object
|
static byte |
getTypedPrimitiveByte(Object value,
byte defValue)
Returns primitive byte value from Byte value object
|
static char |
getTypedPrimitiveChar(Object value,
char defValue)
Returns primitive char value from Character value object
|
static double |
getTypedPrimitiveDouble(Object value,
double defValue)
Returns primitive double value from Dobule value object
|
static float |
getTypedPrimitiveFloat(Object value,
float defValue)
Returns primitive float value from Float value object
|
static int |
getTypedPrimitiveInteger(Object value,
int defValue)
Returns primitive int value from Integer value object
|
static long |
getTypedPrimitiveLong(Object value,
long defValue)
Returns primitive long value from Long value object
|
static short |
getTypedPrimitiveShort(Object value,
short defValue)
Returns primitive short value from Short value object
|
public static double getTypedPrimitiveDouble(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(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(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(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(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(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(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(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, 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, String extensionName)
public static void exportTypeLocalizations(JaloSession jaloSession, Writer wr, 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(Collection types, Writer wr, 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 - Copyright © 2017 SAP SE. All Rights Reserved.