public class MutableMultiLanguagedProperty extends Object implements IMutableMultiLanguagedProperty
Copyright (c) SAP AG 2004
| Constructor and Description |
|---|
MutableMultiLanguagedProperty(IPropertyName name,
IPropertyDef def,
Locale locale) |
MutableMultiLanguagedProperty(IPropertyName name,
Locale locale) |
MutableMultiLanguagedProperty(MutableProperty prop,
List values,
Locale locale) |
MutableMultiLanguagedProperty(MutableProperty prop,
Locale locale) |
| Modifier and Type | Method and Description |
|---|---|
void |
addValue(Object value)
Adds a value to the list for a multi-value property
|
void |
deleteValue(String languageTag)
Removes a language specific value of this property
|
String |
getAttribute(String name)
Get the value of an attribute
|
Properties |
getAttributes()
Returns a collection of attributes
|
boolean |
getBooleanValue()
Get the property value if the type is PropertyType.BOOLEAN
|
boolean |
getBooleanValue(String languageTag)
Get the property value if the type is PropertyType.BOOLEAN for the desired languageTag
|
IMultiLanguagedProperty |
getClone(Locale locale) |
Date |
getDateValue()
Get the property value if the type is PropertyType.DATE
|
Date |
getDateValue(String languageTag)
Get the property value if the type is PropertyType.DATE for the desired languageTag
|
String |
getDefaultLanguage() |
String |
getDescription()
Returns the description of the property
|
String |
getDescription(IResourceContext context) |
int |
getIntValue()
Get the property value if the type is PropertyType.INTEGER
|
int |
getIntValue(String languageTag)
Get the property value if the type is PropertyType.INTEGER for the desired languageTag
|
String[] |
getLanguageTags() |
String[] |
getLanguageTagsNeedingTranslation() |
String |
getLastSetLanguageTag() |
long |
getLongIntValue()
Get the property value if the type is PropertyType.LONG
|
long |
getLongIntValue(String languageTag)
Get the property value if the type is PropertyType.LONG for the desired languageTag
|
IMutableProperty |
getMutable()
Returns a copy of this propertry that can be modified
|
IPropertyDef |
getPropertyDef()
Get a reference to the proeprty definition.
|
IPropertyName |
getPropertyName()
Returns the property name
|
String |
getStringValue()
Get the property value if the type is String
|
String |
getStringValue(String languageTag)
Get the property value if the type is String for the desired languageTag
|
PropertyType |
getType()
Return the property's data type
|
Object |
getValue()
Returns the property value as a Object if this is not a multi-valued property.
|
String |
getValueAsString()
Get the property value converted to a string.
|
String |
getValueAsString(String languageTag)
Get the property value converted to a string for the desired languageTag.
|
List |
getValues()
Returns the property values if this is a multi-valued property.
|
static boolean |
isMultiLanguaged(IProperty prop) |
boolean |
isMultivalued()
Returns true if the property is multi-valued
|
void |
markAsTranslated()
marks all languages as up-to-date
|
void |
markAsTranslated(String languageTag)
marks this language as up-to-date
|
boolean |
needsTranslation(String languageTag) |
void |
removeAttribute(String name)
Removes a attribute
|
void |
removeValue(int index)
Remove a value of a multi-value property
|
void |
setAttribute(String name,
String value)
Set an attribute
|
void |
setAttributes(Properties attributes)
Set the complete collection of attributes
|
void |
setBooleanValue(boolean value)
Sets the property value if the type ist PropertyType.BOOLEAN
|
void |
setBooleanValue(String languageTag,
boolean value)
Sets the property value if the type ist PropertyType.BOOLEAN
|
void |
setDateValue(Date value)
Sets the property value if the type ist PropertyType.DATE
|
void |
setDateValue(String languageTag,
Date value)
Sets the property value if the type ist PropertyType.DATE
|
void |
setDateValueFromLong(long value)
Sets the property value if the type ist PropertyType.DATE
|
void |
setDateValueFromLong(String languageTag,
long value)
Sets the property value if the type ist PropertyType.DATE
|
void |
setDefaultLanguage(String languageTag)
Specifies the default language.
|
void |
setIntValue(int value)
Sets the property value if the type ist PropertyType.INTEGER
|
void |
setIntValue(String languageTag,
int value)
Sets the property value if the type ist PropertyType.INTEGER
|
void |
setLongIntValue(long value)
Sets the property value if the type ist PropertyType.LONG
|
void |
setLongIntValue(String languageTag,
long value)
Sets the property value if the type ist PropertyType.LONG
|
void |
setStringValue(String value)
Sets the property value if the type ist PropertyType.STRING
|
void |
setStringValue(String languageTag,
String value)
Sets the property value if the type ist PropertyType.STRING
|
void |
setValue(int index,
Object value)
Set a value of a multi-value property
|
void |
setValues(List values)
Sets all values of a multi-value property
|
String |
toString() |
public MutableMultiLanguagedProperty(IPropertyName name, Locale locale) throws ResourceException
ResourceExceptionpublic MutableMultiLanguagedProperty(IPropertyName name, IPropertyDef def, Locale locale) throws ResourceException
ResourceExceptionpublic MutableMultiLanguagedProperty(MutableProperty prop, Locale locale)
public MutableMultiLanguagedProperty(MutableProperty prop, List values, Locale locale)
public static boolean isMultiLanguaged(IProperty prop) throws ResourceException
ResourceExceptionpublic boolean getBooleanValue(String languageTag) throws ResourceException
IMultiLanguagedPropertygetBooleanValue in interface IMultiLanguagedPropertyResourceExceptionpublic int getIntValue(String languageTag) throws ResourceException
IMultiLanguagedPropertygetIntValue in interface IMultiLanguagedPropertyResourceExceptionpublic long getLongIntValue(String languageTag) throws ResourceException
IMultiLanguagedPropertygetLongIntValue in interface IMultiLanguagedPropertyResourceExceptionpublic Date getDateValue(String languageTag) throws ResourceException
IMultiLanguagedPropertygetDateValue in interface IMultiLanguagedPropertyResourceExceptionpublic String getStringValue(String languageTag) throws ResourceException
IMultiLanguagedPropertygetStringValue in interface IMultiLanguagedPropertyResourceExceptionpublic String getValueAsString(String languageTag) throws ResourceException
IMultiLanguagedPropertygetValueAsString in interface IMultiLanguagedPropertyResourceExceptionpublic String[] getLanguageTags() throws ResourceException
getLanguageTags in interface IMultiLanguagedPropertyResourceExceptionpublic String[] getLanguageTagsNeedingTranslation() throws ResourceException
getLanguageTagsNeedingTranslation in interface IMultiLanguagedPropertyResourceExceptionpublic boolean needsTranslation(String languageTag) throws ResourceException
needsTranslation in interface IMultiLanguagedPropertyResourceExceptionpublic String getLastSetLanguageTag() throws ResourceException
getLastSetLanguageTag in interface IMultiLanguagedPropertyResourceExceptionpublic IPropertyName getPropertyName()
IPropertygetPropertyName in interface IPropertypublic PropertyType getType()
IPropertypublic boolean isMultivalued()
IPropertyisMultivalued in interface IPropertypublic IPropertyDef getPropertyDef()
IPropertygetPropertyDef in interface IPropertypublic String getValueAsString()
IPropertygetValueAsString in interface IPropertypublic boolean getBooleanValue()
IPropertygetBooleanValue in interface IPropertypublic int getIntValue()
IPropertygetIntValue in interface IPropertypublic long getLongIntValue()
IPropertygetLongIntValue in interface IPropertypublic Date getDateValue()
IPropertygetDateValue in interface IPropertypublic String getStringValue()
IPropertygetStringValue in interface IPropertypublic List getValues() throws ResourceException
IPropertygetValues in interface IPropertyResourceExceptionpublic Object getValue() throws ResourceException
IPropertygetValue in interface IPropertyResourceExceptionpublic IMutableProperty getMutable()
IPropertygetMutable in interface IPropertypublic IMultiLanguagedProperty getClone(Locale locale)
getClone in interface IMultiLanguagedPropertylocale - the current locale (needed for determing the default language)public String getAttribute(String name) throws ResourceException
IPropertygetAttribute in interface IPropertyname - Attribute nameResourceExceptionpublic Properties getAttributes() throws ResourceException
IPropertygetAttributes in interface IPropertyResourceExceptionpublic String getDescription() throws WcmException
IPropertygetDescription in interface IPropertyWcmException - Exception raised in failure situationpublic String getDescription(IResourceContext context) throws WcmException
getDescription in interface IPropertyWcmExceptionpublic void setIntValue(int value)
throws ResourceException
IMutablePropertysetIntValue in interface IMutablePropertyvalue - The new valueResourceExceptionpublic void setDateValue(Date value) throws ResourceException
IMutablePropertysetDateValue in interface IMutablePropertyvalue - The new valueResourceExceptionpublic void setDateValueFromLong(long value)
throws ResourceException
IMutablePropertysetDateValueFromLong in interface IMutablePropertyvalue - The new valueResourceExceptionpublic void setStringValue(String value) throws ResourceException
IMutablePropertysetStringValue in interface IMutablePropertyvalue - The new valueResourceExceptionpublic void setLongIntValue(long value)
throws ResourceException
IMutablePropertysetLongIntValue in interface IMutablePropertyvalue - The new valueResourceExceptionpublic void setBooleanValue(boolean value)
throws ResourceException
IMutablePropertysetBooleanValue in interface IMutablePropertyvalue - The new valueResourceExceptionpublic void setValues(List values) throws ResourceException
IMutablePropertysetValues in interface IMutablePropertyvalues - The new values. The following table shows the instance that
has to be used for each type. PropertyType | instanceof
------------------------- STRING | String BOOLEAN | Boolean INTEGER |
Integer LONG | Long DATE | Date XML | StringResourceException - If the property is not defined as multi-valued
If a instance of a value does not match the property typepublic void addValue(Object value) throws ResourceException
IMutablePropertyaddValue in interface IMutablePropertyvalue - The value to add. The following table shows the instance that
has to be used for each type. PropertyType | instanceof
------------------------- STRING | String BOOLEAN | Boolean INTEGER |
Integer LONG | Long DATE | Date XML | StringResourceException - If the property is not defined as multi-valued
If the instance of the value does not match the property typepublic void setValue(int index,
Object value)
throws ResourceException
IMutablePropertysetValue in interface IMutablePropertyindex - The zero-based indexvalue - The new valueResourceException - If the property is not defined as multi-valued
If the instance of the value does not match the property type If the
index it out of boundspublic void removeValue(int index)
throws ResourceException
IMutablePropertyremoveValue in interface IMutablePropertyindex - The zero-based indexResourceException - If the property is not defined as multi-valued
If the index it out of boundspublic void setAttribute(String name, String value) throws ResourceException
IMutablePropertysetAttribute in interface IMutablePropertyname - Attribute namevalue - Attribute valueResourceExceptionpublic void setAttributes(Properties attributes) throws ResourceException
IMutablePropertysetAttributes in interface IMutablePropertyattributes - All attributesResourceExceptionpublic void removeAttribute(String name) throws ResourceException
IMutablePropertyremoveAttribute in interface IMutablePropertyname - Attribute nameResourceExceptionpublic String getDefaultLanguage() throws ResourceException
ResourceExceptionpublic void setIntValue(String languageTag, int value) throws ResourceException
IMutableMultiLanguagedPropertysetIntValue in interface IMutableMultiLanguagedPropertyResourceExceptionpublic void setDateValue(String languageTag, Date value) throws ResourceException
IMutableMultiLanguagedPropertysetDateValue in interface IMutableMultiLanguagedPropertyResourceExceptionpublic void setDateValueFromLong(String languageTag, long value) throws ResourceException
IMutableMultiLanguagedPropertysetDateValueFromLong in interface IMutableMultiLanguagedPropertyResourceExceptionpublic void setStringValue(String languageTag, String value) throws ResourceException
IMutableMultiLanguagedPropertysetStringValue in interface IMutableMultiLanguagedPropertyResourceExceptionpublic void setLongIntValue(String languageTag, long value) throws ResourceException
IMutableMultiLanguagedPropertysetLongIntValue in interface IMutableMultiLanguagedPropertyResourceExceptionpublic void setBooleanValue(String languageTag, boolean value) throws ResourceException
IMutableMultiLanguagedPropertysetBooleanValue in interface IMutableMultiLanguagedPropertyResourceExceptionpublic void deleteValue(String languageTag) throws ResourceException
IMutableMultiLanguagedPropertydeleteValue in interface IMutableMultiLanguagedPropertyResourceExceptionpublic void markAsTranslated(String languageTag) throws ResourceException
IMutableMultiLanguagedPropertymarkAsTranslated in interface IMutableMultiLanguagedPropertyResourceExceptionpublic void markAsTranslated()
throws ResourceException
IMutableMultiLanguagedPropertymarkAsTranslated in interface IMutableMultiLanguagedPropertyResourceExceptionpublic void setDefaultLanguage(String languageTag) throws ResourceException
IMutableMultiLanguagedPropertyIMultiLanguagedProperty.setDefaultLanguage in interface IMutableMultiLanguagedPropertylanguageTag - the default languageResourceExceptionIMultiLanguagedProperty| Access Rights |
|---|
| SC | DC | Public Part | ACH |
|---|---|---|---|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2021 SAP SE Complete Copyright Notice