com.sapportals.wcm.service.propertyconfig

Interface IMetaModel


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 String CUSTOM_NAMESPACE
          Name space is used to create properties.
 
Method Summary
 boolean checkMatchesMetaContext(IMetaName metaName, IMetaContext metaContext)
          Checks if the meta name fulfils all filter criteria 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, 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, String errorID)
          Returns an IValidationError
 String getBundleString(String key, Locale locale)
          Read an internationalised string from the model's bundles
 String getBundleString(String key, Locale locale, Object[] objs)
          Read an internationalised 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(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(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

static final String CUSTOM_NAMESPACE
Name space is used to create properties.

See Also:
Constant Field Values
Method Detail

createEmptyMetaNameList

IMetaNameList createEmptyMetaNameList()
returns an empty IMetaNameList

Returns:
an empty MetaNameList

createEmptyMetaValueList

IMetaValueList createEmptyMetaValueList()
returns an empty IMetaValueList

Returns:
an empty MetaValueList

createEmptyMetaContext

IMetaContext createEmptyMetaContext()
returns an empty IMetaContext

Returns:
empty meta context

createEmptyValidationErrorList

IValidationErrorList createEmptyValidationErrorList()
returns an empty IValidationErrorList

Returns:
an empty validation error list

createValidationError

IValidationError createValidationError(IMetaModel model,
                                       IMetaName metaName,
                                       IValidation validationInstance,
                                       String errorID)
Returns an IValidationError

Parameters:
model - meta model
metaName - invalid meta name
validationInstance - validation instance
errorID - error ID
Returns:
an validation error

createMetaValue

IMetaValue createMetaValue(IMetaModel model,
                           IMetaName metaName,
                           IDynamicValues dynamicValuesInstance,
                           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

IMetaNameListIterator nameIterator()
                                   throws PropertyConfigurationServiceException
Returns a iterator to get a ordered name list.

Returns:
<{IMetaNameListIterator}>
Throws:
PropertyConfigurationServiceException - Exception raised in failure situation
<{PropertyConfigurationServiceException}>

nameIterator

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

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

IMetaGroupListIterator groupIterator()
                                     throws PropertyConfigurationServiceException
Returns a iterator to get a ordered group list. This groups are usually registered in config framework (s. implementation)

Returns:
<{IMetaGroupListIterator}>
Throws:
PropertyConfigurationServiceException - Exception raised in failure situation
<{PropertyConfigurationServiceException}>

searchByProperty

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

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

IMetaName searchById(String id)
                     throws PropertyConfigurationServiceException
Search for a meta name by given id.

Parameters:
id - meta name id
Returns:
IMetaName (0,1)
Throws:
PropertyConfigurationServiceException

searchGroupById

IMetaGroup searchGroupById(String id)
                           throws PropertyConfigurationServiceException
Search for a meta group by given id.

Parameters:
id - meta group id
Returns:
IMetaGroup (0,1)
Throws:
PropertyConfigurationServiceException

createProperty

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

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

Returns:
flag

getBundleString

String getBundleString(String key,
                       Locale locale)
                       throws MissingResourceException
Read an internationalised string from the model's bundles

Parameters:
key - - the text key
locale - - the current local
Returns:
the internationalised text string
Throws:
MissingResourceException

getBundleString

String getBundleString(String key,
                       Locale locale,
                       Object[] objs)
                       throws MissingResourceException
Read an internationalised string from the model's bundles

Parameters:
key - text key
locale - current locals
objs - bundle string parameters
Returns:
the internationalised text string
Throws:
MissingResourceException

validate

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 occurred
Throws:
PropertyConfigurationServiceException

validate

IValidationErrorList validate(IProperty property,
                              IMetaContext metaContext)
                              throws PropertyConfigurationServiceException
Validation of properties via predefined validation classes

Parameters:
property - list of properties to validate
metaContext - context information
Returns:
list of validation errors, null if no error occurred
Throws:
PropertyConfigurationServiceException

checkMatchesMetaContext

boolean checkMatchesMetaContext(IMetaName metaName,
                                IMetaContext metaContext)
                                throws PropertyConfigurationServiceException
Checks if the meta name fulfils all filter criteria 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
Throws:
PropertyConfigurationServiceException

createMetaModelExport

IMetaModelExport createMetaModelExport()

createMetaModelImport

IMetaModelImport createMetaModelImport()
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2014 SAP AG Complete Copyright Notice