View Javadoc
1   /**
2    * Copyright 2005-2016 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.core.api.uif;
17  
18  import org.kuali.rice.core.api.mo.AbstractDataTransferObject;
19  import org.kuali.rice.core.api.mo.ModelBuilder;
20  
21  import javax.xml.bind.annotation.XmlAccessType;
22  import javax.xml.bind.annotation.XmlAccessorType;
23  import javax.xml.bind.annotation.XmlType;
24  
25  /**
26   * An abstract widget that all widgets inherit from.
27   */
28  @XmlAccessorType(XmlAccessType.NONE)
29  @XmlType(name = RemotableAbstractWidget.Constants.TYPE_NAME)
30  public abstract class RemotableAbstractWidget extends AbstractDataTransferObject implements RemotableWidgetContract {
31  
32      /**
33       * Should only be invoked by JAXB.
34       */
35      @SuppressWarnings("unused")
36      RemotableAbstractWidget() {
37  
38      }
39  
40      public abstract static class Builder implements RemotableWidgetContract, ModelBuilder {
41          Builder() {
42              super();
43          }
44  
45          //todo make ModelBuilder generic so I don't have to do this.
46          public abstract RemotableAbstractWidget build();
47      }
48  
49      /**
50       * Defines some internal constants used on this class.
51       */
52      static class Constants {
53          final static String TYPE_NAME = "AbstractWidgetType";
54      }
55  }