Class RemoteWorkspaceServer.Instance

java.lang.Object
aQute.bnd.remoteworkspace.server.RemoteWorkspaceServer.Instance
All Implemented Interfaces:
RemoteWorkspace, Closeable, AutoCloseable
Enclosing class:
RemoteWorkspaceServer

class RemoteWorkspaceServer.Instance extends Object implements RemoteWorkspace
Holds the implementations of the RemoteWorkspace
  • Constructor Details

    • Instance

      Instance()
  • Method Details

    • getBndVersion

      public String getBndVersion()
      Description copied from interface: RemoteWorkspace
      Get the bnd version of the workspace. This is the About.CURRENT value.
      Specified by:
      getBndVersion in interface RemoteWorkspace
    • getRun

      public RunSpecification getRun(String pathToBndOrBndrun)
      Description copied from interface: RemoteWorkspace
      Parse a bndrun file (which can also a plain bnd file with -run* instructions) and provide the resulting run specification.
      Specified by:
      getRun in interface RemoteWorkspace
      Parameters:
      pathToBndOrBndrun - the path to a bnd or bndrun file, never null
    • getLatestBundles

      public List<String> getLatestBundles(String projectDir, String specification)
      Description copied from interface: RemoteWorkspace
      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.
      Specified by:
      getLatestBundles in interface RemoteWorkspace
      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.
    • analyzeTestSetup

      public RunSpecification analyzeTestSetup(String projectDir)
      Description copied from interface: RemoteWorkspace
      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.
      Specified by:
      analyzeTestSetup in interface RemoteWorkspace
      Parameters:
      projectDir - the absolute path in
    • build

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

      private void merge(Manifest a, Manifest b, String hdr)
    • getBuilder

      private Builder getBuilder(Project project, List<String> parent) throws Exception
      Calculate the builder with the properly inheritance structure.
      Parameters:
      project - The context project
      parent - The comma separated parent string. The last entry may be either PROJECT or WORKSPACE
      Throws:
      Exception
    • doPackage

      void doPackage(Parameters extraPackages, Descriptors.PackageRef p, Attrs a)
    • getProject

      Project getProject(String projectDir)
    • getProjects

      public List<String> getProjects()
      Description copied from interface: RemoteWorkspace
      Get a list of all projects.
      Specified by:
      getProjects in interface RemoteWorkspace
      Returns:
      the list of all projects
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException