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. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. 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.