Package aQute.bnd.remoteworkspace.server
Class RemoteWorkspaceServer.Instance
- java.lang.Object
-
- aQute.bnd.remoteworkspace.server.RemoteWorkspaceServer.Instance
-
- All Implemented Interfaces:
RemoteWorkspace,java.io.Closeable,java.lang.AutoCloseable
- Enclosing class:
- RemoteWorkspaceServer
class RemoteWorkspaceServer.Instance extends java.lang.Object implements RemoteWorkspace
Holds the implementations of theRemoteWorkspace
-
-
Constructor Summary
Constructors Constructor Description Instance()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RunSpecificationanalyzeTestSetup(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.voidclose()(package private) voiddoPackage(Parameters extraPackages, Descriptors.PackageRef p, Attrs a)java.lang.StringgetBndVersion()Get the bnd version of the workspace.private BuildergetBuilder(Project project, java.util.List<java.lang.String> parent)Calculate the builder with the properly inheritance structure.java.util.List<java.lang.String>getLatestBundles(java.lang.String projectDir, java.lang.String specification)Get the latest bundles from a specification.(package private) ProjectgetProject(java.lang.String projectDir)java.util.List<java.lang.String>getProjects()Get a list of all projects.RunSpecificationgetRun(java.lang.String pathToBndOrBndrun)Parse a bndrun file (which can also a plain bnd file with -run* instructions) and provide the resulting run specification.private voidmerge(java.util.jar.Manifest a, java.util.jar.Manifest b, java.lang.String hdr)
-
-
-
Method Detail
-
getBndVersion
public java.lang.String getBndVersion()
Description copied from interface:RemoteWorkspaceGet the bnd version of the workspace. This is theAbout.CURRENTvalue.- Specified by:
getBndVersionin interfaceRemoteWorkspace
-
getRun
public RunSpecification getRun(java.lang.String pathToBndOrBndrun)
Description copied from interface:RemoteWorkspaceParse a bndrun file (which can also a plain bnd file with -run* instructions) and provide the resulting run specification.- Specified by:
getRunin interfaceRemoteWorkspace- Parameters:
pathToBndOrBndrun- the path to a bnd or bndrun file, never null
-
getLatestBundles
public java.util.List<java.lang.String> getLatestBundles(java.lang.String projectDir, java.lang.String specification)Description copied from interface:RemoteWorkspaceGet 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:
getLatestBundlesin interfaceRemoteWorkspace- 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.
-
analyzeTestSetup
public RunSpecification analyzeTestSetup(java.lang.String projectDir)
Description copied from interface:RemoteWorkspaceAnalyze 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:
analyzeTestSetupin interfaceRemoteWorkspace- Parameters:
projectDir- the absolute path in
-
build
public byte[] build(java.lang.String projectPath, BuilderSpecification spec)Description copied from interface:RemoteWorkspaceBuild a bundle based on a BuilderSpecification. This allows the remote controller to create bundles on the fly using project specific context.- Specified by:
buildin interfaceRemoteWorkspace- Parameters:
projectPath- The path to the projectspec- the specification for a Builder, seeBuilder.from(BuilderSpecification).- Returns:
- the content of the JAR file
-
merge
private void merge(java.util.jar.Manifest a, java.util.jar.Manifest b, java.lang.String hdr)
-
getBuilder
private Builder getBuilder(Project project, java.util.List<java.lang.String> parent) throws java.lang.Exception
Calculate the builder with the properly inheritance structure.- Parameters:
project- The context projectparent- The comma separated parent string. The last entry may be either PROJECT or WORKSPACE- Throws:
java.lang.Exception
-
doPackage
void doPackage(Parameters extraPackages, Descriptors.PackageRef p, Attrs a)
-
getProject
Project getProject(java.lang.String projectDir)
-
getProjects
public java.util.List<java.lang.String> getProjects()
Description copied from interface:RemoteWorkspaceGet a list of all projects.- Specified by:
getProjectsin interfaceRemoteWorkspace- Returns:
- the list of all projects
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-