Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 51815 invoked from network); 25 Sep 2010 14:12:59 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 Sep 2010 14:12:59 -0000 Received: (qmail 65667 invoked by uid 500); 25 Sep 2010 14:12:59 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 65317 invoked by uid 500); 25 Sep 2010 14:12:56 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 65301 invoked by uid 99); 25 Sep 2010 14:12:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Sep 2010 14:12:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Sep 2010 14:12:54 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o8PECYZD016547 for ; Sat, 25 Sep 2010 14:12:34 GMT Message-ID: <22428262.400411285423954606.JavaMail.jira@thor> Date: Sat, 25 Sep 2010 10:12:34 -0400 (EDT) From: "Clement Escoffier (JIRA)" To: dev@felix.apache.org Subject: [jira] Commented: (FELIX-2622) Support static service properties that are not mirrored into fields In-Reply-To: <15389688.376271285290531962.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FELIX-2622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12914819#action_12914819 ] Clement Escoffier commented on FELIX-2622: ------------------------------------------ This is fixed in the trunk. Now you can write: @Component @Provides( properties= { @StaticServiceProperty(name="prop1", value="prop1", type="java.lang.String"), @StaticServiceProperty(name="prop2", type="java.lang.String"), @StaticServiceProperty(name="props", value="{prop1, prop2}", type="string[]"), @StaticServiceProperty(name="mandatory1", mandatory=true, type="string") }) I've used StaticServiceProperty and no ServiceProperty because the set of attribute is different. Indeed, the type attriubte is mandatory for static properties. > Support static service properties that are not mirrored into fields > ------------------------------------------------------------------- > > Key: FELIX-2622 > URL: https://issues.apache.org/jira/browse/FELIX-2622 > Project: Felix > Issue Type: Improvement > Components: iPOJO > Affects Versions: iPOJO-1.6.0 > Reporter: Peter Donald > Assignee: Clement Escoffier > Fix For: iPOJO-1.8.0 > > > Sometimes you want to add static service properties to a component that you don't need to mirror in fields. This is of particular use when the component uses a generic specification (i.e. JComponent.class) but uses service properties to further classify the specification (i.e. name=foo;location=toolbar). An example of annotating a class for this would be > @Provides{ specifications = {JComponent.class}, properties = {@ServiceProperty{name="name", value="foo"},@ServiceProperty{name="location", value="toolbar"}}} ) > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.