com.sapportals.wcm.repository

Interface IProperty

All Known Subinterfaces:
IMutableProperty
All Known Implementing Classes:
MutableProperty, Property

public interface IProperty

This interface provides read-only access to a property of a resource. A property has a name (IPropertyName), data type (PropertyType), value(s), atttributes, a definition (IPropertyDef) and a description.

See Also:
IPropertyName, PropertyType, IPropertyDef, IMutableProperty

Method Summary
 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
 Date getDateValue()
          Get the property value if the type is PropertyType.DATE
 String getDescription()
          Returns the description of the property
 String getDescription(IResourceContext context)
           
 int getIntValue()
          Get the property value if the type is PropertyType.INTEGER
 long getLongIntValue()
          Get the property value if the type is PropertyType.LONG
 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
 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.
 List getValues()
          Returns the property values if this is a multi-valued property.
 boolean isMultivalued()
          Returns true if the property is multi-valued
 

Method Detail

getPropertyName

public IPropertyName getPropertyName()
Returns the property name

Returns:
A property name object

getType

public PropertyType getType()
Return the property's data type

Returns:
A property type constant

isMultivalued

public boolean isMultivalued()
Returns true if the property is multi-valued

Returns:
multivalued

getPropertyDef

public IPropertyDef getPropertyDef()
Get a reference to the proeprty definition.

Returns:
The property definition

getValueAsString

public String getValueAsString()
Get the property value converted to a string.

Returns:
A String

getBooleanValue

public boolean getBooleanValue()
Get the property value if the type is PropertyType.BOOLEAN

Returns:
The value

getIntValue

public int getIntValue()
Get the property value if the type is PropertyType.INTEGER

Returns:
The value

getLongIntValue

public long getLongIntValue()
Get the property value if the type is PropertyType.LONG

Returns:
The value

getDateValue

public Date getDateValue()
Get the property value if the type is PropertyType.DATE

Returns:
The value

getStringValue

public String getStringValue()
Get the property value if the type is String

Returns:
The value

getValues

public List getValues()
               throws ResourceException
Returns the property values if this is a multi-valued property.

Returns:
An unmodifiable List of value objects (String, Date, Integer, Long, Boolean, XMLMarkup)
Throws:
ResourceException

getValue

public Object getValue()
                throws ResourceException
Returns the property value as a Object if this is not a multi-valued property.

Returns:
The value object (String, Date, Integer, Long, Boolean, XMLMarkup)
Throws:
ResourceException

getMutable

public IMutableProperty getMutable()
Returns a copy of this propertry that can be modified

Returns:
A mutable property instance

getAttribute

public String getAttribute(String name)
                    throws ResourceException
Get the value of an attribute

Parameters:
name - Attribute name
Returns:
The value, ot null if the name does not exist
Throws:
ResourceException

getAttributes

public Properties getAttributes()
                         throws ResourceException
Returns a collection of attributes

Returns:
The attributes
Throws:
ResourceException

getDescription

public String getDescription()
                      throws WcmException
Returns the description of the property

Returns:
description
Throws:
WcmException - Exception raised in failure situation

getDescription

public String getDescription(IResourceContext context)
                      throws WcmException
Throws:
WcmException


Copyright 2006 SAP AG Complete Copyright Notice