View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.tck.testmodels.fruit;
8   
9   import org.springframework.beans.factory.FactoryBean;
10  
11  /**
12   * A Spring FactoryBean implementation for unit testing.
13   */
14  public class FloridaSunnyOrangeFactoryBean implements FactoryBean
15  {
16      Integer segments = new Integer(10);
17      Double radius = new Double(4.34);
18      
19      public Object getObject() throws Exception
20      {
21          return new Orange(segments, radius, "Florida Sunny");
22      }
23  
24      public Class getObjectType()
25      {
26          return Orange.class;
27      }
28  
29      public boolean isSingleton()
30      {
31          return false;
32      }
33  
34      public Double getRadius()
35      {
36          return radius;
37      }
38  
39      public void setRadius(Double radius)
40      {
41          this.radius = radius;
42      }
43  
44      public Integer getSegments()
45      {
46          return segments;
47      }
48  
49      public void setSegments(Integer segments)
50      {
51          this.segments = segments;
52      }
53  }