View Javadoc

1   /*
2    * $Id: NameString.java 8023 2007-08-23 07:40:46Z dirk.olmes $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.samples.hello;
12  
13  import java.io.Serializable;
14  
15  /**
16   * <code>NameString</code> TODO (document class)
17   * 
18   * @author <a href="mailto:ross.mason@symphonysoft.com">Ross Mason</a>
19   * @version $Revision: 8023 $
20   */
21  public class NameString implements Serializable
22  {
23      /**
24       * Serial version
25       */
26      private static final long serialVersionUID = 7010138636008560022L;
27  
28      private String name;
29      private String greeting;
30  
31      public NameString()
32      {
33          this.name = null;
34      }
35      
36      public NameString(String name)
37      {
38          this.name = name;
39      }
40  
41      /**
42       * @return Returns the name.
43       */
44      public String getName()
45      {
46          return name;
47      }
48  
49      /**
50       * @param name The name to set.
51       */
52      public void setName(String name)
53      {
54          this.name = name;
55      }
56  
57      /**
58       * @return Returns the greeting.
59       */
60      public String getGreeting()
61      {
62          return greeting;
63      }
64  
65      /**
66       * @param greeting The greeting to set.
67       */
68      public void setGreeting(String greeting)
69      {
70          this.greeting = greeting;
71      }
72      
73      public boolean isValid()
74      {
75          return name != null && name.length() > 0;
76      }
77  
78  }