Return-Path: Delivered-To: apmail-incubator-aries-commits-archive@minotaur.apache.org Received: (qmail 32109 invoked from network); 7 May 2010 02:48:45 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 May 2010 02:48:45 -0000 Received: (qmail 55393 invoked by uid 500); 7 May 2010 02:48:45 -0000 Delivered-To: apmail-incubator-aries-commits-archive@incubator.apache.org Received: (qmail 55290 invoked by uid 500); 7 May 2010 02:48:44 -0000 Mailing-List: contact aries-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: aries-dev@incubator.apache.org Delivered-To: mailing list aries-commits@incubator.apache.org Received: (qmail 55282 invoked by uid 99); 7 May 2010 02:48:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 May 2010 02:48:44 +0000 X-ASF-Spam-Status: No, hits=-1690.9 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 May 2010 02:48:43 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id AFD0923888CB; Fri, 7 May 2010 02:47:53 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r941986 - /incubator/aries/sandbox/linsun/blueprint/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/annotation/impl/BlueprintAnnotationScannerImpl.java Date: Fri, 07 May 2010 02:47:53 -0000 To: aries-commits@incubator.apache.org From: linsun@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100507024753.AFD0923888CB@eris.apache.org> Author: linsun Date: Fri May 7 02:47:53 2010 New Revision: 941986 URL: http://svn.apache.org/viewvc?rev=941986&view=rev Log: [blueprint annotation] modify the code to set the interfaces for Treference, TreferenceList and Tservice due to annotation API change Modified: incubator/aries/sandbox/linsun/blueprint/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/annotation/impl/BlueprintAnnotationScannerImpl.java Modified: incubator/aries/sandbox/linsun/blueprint/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/annotation/impl/BlueprintAnnotationScannerImpl.java URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/linsun/blueprint/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/annotation/impl/BlueprintAnnotationScannerImpl.java?rev=941986&r1=941985&r2=941986&view=diff ============================================================================== --- incubator/aries/sandbox/linsun/blueprint/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/annotation/impl/BlueprintAnnotationScannerImpl.java (original) +++ incubator/aries/sandbox/linsun/blueprint/blueprint-annotation-impl/src/main/java/org/apache/aries/blueprint/annotation/impl/BlueprintAnnotationScannerImpl.java Fri May 7 02:47:53 2010 @@ -39,6 +39,7 @@ import org.apache.aries.blueprint.annota import org.apache.aries.blueprint.annotation.service.BlueprintAnnotationScanner; import org.apache.aries.blueprint.jaxb.Tbean; import org.apache.aries.blueprint.jaxb.Tdescription; +import org.apache.aries.blueprint.jaxb.Tinterfaces; import org.apache.aries.blueprint.jaxb.Tproperty; import org.apache.aries.blueprint.jaxb.Tref; import org.apache.aries.blueprint.jaxb.Treference; @@ -382,7 +383,7 @@ public class BlueprintAnnotationScannerI String compName = ref.componentName(); String desp = ref.description(); String filter = ref.filter(); - String pubInterface = ref.publishInterface(); + Class serviceInterface = ref.serviceInterface(); ReferenceListener[] refListeners = ref.referenceListener(); int timeout = ref.timeout(); Treference tref = new Treference(); @@ -408,8 +409,8 @@ public class BlueprintAnnotationScannerI if (filter.length() > 0) { tref.setFilter(filter); } - if (pubInterface.length() > 0) { - tref.setInterface(pubInterface); + if (serviceInterface != Object.class) { + tref.setInterface(serviceInterface.getName()); } else { boolean isInterface = refClass.isInterface(); if (isInterface) { @@ -445,7 +446,7 @@ public class BlueprintAnnotationScannerI String compName = ref.componentName(); String desp = ref.description(); String filter = ref.filter(); - String pubInterface = ref.publishInterface(); + Class serviceInterface = ref.serviceInterface(); ReferenceListener[] refListeners = ref.referenceListener(); TreferenceList tref = new TreferenceList(); @@ -470,8 +471,8 @@ public class BlueprintAnnotationScannerI if (filter.length() > 0) { tref.setFilter(filter); } - if (pubInterface.length() > 0) { - tref.setInterface(pubInterface); + if (serviceInterface != Object.class) { + tref.setInterface(serviceInterface.getName()); } else { boolean isInterface = refClass.isInterface(); if (isInterface) { @@ -496,7 +497,7 @@ public class BlueprintAnnotationScannerI private Tservice generateTservice(Class clazz, String id) { Service service = (Service) clazz.getAnnotation(Service.class); - String pInterface = service.publishInterface(); + Class[] interfaces = service.interfaces(); int ranking = service.ranking(); String autoExport = service.autoExport(); RegistrationListener[] regListeners = service.registerationListener(); @@ -515,9 +516,12 @@ public class BlueprintAnnotationScannerI if (ranking > 0) { tservice.setRanking(ranking); } - if (pInterface.length() > 0) { - // TODO add support for multiple interfaces - tservice.setInterface(pInterface); + for (Class interf : interfaces) { + Tinterfaces tInterfaces = new Tinterfaces(); + if (interf != null) { + tInterfaces.getValue().add(interf.getName()); + } + tservice.setInterfaces(tInterfaces); } for (RegistrationListener regListener : regListeners) {