Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
ikylin committed Jun 10, 2012
1 parent b266de2 commit 781855c
Show file tree
Hide file tree
Showing 17 changed files with 9 additions and 212 deletions.
1 change: 0 additions & 1 deletion advanced.tutorial/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@
<module>vendor.customer.creator</module>
<module>vendor.popcorn</module>
<module>vendor.corn.transporter</module>
<module>vender.test</module>
</modules>
</project>
8 changes: 0 additions & 8 deletions advanced.tutorial/vender.test/.classpath

This file was deleted.

23 changes: 0 additions & 23 deletions advanced.tutorial/vender.test/.project

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions advanced.tutorial/vender.test/bundle.properties

This file was deleted.

96 changes: 0 additions & 96 deletions advanced.tutorial/vender.test/pom.xml

This file was deleted.

This file was deleted.

This file was deleted.

16 changes: 0 additions & 16 deletions advanced.tutorial/vender.test/src/main/resources/metadata.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* Component implementation providing both buns and wieners.
*/
@Component(name="buns_and_wieners", public_factory=false, architecture=true)
@Component(name="buns_and_wieners", publicFactory=false, architecture=true)
@Provides
@Instantiate(name="buns_and_wieners")
public class BunWienerProvider implements Bun, Wiener {
Expand Down
1 change: 0 additions & 1 deletion advanced.tutorial/vendor.corn.transporter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.configadmin</artifactId>
<version>1.2.8</version>
<scope>compile</scope>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* The corn transport refill corn stock. This class use iPOJO reconfiguration
* features to reconfigure the popcorn vendor.
*/
@Component(name = "transporter", public_factory = false, architecture = true)
@Component(name = "transporter", publicFactory = false, architecture = true)
@Instantiate
public class CornTransporter {

Expand All @@ -49,9 +49,9 @@ public void refillStock() {
// configuration admin
Configuration configuration = m_configAdmin.getConfiguration(
"Super.PopCorn.Stock",
"file:D:/may/sDrive/advanced.tutorial/vendor.corn.transporter/target/vendor.corn.transporter-1.0.0.jar");
"file:D:/svn/uims/advanced.tutorial/vendor.popcorn/target/vendor.popcorn-1.0.0.jar");
configuration
.setBundleLocation("file:D:/may/sDrive/advanced.tutorial/vendor.corn.transporter/target/vendor.corn.transporter-1.0.0.jar");
.setBundleLocation("file:D:/svn/uims/advanced.tutorial/vendor.popcorn/target/vendor.popcorn-1.0.0.jar");
Properties props = new Properties();
props.put("stock", new Integer(15)); // Delivered corn
configuration.update(props);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class Customer {
*/
public Customer() {
Product product = vendor.sell();
System.out.println("Customer " + name + " bought " + product.getProductType() + " from " + product.getProductType());
System.out.println("Customer " + name + " bought " + product.getProductType() + " from " + product.getProductOrigin());
}

}
Original file line number Diff line number Diff line change
@@ -1,34 +1,5 @@
<ipojo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="org.apache.felix.ipojo http://felix.apache.org/ipojo/schemas/CURRENT/core.xsd"
xmlns="org.apache.felix.ipojo">
<instance component="customer">
<property name="name" value="customer-1" />
</instance>
<instance component="customer">
<property name="name" value="customer-2" />
</instance>
<instance component="customer">
<property name="name" value="customer-3" />
</instance>
<instance component="customer">
<property name="name" value="customer-4" />
</instance>
<instance component="customer">
<property name="name" value="customer-5" />
</instance>
<instance component="customer">
<property name="name" value="customer-6" />
</instance>
<instance component="customer">
<property name="name" value="customer-7" />
</instance>
<instance component="customer">
<property name="name" value="customer-8" />
</instance>
<instance component="customer">
<property name="name" value="customer-9" />
</instance>
<instance component="customer">
<property name="name" value="customer-10" />
</instance>

</ipojo>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import org.vendor.services.ingredient.Bun;
import org.vendor.services.ingredient.Wiener;

@Component(name="HD", public_factory=false, architecture=true)
@Component(name="HD", publicFactory=false, architecture=true)
@Provides
@Instantiate
public class HotDogVendor implements Vendor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
public interface Product {

String getProductType();

String getProductOrigin();

}

0 comments on commit 781855c

Please sign in to comment.