|
SAP NetWeaver 7.40 SP 06 KMC | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sapportals.wcm.repository.MutableMultiLanguagedProperty
public class MutableMultiLanguagedProperty
Default implementation of an IMutableMultiLanguagedProperty.
Copyright (c) SAP AG 2004
| Constructor Summary | |
|---|---|
MutableMultiLanguagedProperty(IPropertyName name,
IPropertyDef def,
Locale locale)
|
|
MutableMultiLanguagedProperty(IPropertyName name,
Locale locale)
|
|
MutableMultiLanguagedProperty(MutableProperty prop,
List values,
Locale locale)
|
|
MutableMultiLanguagedProperty(MutableProperty prop,
Locale locale)
|
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MutableMultiLanguagedProperty(IPropertyName name,
Locale locale)
throws ResourceException
ResourceException
public MutableMultiLanguagedProperty(IPropertyName name,
IPropertyDef def,
Locale locale)
throws ResourceException
ResourceException
public MutableMultiLanguagedProperty(MutableProperty prop,
Locale locale)
public MutableMultiLanguagedProperty(MutableProperty prop,
List values,
Locale locale)
| Method Detail |
|---|
public static boolean isMultiLanguaged(IProperty prop)
throws ResourceException
ResourceException
public boolean getBooleanValue(String languageTag)
throws ResourceException
IMultiLanguagedProperty
getBooleanValue in interface IMultiLanguagedPropertyResourceException
public int getIntValue(String languageTag)
throws ResourceException
IMultiLanguagedProperty
getIntValue in interface IMultiLanguagedPropertyResourceException
public long getLongIntValue(String languageTag)
throws ResourceException
IMultiLanguagedProperty
getLongIntValue in interface IMultiLanguagedPropertyResourceException
public Date getDateValue(String languageTag)
throws ResourceException
IMultiLanguagedProperty
getDateValue in interface IMultiLanguagedPropertyResourceException
public String getStringValue(String languageTag)
throws ResourceException
IMultiLanguagedProperty
getStringValue in interface IMultiLanguagedPropertyResourceException
public String getValueAsString(String languageTag)
throws ResourceException
IMultiLanguagedProperty
getValueAsString in interface IMultiLanguagedPropertyResourceException
public String[] getLanguageTags()
throws ResourceException
getLanguageTags in interface IMultiLanguagedPropertyResourceException
public String[] getLanguageTagsNeedingTranslation()
throws ResourceException
getLanguageTagsNeedingTranslation in interface IMultiLanguagedPropertyResourceException
public boolean needsTranslation(String languageTag)
throws ResourceException
needsTranslation in interface IMultiLanguagedPropertyResourceException
public String getLastSetLanguageTag()
throws ResourceException
getLastSetLanguageTag in interface IMultiLanguagedPropertyResourceExceptionpublic IPropertyName getPropertyName()
IProperty
getPropertyName in interface IPropertypublic PropertyType getType()
IProperty
getType in interface IPropertypublic boolean isMultivalued()
IProperty
isMultivalued in interface IPropertypublic IPropertyDef getPropertyDef()
IProperty
getPropertyDef in interface IPropertypublic String getValueAsString()
IProperty
getValueAsString in interface IPropertypublic boolean getBooleanValue()
IProperty
getBooleanValue in interface IPropertypublic int getIntValue()
IProperty
getIntValue in interface IPropertypublic long getLongIntValue()
IProperty
getLongIntValue in interface IPropertypublic Date getDateValue()
IProperty
getDateValue in interface IPropertypublic String getStringValue()
IProperty
getStringValue in interface IProperty
public List getValues()
throws ResourceException
IProperty
getValues in interface IPropertyResourceException
public Object getValue()
throws ResourceException
IProperty
getValue in interface IPropertyResourceExceptionpublic IMutableProperty getMutable()
IProperty
getMutable 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
IProperty
getAttribute in interface IPropertyname - Attribute name
ResourceException
public Properties getAttributes()
throws ResourceException
IProperty
getAttributes in interface IPropertyResourceException
public String getDescription()
throws WcmException
IProperty
getDescription in interface IPropertyWcmException - Exception raised in failure situation
public String getDescription(IResourceContext context)
throws WcmException
getDescription in interface IPropertyWcmException
public void setIntValue(int value)
throws ResourceException
IMutableProperty
setIntValue in interface IMutablePropertyvalue - The new value
ResourceException
public void setDateValue(Date value)
throws ResourceException
IMutableProperty
setDateValue in interface IMutablePropertyvalue - The new value
ResourceException
public void setDateValueFromLong(long value)
throws ResourceException
IMutableProperty
setDateValueFromLong in interface IMutablePropertyvalue - The new value
ResourceException
public void setStringValue(String value)
throws ResourceException
IMutableProperty
setStringValue in interface IMutablePropertyvalue - The new value
ResourceException
public void setLongIntValue(long value)
throws ResourceException
IMutableProperty
setLongIntValue in interface IMutablePropertyvalue - The new value
ResourceException
public void setBooleanValue(boolean value)
throws ResourceException
IMutableProperty
setBooleanValue in interface IMutablePropertyvalue - The new value
ResourceException
public void setValues(List values)
throws ResourceException
IMutableProperty
setValues 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 | String
ResourceException - If the property is not defined as multi-valued
If a instance of a value does not match the property type
public void addValue(Object value)
throws ResourceException
IMutableProperty
addValue 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 | String
ResourceException - If the property is not defined as multi-valued
If the instance of the value does not match the property type
public void setValue(int index,
Object value)
throws ResourceException
IMutableProperty
setValue in interface IMutablePropertyindex - The zero-based indexvalue - The new value
ResourceException - 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 bounds
public void removeValue(int index)
throws ResourceException
IMutableProperty
removeValue in interface IMutablePropertyindex - The zero-based index
ResourceException - If the property is not defined as multi-valued
If the index it out of bounds
public void setAttribute(String name,
String value)
throws ResourceException
IMutableProperty
setAttribute in interface IMutablePropertyname - Attribute namevalue - Attribute value
ResourceException
public void setAttributes(Properties attributes)
throws ResourceException
IMutableProperty
setAttributes in interface IMutablePropertyattributes - All attributes
ResourceException
public void removeAttribute(String name)
throws ResourceException
IMutableProperty
removeAttribute in interface IMutablePropertyname - Attribute name
ResourceException
public String getDefaultLanguage()
throws ResourceException
ResourceException
public void setIntValue(String languageTag,
int value)
throws ResourceException
IMutableMultiLanguagedProperty
setIntValue in interface IMutableMultiLanguagedPropertyResourceException
public void setDateValue(String languageTag,
Date value)
throws ResourceException
IMutableMultiLanguagedProperty
setDateValue in interface IMutableMultiLanguagedPropertyResourceException
public void setDateValueFromLong(String languageTag,
long value)
throws ResourceException
IMutableMultiLanguagedProperty
setDateValueFromLong in interface IMutableMultiLanguagedPropertyResourceException
public void setStringValue(String languageTag,
String value)
throws ResourceException
IMutableMultiLanguagedProperty
setStringValue in interface IMutableMultiLanguagedPropertyResourceException
public void setLongIntValue(String languageTag,
long value)
throws ResourceException
IMutableMultiLanguagedProperty
setLongIntValue in interface IMutableMultiLanguagedPropertyResourceException
public void setBooleanValue(String languageTag,
boolean value)
throws ResourceException
IMutableMultiLanguagedProperty
setBooleanValue in interface IMutableMultiLanguagedPropertyResourceException
public void deleteValue(String languageTag)
throws ResourceException
IMutableMultiLanguagedProperty
deleteValue in interface IMutableMultiLanguagedPropertyResourceException
public void markAsTranslated(String languageTag)
throws ResourceException
IMutableMultiLanguagedProperty
markAsTranslated in interface IMutableMultiLanguagedPropertyResourceException
public void markAsTranslated()
throws ResourceException
IMutableMultiLanguagedProperty
markAsTranslated in interface IMutableMultiLanguagedPropertyResourceException
public void setDefaultLanguage(String languageTag)
throws ResourceException
IMutableMultiLanguagedPropertyIMultiLanguagedProperty.
setDefaultLanguage in interface IMutableMultiLanguagedPropertylanguageTag - the default language
ResourceExceptionIMultiLanguagedPropertypublic final String toString()
toString in class Object| 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
|
|
SAP NetWeaver 7.40 SP 06 KMC | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||