Web Dynpro API Documentation

com.sap.tc.webdynpro.repository.api
Interface IWDRepositoryModelClass

All Superinterfaces:
com.sap.tc.cmi.model.ICMIGenericModelClass, com.sap.tc.cmi.model.ICMIModelClass
All Known Subinterfaces:
IWDAbstractViewInfo, IWDActionInfo, IWDApplicationInfo, IWDApplicationPropertyInfo, IWDBusinessGraphicsInfo, IWDComponentControllerUsageInfo, IWDComponentInfo, IWDComponentInterfaceDefinitionInfo, IWDComponentInterfaceImplementationInfo, IWDComponentInterfaceInfo, IWDComponentUsageInfo, IWDContextAttributeMappingInfo, IWDContextElementMappingInfo, IWDControllerInfo, IWDControllerUsageInfo, IWDCustomEventInfo, IWDEmptyViewInfo, IWDEventBindingInfo, IWDEventHandlerInfo, IWDEventInfo, IWDInboundPlugInfo, IWDIncomingEventInfo, IWDInterfaceViewInfo, IWDNavigationLinkInfo, IWDNavigationTargetReferenceInfo, IWDOutboundPlugInfo, IWDParameterInfo, IWDParameterizedFeatureInfo, IWDParameterMappingInfo, IWDUIElementInfo, IWDUIElementLibraryInfo, IWDViewContainerAssignmentInfo, IWDViewContainerInfo, IWDViewInfo, IWDViewUsageInfo, IWDWindowInfo

public interface IWDRepositoryModelClass
extends com.sap.tc.cmi.model.ICMIGenericModelClass

The API to the generic repository object class that represents repository content at runtime time.

Version:
$Id: //tc/WebDynproRuntime/630_VAL_REL/src/_webdynpro_runtime_repository/java/com/sap/tc/webdynpro/repository/api/IWDRepositoryModelClass.java#2 $

Method Summary
 IWDRepositoryModelClass createRelatedModelObject(java.lang.String rolename, java.lang.String name)
          Creates a new child object for the given relation.
 IWDRepositoryModelClass createRelatedModelObject(java.lang.String rolename, java.lang.String name, IWDRepositoryModelClassInfo modelClassInfo)
          Creates a new child object for the given relation.
 boolean deleteRelatedModelObject(java.lang.String rolename, IWDRepositoryModelClass o)
          Deletes the given child object from the given relation.
 java.lang.String getAttributeValue(java.lang.String name, java.util.Locale locale)
          Returns the value of an attribute for the specified locale.
 java.lang.String getName()
          Returns the name of the repository object.
 IWDRepositoryModelClass getParent()
          Returns the parent of this object.
 IWDRepositoryModelClass getPersonalizationObject()
          Returns the personalization repository object for this repository object.
 IWDRepositoryModel getRepositoryModel()
          Returns the repository model of this repository object.
 IWDRepositoryModel getRepositoryRoot()
          Deprecated. To improve consistency across the Web Dynpro API, this method has been renamed to getRepositoryModel(). The method with the old name has been kept for backward compatiblity, but may be withdrawn with the first new NetWeaver release in 2006.
 boolean isVersionableModelObject()
          Returns true, iff the current object is a versionable model object.
 void setAttributeValue(java.lang.String name, java.lang.String value, java.util.Locale locale)
          Sets the attribute value.
 
Methods inherited from interface com.sap.tc.cmi.model.ICMIGenericModelClass
addRelatedModelObject, associatedModelClassInfo, getAttributeValue, getRelatedModelObject, getRelatedModelObjects, removeRelatedModelObject, setAttributeValue, setRelatedModelObject, setRelatedModelObjects
 
Methods inherited from interface com.sap.tc.cmi.model.ICMIModelClass
associatedModel
 

Method Detail

getName

public java.lang.String getName()
Returns the name of the repository object.
Returns:
the name of the repository object

getParent

public IWDRepositoryModelClass getParent()
Returns the parent of this object.
Returns:
the parent of this object or null, if the object has no parent

