1   package org.apache.commons.betwixt.scarab;
2   
3   /*
4    * Copyright 2001-2004 The Apache Software Foundation.
5    * 
6    * Licensed under the Apache License, Version 2.0 (the "License");
7    * you may not use this file except in compliance with the License.
8    * You may obtain a copy of the License at
9    * 
10   *      http://www.apache.org/licenses/LICENSE-2.0
11   * 
12   * Unless required by applicable law or agreed to in writing, software
13   * distributed under the License is distributed on an "AS IS" BASIS,
14   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   * See the License for the specific language governing permissions and
16   * limitations under the License.
17   */ 
18  
19  import java.io.Serializable;
20  import java.util.ArrayList;
21  import java.util.List;
22  
23  import org.apache.commons.logging.Log;
24  import org.apache.commons.logging.LogFactory;
25  
26  /***
27   * <p><code>GlobalAttribute</code> is a sample bean for use by the test cases.</p>
28   *
29   * @author <a href="mailto:jason@zenplex.com">Jason van Zyl</a>
30   * @version $Id: GlobalAttribute.java,v 1.5 2002/06/05 10:30:50 jstrachan Exp $
31   */
32  public class GlobalAttribute implements Serializable
33  {
34      /***
35       * Logger
36       */
37      private final static Log log = LogFactory.getLog(GlobalAttribute.class);
38  
39      private List globalAttributeOptions;
40      
41      private String name;
42      private CreatedDate createdDate;
43  
44      /***
45       * Constructor for the ScarabSettings object
46       */
47      public GlobalAttribute() 
48      {
49          globalAttributeOptions = new ArrayList();
50      }
51  
52      public String toString() {
53          return super.toString() + "[name=" + name + ";createdDate=" + createdDate + ";options=" + globalAttributeOptions + "]";
54      }
55  
56      public void addGlobalAttributeOption(GlobalAttributeOption globalAttributeOption)
57      {
58          globalAttributeOptions.add(globalAttributeOption);
59      }        
60  
61      public List getGlobalAttributeOptions()
62      {
63          return globalAttributeOptions;
64      }        
65  
66      public void setName(String name)
67      {
68          this.name = name;
69      }        
70  
71      public String getName()
72      {
73          return name;
74      }
75      
76      public void addCreatedDate(CreatedDate cd)
77      {
78          this.createdDate = cd;
79      }
80      
81      public CreatedDate getCreatedDate()
82      {
83          return this.createdDate;
84      }
85  }