Web Dynpro API Documentation

com.sap.tc.webdynpro.progmodel.api
Interface IWDAttributeInfo


public interface IWDAttributeInfo

Structure information for a context attribute.

The information contained herein either has been declared at design time (for a statically declared attribute) or has been provided at runtime (dynamically declared attribute).

Methods in IWDNodeInfo can be used to retrieve or dynamically create instances of this interface.

DO NOT EXTEND THIS TYPE. It won't work.

Version:
$Id: //tc/WebDynproRuntime/630_VAL_REL/src/_webdynpro_progmodel/java/com/sap/tc/webdynpro/progmodel/api/IWDAttributeInfo.java#3 $

Method Summary
 IWDAttributeInfo getDataAttribute()
          Returns the AttributeInfo of the attribute this attribute is mapped to or null if this attribute is unmapped.
 IDataType getDataType()
          Returns the data type of the attribute.
 ISimpleTypeModifiable getModifiableSimpleType()
          Returns a modifiable version of the data type of the attribute.
 java.lang.String getName()
          Returns the name of the attribute.
 IWDNodeInfo getNode()
          Returns the node info, this attribute belongs to.
 java.lang.String getOriginName()
          Returns the origin's name which is the name of the attribute either in the origin node or in the model object.
 ISimpleType getSimpleType()
          Returns the data type of the attribute.
 boolean hasSimpleType()
          Returns whether the attribute contains an ISimpleType.
 boolean isDeclared()
          Returns whether this attribute has been declared at design time.
 boolean isReadOnly()
          Checks whether this attribute is read only for clients.
 void setR3NormalizingFormattingService(boolean formatting)
          Set a special formatting service for currencies when working with an R/3 system.
 

Method Detail

getName

public java.lang.String getName()
Returns the name of the attribute. The name is unique in the context of the containing IWDNodeInfo and can be used to retrieve/set the value of the corresponding attribute.
Returns:
the name of the attribute

getNode

public IWDNodeInfo getNode()
Returns the node info, this attribute belongs to.
Returns:
the node info this attribute belongs to

getOriginName

public java.lang.String getOriginName()
Returns the origin's name which is the name of the attribute either in the origin node or in the model object. Returns null for unmapped value nodes.
Returns:
the origin's name

getDataType

public IDataType getDataType()
Returns the data type of the attribute. The attribute is guaranteed to have one. Nevertheless under special circumstances this method returns null: If you map into a component that you create manually and that component has not been created yet. In this case the attribute does not yet know the type and returns null.
Returns:
the data type of the attribute.

hasSimpleType

public boolean hasSimpleType()
Returns whether the attribute contains an ISimpleType. Otherwise it's a JavaType. Only attributes based on ISimpleType can be rendered to the GUI.
Returns:
true, if the attribute contains an ISimpleType.

getSimpleType

public ISimpleType getSimpleType()
Returns the data type of the attribute.
Returns:
the data type of the attribute.
Throws:
ContextException - if the IWDAttributeInfo does not contain an ISimpleType, but another IDataType.
See Also:
getDataType()

getModifiableSimpleType

public ISimpleTypeModifiable getModifiableSimpleType()
Returns a modifiable version of the data type of the attribute. The modifiable type is cloned from the standard type upon first access and is used for this attribute only. Once created, alyways the same instance will be returned for this attribute as long as the context exists.

A modifiable data type can only be queried from a non-mapped attribute. A mapped attribute throws a ContextException. The reason for this is that you always should be aware of the effects of changing the attribute type. This change affects the complete mapping chain, even across component boundaries. So you are only allowed to modify the data source.

Returns:
a modifiable version of the attributes data type
Throws:
ContextException - if the IWDAttributeInfo does not contain an ISimpleType, but another IDataType or if the attribute is mapped.

getDataAttribute

public IWDAttributeInfo getDataAttribute()
Returns the AttributeInfo of the attribute this attribute is mapped to or null if this attribute is unmapped.
Returns:
the AttributeInfo of the attribute this is mapped to

isReadOnly

public boolean isReadOnly()
Checks whether this attribute is read only for clients.

Note: if an attribute is read-only for clients, it might or might not be writable for applications. Normally all attributes are writable for applications, but if a context attribute is mapped to a model class property and if that model class property is read-only or if the attribute is calculated and no setter is declared, then the attribute is read-only for applications, too.

Returns:
read only state of attribute

isDeclared

public boolean isDeclared()
Returns whether this attribute has been declared at design time. There are several possibilities that a node may have undeclared attributes.
Returns:
whether the attribute is declared at design time

setR3NormalizingFormattingService

public void setR3NormalizingFormattingService(boolean formatting)
Set a special formatting service for currencies when working with an R/3 system. R/3 has a very special handling of currencies and some RFCs do not normalize this. In that case the attribute in Web Dynpro must also store the value denormalized and pass it to the R/3 system this way.

If you are not working with Adaptive RFC or if you are only usings BAPIs, you will not need this method. See the documentation of the Java Dictionary for more details.


Web Dynpro API Documentation

Copyright © 2004 SAP AG. Automatically generated Thu Mar 3 2005, 22:15