getPersonalizationObject

public IWDRepositoryModelClass getPersonalizationObject()
Returns the personalization repository object for this repository object. Throws an exception if no personalization repository object is available.
Returns:
the personalization repository object for this repository object

getRepositoryRoot

public IWDRepositoryModel getRepositoryRoot()
Deprecated. To improve consistency across the Web Dynpro API, this method has been renamed to getRepositoryModel(). The method with the old name has been kept for backward compatiblity, but may be withdrawn with the first new NetWeaver release in 2006.

Returns the repository root of this repository object.
Returns:
the repository root of this repository object

getRepositoryModel

public IWDRepositoryModel getRepositoryModel()
Returns the repository model of this repository object.
Returns:
the repository model of this repository object

createRelatedModelObject

public IWDRepositoryModelClass createRelatedModelObject(java.lang.String rolename,
                                                        java.lang.String name)
Creates a new child object for the given relation. Preconditions:
rolename is not empty
name is not empty
name must only contain a..zA..Z0..9._- symbols
object with the given name must not exist in the given role
the relation must be an aggregation
Parameters:
rolename - name of the relation role the new child will belong to
name - name of the child object
Returns:
the newly created child object
Throws:
RepositoryRuntimeException - if name is the name of an object that was deleted in the current variant, in one of its predecessor variants or in the personalization layer before

createRelatedModelObject

public IWDRepositoryModelClass createRelatedModelObject(java.lang.String rolename,
                                                        java.lang.String name,
                                                        IWDRepositoryModelClassInfo modelClassInfo)
Creates a new child object for the given relation. The provided modelClassInfo must belong to a modelClass which is a sub-class of the aggregated class. Preconditions:
rolename is not empty
name is not empty
name must only contain a..zA..Z0..9._- symbols
object with the given name must not exist in the given role
the relation must be an aggregation
Parameters:
rolename - name of the relation role the new child will belong to
name - name of the child object
modelClassInfo - the class description to use when creating the object
Returns:
the newly created child object
Throws:
RepositoryRuntimeException - if name is the name of an object that was deleted in the current variant, in one of its predecessor variants or in the personalization layer before

deleteRelatedModelObject

public boolean deleteRelatedModelObject(java.lang.String rolename,
                                        IWDRepositoryModelClass o)
Deletes the given child object from the given relation. Preconditions:
rolename is not empty
the role be a valid target role for this repository model class
o != null
Parameters:
rolename - name of the relation role the child belongs to
o - the child object to be deleted
Returns:
true, iff the child belonged to the given relation role and was deleted

isVersionableModelObject

public boolean isVersionableModelObject()
Returns true, iff the current object is a versionable model object.

getAttributeValue

public java.lang.String getAttributeValue(java.lang.String name,
                                          java.util.Locale locale)
Returns the value of an attribute for the specified locale. The search algorithm is as follows (the first found value is used):
Specified locale in current layer.
Specified locale without country in current layer.
Specified locale in previous layers.
Specified locale without country in previous layers.
Master locale in current layer.
Master locale without country in current layer.
Master locale in previous layers.
Master locale without country in previous layers.
Continue search in the same way for all predecessing variants.
Precondition: name denotes an attribute that is translatable, i.e. ((RepositoryObjectAttributeInfo) associatedModelClassInfo.getPropertyInfo(name)).isTranslatable() == true
Parameters:
name - the attribute's name
locale - the locale to be used; if null, the default locale of the repository is used
Returns:
the value of the attribute with name supplied as input parameter; if the attribute couldn't be found, null is returned

setAttributeValue

public void setAttributeValue(java.lang.String name,
                              java.lang.String value,
                              java.util.Locale locale)
Sets the attribute value. Precondition: name denotes an attribute that is translatable, i.e. ((RepositoryObjectAttributeInfo) associatedModelClassInfo.getPropertyInfo(name)).isTranslatable() == true
Parameters:
name - name of the attribute
value - value of the attribute
locale - the locale the specified value belongs to

Web Dynpro API Documentation

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