[
https://issues.apache.org/jira/browse/FELIX-3888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13569866#comment-13569866
]
David Jencks commented on FELIX-3888:
-------------------------------------
Re versioning:
I did some investigation with the aries version checker and it looks like the
1.6.2 should have had a bundle-version of 1.7 rather than 1.6.2. The
maven-bundle-plugin uses the maven version as the default bundle version. So
if we want to avoid specifying the bundle-version explicitly we need to use
semantic versioning on the maven version. That's OK with me but not a decision
I'm going to make by myself :-)
Re API:
In order to avoid multiple string copies in situations like this I like to pass
in some kind of buffer or stream that the api can write to, rather than
returning a new object that then has to be copied. In order to avoid having to
deal with line separator issues I think PrintStream or PrintWriter might be
easier than StringBuffer. Throwing an exception rather than using an error
stream seems like a good idea.
So how about the api methods looking like e.g.
void info(String componentId, PrintWriter out) throws
IllegalArgumentException
?
> [DS] Expose the insides of ScrCommand as a service directly and enhance it
> --------------------------------------------------------------------------
>
> Key: FELIX-3888
> URL: https://issues.apache.org/jira/browse/FELIX-3888
> Project: Felix
> Issue Type: Improvement
> Components: Declarative Services (SCR)
> Affects Versions: scr-1.6.4
> Reporter: David Jencks
> Fix For: scr-1.6.4
>
> Attachments: FELIX-3888-1.diff, FELIX-3888-2.diff
>
>
> I have an environment where I'd like the basic capabilities of outputting the
> DS info as text but not through the console. We've been using the old Felix
> command but this has always been odd and is getting too complicated.
> Therefore I'd like to expose the ScrCommand as a service directly. I'm
> proposing to expose this only if an optional config admin property
> ds.info.service is set to true.
> To further support this I'd like to make ScrCommand.getInfo(String id....) be
> able to return info for all components. I'm proposing to do this by letting
> id be a regexp to match, so I can use ".*" and get all components. (This is
> implemented in scrService.getComponents(String componentIdentifier))
> For components from multiple bundles I'd like to sort the results by bundleId
> and componentId, marking the bundle id changing.
> I'd like to modify the list command to sort the results by component id.
> The patch has a bit of java-5 updating that I missed the first time around.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira