Class ElementDefinition<T>

    • Method Detail

      • getEnumerator

        public Enumerator<TgetEnumerator()
        Retrieves the enumerator.
        Returns:
        the enumerator or null if none is defined.
      • setEnumerator

        public void setEnumerator​(Enumerator<T> enumerator)
        Set the enumerator.
        Parameters:
        enumerator - the enumerator.
      • getCustomEnumerator

        public String getCustomEnumerator()
        Retrieves the custom enumerator's class name
        Returns:
        the custom enumerator's class name
      • setCustomEnumerator

        public void setCustomEnumerator​(String customEnumerator)
        Set the custom enumerator's class name
        Parameters:
        customEnumerator - the custom enumerator's class name
      • setEnumeratorConfiguration

        public void setEnumeratorConfiguration​(Configuration enumeratorConfiguration)
        Set the custom enumerator's configuration
        Parameters:
        enumeratorConfiguration - the custom enumerator's configuration
      • getValidator

        public Validator getValidator()
        Retrieves the validator.
        Returns:
        the validator or null if none is defined.
      • setValidator

        public void setValidator​(Validator validator)
        Set the validator.
        Parameters:
        validator - the validator.
      • getCustomValidator

        public String getCustomValidator()
        Retrieves the custom validator's class name
        Returns:
        the custom validator's class name
      • setCustomValidator

        public void setCustomValidator​(String customValidator)
        Set the custom validator's class name
        Parameters:
        customValidator - the custom validator's class name
      • setValidatorConfiguration

        public void setValidatorConfiguration​(Configuration validatorConfiguration)
        Set the custom validator's configuration
        Parameters:
        validatorConfiguration - the custom validator's configuration
      • getDefaultValue

        public <X> X getDefaultValue()
        Retrieves the default value, as an object corresponding to the definition's type and cardinality Retrieves null if no default value is defined for this definition
        Type Parameters:
        X - The type of the default value
        Returns:
        the default value.
      • _getDefaultValue

        protected T _getDefaultValue​(String defaultValueType,
                                     Object parsedDefaultValue)
        Retrieves the default value from the parsed one, according to the type of the default value
        Parameters:
        parsedDefaultValue - the parsed default value (can be an I18nizableText, a config parameter name, ... depending on the default value type)
        defaultValueType - the type of the default value
        Returns:
        the default value.
      • setParsedDefaultValues

        public void setParsedDefaultValues​(List<Pair<String,​Object>> parsedDefaultValues)
        Set the parsed default values. If the definition is not multiple, the list should contain only one element A parsed default value is described by its type and an object depending on the type
        Parameters:
        parsedDefaultValues - the parsed default values.
      • setDefaultValue

        public void setDefaultValue​(T defaultValue)
        Set a default value to the definition The default value is single, classic default value
        Parameters:
        defaultValue - the default value to set
      • isMultiple

        public boolean isMultiple()
        Test if the element is multiple.
        Returns:
        true if the metadata is multiple.
      • setMultiple

        public void setMultiple​(boolean isMultiple)
        Set the element multiple status.
        Parameters:
        isMultiple - the element multiple status.