Interface RemoteWorkspace

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
RemoteWorkspaceServer.Instance

public interface RemoteWorkspace extends Closeable
A remote RPC interface to a workspace. This API is designed to run on the same machine as the caller so that file paths can be used.

Paths in this API must all be absolute and formatted in the operating system specific format. (I.e. File.getAbsolutePath()). They must also reside in the the workspace that this object is attached to.

  • Method Details

    • getBndVersion

      String getBndVersion()
      Get the bnd version of the workspace. This is the About.CURRENT value.
    • getRun

      RunSpecification getRun(String pathToBndOrBndrun)
      Parse a bndrun file (which can also a plain bnd file with -run* instructions) and provide the resulting run specification.
      Parameters:
      pathToBndOrBndrun - the path to a bnd or bndrun file, never null
    • analyzeTestSetup

      RunSpecification analyzeTestSetup(String projectDir)
      Analyze the project given as a parameter and provide the setup information. This is intended to be used by a JUnit test project that wants to provide its test classes and imports from the -buildpath/-testpath to the framework to be exported. The idea is that this allows the classes from the JUnit tests to reside outside the framework but leverage the same classes inside. This significantly changes testing.
      Parameters:
      projectDir - the absolute path in
    • getLatestBundles

      List<String> getLatestBundles(String projectDir, String specification)
      Get the latest bundles from a specification. The specification is in the format used for a -buildpath/-testpath/-runbundles, etc. It can contain multiple bundles.
      Parameters:
      projectDir - The absolute path to the project directory where Project.getBundles(aQute.bnd.service.Strategy, String, String) is called.
      specification - A specification for bundles/
      Returns:
      A list with absolute paths (in OS specific form) to the JARs/bundles specified.
    • build

      byte[] build(String projectPath, BuilderSpecification spec)
      Build a bundle based on a BuilderSpecification. This allows the remote controller to create bundles on the fly using project specific context.
      Parameters:
      projectPath - The path to the project
      spec - the specification for a Builder, see Builder.from(BuilderSpecification).
      Returns:
      the content of the JAR file
    • getProjects

      List<String> getProjects()
      Get a list of all projects.
      Returns:
      the list of all projects