Interface RuntimeHarness

    • Method Detail

      • getWorkingDir

        File getWorkingDir()
        Gets the framework working directory.
      • fireFrameworkStarted

        void fireFrameworkStarted()
                           throws Exception
        Resume the runtime
        Throws:
        Exception
      • deployBundle

        void deployBundle​(String bundle)
                   throws Exception
        Deploys a whole OSGI bundle.

        The lookup is first done on symbolic name, as set in MANIFEST.MF and then falls back to the bundle url (e.g., nuxeo-platform-search-api) for backwards compatibility.

        Parameters:
        bundle - the symbolic name
        Throws:
        Exception
      • undeployContrib

        void undeployContrib​(String bundle,
                             String contrib)
                      throws Exception
        Undeploys a contribution from a given bundle.

        The path will be relative to the bundle root. Example: undeployContrib("org.nuxeo.ecm.core", "OSGI-INF/CoreExtensions.xml")

        Parameters:
        bundle - the bundle
        contrib - the contribution
        Throws:
        Exception
      • deployTestContrib

        @Deprecated
        RuntimeContext deployTestContrib​(String bundle,
                                         String contrib)
                                  throws Exception
        Deprecated.
        Deploys an XML contribution from outside a bundle.

        This should be used by tests wiling to deploy test contribution as part of a real bundle.

        The bundle owner is important since the contribution may depend on resources deployed in that bundle.

        Note that the owner bundle MUST be an already deployed bundle.

        Parameters:
        bundle - the bundle that becomes the contribution owner
        contrib - the contribution to deploy as part of the given bundle
        Throws:
        Exception
      • deployContrib

        void deployContrib​(String bundle,
                           String contrib)
                    throws Exception
        Deploys a contribution from a given bundle.

        The path will be relative to the bundle root. Example: deployContrib("org.nuxeo.ecm.core", "OSGI-INF/CoreExtensions.xml")

        For compatibility reasons the name of the bundle may be a jar name, but this use is discouraged and deprecated.

        Parameters:
        bundle - the name of the bundle to peek the contrib in
        contrib - the path to contrib in the bundle.
        Throws:
        Exception
      • isStarted

        boolean isStarted()
      • deployPartial

        RuntimeContext deployPartial​(String bundle,
                                     Set<TargetExtensions> targetExtensions)
                              throws Exception
        Deploys a subset of a Bundle defined per the targetExtensions parameter
        Parameters:
        bundle - the name of the component
        targetExtensions - Set of allowed TargetExtensions in the final contribution
        Throws:
        Exception
        Since:
        9.1
      • getProperties

        @Deprecated
        Properties getProperties()
        Deprecated.
        since 10.2, unused and useless
        Framework properties for variable injections
        Since:
        5.4.2
      • getContext

        RuntimeContext getContext()
        Runtime context for deployment
        Since:
        5.4.2
      • getOSGiAdapter

        OSGiAdapter getOSGiAdapter()
        OSGI bridge
        Since:
        5.4.2
      • isRestart

        @Deprecated
        boolean isRestart()
        Deprecated.
        since 10.2, unused and useless
        Since:
        5.5