Class DataContext

    • Method Detail

      • _cloneContextData

        protected void _cloneContextData​(DataContext context)
        Clone the data of the current context in the given one
        Parameters:
        context - the clone
      • getLocale

        public Locale getLocale()
        Retrieves the locale to use for localized data
        Returns:
        the locale, or null if no local has been set
      • withLocale

        public DataContext withLocale​(Locale locale)
        Sets the locale to use for localized data. Do not set Locale to use all existing ones.
        Parameters:
        locale - the locale to set
        Returns:
        the current DataContext
      • getDataPath

        public String getDataPath()
        Retrieves the data path
        Returns:
        the dataPath
      • getFullDataPath

        public String getFullDataPath()
        Retrieves the full data path
        Returns:
        the fullDataPath
      • getObjectId

        public Optional<StringgetObjectId()
        Retrieves the identifier of the object from which the data path is computed
        Returns:
        the object identifier
      • withObjectId

        public DataContext withObjectId​(String objectId)
        Set the identifier of the object from which the data path is computed
        Parameters:
        objectId - the object identifier to set
        Returns:
        the current DataContext
      • getRootObjectId

        public Optional<StringgetRootObjectId()
        Retrieves the identifier of the object from which the full data path is computed
        Returns:
        the root object identifier
      • withRootObjectId

        public DataContext withRootObjectId​(String rootObjectId)
        Set the identifier of the object from which the full data path is computed
        Parameters:
        rootObjectId - the root object identifier to set
        Returns:
        the current DataContext
      • renderEmptyValues

        public boolean renderEmptyValues()
        Determines if the empty values have to be rendered
        Returns:
        true if empty values must be rendered (default), false otherwise
      • withEmptyValues

        public DataContext withEmptyValues​(boolean renderEmptyValues)
        Set to false to not render empty values (default to true)
        Parameters:
        renderEmptyValues - true to render the empty values, false otherwise
        Returns:
        the current DataContext