Class System


  • public final class System
    extends Object
    Helper class that can be used to easily initialize the full XWiki System (ie Component Manager and Environment).
    Since:
    3.5M1
    Version:
    $Id: b40e95e910476f9d33531d732cf87539bb29eef0 $
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void dispose​(org.xwiki.component.manager.ComponentManager componentManager)
      Free resource taken by the Component Manager create by one of the initialize methods.
      static org.xwiki.component.manager.ComponentManager initialize()
      Initialize the full XWiki system (ie Component Manager and Environment), using the class loader that loaded this class, using the "java.io.tmpdir" System property value as the temporary diretory location, without any resource directory set and without any permanent directory set either.
      static org.xwiki.component.manager.ComponentManager initialize​(File permanentDirectory)
      Initialize the full XWiki system (ie Component Manager and Environment), using the class loader that loaded this class, using the "java.io.tmpdir" System property value as the temporary diretory location and without any resource directory set (the permanent directory will be used as the resource directory).
      static org.xwiki.component.manager.ComponentManager initialize​(File permanentDirectory, File resourceDirectory)
      Initialize the full XWiki system (ie Component Manager and Environment), using the class loader that loaded this class and using the "java.io.tmpdir" System property value as the temporary diretory location.
      static org.xwiki.component.manager.ComponentManager initialize​(File permanentDirectory, File resourceDirectory, File temporaryDirectory)
      Initialize the full XWiki system (ie Component Manager and Environment), using the class loader that loaded this class.
      static org.xwiki.component.manager.ComponentManager initialize​(File permanentDirectory, File resourceDirectory, File temporaryDirectory, ClassLoader classLoader)
      Initialize the full XWiki system (ie Component Manager and Environment).
      static org.xwiki.component.manager.ComponentManager initialize​(ClassLoader classLoader)
      Initialize the full XWiki system (ie Component Manager and Environment), using the "java.io.tmpdir" System property value as the temporary diretory location, without any resource directory set and without any permanent directory set either.
    • Method Detail

      • initialize

        public static org.xwiki.component.manager.ComponentManager initialize​(ClassLoader classLoader)
        Initialize the full XWiki system (ie Component Manager and Environment), using the "java.io.tmpdir" System property value as the temporary diretory location, without any resource directory set and without any permanent directory set either.
        Parameters:
        classLoader - see EmbeddableComponentManager.initialize(ClassLoader)
        Returns:
        the initialized Component Manager
        See Also:
        dispose(ComponentManager)
      • initialize

        public static org.xwiki.component.manager.ComponentManager initialize()
        Initialize the full XWiki system (ie Component Manager and Environment), using the class loader that loaded this class, using the "java.io.tmpdir" System property value as the temporary diretory location, without any resource directory set and without any permanent directory set either.
        Returns:
        the initialized Component Manager
        See Also:
        dispose(ComponentManager)
      • initialize

        public static org.xwiki.component.manager.ComponentManager initialize​(File permanentDirectory)
        Initialize the full XWiki system (ie Component Manager and Environment), using the class loader that loaded this class, using the "java.io.tmpdir" System property value as the temporary diretory location and without any resource directory set (the permanent directory will be used as the resource directory).
        Parameters:
        permanentDirectory - see Environment.getPermanentDirectory()
        Returns:
        the initialized Component Manager
        See Also:
        dispose(ComponentManager)
      • initialize

        public static org.xwiki.component.manager.ComponentManager initialize​(File permanentDirectory,
                                                                              File resourceDirectory)
        Initialize the full XWiki system (ie Component Manager and Environment), using the class loader that loaded this class and using the "java.io.tmpdir" System property value as the temporary diretory location.
        Parameters:
        permanentDirectory - see Environment.getPermanentDirectory()
        resourceDirectory - see StandardEnvironment.setResourceDirectory(java.io.File)
        Returns:
        the initialized Component Manager
        See Also:
        dispose(ComponentManager)
      • initialize

        public static org.xwiki.component.manager.ComponentManager initialize​(File permanentDirectory,
                                                                              File resourceDirectory,
                                                                              File temporaryDirectory)
        Initialize the full XWiki system (ie Component Manager and Environment), using the class loader that loaded this class.
        Parameters:
        permanentDirectory - see Environment.getPermanentDirectory()
        resourceDirectory - see StandardEnvironment.setResourceDirectory(java.io.File)
        temporaryDirectory - see Environment.getTemporaryDirectory()
        Returns:
        the initialized Component Manager
        See Also:
        dispose(ComponentManager)
      • initialize

        public static org.xwiki.component.manager.ComponentManager initialize​(File permanentDirectory,
                                                                              File resourceDirectory,
                                                                              File temporaryDirectory,
                                                                              ClassLoader classLoader)
        Initialize the full XWiki system (ie Component Manager and Environment).
        Parameters:
        permanentDirectory - see Environment.getPermanentDirectory()
        resourceDirectory - see StandardEnvironment.setResourceDirectory(java.io.File)
        temporaryDirectory - see Environment.getTemporaryDirectory()
        classLoader - see EmbeddableComponentManager.initialize(ClassLoader)
        Returns:
        the initialized Component Manager
        See Also:
        dispose(ComponentManager)
      • dispose

        public static void dispose​(org.xwiki.component.manager.ComponentManager componentManager)
        Free resource taken by the Component Manager create by one of the initialize methods.
        Parameters:
        componentManager - the component manager
        Since:
        5.1