SAP NetWeaver '04

com.sapportals.wcm.service.propertyconfig
Interface IMetaModel

[contained in: com.sap.km.cm.service.base.par - km.shared.service.propertyconfig_api.jar]
public interface IMetaModel

IMetaModel defines a model of name - value pair configuration which can be used by UI to create custom properties. The info exists of a list of names, each name has 0 or * values, each value has 1 or * set of sub values (= multi value).


Field Summary
static java.lang.String CUSTOM_NAMESPACE
          Namespace is used to create properties.
 
Method Summary
 boolean checkMatchesMetaContext(IMetaName metaName, IMetaContext metaContext)
          Checks if the meta name fulfils all filter criterias to be displayed for the context information.
 IMetaContext createEmptyMetaContext()
          returns an empty IMetaContext
 IMetaNameList createEmptyMetaNameList()
          returns an empty IMetaNameList
 IMetaValueList createEmptyMetaValueList()
          returns an empty IMetaValueList
 IValidationErrorList createEmptyValidationErrorList()
          returns an empty IValidationErrorList
 IMetaModelExport createMetaModelExport()
           
 IMetaModelImport createMetaModelImport()
           
 IMetaValue createMetaValue(IMetaModel model, IMetaName metaName, IDynamicValues dynamicValuesInstance, java.lang.String value)
          Returns an IMetaValue
 IProperty createProperty(IMetaName name, IMetaValue value)
          Creates a property from meta name and value.
 IValidationError createValidationError(IMetaModel model, IMetaName metaName, IValidation validationInstance, java.lang.String errorID)
          Returns an IValidationError
 java.lang.String getBundleString(java.lang.String key, java.util.Locale locale)
          Read an internationalized string from the model's bundles
 java.lang.String getBundleString(java.lang.String key, java.util.Locale locale, java.lang.Object[] objs)
          Read an internationalized string from the model's bundles
 IMetaGroupListIterator groupIterator()
          Returns a iterator to get a ordered group list.
 boolean isRestricted()
          Returns a flag which can be evaluated by UI to enable non restricted property creation.
 IMetaNameListIterator nameIterator()
          Returns a iterator to get a ordered name list.
 IMetaNameListIterator nameIterator(IMetaContext metaContext)
          Returns an iterator to get the properties configured for specific resource data
 IMetaNameListIterator nameIterator(IMetaContext metaContext, IMetaGroup metaGroup)
          Returns an iterator to get the properties configured for specific resource data and with a specific meta group
 IMetaName searchById(java.lang.String id)
          Search for a meta name by given id.
 IMetaName searchByProperty(IProperty property)
          Search for the meta name that was used to create the passed property.
 IMetaName searchByPropertyName(IPropertyName propertyName)
          Search for the meta name by a given property name.
 IMetaGroup searchGroupById(java.lang.String id)
          Search for a meta group by given id.
 IValidationErrorList validate(IProperty property, IMetaContext metaContext)
          Validation of properties via predefined validation classes
 IValidationErrorList validate(IPropertyMap properties, IMetaContext metaContext)
          Validation of properties via predefined validation classes
 

Field Detail

CUSTOM_NAMESPACE

public static final java.lang.String CUSTOM_NAMESPACE
Namespace is used to create properties.
Method Detail

createEmptyMetaNameList

public IMetaNameList createEmptyMetaNameList()
returns an empty IMetaNameList
Returns:
an empty MetaNameList

createEmptyMetaValueList

public IMetaValueList createEmptyMetaValueList()
returns an empty IMetaValueList
Returns:
an empty MetaValueList

createEmptyMetaContext

public IMetaContext createEmptyMetaContext()
returns an empty IMetaContext
Returns:
empty meta context

createEmptyValidationErrorList

public IValidationErrorList createEmptyValidationErrorList()
returns an empty IValidationErrorList
Returns:
an empty validation error list

createValidationError

public IValidationError createValidationError(IMetaModel model,
                                              IMetaName metaName,
                                              IValidation validationInstance,
                                              java.lang.String errorID)
Returns an IValidationError
Parameters:
model - meta model
metaName - invalid meta name
validationInstance - validation instance
errorID - error ID
Returns:
an validation error

createMetaValue

public IMetaValue createMetaValue(IMetaModel model,
                                  IMetaName metaName,
                                  IDynamicValues dynamicValuesInstance,
                                  java.lang.String value)
Returns an IMetaValue
Parameters:
model - meta model
metaName - meta name for that the value is valid
dynamicValuesInstance - value provider
value - property value
Returns:
meta value object

nameIterator

public IMetaNameListIterator nameIterator()
                                   throws PropertyConfigurationServiceException
Returns a iterator to get a ordered name list.
Returns:
<{IMetaNameListIterator}>
Throws:
PropertyConfigurationServiceException - Exception raised in failure situation
<{PropertyConfigurationServiceException}> -  

