01: /*
02: * $Id: FloridaSunnyOrangeFactoryBean.java 10787 2008-02-12 18:51:50Z dfeist $
03: * --------------------------------------------------------------------------------------
04: * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
05: *
06: * The software in this package is published under the terms of the CPAL v1.0
07: * license, a copy of which has been included with this distribution in the
08: * LICENSE.txt file.
09: */
10:
11: package org.mule.tck.testmodels.fruit;
12:
13: import org.springframework.beans.factory.FactoryBean;
14:
15: /**
16: * A Spring FactoryBean implementation for unit testing.
17: */
18: public class FloridaSunnyOrangeFactoryBean implements FactoryBean {
19: Integer segments = new Integer(10);
20: Double radius = new Double(4.34);
21:
22: public Object getObject() throws Exception {
23: return new Orange(segments, radius, "Florida Sunny");
24: }
25:
26: public Class getObjectType() {
27: return Orange.class;
28: }
29:
30: public boolean isSingleton() {
31: return false;
32: }
33:
34: public Double getRadius() {
35: return radius;
36: }
37:
38: public void setRadius(Double radius) {
39: this .radius = radius;
40: }
41:
42: public Integer getSegments() {
43: return segments;
44: }
45:
46: public void setSegments(Integer segments) {
47: this.segments = segments;
48: }
49: }
|