aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lin...@apache.org
Subject svn commit: r941987 - in /incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample: Account.java AccountFactory.java NewAccount.java StaticAccountFactory.java
Date Fri, 07 May 2010 02:48:50 GMT
Author: linsun
Date: Fri May  7 02:48:49 2010
New Revision: 941987

URL: http://svn.apache.org/viewvc?rev=941987&view=rev
Log:
[blueprint annotation]add new test bean and bean factory classes from trunk with attempted
annotation

Added:
    incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/Account.java
  (with props)
    incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/AccountFactory.java
  (with props)
    incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/NewAccount.java
  (with props)
    incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/StaticAccountFactory.java
  (with props)

Added: incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/Account.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/Account.java?rev=941987&view=auto
==============================================================================
--- incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/Account.java
(added)
+++ incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/Account.java
Fri May  7 02:48:49 2010
@@ -0,0 +1,40 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.aries.blueprint.sample;
+
+import org.apache.aries.blueprint.annotation.Inject;
+import org.apache.aries.blueprint.annotation.Bean;
+
+@Bean(id="accountOne")
+public class Account {
+    
+    private long accountNumber;
+    
+    @Inject(value="1")
+    // @Inject(values={"1"})
+    public Account(long number) {
+        this.accountNumber = number;
+    }
+    
+    public long getAccountNumber() {
+        return this.accountNumber;
+    }
+    
+    public void setAccountNumber(long number) {
+        this.accountNumber = number;
+    }
+}

Propchange: incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/Account.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/Account.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/Account.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/AccountFactory.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/AccountFactory.java?rev=941987&view=auto
==============================================================================
--- incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/AccountFactory.java
(added)
+++ incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/AccountFactory.java
Fri May  7 02:48:49 2010
@@ -0,0 +1,41 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.aries.blueprint.sample;
+
+import org.apache.aries.blueprint.annotation.Bean;
+import org.apache.aries.blueprint.annotation.Inject;
+import org.apache.aries.blueprint.annotation.FactoryMethod;
+
+@Bean(id="accountFactory")
+public class AccountFactory {
+    private String factoryName;
+
+    @Inject(value="account factory")
+    public AccountFactory(String factoryName) {
+        this.factoryName = factoryName;
+    }
+
+    @FactoryMethod(values="3")
+    public NewAccount createAccount(long number) {
+        return new NewAccount(number);
+    }
+    
+    public String getFactoryName() {
+        return this.factoryName;
+    }
+
+}

Propchange: incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/AccountFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/AccountFactory.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/AccountFactory.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/NewAccount.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/NewAccount.java?rev=941987&view=auto
==============================================================================
--- incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/NewAccount.java
(added)
+++ incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/NewAccount.java
Fri May  7 02:48:49 2010
@@ -0,0 +1,37 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.aries.blueprint.sample;
+
+import org.apache.aries.blueprint.annotation.Bean;
+
+@Bean(id="accountThree", factoryRef="accountFactory")
+public class NewAccount {
+    
+    private long accountNumber;
+    
+    public NewAccount(long number) {
+        this.accountNumber = number;
+    }
+    
+    public long getAccountNumber() {
+        return this.accountNumber;
+    }
+    
+    public void setAccountNumber(long number) {
+        this.accountNumber = number;
+    }
+}

Propchange: incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/NewAccount.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/NewAccount.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/NewAccount.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/StaticAccountFactory.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/StaticAccountFactory.java?rev=941987&view=auto
==============================================================================
--- incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/StaticAccountFactory.java
(added)
+++ incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/StaticAccountFactory.java
Fri May  7 02:48:49 2010
@@ -0,0 +1,29 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.aries.blueprint.sample;
+
+import org.apache.aries.blueprint.annotation.Bean;
+import org.apache.aries.blueprint.annotation.FactoryMethod;
+
+@Bean(id="accountTwo")
+public class StaticAccountFactory {
+    
+    @FactoryMethod(values={"2"})
+    public static Account createAccount(long number) {
+        return new Account(number);
+     }
+}

Propchange: incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/StaticAccountFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/StaticAccountFactory.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/aries/sandbox/linsun/blueprint/blueprint-sample-annotation/src/main/java/org/apache/aries/blueprint/sample/StaticAccountFactory.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message