SAP NetWeaver '04

com.sapportals.wcm.repository
Class MutableProperty

[contained in: com.sap.netweaver.bc.rf.par - bc.rf.framework_api.jar]
java.lang.Object
  |
  +--com.sapportals.wcm.WcmObject
        |
        +--com.sapportals.wcm.repository.Property
              |
              +--com.sapportals.wcm.repository.MutableProperty
All Implemented Interfaces:
IMutableProperty, IProperty, java.io.Serializable

public class MutableProperty
extends Property
implements IMutableProperty, java.io.Serializable

A property of a resource object that can be modified

See Also:
Serialized Form

Fields inherited from class com.sapportals.wcm.repository.Property
m_attributes, m_dateValue, m_res, m_value, m_value_object, m_values
 
Fields inherited from class com.sapportals.wcm.WcmObject
ORDER_TYPE_MANUAL, ORDER_TYPE_NONE
 
Constructor Summary
  MutableProperty(IPropertyName name, java.lang.Boolean value)
          Construct a new property of type BOOLEAN.
  MutableProperty(IPropertyName name, java.lang.Boolean value, java.util.Properties attributes)
          Construct a new property of type BOOLEAN.
  MutableProperty(IPropertyName name, java.util.Date value)
          Construct a new property of type DATE.
  MutableProperty(IPropertyName name, java.util.Date value, java.util.Properties attributes)
          Construct a new property of type DATE.
  MutableProperty(IPropertyName name, java.lang.Integer value)
          Construct a new property of type INTEGER.
  MutableProperty(IPropertyName name, java.lang.Integer value, java.util.Properties attributes)
          Construct a new property of type INTEGER.
  MutableProperty(IPropertyName name, IPropertyDef def, java.lang.Boolean value)
          Construct a new property of type BOOLEAN.
  MutableProperty(IPropertyName name, IPropertyDef def, java.lang.Boolean value, java.util.Properties attributes)
          Construct a new property of type BOOLEAN.
  MutableProperty(IPropertyName name, IPropertyDef def, java.util.Date value)
          Construct a new property of type DATE.
  MutableProperty(IPropertyName name, IPropertyDef def, java.util.Date value, java.util.Properties attributes)
          Construct a new property of type DATE.
  MutableProperty(IPropertyName name, IPropertyDef def, java.lang.Integer value)
          Construct a new property of type INTEGER.
  MutableProperty(IPropertyName name, IPropertyDef def, java.lang.Integer value, java.util.Properties attributes)
          Construct a new property of type INTEGER.
  MutableProperty(IPropertyName name, IPropertyDef def, java.util.List values)
          Construct a new multi-valued property.
  MutableProperty(IPropertyName name, IPropertyDef def, java.util.List values, java.util.Properties attributes)
          Construct a new multi-valued property.
  MutableProperty(IPropertyName name, IPropertyDef def, java.lang.Long value)
          Construct a new property of type LONG.
  MutableProperty(IPropertyName name, IPropertyDef def, java.lang.Long value, java.util.Properties attributes)
          Construct a new property of type LONG.
  MutableProperty(IPropertyName name, IPropertyDef def, java.lang.Object value)
          Construct a new property.
  MutableProperty(IPropertyName name, IPropertyDef def, java.lang.Object value, java.util.Properties attributes)
          Construct a new property.
  MutableProperty(IPropertyName name, IPropertyDef def, java.lang.String value)
          Construct a new property of type STRING.
  MutableProperty(IPropertyName name, IPropertyDef def, java.lang.String value, java.util.Properties attributes)
          Construct a new property of type STRING.
  MutableProperty(IPropertyName name, IPropertyDef def, XMLMarkup value)
          Construct a new property of type XML.
  MutableProperty(IPropertyName name, IPropertyDef def, XMLMarkup value, java.util.Properties attributes)
          Construct a new property of type XML.
  MutableProperty(IPropertyName name, java.lang.Long value)
          Construct a new property of type LONG.
  MutableProperty(IPropertyName name, java.lang.Long value, java.util.Properties attributes)
          Construct a new property of type LONG.
  MutableProperty(IPropertyName name, java.lang.Object value)
          Construct a new property.
  MutableProperty(IPropertyName name, java.lang.Object value, java.util.Properties attributes)
          Construct a new property.
  MutableProperty(IPropertyName name, PropertyType type, java.util.List values)
          Construct a new multi-valued property.
  MutableProperty(IPropertyName name, PropertyType type, java.util.List values, java.util.Properties attributes)
          Construct a new multi-valued property.
  MutableProperty(IPropertyName name, java.lang.String value)
          Construct a new property of type STRING.
  MutableProperty(IPropertyName name, java.lang.String value, java.util.Properties attributes)
          Construct a new property of type STRING.
  MutableProperty(IPropertyName name, XMLMarkup value)
          Construct a new property of type XML.
  MutableProperty(IPropertyName name, XMLMarkup value, java.util.Properties attributes)
          Construct a new property of type XML.