nameIterator

public IMetaNameListIterator nameIterator(IMetaContext metaContext)
                                   throws PropertyConfigurationServiceException
Returns an iterator to get the properties configured for specific resource data
Parameters:
metaContext - context information
Returns:
<{IMetaValueListIterator}>
Throws:
PropertyConfigurationServiceException - Exception raised in failure situation
<{PropertyConfigurationServiceException}> -  

nameIterator

public IMetaNameListIterator nameIterator(IMetaContext metaContext,
                                          IMetaGroup metaGroup)
                                   throws PropertyConfigurationServiceException
Returns an iterator to get the properties configured for specific resource data and with a specific meta group
Parameters:
metaContext - context information
metaGroup - group as additional filter criterium
Returns:
<{IMetaValueListIterator}>
Throws:
PropertyConfigurationServiceException - Exception raised in failure situation
<{PropertyConfigurationServiceException}> -  

groupIterator

public IMetaGroupListIterator groupIterator()
                                     throws PropertyConfigurationServiceException
Returns a iterator to get a ordered group list. This groups are usually registert in config framework (s. implementation)
Returns:
<{IMetaGroupListIterator}>
Throws:
PropertyConfigurationServiceException - Exception raised in failure situation
<{PropertyConfigurationServiceException}> -  

searchByProperty

public IMetaName searchByProperty(IProperty property)
                           throws PropertyConfigurationServiceException
Search for the meta name that was used to create the passed property.
Parameters:
property - Search argument.
Returns:
IMetaName (0, 1)
Throws:
PropertyConfigurationServiceException -  

searchByPropertyName

public IMetaName searchByPropertyName(IPropertyName propertyName)
                               throws PropertyConfigurationServiceException
Search for the meta name by a given property name.
Parameters:
propertyName - Search argument.
Returns:
IMetaName (0, 1)
Throws:
PropertyConfigurationServiceException - Exception raised in failure situation
<{PropertyConfigurationServiceException}> -  

searchById

public IMetaName searchById(java.lang.String id)
                     throws PropertyConfigurationServiceException
Search for a meta name by given id.
Parameters:
id - meta name id
Returns:
IMetaName (0,1)
Throws:
PropertyConfigurationServiceException -  

searchGroupById

public IMetaGroup searchGroupById(java.lang.String id)
                           throws PropertyConfigurationServiceException
Search for a meta group by given id.
Parameters:
id - meta group id
Returns:
IMetaGroup (0,1)
Throws:
PropertyConfigurationServiceException -  

createProperty

public IProperty createProperty(IMetaName name,
                                IMetaValue value)
                         throws PropertyConfigurationServiceException
Creates a property from meta name and value.
Parameters:
name - - A meta name
value - - A meta value
Returns:
A property
Throws:
PropertyConfigurationServiceException -  

isRestricted

public boolean isRestricted()
Returns a flag which can be evaluated by UI to enable non restricted property creation.
Returns:
flag

getBundleString

public java.lang.String getBundleString(java.lang.String key,
                                        java.util.Locale locale)
                                 throws java.util.MissingResourceException
Read an internationalized string from the model's bundles
Parameters:
key - - the text key
locale - - the current locale
Returns:
the internationalized text string
Throws:
java.util.MissingResourceException -  

getBundleString

public java.lang.String getBundleString(java.lang.String key,
                                        java.util.Locale locale,
                                        java.lang.Object[] objs)
                                 throws java.util.MissingResourceException
Read an internationalized string from the model's bundles
Parameters:
key - text key
locale - current locale
objs - bundle string parameters
Returns:
the internationalized text string
Throws:
java.util.MissingResourceException -  

validate

public IValidationErrorList validate(IPropertyMap properties,
                                     IMetaContext metaContext)
                              throws PropertyConfigurationServiceException
Validation of properties via predefined validation classes
Parameters:
properties - list of properties to validate
metaContext - context information
Returns:
list of validation errors, null if no error occured

validate

public IValidationErrorList validate(IProperty property,
                                     IMetaContext metaContext)
                              throws PropertyConfigurationServiceException
Validation of properties via predefined validation classes
Parameters:
properties - list of properties to validate
metaContext - context information
Returns:
list of validation errors, null if no error occured

checkMatchesMetaContext

public boolean checkMatchesMetaContext(IMetaName metaName,
                                       IMetaContext metaContext)
                                throws PropertyConfigurationServiceException
Checks if the meta name fulfils all filter criterias to be displayed for the context information.
Parameters:
metaName - meta name to be checked
metaContext - context information that is used to check the meta name
Returns:
true if the meta name is relevant for the context information

createMetaModelExport

public IMetaModelExport createMetaModelExport()

createMetaModelImport

public IMetaModelImport createMetaModelImport()

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.