Class LiveDataScriptService

  • All Implemented Interfaces:
    org.xwiki.script.service.ScriptService

    @Component
    @Named("liveData")
    @Singleton
    public class LiveDataScriptService
    extends Object
    implements org.xwiki.script.service.ScriptService
    Scripting APIs for the Live Data component.
    Since:
    12.10
    Version:
    $Id: 31d57f9baee88f4fcb0ae2939f703301e78c0714 $
    • Constructor Detail

      • LiveDataScriptService

        public LiveDataScriptService()
    • Method Detail

      • query

        public LiveData query​(Map<String,​Object> queryConfig)
        Executes a live data query.
        Parameters:
        queryConfig - the live data query configuration
        Returns:
        the live data entries that match the given query
      • query

        public LiveData query​(String queryConfigJSON)
        Executes a live data query.
        Parameters:
        queryConfigJSON - the live data query configuration
        Returns:
        the live data entries that match the given query
      • effectiveConfig

        public Map<String,​Object> effectiveConfig​(Map<String,​Object> liveDataConfig)
        Computes the effective live data configuration by normalizing the given configuration (i.e. transforming it to match the format expected by the live data widget) and adding the (missing) default values.
        Parameters:
        liveDataConfig - the live data configuration to start with
        Returns:
        the effective live data configuration, using the standard format and containing the default values
      • effectiveConfig

        public String effectiveConfig​(String liveDataConfigJSON)
        Computes the effective live data configuration by normalizing the given configuration (i.e. transforming it to match the format expected by the live data widget) and adding the (missing) default values.
        Parameters:
        liveDataConfigJSON - the live data configuration to start with
        Returns:
        the effective live data configuration, using the standard format and containing the default values
      • get

        public <S extends org.xwiki.script.service.ScriptService> S get​(String serviceName)
        Type Parameters:
        S - the type of the ScriptService
        Parameters:
        serviceName - the name of the sub ScriptService
        Returns:
        the ScriptService or null of none could be found