public class DdBroker extends Object implements IBroker, IRegistry, DdConstants, Serializable
| Modifier and Type | Field and Description |
|---|---|
protected static String |
CURR_PACKAGE |
protected static String |
CURRENCY |
protected static String |
CURRENCY_NORMALIZED |
protected static String |
MEASURE_PACKAGE |
protected static String |
QUAN_PACKAGE |
protected static String |
QUANTITY |
protected static String |
QUANTITY_NORMALIZED |
ALLOWED_PRECISION_IS_HURT, AMBIGUOUS_DESCRIPTION, BIGGER_THAN_MIN_EXCL, BIGGER_THAN_MIN_INCL, CCTS_FORMAT_MESSAGE1, CCTS_FORMAT_MESSAGE2, CCTS_PARSE_MESSAGE1, CCTS_PARSE_MESSAGE2, CCTS_TYPE_EXPECTED_WITH_SUPPL_TYPE, CCTS_TYPE_EXPECTED_WITH_SUPPL_TYPE_SET_NAME, CLASS_DOES_NOT_IMPLEMENT_INTERFACE, COMPONENT_DOES_NOT_EXIST, COMPONENT_VALUE_CAN_NOT_BE_EXTRACTED, CONTAINER_COULD_NOT_BE_CREATED, CONVERSION_EXIT_DOES_NOT_EXIST, CONVERSION_EXIT_NOT_SET, DDIC_NOT_CREATED, DDIC_TYPE_DOES_NOT_EXIST, DECIMAL_VALUE_TO_BIG, DECIMALS_NOT_ALLOWED, DURATION_TEMPLATE_VIOLATION, DURATION_TEMPLATE_VIOLATION2, EMPTY_STRING_NOT_VALID, ENTRY_NOT_VALID, ERROR_DURING_PARSE, ERROR_DURING_PARSE_DATE, ERROR_DURING_PARSE_NO_VALID, ERROR_DURING_PARSE_TIME, ERROR_DURING_PARSE_TIMESTAMP, ERROR_DURING_PARSE2, ERROR_DURING_UNIT_TYPE_CREATION, FORMATTING_OPTION_NOT_SUPPORTED, LOCALE_CHANGE_NOT_POSSIBLE, LOGICAL_DDIC_DOES_NOT_EXIST, NO_AVAILABLE_LOCALE, NO_DATATYPE_FOR_FIELD, NO_DATATYPE_IN_FIELD, NO_DATETIME_SUBTYPE_FOR_THIS_PATTERN, NO_DDIC_NAME, NO_ENUM_MATCHING, NO_ENUM_MATCHING_S, NO_EXTERNAL_REPRESENTATION, NO_KEY_FOR_THIS_DESCRIPTION, NO_NUMBER, NO_NUMERIC_VALUE, NO_PATTERN_MATCHING, NO_PATTERN_MATCHING_S, NO_REFERENCE_FIELD_FOUND, NO_TEXTSERVICE_AVAILABLE, NO_TYPE_IN_XML, NO_UNIT_DESCRIPTION, NO_VALID_DEFAULT_OPTION_VALUE, NO_VALID_ENTRY, NO_VALUESERVICE_AVAILABLE, NON_NUMERIC_CHARS, NOT_NORMALIZED, NOT_NUMERIC, NOT_SUPPORTED_IN_AP6_5, NOT_VALID, NULL_NOT_VALID, NUMBER_OUT_OF_RANGE, PARSE_ERROR_CLEARED_FIELD, PARSE_ERROR_NO_BIG_INTEGER, PARSE_ERROR_NO_INTEGER, PARSE_ERROR_UNALLOWED_CHARS, PARSE_NOT_POSSIBLE, PATTERN_NOT_VALID_FOR_KEYS, PERCENT_DEFINITION_AREA_HURT, PRECISION_TOO_BIG, PREVIOUS_VALUE_CAN_NOT_BE_FORMATTED, PROVIDER_CLASS_NOT_FOUND, PROVIDER_NOT_FOUND, REFERENCE_FIELD_DOES_NOT_EXIST, SIMPLE_FORMAT_MESSAGE, SIMPLE_PARSE_MESSAGE, SIMPLE_TYPE_DOES_NOT_EXIST, SIMPLE_TYPE_EXPECTED, SIMPLE_TYPE_EXPECTED_WITH_CONTENT_TYPE, SIMPLE_TYPE_EXPECTED_WITH_SUPPL_TYPE, SIMPLE_TYPE_NOT_CREATED, SMALLER_THAN_MAX_EXCL, SMALLER_THAN_MAX_INCL, STRUCTURE_TYPE_DOES_NOT_EXIST, TIME_DOES_NOT_EXIST, TOO_MUCH_SIGNIFICANT_POSITIONS, TRANSFER_TO_XML_NOT_POSSIBLE, TRANSFER_TO_XML_NOT_POSSIBLE_WRONG_PATTERN, TYPE_INFO_MESSAGE, TYPE_NOT_FOUND, UNKNOWN_TIMEZONE, VALUE_CAN_NOT_BE_PARSED, WRONG_AMOUNT_TYPE, WRONG_BASE_TYPE_FOR_US, WRONG_CLASS, WRONG_CONTAINER_CLASS, WRONG_CONTAINER_INSTANCE, WRONG_CURRENCY_CODE, WRONG_CURRENCY_UNIT, WRONG_DATA_FOR_CHECK, WRONG_DATA_FOR_FORMAT, WRONG_DURATION_TEMPLATE, WRONG_FIXED_LENGTH_S, WRONG_KEY_TYPE, WRONG_KEY_TYPE_FOR_FORMAT, WRONG_KEY_TYPE_FOR_US, WRONG_MAX_EXT_LENGTH, WRONG_MAX_EXT_LENGTH_S, WRONG_MAX_LENGTH_S, WRONG_MEASURE_CODE, WRONG_MIN_LENGTH_S, WRONG_OR_NO_COMPONENT_PATH, WRONG_POSITION_OF_PERCENT_SIGN, WRONG_PRECISION, WRONG_QUANTITY_CODE, WRONG_UNIT_KEY, WRONG_UNIT_KEY_TYPE, WRONG_UNIT_TYPE_PROPERTIES, WRONG_XML_FILE, XML_PARSE_ERROR, YEAR_WITH_WRONG_VALUE| Modifier | Constructor and Description |
|---|---|
protected |
DdBroker(ClassLoader classLoader,
Locale locale) |
protected |
DdBroker(ClassLoader classLoader,
Locale locale,
com.sap.dictionary.types.services.IConfig configuration) |
protected |
DdBroker(com.sap.typeservices.IClassLoaderHandle handle,
Locale locale) |
protected |
DdBroker(com.sap.typeservices.IClassLoaderHandle handle,
Locale locale,
DdDictionary backendDictionary,
INameTranslator translator) |
protected |
DdBroker(com.sap.typeservices.IClassLoaderHandle handle,
Locale locale,
com.sap.dictionary.types.services.IConfig configuration) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
clearCache(String dictionaryName) |
Iterator |
dictionaryIterator()
Returns an iterator over the dictionaries in sequence of insertion
|
ClassLoader |
getClassLoader()
Returns the broker's classLoader
|
IConversionExit |
getConversionExit(String dictionaryName,
String name)
Gets the conversion exit with key name for the given dictionary.
|
IUnitService |
getCurrencyService(ISimpleType amountType,
boolean normalized,
Locale locale) |
protected IDataType |
getDataType(IField field) |
IDataType |
getDataType(String name)
Returns a dataType with the given type name whereas name contains of
package and typeName.
|
IDataType |
getDataType(String dictionaryName,
String name)
Returns a dataType with the given dictionaryName and type name.
|
DdDictionary |
getDictionary(String dictionaryName)
Gets a DataDictionary as IDictionary out of the cache
|
static com.sap.i18n.cpbase.I18nFormatterFactory |
getFormatterFactory() |
Locale |
getLocale()
Returns the TypeBroker's locale
|
ISimpleType |
getPredefinedSimpleType(BigDecimal value) |
ISimpleType |
getPredefinedSimpleType(BigInteger value) |
ISimpleType |
getPredefinedSimpleType(boolean value) |
ISimpleType |
getPredefinedSimpleType(Boolean value) |
ISimpleType |
getPredefinedSimpleType(byte value) |
ISimpleType |
getPredefinedSimpleType(Byte value) |
ISimpleType |
getPredefinedSimpleType(byte[] value) |
ISimpleType |
getPredefinedSimpleType(Class attributeClass) |
ISimpleType |
getPredefinedSimpleType(Date value) |
ISimpleType |
getPredefinedSimpleType(Date value) |
ISimpleType |
getPredefinedSimpleType(double value) |
ISimpleType |
getPredefinedSimpleType(Double value) |
ISimpleType |
getPredefinedSimpleType(float value) |
ISimpleType |
getPredefinedSimpleType(Float value) |
ISimpleType |
getPredefinedSimpleType(int value) |
ISimpleType |
getPredefinedSimpleType(Integer value) |
ISimpleType |
getPredefinedSimpleType(long value) |
ISimpleType |
getPredefinedSimpleType(Long value) |
ISimpleType |
getPredefinedSimpleType(short value) |
ISimpleType |
getPredefinedSimpleType(Short value) |
ISimpleType |
getPredefinedSimpleType(String value) |
ISimpleType |
getPredefinedSimpleType(Time value) |
ISimpleType |
getPredefinedSimpleType(Timestamp value) |
ISimpleType |
getPredefinedSimpleTypeByName(String typeName) |
IUnitService |
getQuantityService(ISimpleType amountType,
boolean normalized,
Locale locale) |
static Locale |
getSessionLocale() |
ISimpleType |
getSimpleType(String dictionaryName,
String name)
Returns a simpleType with the given given dictionaryName and SimpleType
name.
|
IStructure |
getStructure(String dictionaryName,
String name)
Returns a structure with the given dictionary name and structure name.
|
static TimeZone |
getTimeZone() |
IUnitService |
getUnitService(IField amountField)
Returns a unit service for the given amount type.
|
IUnitService |
getUnitService(IField amountField,
boolean normalizingForced)
Returns a unit service for the given amount field.
|
IUnitService |
getUnitService(ISimpleType amountType,
ISimpleType unitKeyType) |
boolean |
invalidateCache(String dictionaryName)
Invalidates the cache for the dictionary with the given name.
|
static boolean |
isUsingSAPTimeZone(IDataType type) |
void |
putDictionary(String dictionaryName,
IDataProvider provider)
Introduce a new-dictionary to this TypeBroker
|
protected void |
putDictionary(String dictionaryName,
String logSystemName,
IDataProvider provider) |
void |
putJavaDictionary(ClassLoader classLoader)
Introduce a java-dictionary to this TypeBroker
|
DdDictionary |
removeDictionary(String dictionaryName)
Removes a dictionary from the TypeBroker
|
void |
setConversionExit(String dictionaryName,
String name,
IConversionExit cnvExit)
Sets a conversion exit with key name for the given dictionary.
|
static void |
setFormatterFactory(com.sap.i18n.cpbase.I18nFormatterFactory formatterFactory) |
static void |
setSessionLocale(Locale locale) |
static void |
setTimeZone(TimeZone timeZone) |
protected static final String CURRENCY
protected static final String CURRENCY_NORMALIZED
protected static final String QUANTITY
protected static final String QUANTITY_NORMALIZED
protected static final String CURR_PACKAGE
protected static final String QUAN_PACKAGE
protected static final String MEASURE_PACKAGE
protected DdBroker(ClassLoader classLoader, Locale locale) throws DdException
DdExceptionprotected DdBroker(ClassLoader classLoader, Locale locale, com.sap.dictionary.types.services.IConfig configuration) throws DdException
DdExceptionprotected DdBroker(com.sap.typeservices.IClassLoaderHandle handle,
Locale locale)
throws DdException
DdExceptionprotected DdBroker(com.sap.typeservices.IClassLoaderHandle handle,
Locale locale,
com.sap.dictionary.types.services.IConfig configuration)
throws DdException
DdExceptionprotected DdBroker(com.sap.typeservices.IClassLoaderHandle handle,
Locale locale,
DdDictionary backendDictionary,
INameTranslator translator)
throws DdException
DdExceptionpublic static TimeZone getTimeZone()
public static boolean isUsingSAPTimeZone(IDataType type)
public static void setTimeZone(TimeZone timeZone)
public static com.sap.i18n.cpbase.I18nFormatterFactory getFormatterFactory()
public static void setFormatterFactory(com.sap.i18n.cpbase.I18nFormatterFactory formatterFactory)
public static Locale getSessionLocale()
public static void setSessionLocale(Locale locale)
protected void putDictionary(String dictionaryName, String logSystemName, IDataProvider provider)
public void putDictionary(String dictionaryName, IDataProvider provider)
IBrokerputDictionary in interface IBrokerdictionaryName - - the name to identify this dictionaryprovider - - the provider-instance for backend-accesspublic void putJavaDictionary(ClassLoader classLoader)
IBrokerputJavaDictionary in interface IBrokerclassLoader - - the class loader to get the java-typespublic DdDictionary getDictionary(String dictionaryName) throws DdRuntimeException
IBrokergetDictionary in interface IBrokerdictionaryName - - logical Name of this dictionary instanceDdRuntimeExceptionpublic ClassLoader getClassLoader()
IBrokergetClassLoader in interface IBrokerpublic DdDictionary removeDictionary(String dictionaryName)
IBrokerremoveDictionary in interface IBrokerdictionaryName - - a DataDictionary namepublic Iterator dictionaryIterator()
IBrokerdictionaryIterator in interface IBrokerpublic boolean invalidateCache(String dictionaryName)
IBrokerinvalidateCache in interface IBrokerdictionaryName - - the logical name of the dictionarypublic boolean clearCache(String dictionaryName)
public IDataType getDataType(String dictionaryName, String name) throws DdException
IBrokergetDataType in interface IBrokerdictionaryName - the name of the logical dictionaryname - - the type's name, includes package if necessaryDdException - - if data type could not be instantiatedpublic ISimpleType getSimpleType(String dictionaryName, String name) throws DdException
IBrokergetSimpleType in interface IBrokerdictionaryName - the name of the logical dictionaryname - - the type's name, includes package if necessaryDdException - - if simple type could not be instantiatedpublic IStructure getStructure(String dictionaryName, String name) throws DdException
IBrokergetStructure in interface IBrokerdictionaryName - the name of the logical dictionaryname - - the type's name, includes package if necessaryDdException - - if structure could not be instantiatedpublic IDataType getDataType(String name) throws DdException
IBrokergetDataType in interface IBrokername - - the type's name, includes packageDdException - - if data type could not be instantiatedpublic Locale getLocale()
IBrokerpublic void setConversionExit(String dictionaryName, String name, IConversionExit cnvExit) throws DdException
IBrokersetConversionExit in interface IBrokersetConversionExit in interface IRegistrydictionaryName - - Name of dictionaryname - - name of conversion exit keycnvExit - - conversion exit object implementing IConversionExit holding the format and parse implementationDdException - - thrown if no dictionary of given name can be retrievedpublic IConversionExit getConversionExit(String dictionaryName, String name) throws DdException
IBrokergetConversionExit in interface IBrokergetConversionExit in interface IRegistrydictionaryName - - Name of dictionaryname - - - name of conversion exit keyDdException - - thrown if no dictionary of given name can be retrievedpublic IUnitService getUnitService(IField amountField) throws DdException
getUnitService in interface IBrokeramountField - amount typeDdException - - if unit Service could not be instantiatedpublic IUnitService getUnitService(IField amountField, boolean normalizingForced) throws DdException
IBrokergetUnitService in interface IBrokeramountField - - the reference fieldnormalizingForced - - true means the currency-values are normalized
during parse and denormalized during formatting,
false means that the type controls whether normalization is done or not.
Then in case of R/3 backend de/normalization will never be doneDdException - - if unit Service could not be instantiatedpublic ISimpleType getPredefinedSimpleType(Class attributeClass)
getPredefinedSimpleType in interface IBrokerpublic ISimpleType getPredefinedSimpleTypeByName(String typeName)
public ISimpleType getPredefinedSimpleType(String value)
public ISimpleType getPredefinedSimpleType(byte[] value)
public ISimpleType getPredefinedSimpleType(Boolean value)
public ISimpleType getPredefinedSimpleType(boolean value)
public ISimpleType getPredefinedSimpleType(BigDecimal value)
public ISimpleType getPredefinedSimpleType(BigInteger value)
public ISimpleType getPredefinedSimpleType(Byte value)
public ISimpleType getPredefinedSimpleType(Double value)
public ISimpleType getPredefinedSimpleType(Float value)
public ISimpleType getPredefinedSimpleType(Integer value)
public ISimpleType getPredefinedSimpleType(Long value)
public ISimpleType getPredefinedSimpleType(Short value)
public ISimpleType getPredefinedSimpleType(byte value)
public ISimpleType getPredefinedSimpleType(double value)
public ISimpleType getPredefinedSimpleType(float value)
public ISimpleType getPredefinedSimpleType(int value)
public ISimpleType getPredefinedSimpleType(long value)
public ISimpleType getPredefinedSimpleType(short value)
public ISimpleType getPredefinedSimpleType(Date value)
public ISimpleType getPredefinedSimpleType(Date value)
public ISimpleType getPredefinedSimpleType(Time value)
public ISimpleType getPredefinedSimpleType(Timestamp value)
protected IDataType getDataType(IField field) throws DdException
DdExceptionpublic IUnitService getCurrencyService(ISimpleType amountType, boolean normalized, Locale locale) throws DdException
DdExceptionpublic IUnitService getQuantityService(ISimpleType amountType, boolean normalized, Locale locale) throws DdException
DdExceptionpublic IUnitService getUnitService(ISimpleType amountType, ISimpleType unitKeyType) throws DdException
DdException| Access Rights |
|---|
| SC | DC | Public Part | ACH |
|---|---|---|---|
[sap.com] FRAMEWORK
|
[sap.com] tc/ddic/ddicruntime
|
default
|
BC-DWB-JDD
|
Copyright 2016 SAP AG Complete Copyright Notice