KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > infoglue > cms > entities > workflow > EventVO


1 /* ===============================================================================
2  *
3  * Part of the InfoGlue Content Management Platform (www.infoglue.org)
4  *
5  * ===============================================================================
6  *
7  * Copyright (C)
8  *
9  * This program is free software; you can redistribute it and/or modify it under
10  * the terms of the GNU General Public License version 2, as published by the
11  * Free Software Foundation. See the file LICENSE.html for more information.
12  *
13  * This program is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY, including the implied warranty of MERCHANTABILITY or FITNESS
15  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along with
18  * this program; if not, write to the Free Software Foundation, Inc. / 59 Temple
19  * Place, Suite 330 / Boston, MA 02111-1307 / USA.
20  *
21  * ===============================================================================
22  */

23
24 package org.infoglue.cms.entities.workflow;
25
26 import org.infoglue.cms.entities.kernel.BaseEntityVO;
27 import org.infoglue.cms.util.ConstraintExceptionBuffer;
28 import org.infoglue.cms.util.DateHelper;
29 import org.infoglue.cms.util.validators.ValidatorFactory;
30
31 public class EventVO implements BaseEntityVO
32 {
33     public static final Integer JavaDoc UNDEFINED = new Integer JavaDoc(0);
34     public static final Integer JavaDoc PUBLISH = new Integer JavaDoc(1);
35     public static final Integer JavaDoc PUBLISH_DENIED = new Integer JavaDoc(2);
36     public static final Integer JavaDoc UNPUBLISH_LATEST = new Integer JavaDoc(3);
37     public static final Integer JavaDoc UNPUBLISH_DENIED = new Integer JavaDoc(4);
38     //public static final Integer UNPUBLISH_ALL = new Integer(5);
39

40     
41     private java.lang.Integer JavaDoc eventId;
42     private java.lang.String JavaDoc name = "";
43     private java.lang.String JavaDoc description = "No comment";
44     private java.lang.String JavaDoc entityClass = "";
45     private java.lang.Integer JavaDoc entityId = null;
46     private java.util.Date JavaDoc creationDateTime = DateHelper.getSecondPreciseDate();
47     private java.lang.Integer JavaDoc typeId = UNDEFINED;
48     private java.lang.String JavaDoc creator = null;
49       
50     /**
51      * The constructor for the object. Empty now.
52      */

53         
54     public EventVO()
55     {
56     }
57         
58     public java.lang.Integer JavaDoc getEventId()
59     {
60         return this.eventId;
61     }
62     
63     public void setEventId(java.lang.Integer JavaDoc eventId)
64     {
65         this.eventId = eventId;
66     }
67     
68     public java.lang.String JavaDoc getName()
69     {
70         return this.name;
71     }
72                 
73     public void setName(java.lang.String JavaDoc name)
74     {
75         this.name = name;
76     }
77
78     public java.lang.String JavaDoc getDescription()
79     {
80         return this.description;
81     }
82                 
83     public void setDescription(java.lang.String JavaDoc description)
84     {
85         if(description != null && description.length() > 0)
86             this.description = description;
87     }
88
89     public java.lang.String JavaDoc getEntityClass()
90     {
91         return this.entityClass;
92     }
93             
94     public void setEntityClass(java.lang.String JavaDoc entityClass)
95     {
96         this.entityClass = entityClass;
97     }
98
99     public java.lang.Integer JavaDoc getEntityId()
100     {
101         return entityId;
102     }
103             
104     public void setEntityId(java.lang.Integer JavaDoc entityId)
105     {
106         this.entityId = entityId;
107     }
108     
109     public java.lang.Integer JavaDoc getTypeId()
110     {
111         return this.typeId;
112     }
113     
114     public void setTypeId(java.lang.Integer JavaDoc typeId)
115     {
116         this.typeId = typeId;
117     }
118     
119     public java.util.Date JavaDoc getCreationDateTime()
120     {
121         return this.creationDateTime;
122     }
123                 
124     public void setCreationDateTime(java.util.Date JavaDoc creationDateTime)
125     {
126         this.creationDateTime = creationDateTime;
127     }
128     
129     public java.lang.String JavaDoc getCreator()
130     {
131         return this.creator;
132     }
133
134     public void setCreator(java.lang.String JavaDoc creator)
135     {
136         this.creator = creator;
137     }
138                     
139
140     /**
141      * @see org.infoglue.cms.entities.kernel.BaseEntityVO#getId()
142      */

143     public Integer JavaDoc getId()
144     {
145         return getEventId();
146     }
147
148     
149     /**
150      * @see org.infoglue.cms.entities.kernel.BaseEntityVO#validate()
151      */

152     public ConstraintExceptionBuffer validate()
153     {
154         ConstraintExceptionBuffer ceb = new ConstraintExceptionBuffer();
155         
156         //ValidatorFactory.createStringValidator("Event.description", false, 0, 255).validate(description, ceb);
157

158         return ceb;
159     }
160
161 }
162         
163
Popular Tags