Interface RenderingContext

    • Method Detail

      • getLocale

        Locale getLocale()
        Gets the requested Locale.
        Since:
        7.2
      • getBaseUrl

        String getBaseUrl()
        Gets the current base url.
        Since:
        7.2
      • setExistingSession

        void setExistingSession​(CoreSession session)
        Provides a CoreSession to marshallers.

        For example: a CoreSession from the request context.

        Parameters:
        session - The existing CoreSession which lifecycle is managed outside the marshalling context.
        Since:
        7.2
      • getProperties

        Set<String> getProperties()
        Get all document properties. This will aggregate all values from parameters "properties", "X-NXproperties" and "X-NXDocumentProperties". This supports value separated by comma.
        Returns:
        All document properties.
        Since:
        7.2
      • getFetched

        Set<String> getFetched​(String entity)
        Get all properties to fetch for a given entity type. This will aggregate all values from parameters "fetch.entity" and "X-NXfetch.entity". This supports value separated by comma.
        Parameters:
        entity - The type of the entity on which you want to fetch properties.
        Returns:
        All properties to fetch.
        Since:
        7.2
      • getTranslated

        Set<String> getTranslated​(String entity)
        Get all properties to translate for a given entity type. This will aggregate all values from parameters "translate.entity" and "X-NXtranslate.entity". This supports value separated by comma.
        Parameters:
        entity - The type of the entity on which you want to fetch properties.
        Returns:
        All properties to fetch.
        Since:
        7.2
      • getEnrichers

        Set<String> getEnrichers​(String entity)
        Get all enrichers to activate on the given entity type. This will aggregate all values from parameters "enrichers.entity", "X-NXenrichers.entity" and "X-NXContext-Category". This supports value separated by comma.
        Parameters:
        entity - The type of the entity on which you want to activate enrichers.
        Returns:
        All enrichers to activate.
        Since:
        7.2
      • getParameter

        <T> T getParameter​(String name)
        Get the casted parameter value for a given name. If multiple are available, the first found is returned.
        Parameters:
        name - The parameter name.
        Returns:
        The first parameter value, null if no parameter are availble.
        Since:
        7.2
      • getBooleanParameter

        boolean getBooleanParameter​(String name)
        Returns:
        true is the parameter exists and if it's Boolean.TRUE or "true", false otherwise.
      • getParameters

        <T> List<T> getParameters​(String name)
        Get the casted parameter values for a given name.
        Parameters:
        name - The parameter name.
        Returns:
        The parameter values.
        Since:
        7.2
      • getAllParameters

        Map<String,​List<Object>> getAllParameters()
        Get all parameter in this context except wrapped parameters.
        Returns:
        All parameter's names and their values.
        Since:
        7.2
      • setParameterListValues

        void setParameterListValues​(String name,
                                    List<Object> values)
        Push values in the context with a given name. Please note that this method remove any value for the given name.
        Parameters:
        name - The parameter name.
        values - The parameter values.
        Since:
        7.2
      • addParameterListValues

        void addParameterListValues​(String name,
                                    List<?> values)
        Add values in the context with a given name. Please note that this method keep current values for the given name.
        Parameters:
        name - The parameter name.
        values - The parameter values.
        Since:
        7.2