[
https://issues.apache.org/jira/browse/FELIX-2109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12836134#action_12836134
]
Guillaume Nodet commented on FELIX-2109:
----------------------------------------
Mmh, this is not exactly the same thing.
There is currently no way to find a list of resources that export a given
package or service right now.
Another way is to extend the syntax of the argument and not consider it a
string but a requirement.
The syntax I've implemented locally is the following:
[name:]filter
With a heuristic to determine the name of the requirement if not specified.
private Requirement parseRequirement(String req) throws
InvalidSyntaxException {
int p = req.indexOf(':');
String name;
String filter;
if (p > 0) {
name = req.substring(0, p);
filter = req.substring(p + 1);
} else {
if (req.contains("package")) {
name = "package";
} else if (req.contains("service")) {
name = "service";
} else {
name = "bundle";
}
filter = req;
}
if (!filter.startsWith("(")) {
filter = "(" + filter + ")";
}
Filter flt = FrameworkUtil.createFilter(filter);
return new RequirementImpl(name, flt);
}
Then we simply have to modify the method a use the requirement.
This way, we don't have to modify the interface and we still have the new
feature.
The problem in doing so, it that we can't match against resource properties
anymore such as license and such. Thought it would still work for the most
common cases of symbolicname, presentationname and version.
Another way would be to add the follwoing:
Resource[] discoverResources(java.lang.String name, java.lang.String
filter);
> OBR should support matching resources for a given requirement
> -------------------------------------------------------------
>
> Key: FELIX-2109
> URL: https://issues.apache.org/jira/browse/FELIX-2109
> Project: Felix
> Issue Type: Improvement
> Components: Bundle Repository (OBR)
> Reporter: Guillaume Nodet
>
> Somehing like
> Resource[] discoverResources(Requirement requirement);
> on the RespositoryAdmin
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.