|
Rule Designer API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectilog.rules.shared.bom.IlrPropertyBOMDomainValueProvider
public class IlrPropertyBOMDomainValueProvider
This class is an implementation of BOM Domain Value Provider that takes its data from a property file. To provides values for a BOM Domain associated to the BOM Class sample.Book, you must specify the set of Enumerated values that are part of the domain and then properties of this values The syntax of the property file is the following: # this property specifies the list of values that are part of the BOM domain. Values are also names of # the static attributes that will be added to the BOM class. sample.Book.values = Book1, Book2 # This property specified the label to be used for the element Book1. This label is given for the Locale associated to # this property file sample.Book.Book1.label = Book1 # This property specifies the documentation of the element Book1 sample.Book.Book1.documentation = Documentation of the book1 # This property specifies the BOM to XOM mapping statement that will be associated to the BOM static attribute sample.Book.Book1.b2x = return sample.Book.getBook("book1"); # whatever property can be added to any element. In this example, the deprecated property is added to Book1 sample.Book1.deprecated = true
| Constructor Summary | |
|---|---|
IlrPropertyBOMDomainValueProvider(ResourceBundle resources)
This constructor initializes a property BOM domain value provider from a resource bundle. |
|
IlrPropertyBOMDomainValueProvider(String resourceFile,
ClassLoader classLoader)
This constructor initializes a property BOM domain value provider from a resource file and a class loader. |
|
| Method Summary | |
|---|---|
String |
getBOM2XOMMapping(String valueName)
Returns the BOM to XOM mapping of the given value name. |
String |
getDisplayText(String valueName,
Locale locale)
Returns the display text of the given value name. |
String |
getDocumentation(String valueName,
Locale locale)
Returns the documentation of the given value name. |
Map |
getProperties(String valueName)
Returns a map of properties associated to the given value name. |
String |
getTranslation(String valueName)
Returns the translation of the given value name. |
Collection |
getValues(IlrClass clazz)
This implementation of IlrBOMDomainValueProvider.getValues() retrieves values stored in the resource file associated to
this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface ilog.rules.shared.bom.IlrBOMDomainValueProvider |
|---|
dispose |
| Constructor Detail |
|---|
public IlrPropertyBOMDomainValueProvider(ResourceBundle resources)
resources - public IlrPropertyBOMDomainValueProvider(String resourceFile,
ClassLoader classLoader)
resourceFile - the .properties file containing the valuesclassLoader - the class loader to be used to load the resource file| Method Detail |
|---|
public Collection getValues(IlrClass clazz)
IlrBOMDomainValueProvider.getValues() retrieves values stored in the resource file associated to
this object. List of values can be both specified by a <fqn>.values property, where fqn is the fully qualified name of the class
Value of this property is a list of comma-separated elements.
If no <fqn>.values is provided, this method retrieves all values from all registered keys in this resource file.
getValues in interface IlrBOMDomainValueProviderclazz - The BOM class for which this value provider is used.
public String getDisplayText(String valueName,
Locale locale)
getDisplayText in interface IlrBOMDomainValueProvidervalueName - the name of the valuelocale - the Locale for which this label is asked
public String getDocumentation(String valueName,
Locale locale)
getDocumentation in interface IlrBOMDomainValueProvidervalueName - the name of the valuelocale - the Locale for which this documentation is asked
public Map getProperties(String valueName)
getProperties in interface IlrBOMDomainValueProvidervalueName - the name of the value
public String getTranslation(String valueName)
getTranslation in interface IlrBOMDomainValueProvidervalueName - the name of the value
public String getBOM2XOMMapping(String valueName)
getBOM2XOMMapping in interface IlrBOMDomainValueProvidervalueName - The name of the value.
|
Rule Designer API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||