Class SynonymAwarePresentationProvider
- java.lang.Object
- 
- com._1c.g5.v8.dt.md.resource.presentation.SynonymAwarePresentationProvider
 
- 
- All Implemented Interfaces:
- IPresentationAdapter
 - Direct Known Subclasses:
- PeriodFieldPresentationProvider
 
 public class SynonymAwarePresentationProvider extends Object implements IPresentationAdapter DefaultIPresentationAdapterimplementation for DbView fields based on object with synonym. This implementation uses synonym of given object. This object should be instance ofMdObjectorStandardAttribute. If given object has no synonym or wrong type this provider will return field name according configuration script variant.This implementation can be used only with DbViewFieldFieldDef.
- 
- 
Field SummaryFields Modifier and Type Field Description static StringBM_PERSISTENT_ADAPTER_CONTEXT_KEY_SEPARATORstatic StringBM_PERSISTENT_ADAPTER_CONTEXT_KEY_SUFFIXstatic StringBM_PERSISTENT_ADAPTER_ID
 - 
Constructor SummaryConstructors Constructor Description SynonymAwarePresentationProvider(IBmModelManager bmModelManager)Constructs the instance of the provider.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidaddAdapter(IBmObject target, org.eclipse.emf.ecore.EObject objectWithSynonym)Adds adapter data for the given context.static voidaddAdapter(IBmObject target, org.eclipse.emf.ecore.EObject objectWithSynonym, String separator, String suffix)Adds adapter data for the given context.protected IBmModelManagergetBmModelManager()Gets theIBmModelManagerreference for descendant's use.protected StringgetFieldName(DbViewFieldDef field)Gets the field display name.protected StringgetFromSynonym(IBmObject synonymSource, String languageCode)Gets the name information from the synonym.protected StringgetLocalizedSuffix(String suffix)Gets the UI-localized representation of the suffix.StringgetPresentation(IBmObject target, String languageCode)Returns object presentation for given languageCode
 
- 
- 
- 
Field Detail- 
BM_PERSISTENT_ADAPTER_IDpublic static final String BM_PERSISTENT_ADAPTER_ID - See Also:
- Constant Field Values
 
 - 
BM_PERSISTENT_ADAPTER_CONTEXT_KEY_SUFFIXpublic static final String BM_PERSISTENT_ADAPTER_CONTEXT_KEY_SUFFIX - See Also:
- Constant Field Values
 
 - 
BM_PERSISTENT_ADAPTER_CONTEXT_KEY_SEPARATORpublic static final String BM_PERSISTENT_ADAPTER_CONTEXT_KEY_SEPARATOR - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
SynonymAwarePresentationProviderpublic SynonymAwarePresentationProvider(IBmModelManager bmModelManager) Constructs the instance of the provider.- Parameters:
- bmModelManager- The- IBmModelManagerreference.
 
 
- 
 - 
Method Detail- 
addAdapterpublic static void addAdapter(IBmObject target, org.eclipse.emf.ecore.EObject objectWithSynonym) Adds adapter data for the given context.- Parameters:
- target- The target object to store context in (not- null)
- objectWithSynonym- - the object with synonym (not- null)
 
 - 
addAdapterpublic static void addAdapter(IBmObject target, org.eclipse.emf.ecore.EObject objectWithSynonym, String separator, String suffix) Adds adapter data for the given context.- Parameters:
- target- The target object to store context in (not- null)
- objectWithSynonym- The object with synonym (not- null)
- separator- The separator (not- null)
- suffix- - the suffix (not- null)
 
 - 
getPresentationpublic String getPresentation(IBmObject target, String languageCode) Description copied from interface:IPresentationAdapterReturns object presentation for given languageCode- Specified by:
- getPresentationin interface- IPresentationAdapter
- languageCode- - the language code (not- null)
- Returns:
- object presentation for given languageCode (never null)
 
 - 
getBmModelManagerprotected IBmModelManager getBmModelManager() Gets theIBmModelManagerreference for descendant's use.- Returns:
- The instance of the IBmModelManager.
 
 - 
getFieldNameprotected String getFieldName(DbViewFieldDef field) Gets the field display name.- Parameters:
- field- The field.
- Returns:
- The display name of the field.
 
 - 
getFromSynonymprotected String getFromSynonym(IBmObject synonymSource, String languageCode) Gets the name information from the synonym.- Parameters:
- synonymSource- The source of the synonym data.
- languageCode- The code of the language to get synonym data for.
- Returns:
- The synonym data that corresponds the given language code.
 
 
- 
 
-