Class VariablePresentation

    • 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 be null
        engName - English version of the name of the variable, cannot be null
        description - Human readable description of the variable, cannot be null
        parametersCount - The amount of parameters
        acceptableLanguages - The languages that this variable can be created for, cannot be null
      • 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 be null
        engName - English version of the name of the variable, cannot be null
        description - Human readable description of the variable, cannot be null
        parametersCount - The amount of parameters
        acceptableLanguages - The languages that this variable can be created for, cannot be null
        suggestedNamesRu - The suggested names in Russian language for parameters, can be null
        suggestedNamesEn - The suggested names in English language for parameters, can be null
      • 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 be null
        engName - English version of the name of the variable, cannot be null
        description - Human readable description of the variable, cannot be null
        parametersCount - The amount of parameters
        acceptableLanguages - The languages that this variable can be created for, cannot be null
        suggestedNamesRu - The suggested names in Russian language for parameters, can be null
        suggestedNamesEn - The suggested names in English language for parameters, can be null
        parameterProposalsRu - proposals for each parameters in Russian language, can be null
        parameterProposalsRu - proposals for each parameters in English language, can be null
    • Method Detail

      • getProposalsForParameters

        public String[] getProposalsForParameters​(int parameterIndex,
                                                  boolean isRu)
        Description copied from interface: IVariablePresentation
        Gets proposals for variable parameter
        Specified by:
        getProposalsForParameters in interface IVariablePresentation
        Parameters:
        parameterIndex - index of parameter, starts with 0
        isRu - 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 interface IVariablePresentation
        Returns:
        The list of the names that is associated with this 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 interface IVariablePresentation
        Returns:
        The number of parameters held by this variable