public class RunResolution
extends java.lang.Object
BndEditModel. Static methods are used to resolve and then this
class holds the different aspects of the result. Either with an exception or
the required and optional wiring.
The resolution also then provides convenience methods to link it to the projects
| Modifier and Type | Class and Description |
|---|---|
static class |
RunResolution.CacheDTO |
| Modifier and Type | Field and Description |
|---|---|
java.lang.Exception |
exception |
java.lang.String |
log |
java.util.Map<Resource,java.util.List<Wire>> |
optional |
Project |
project |
Processor |
properties |
java.util.Map<Resource,java.util.List<Wire>> |
required |
RunStartLevel |
runstartlevel |
| Modifier and Type | Method and Description |
|---|---|
<any> |
asResult()
Return a result based on the isOk status.
|
void |
cache()
Cache this resolution for the given project.
|
static void |
clearCache(Workspace ws) |
java.lang.String |
dot(java.lang.String name) |
java.util.List<Container> |
getContainers()
Get a list of runbundles as containers
|
java.util.Map<Resource,java.util.List<Resource>> |
getGraph(java.util.Map<Resource,java.util.List<Wire>> resolution)
Turn the wiring into a a->b map.
|
java.util.List<Resource> |
getOrderedResources() |
java.util.List<Resource> |
getOrderedResources(java.util.Map<Resource,java.util.List<Wire>> resolution,
Runorder runorder) |
java.util.Map<Resource,java.util.List<Wire>> |
getRequired() |
java.util.List<VersionedClause> |
getRunBundles()
Get a list of ordered run bundles.
|
static <any> |
getRunBundles(Project project,
boolean resolveIfNecessary)
Get the run bundles from the cache and resolve if necessary.
|
java.lang.String |
getRunBundlesAsString()
Return the current -runbundles.
|
boolean |
isOK()
Check if the resolution is ok, that is, there was no exception.
|
java.lang.String |
report(boolean optionals) |
RunResolution |
reportException() |
static RunResolution |
resolve(Project project,
java.util.Collection<ResolutionCallback> callbacks)
The secondary workhorse to resolve.
|
static RunResolution |
resolve(Project project,
Processor actualProperties,
java.util.Collection<ResolutionCallback> callbacks)
The main workhorse to resolve
|
java.util.List<Resource> |
sortByDependencies(java.util.Map<Resource,java.util.List<Wire>> resolution)
Sort the resources based on their dependencies.
|
boolean |
updateBundles(BndEditModel model)
Update the
BndEditModel with the calculated set of runbundles. |
void |
updateBundles(Project project) |
public final Project project
public final Processor properties
public final java.util.Map<Resource,java.util.List<Wire>> required
public final java.util.Map<Resource,java.util.List<Wire>> optional
public final java.lang.Exception exception
public final java.lang.String log
public final RunStartLevel runstartlevel
public static RunResolution resolve(Project project, Processor actualProperties, java.util.Collection<ResolutionCallback> callbacks)
project - used for reporting errorsactualProperties - the actual properties used for resolving. This
can be the project in builders that do not use the
BndEditModel, otherwise it is generally the
BndEditModel.callbacks - any callbackspublic static RunResolution resolve(Project project, java.util.Collection<ResolutionCallback> callbacks)
project - used for reporting errors and the properties for the
resolve operationscallbacks - any callbackspublic boolean isOK()
public boolean updateBundles(BndEditModel model)
BndEditModel with the calculated set of runbundles.
Use the ResolutionInstructions#runstartlevel(RunStartLevel).order
to order the bundles. Do not update it if the list has not changed. In
that case return false (no changes)
If the ResolutionInstructions#runstartlevel(RunStartLevel).order
is then merge the list with the
previous one.
return true if the list was changed
model - the edit model to updatepublic void updateBundles(Project project)
public java.util.List<Resource> sortByDependencies(java.util.Map<Resource,java.util.List<Wire>> resolution)
resolution - the required wiringpublic java.util.Map<Resource,java.util.List<Resource>> getGraph(java.util.Map<Resource,java.util.List<Wire>> resolution)
resolution - the wiringpublic java.util.List<VersionedClause> getRunBundles()
public java.lang.String getRunBundlesAsString()
public java.util.List<Resource> getOrderedResources(java.util.Map<Resource,java.util.List<Wire>> resolution,
Runorder runorder)
public java.util.List<Resource> getOrderedResources()
public java.lang.String dot(java.lang.String name)
public java.util.List<Container> getContainers()
throws java.lang.Exception
java.lang.Exceptionpublic RunResolution reportException()
public java.lang.String report(boolean optionals)
public java.util.Map<Resource,java.util.List<Wire>> getRequired()
public void cache()
public static <any> getRunBundles(Project project,
boolean resolveIfNecessary)
project - the project to get the run bundles fromresolveIfNecessary - if true, call resolvepublic <any> asResult()
public static void clearCache(Workspace ws)
Data In Motion GmbH all rights reserved