protected MutableProperty(Property p)
          Construct a new mutable property from a read-only property.
 
Method Summary
 void addValue(java.lang.Object value)
          Adds a value to the list for a multi-value property
 IMutableProperty getMutable()
          Returns a copy of this propertry that can be modified
 void removeAttribute(java.lang.String name)
          Removes a attribute
 void removeValue(int index)
          Remove a value of a multi-value property
 void setAttribute(java.lang.String name, java.lang.String value)
          Set an attribute
 void setAttributes(java.util.Properties attributes)
          Set the complete collection of attributes
 void setBooleanValue(boolean value)
          Sets the property value if the type ist PropertyType.BOOLEAN
 void setDateValue(java.util.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 setIntValue(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 setStringValue(java.lang.String value)
          Sets the property value if the type ist PropertyType.STRING
 void setValue(int index, java.lang.Object value)
          Set a value of a multi-value property
 void setValues(java.util.List values)
          Sets all values of a multi-value property
 
Methods inherited from class com.sapportals.wcm.repository.Property
createContentLanguageProp, createContentLengthProp, createContentTypeProp, createCreatedByProp, createCreationDateProp, createDescriptionProp, createDisplaynameProp, createETagProp, createHiddenProp, createLastModifiedByProp, createLastModifiedProp, createReadOnlyProp, createResourceTypeProp, equals, getAttribute, getAttributes, getBooleanValue, getDateValue, getDescription, getDescription, getIntValue, getLongIntValue, getPropertyDef, getPropertyName, getStringValue, getType, getValue, getValueAsString, getValues, isMultivalued, isSystemProperty, toString, validateType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sapportals.wcm.repository.IProperty
getAttribute, getAttributes, getBooleanValue, getDateValue, getDescription, getDescription, getIntValue, getLongIntValue, getPropertyDef, getPropertyName, getStringValue, getType, getValue, getValueAsString, getValues, isMultivalued
 

Constructor Detail

MutableProperty

protected MutableProperty(Property p)
Construct a new mutable property from a read-only property. This is used in Property.getMutable().
Parameters:
p - TBD: Description of the incoming method parameter

MutableProperty

public MutableProperty(IPropertyName name,
                       java.lang.String value)
                throws ResourceException
Construct a new property of type STRING.
Parameters:
name - The property name
value - The property string value
Throws:
ResourceException - Exception raised in failure situation

MutableProperty

public MutableProperty(IPropertyName name,
                       java.util.Date value)
                throws ResourceException
Construct a new property of type DATE.
Parameters:
name - The property name
value - The property date value
Throws:
ResourceException - Exception raised in failure situation

MutableProperty

public MutableProperty(IPropertyName name,
                       java.lang.Boolean value)
                throws ResourceException
Construct a new property of type BOOLEAN.
Parameters:
name - The property name
value - The property booelan value
Throws:
ResourceException - Exception raised in failure situation

MutableProperty

public MutableProperty(IPropertyName name,
                       java.lang.Integer value)
                throws ResourceException
Construct a new property of type INTEGER.
Parameters:
name - The property name
value - The property integer value
Throws:
ResourceException - Exception raised in failure situation

MutableProperty

public MutableProperty(IPropertyName name,
                       java.lang.Long value)
                throws ResourceException
Construct a new property of type LONG.
Parameters:
name - The property name
value - The property long value
Throws:
ResourceException - Exception raised in failure situation

MutableProperty

public MutableProperty(IPropertyName name,
                       XMLMarkup value)
                throws ResourceException
Construct a new property of type XML.
Parameters:
name - The property name
value - The property xml value
Throws:
ResourceException - Exception raised in failure situation

MutableProperty

public MutableProperty(IPropertyName name,
                       PropertyType type,
                       java.util.List values)
                throws ResourceException
Construct a new multi-valued property.
Parameters:
name - The property name
type - The property data type
values - A list of values. The list must contain suitable object instances (String, Date, Integer, Long, Boolean, XMLMarkup) for the specified property type.
Throws:
ResourceException - If the instance of the value does not match the property type

MutableProperty

public MutableProperty(IPropertyName name,
                       java.lang.Object value)
                throws ResourceException
Construct a new property. The value object's instance must be one of String, Integer, Long, Boolean, Date or XMLMarkup.
Parameters:
name - The property name
value - The value object
Throws:
ResourceException - If the instance of the value parameter is not allowed

MutableProperty

public MutableProperty(IPropertyName name,
                       IPropertyDef def,
                       java.lang.String value)
                throws ResourceException
Construct a new property of type STRING.
Parameters:
name - The property name
def - The property definition
value - The property string value
Throws:
ResourceException - Exception raised in failure situation

MutableProperty

public MutableProperty(IPropertyName name,
                       IPropertyDef def,
                       java.util.Date value)
                throws ResourceException
Construct a new property of type DATE.
Parameters:
name - The property name
def - The property definition
value - The property string value
Throws:
ResourceException - Exception raised in failure situation

MutableProperty

public MutableProperty(IPropertyName name,
                       IPropertyDef def,
                       java.lang.Boolean value)
                throws ResourceException
Construct a new property of type BOOLEAN.
Parameters:
name - The property name
def - The property definition
value - The property string value
Throws:
ResourceException - Exception raised in failure situation

MutableProperty

public MutableProperty(IPropertyName name,
                       IPropertyDef def,
                       java.lang.Integer value)
                throws ResourceException
Construct a new property of type INTEGER.
Parameters:
name - The property name
def - The property definition
value - The property string value
Throws:
ResourceException - Exception raised in failure situation

MutableProperty

public MutableProperty(IPropertyName name,
                       IPropertyDef def,
                       java.lang.Long value)
                throws ResourceException
Construct a new property of type LONG.
Parameters:
name - The property name
def - The property definition
value - The property string value
Throws:
ResourceException - Exception raised in failure situation

MutableProperty

public MutableProperty(IPropertyName name,
                       IPropertyDef def,
                       XMLMarkup value)
                throws ResourceException
Construct a new property of type XML.
Parameters:
name - The property name
def - The property definition
value - The property string value
Throws:
ResourceException - Exception raised in failure situation

MutableProperty

public MutableProperty(IPropertyName name,
                       IPropertyDef def,
                       java.lang.Object value)
                throws ResourceException
Construct a new property. The value object's instance must be one of String, Integer, Long, Boolean, Date or XMLMarkup and must match the PropertyDef's type.
Parameters:
name - The property name
def - The property definition
value - The value object
Throws:
ResourceException - If the instance of the value parameter is not allowed or does not matach the type

MutableProperty

public MutableProperty(IPropertyName name,
                       IPropertyDef def,
                       java.util.List values)
                throws ResourceException
Construct a new multi-valued property.
Parameters:
name - The property name
def - The property definition
values - A list of values. The list must contain suitable object instances (String, Date, Integer, Long, Boolean, XMLMarkup) for the specified property type.
Throws:
ResourceException - If the instance of the value does not match the property type

MutableProperty

public MutableProperty(IPropertyName name,
                       java.lang.String value,
                       java.util.Properties attributes)
                throws ResourceException
Construct a new property of type STRING.
Parameters:
name - The property name
value - The property string value
attributes - TBD: Description of the incoming method parameter
Throws:
ResourceException - Exception raised in failure situation

MutableProperty

public MutableProperty(IPropertyName name,
                       java.util.Date value,
                       java.util.Properties attributes)
                throws ResourceException
Construct a new property of type DATE.
Parameters:
name - The property name
value - The property date value
attributes - TBD: Description of the incoming method parameter
Throws:
ResourceException - Exception raised in failure situation

MutableProperty

public MutableProperty(IPropertyName name,
                       java.lang.Boolean value,
                       java.util.Properties attributes)
                throws ResourceException
Construct a new property of type BOOLEAN.
Parameters:
name - The property name
value - The property booelan value
attributes - TBD: Description of the incoming method parameter
Throws:
ResourceException - Exception raised in failure situation

MutableProperty

public MutableProperty(IPropertyName name,
                       java.lang.Integer value,
                       java.util.Properties attributes)
                throws ResourceException
Construct a new property of type INTEGER.
Parameters:
name - The property name
value - The property integer value
attributes - TBD: Description of the incoming method parameter
Throws:
ResourceException - Exception raised in failure situation

MutableProperty

public MutableProperty(IPropertyName name,
                       java.lang.Long value,
                       java.util.Properties attributes)
                throws ResourceException
Construct a new property of type LONG.
Parameters:
name - The property name
value - The property long value
attributes - TBD: Description of the incoming method parameter
Throws:
ResourceException - Exception raised in failure situation

MutableProperty

public MutableProperty(IPropertyName name,
                       XMLMarkup value,
                       java.util.Properties attributes)
                throws ResourceException
Construct a new property of type XML.
Parameters:
name - The property name
value - The property xml value
attributes - TBD: Description of the incoming method parameter
Throws:
ResourceException - Exception raised in failure situation

MutableProperty

public MutableProperty(IPropertyName name,
                       java.lang.Object value,
                       java.util.Properties attributes)
                throws ResourceException
Construct a new property. The value object's instance must be one of String, Integer, Long, Boolean, Date or XMLMarkup.
Parameters:
name - The property name
value - The value object
attributes - TBD: Description of the incoming method parameter
Throws:
ResourceException - If the instance of the value parameter is not allowed

MutableProperty

public MutableProperty(IPropertyName name,
                       PropertyType type,
                       java.util.List values,
                       java.util.Properties attributes)
                throws ResourceException
Construct a new multi-valued property.
Parameters:
name - The property name
type - The property data type
values - A list of values. The list must contain suitable object instances (String, Date, Integer, Long, Boolean, XMLMarkup) for the specified property type.
attributes - TBD: Description of the incoming method parameter
Throws:
ResourceException - If the instance of the value does not match the property type

MutableProperty

public MutableProperty(IPropertyName name,
                       IPropertyDef def,
                       java.lang.String value,
                       java.util.Properties attributes)
                throws ResourceException
Construct a new property of type STRING.
Parameters:
name - The property name
def - The property definition
value - The property string value
attributes - TBD: Description of the incoming method parameter
Throws:
ResourceException - Exception raised in failure situation

MutableProperty

public MutableProperty(IPropertyName name,
                       IPropertyDef def,
                       java.util.Date value,
                       java.util.Properties attributes)
                throws ResourceException
Construct a new property of type DATE.
Parameters:
name - The property name
def - The property definition
value - The property string value
attributes - TBD: Description of the incoming method parameter
Throws:
ResourceException - Exception raised in failure situation

MutableProperty

public MutableProperty(IPropertyName name,
                       IPropertyDef def,
                       java.lang.Boolean value,
                       java.util.Properties attributes)
                throws ResourceException
Construct a new property of type BOOLEAN.
Parameters:
name - The property name
def - The property definition
value - The property string value
attributes - TBD: Description of the incoming method parameter
Throws:
ResourceException - Exception raised in failure situation

MutableProperty

public MutableProperty(IPropertyName name,
                       IPropertyDef def,
                       java.lang.Integer value,
                       java.util.Properties attributes)
                throws ResourceException
Construct a new property of type INTEGER.
Parameters:
name - The property name
def - The property definition
value - The property string value
attributes - TBD: Description of the incoming method parameter
Throws:
ResourceException - Exception raised in failure situation

MutableProperty

public MutableProperty(IPropertyName name,
                       IPropertyDef def,
                       java.lang.Long value,
                       java.util.Properties attributes)
                throws ResourceException
Construct a new property of type LONG.
Parameters:
name - The property name
def - The property definition
value - The property string value
attributes - TBD: Description of the incoming method parameter
Throws:
ResourceException - Exception raised in failure situation

MutableProperty

public MutableProperty(IPropertyName name,
                       IPropertyDef def,
                       XMLMarkup value,
                       java.util.Properties attributes)
                throws ResourceException
Construct a new property of type XML.
Parameters:
name - The property name
def - The property definition
value - The property string value
attributes - TBD: Description of the incoming method parameter
Throws:
ResourceException - Exception raised in failure situation

MutableProperty

public MutableProperty(IPropertyName name,
                       IPropertyDef def,
                       java.lang.Object value,
                       java.util.Properties attributes)
                throws ResourceException
Construct a new property. The value object's instance must be one of String, Integer, Long, Boolean, Date or XMLMarkup and must match the PropertyDef's type.
Parameters:
name - The property name
def - The property definition
value - The value object
attributes - TBD: Description of the incoming method parameter
Throws:
ResourceException - If the instance of the value parameter is not allowed or does not matach the type

MutableProperty

public MutableProperty(IPropertyName name,
                       IPropertyDef def,
                       java.util.List values,
                       java.util.Properties attributes)
                throws ResourceException
Construct a new multi-valued property.
Parameters:
name - The property name
def - The property definition
values - A list of values. The list must contain suitable object instances (String, Date, Integer, Long, Boolean, XMLMarkup) for the specified property type.
attributes - TBD: Description of the incoming method parameter
Throws:
ResourceException - If the instance of the value does not match the property type
Method Detail

setIntValue

public void setIntValue(int value)
                 throws ResourceException
Description copied from interface: IMutableProperty
Sets the property value if the type ist PropertyType.INTEGER
Specified by:
setIntValue in interface IMutableProperty
Following copied from interface: com.sapportals.wcm.repository.IMutableProperty
Parameters:
value - The new value
Throws:
ResourceException -  

setDateValue

public void setDateValue(java.util.Date value)
                  throws ResourceException
Description copied from interface: IMutableProperty
Sets the property value if the type ist PropertyType.DATE
Specified by:
setDateValue in interface IMutableProperty
Following copied from interface: com.sapportals.wcm.repository.IMutableProperty
Parameters:
value - The new value
Throws:
ResourceException -  

setDateValueFromLong

public void setDateValueFromLong(long value)
                          throws ResourceException
Description copied from interface: IMutableProperty
Sets the property value if the type ist PropertyType.DATE
Specified by:
setDateValueFromLong in interface IMutableProperty
Following copied from interface: com.sapportals.wcm.repository.IMutableProperty
Parameters:
value - The new value
Throws:
ResourceException -  

setStringValue

public void setStringValue(java.lang.String value)
                    throws ResourceException
Description copied from interface: IMutableProperty
Sets the property value if the type ist PropertyType.STRING
Specified by:
setStringValue in interface IMutableProperty
Following copied from interface: com.sapportals.wcm.repository.IMutableProperty
Parameters:
value - The new value
Throws:
ResourceException -  

setLongIntValue

public void setLongIntValue(long value)
                     throws ResourceException
Description copied from interface: IMutableProperty
Sets the property value if the type ist PropertyType.LONG
Specified by:
setLongIntValue in interface IMutableProperty
Following copied from interface: com.sapportals.wcm.repository.IMutableProperty
Parameters:
value - The new value
Throws:
ResourceException -  

setBooleanValue

public void setBooleanValue(boolean value)
                     throws ResourceException
Description copied from interface: IMutableProperty
Sets the property value if the type ist PropertyType.BOOLEAN
Specified by:
setBooleanValue in interface IMutableProperty
Following copied from interface: com.sapportals.wcm.repository.IMutableProperty
Parameters:
value - The new value
Throws:
ResourceException -  

setValues

public void setValues(java.util.List values)
               throws ResourceException
Description copied from interface: IMutableProperty
Sets all values of a multi-value property
Specified by:
setValues in interface IMutableProperty
Following copied from interface: com.sapportals.wcm.repository.IMutableProperty
Parameters:
values - 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
Throws:
ResourceException - If the property is not defined as multi-valued If a instance of a value does not match the property type

addValue

public void addValue(java.lang.Object value)
              throws ResourceException
Description copied from interface: IMutableProperty
Adds a value to the list for a multi-value property
Specified by:
addValue in interface IMutableProperty
Following copied from interface: com.sapportals.wcm.repository.IMutableProperty
Parameters:
value - 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
Throws:
ResourceException - If the property is not defined as multi-valued If the instance of the value does not match the property type

setValue

public void setValue(int index,
                     java.lang.Object value)
              throws ResourceException
Description copied from interface: IMutableProperty
Set a value of a multi-value property
Specified by:
setValue in interface IMutableProperty
Following copied from interface: com.sapportals.wcm.repository.IMutableProperty
Parameters:
index - The zero-based index
value - The new value
Throws:
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

removeValue

public void removeValue(int index)
                 throws ResourceException
Description copied from interface: IMutableProperty
Remove a value of a multi-value property
Specified by:
removeValue in interface IMutableProperty
Following copied from interface: com.sapportals.wcm.repository.IMutableProperty
Parameters:
index - The zero-based index
Throws:
ResourceException - If the property is not defined as multi-valued If the index it out of bounds

getMutable

public IMutableProperty getMutable()
Description copied from interface: IProperty
Returns a copy of this propertry that can be modified
Specified by:
getMutable in interface IProperty
Overrides:
getMutable in class Property
Following copied from interface: com.sapportals.wcm.repository.IProperty
Returns:
A mutable property instance

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.String value)
                  throws ResourceException
Description copied from interface: IMutableProperty
Set an attribute
Specified by:
setAttribute in interface IMutableProperty
Following copied from interface: com.sapportals.wcm.repository.IMutableProperty
Parameters:
name - Attribute name
value - Attribute value
Throws:
ResourceException -  

setAttributes

public void setAttributes(java.util.Properties attributes)
                   throws ResourceException
Description copied from interface: IMutableProperty
Set the complete collection of attributes
Specified by:
setAttributes in interface IMutableProperty
Following copied from interface: com.sapportals.wcm.repository.IMutableProperty
Parameters:
attributes - All attributes
Throws:
ResourceException -  

removeAttribute

public void removeAttribute(java.lang.String name)
                     throws ResourceException
Description copied from interface: IMutableProperty
Removes a attribute
Specified by:
removeAttribute in interface IMutableProperty
Following copied from interface: com.sapportals.wcm.repository.IMutableProperty
Parameters:
name - Attribute name
Throws:
ResourceException -  

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.