View Javadoc

1   /*
2    * Copyright 2010 FatWire Corporation. All Rights Reserved.
3    *
4    * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0
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 com.fatwire.gst.foundation.wra;
17  
18  import java.util.Date;
19  
20  import com.fatwire.assetapi.data.AssetId;
21  
22  /**
23   * Simple VanityAsset
24   * 
25   * @author Dolf Dijkstra
26   * @since
27   * 
28   */
29  public class VanityAssetBean implements VanityAsset {
30      private AssetId id;
31      private String name;
32      private String description;
33      private String subtype;
34      private String status;
35      private String path;
36      private String template;
37      private Date startDate;
38      private Date endDate;
39  
40      public VanityAssetBean() {
41      }
42  
43      public VanityAssetBean(VanityAsset va) {
44          id = va.getId();
45          name = va.getName();
46          description = va.getDescription();
47          subtype = va.getSubtype();
48          status = va.getStatus();
49          path = va.getPath();
50          template = va.getTemplate();
51          startDate = va.getStartDate();
52          endDate = va.getEndDate();
53      }
54      public VanityAssetBean(Alias alias) {
55          id = alias.getTarget();
56          name = alias.getName();
57          description = alias.getDescription();
58          subtype = alias.getSubtype();
59          status = alias.getStatus();
60          path = alias.getPath();
61          template = alias.getTemplate();
62          startDate = alias.getStartDate();
63          endDate = alias.getEndDate();
64      }
65  
66      public AssetId getId() {
67          return id;
68      }
69  
70      public void setId(AssetId id) {
71          this.id = id;
72      }
73  
74      public String getName() {
75          return name;
76      }
77  
78      public void setName(String name) {
79          this.name = name;
80      }
81  
82      public String getDescription() {
83          return description;
84      }
85  
86      public void setDescription(String description) {
87          this.description = description;
88      }
89  
90      public String getSubtype() {
91          return subtype;
92      }
93  
94      public void setSubtype(String subtype) {
95          this.subtype = subtype;
96      }
97  
98      public String getStatus() {
99          return status;
100     }
101 
102     public void setStatus(String status) {
103         this.status = status;
104     }
105 
106     public String getPath() {
107         return path;
108     }
109 
110     public void setPath(String path) {
111         this.path = path;
112     }
113 
114     public String getTemplate() {
115         return template;
116     }
117 
118     public void setTemplate(String template) {
119         this.template = template;
120     }
121 
122     public Date getStartDate() {
123         return startDate;
124     }
125 
126     public void setStartDate(Date startDate) {
127         this.startDate = startDate;
128     }
129 
130     public Date getEndDate() {
131         return endDate;
132     }
133 
134     public void setEndDate(Date endDate) {
135         this.endDate = endDate;
136     }
137 
138     public String toString() {
139         return (getId() != null) ? getId().toString() : "[null id]";
140     }
141 }