Interface RemoteWorkspace
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
RemoteWorkspaceServer.Instance
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
Modifier and TypeMethodDescriptionanalyzeTestSetup
(String projectDir) Analyze the project given as a parameter and provide the setup information.byte[]
build
(String projectPath, BuilderSpecification spec) Build a bundle based on a BuilderSpecification.Get the bnd version of the workspace.getLatestBundles
(String projectDir, String specification) Get the latest bundles from a specification.Get a list of all projects.Parse a bndrun file (which can also a plain bnd file with -run* instructions) and provide the resulting run specification.
-
Method Details
-
getBndVersion
String getBndVersion()Get the bnd version of the workspace. This is theAbout.CURRENT
value. -
getRun
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
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
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
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
Get a list of all projects.- Returns:
- the list of all projects
-