Interface RemoteWorkspace
-
- All Superinterfaces:
java.lang.AutoCloseable
,java.io.Closeable
public interface RemoteWorkspace extends java.io.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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RunSpecification
analyzeTestSetup(java.lang.String projectDir)
Analyze the project given as a parameter and provide the setup information.byte[]
build(java.lang.String projectPath, BuilderSpecification spec)
Build a bundle based on a BuilderSpecification.java.lang.String
getBndVersion()
Get the bnd version of the workspace.java.util.List<java.lang.String>
getLatestBundles(java.lang.String projectDir, java.lang.String specification)
Get the latest bundles from a specification.java.util.List<java.lang.String>
getProjects()
Get a list of all projects.RunSpecification
getRun(java.lang.String pathToBndOrBndrun)
Parse a bndrun file (which can also a plain bnd file with -run* instructions) and provide the resulting run specification.
-
-
-
Method Detail
-
getBndVersion
java.lang.String getBndVersion()
Get the bnd version of the workspace. This is theAbout.CURRENT
value.
-
getRun
RunSpecification getRun(java.lang.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(java.lang.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
java.util.List<java.lang.String> getLatestBundles(java.lang.String projectDir, java.lang.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 whereProject.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(java.lang.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 projectspec
- the specification for a Builder, seeBuilder.from(BuilderSpecification)
.- Returns:
- the content of the JAR file
-
getProjects
java.util.List<java.lang.String> getProjects()
Get a list of all projects.- Returns:
- the list of all projects
-
-