Class BasicItemNodeLoaderFactory

    • Field Detail

      • log

        private static final org.slf4j.Logger log
      • debug

        private static final boolean debug
      • autoLoadChildren

        private boolean autoLoadChildren
      • useNullLoader

        private boolean useNullLoader
    • Constructor Detail

      • BasicItemNodeLoaderFactory

        public BasicItemNodeLoaderFactory()
        Creates a new factory.
    • Method Detail

      • registerCheckedNodeLoader

        protected void registerCheckedNodeLoader​(Object key,
                                                 Class<? extends NodeLoader<? extends BasicItem>> loaderClass)
        Register a node loader implementation that you are sure fulfills the requirements. Eg. it must have a public no-argument constructor and implement the NodeLoader interface.
        See Also:
        registerNodeLoader(Object, Class)
      • setAutoLoadChildren

        public void setAutoLoadChildren​(boolean autoLoadChildren)
        Set a flag that determines if the factory should create node loaders that automatically loads child nodes or not. If this flag has been set this factory will wrap the node loaders with a AutoChildNodeLoader.

        This will generate a recursive pattern if the used node loader:

        • Uses this factory to create child node loaders. Eg. it should use the node loader factory provided by OverviewContext.getNodeLoaderFactory(). The node loader should NOT instantiate child new loaders by itself.
        • Uses an implementation that recurses into folder-type nodes, for example by extending AbstractNodeLoader.
        Parameters:
        autoLoadChildren - TRUE to create node loaders that automatically loads children, FALSE otherwise
      • isAutoLoadingChildren

        public boolean isAutoLoadingChildren()
        Get the auto load children setting.
        Returns:
        TRUE if child nodes are automatically loaded, FALSE if not
      • setUseNullLoaderIfNotFound

        public void setUseNullLoaderIfNotFound​(boolean useNullLoader)
        Set a flag that determines if a NullNodeLoader should be used or if an ItemNotFoundException should be thrown if no registered node loader is found for a specific key.
        Parameters:
        useNullLoader - TRUE to use a NullNodeLoader, FALSE to throw an exception
      • registerDefaultNodeLoaders

        protected void registerDefaultNodeLoaders()
        Registers default item node loaders from BioSource to Experiment, etc.