public class ValueUtilsImpl extends Object implements ValueUtils
| Constructor and Description |
|---|
ValueUtilsImpl() |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAttribute(Item item,
String qualifier,
Language lang)
Returns a value of the attribute in the specified language.
|
Object |
getAttribute(Item item,
String qualifier,
String langIso)
Returns a value of the attribute in the specified language.
|
String |
getImageRoot() |
protected static Media |
getMediaByFileName(String filename) |
void |
setAttribute(Item item,
String qualifier,
Object value,
Language lang)
Sets the value of the attribute in the specified language.
|
void |
setAttribute(Item item,
String qualifier,
Object value,
String langIso)
Sets the value of the attribute in the specified language.
|
Object |
transformToRawValue(String value,
EnumerationValue valueType)
Parses the given String and tries to return an object of the specified value type that represents the String's content
|
String |
transformToString(Object rawValue,
EnumerationValue valueType)
Return the given object to a String, representing its value
|
public String transformToString(Object rawValue, EnumerationValue valueType)
ValueUtilstransformToString in interface ValueUtilsrawValue - An arbitrary objectvalueType - A placeholder's value type (see: enumtype 'PlaceholderValueType') that should be considered while
transforming the object to a Stringpublic Object transformToRawValue(String value, EnumerationValue valueType) throws ParseException
ValueUtilstransformToRawValue in interface ValueUtilsvalue - A StringvalueType - The value type (see: enumtype 'PlaceholderValueType') that the returned object should be ofParseException - If an error occurs while transforming the String to an objectpublic String getImageRoot()
public Object getAttribute(Item item, String qualifier, Language lang) throws JaloSecurityException
ValueUtilsgetAttribute in interface ValueUtilsitem - the Item to get the value forqualifier - the attribute qualifier to get the value oflang - the language to get the value inJaloSecurityException - if Item.getAttribute() throws itpublic Object getAttribute(Item item, String qualifier, String langIso) throws JaloSecurityException
ValueUtilsgetAttribute in interface ValueUtilsitem - the Item to get the value forqualifier - the attribute qualifier to get the value oflangIso - the iso code of the language to get the value inJaloSecurityException - if Item.getAttribute() throws itpublic void setAttribute(Item item, String qualifier, Object value, Language lang) throws JaloBusinessException
ValueUtilssetAttribute in interface ValueUtilsitem - the Item to set the value forqualifier - the attribute qualifier to set the value ofvalue - the value to be setlang - the language to set the value inJaloBusinessException - if Item.setAttribute() throws itpublic void setAttribute(Item item, String qualifier, Object value, String langIso) throws JaloBusinessException
ValueUtilssetAttribute in interface ValueUtilsitem - the Item to set the value forqualifier - the attribute qualifier to set the value ofvalue - the value to be setlangIso - the iso code of the language to set the value inJaloBusinessException - if Item.setAttribute() throws itCopyright © 2017 SAP SE. All Rights Reserved.