Class VariablePresentation
- java.lang.Object
-
- com.e1c.g5.v8.dt.lcore.ui.templates.contentassist.parsing.VariablePresentation
-
- All Implemented Interfaces:
IVariablePresentation
public class VariablePresentation extends Object implements IVariablePresentation
Default implementation for IVariablePresentation
-
-
Field Summary
-
Fields inherited from interface com.e1c.g5.v8.dt.lcore.ui.templates.contentassist.parsing.IVariablePresentation
ANY_LANGUAGE
-
-
Constructor Summary
Constructors Constructor Description VariablePresentation(String ruName, String engName, String description, int parametersCount, List<String> acceptableLanguages)
Creates new instance of this with given parametersVariablePresentation(String ruName, String engName, String description, int parametersCount, List<String> acceptableLanguages, List<String> suggestedNamesRu, List<String> suggestedNamesEn)
Creates new instance of this with given parametersVariablePresentation(String ruName, String engName, String description, int parametersCount, List<String> acceptableLanguages, List<String> suggestedNamesRu, List<String> suggestedNamesEn, List<String[]> parameterProposalsRu, List<String[]> parameterProposalsEn)
Creates new instance of this with given parameters
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getAcceptableLanguages()
Returns the language that this variable belongs toString
getDescription()
The description of the variableString
getName(boolean russianLocale)
Returns the name of this variable.int
getParametersCount()
Returns the number representing the amount of parameters this variable shall have on the preference page proposalString[]
getProposalsForParameters(int parameterIndex, boolean isRu)
Gets proposals for variable parameterList<String>
getSuggestedParameterNames(boolean isRu)
Returns default localized names for parameters that will be used in proposal ornull
if there is no suggested parameters' names.
-
-
-
Constructor Detail
-
VariablePresentation
public VariablePresentation(String ruName, String engName, String description, int parametersCount, List<String> acceptableLanguages)
Creates new instance of this with given parameters- Parameters:
ruName
- Localized to russian name of the variable, cannot benull
engName
- English version of the name of the variable, cannot benull
description
- Human readable description of the variable, cannot benull
parametersCount
- The amount of parametersacceptableLanguages
- The languages that this variable can be created for, cannot benull
-
VariablePresentation
public VariablePresentation(String ruName, String engName, String description, int parametersCount, List<String> acceptableLanguages, List<String> suggestedNamesRu, List<String> suggestedNamesEn)
Creates new instance of this with given parameters- Parameters:
ruName
- Localized to russian name of the variable, cannot benull
engName
- English version of the name of the variable, cannot benull
description
- Human readable description of the variable, cannot benull
parametersCount
- The amount of parametersacceptableLanguages
- The languages that this variable can be created for, cannot benull
suggestedNamesRu
- The suggested names in Russian language for parameters, can benull
suggestedNamesEn
- The suggested names in English language for parameters, can benull
-
VariablePresentation
public VariablePresentation(String ruName, String engName, String description, int parametersCount, List<String> acceptableLanguages, List<String> suggestedNamesRu, List<String> suggestedNamesEn, List<String[]> parameterProposalsRu, List<String[]> parameterProposalsEn)
Creates new instance of this with given parameters- Parameters:
ruName
- Localized to russian name of the variable, cannot benull
engName
- English version of the name of the variable, cannot benull
description
- Human readable description of the variable, cannot benull
parametersCount
- The amount of parametersacceptableLanguages
- The languages that this variable can be created for, cannot benull
suggestedNamesRu
- The suggested names in Russian language for parameters, can benull
suggestedNamesEn
- The suggested names in English language for parameters, can benull
parameterProposalsRu
- proposals for each parameters in Russian language, can benull
parameterProposalsRu
- proposals for each parameters in English language, can benull
-
-
Method Detail
-
getProposalsForParameters
public String[] getProposalsForParameters(int parameterIndex, boolean isRu)
Description copied from interface:IVariablePresentation
Gets proposals for variable parameter- Specified by:
getProposalsForParameters
in interfaceIVariablePresentation
- Parameters:
parameterIndex
- index of parameter, starts with 0isRu
-true
if getting Russian language parameter proposals,false
if getting English language parameter proposals- Returns:
- proposals for variable parameter in concrete language Russian or English, never
null
-
getName
public String getName(boolean russianLocale)
Description copied from interface:IVariablePresentation
Returns the name of this variable. It can have rus and eng representation- Specified by:
getName
in interfaceIVariablePresentation
- Returns:
- The list of the names that is associated with this variable, cannot be
null
-
getAcceptableLanguages
public List<String> getAcceptableLanguages()
Description copied from interface:IVariablePresentation
Returns the language that this variable belongs to- Specified by:
getAcceptableLanguages
in interfaceIVariablePresentation
- Returns:
- The the language of this variable, cannot be
null
-
getDescription
public String getDescription()
Description copied from interface:IVariablePresentation
The description of the variable- Specified by:
getDescription
in interfaceIVariablePresentation
- Returns:
- The description of the variable, cannot be
null
-
getParametersCount
public int getParametersCount()
Description copied from interface:IVariablePresentation
Returns the number representing the amount of parameters this variable shall have on the preference page proposal- Specified by:
getParametersCount
in interfaceIVariablePresentation
- Returns:
- The number of parameters held by this variable
-
getSuggestedParameterNames
public List<String> getSuggestedParameterNames(boolean isRu)
Description copied from interface:IVariablePresentation
Returns default localized names for parameters that will be used in proposal ornull
if there is no suggested parameters' names. The list size shall be the size ofIVariablePresentation.getParametersCount()
- Specified by:
getSuggestedParameterNames
in interfaceIVariablePresentation
- Returns:
- The list of localized names for parameters, can be
null
-
-