KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > infoglue > cms > entities > management > InterceptionPointVO


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.management;
25
26 import org.infoglue.cms.entities.kernel.BaseEntityVO;
27 import org.infoglue.cms.util.ConstraintExceptionBuffer;
28 import org.infoglue.cms.util.validators.ValidatorFactory;
29
30 public class InterceptionPointVO implements BaseEntityVO
31 {
32
33     private java.lang.Integer JavaDoc interceptionPointId;
34     private java.lang.String JavaDoc category;
35     private java.lang.String JavaDoc name;
36     private java.lang.String JavaDoc description;
37     private java.lang.Boolean JavaDoc usesExtraDataForAccessControl;
38
39     public InterceptionPointVO()
40     {
41     }
42
43     public InterceptionPointVO(String JavaDoc category, String JavaDoc name, String JavaDoc description, boolean usesExtraDataForAccessControl)
44     {
45         this.category = category;
46         this.name = name;
47         this.description = description;
48         this.usesExtraDataForAccessControl = new Boolean JavaDoc(usesExtraDataForAccessControl);
49     }
50     
51     public java.lang.Integer JavaDoc getInterceptionPointId()
52     {
53         return this.interceptionPointId;
54     }
55                 
56     public void setInterceptionPointId(java.lang.Integer JavaDoc interceptionPointId)
57     {
58         this.interceptionPointId = interceptionPointId;
59     }
60     
61     public java.lang.String JavaDoc getCategory()
62     {
63         return this.category;
64     }
65                 
66     public void setCategory(java.lang.String JavaDoc category)
67     {
68         this.category = category;
69     }
70     
71     public java.lang.String JavaDoc getName()
72     {
73         return this.name;
74     }
75                 
76     public void setName(java.lang.String JavaDoc name)
77     {
78         this.name = name;
79     }
80     
81     public java.lang.String JavaDoc getDescription()
82     {
83         return this.description;
84     }
85                 
86     public void setDescription(java.lang.String JavaDoc description)
87     {
88         this.description = description;
89     }
90     
91     public java.lang.Boolean JavaDoc getUsesExtraDataForAccessControl()
92     {
93         return usesExtraDataForAccessControl;
94     }
95
96     public void setUsesExtraDataForAccessControl(java.lang.Boolean JavaDoc usesExtraDataForAccessControl)
97     {
98         this.usesExtraDataForAccessControl = usesExtraDataForAccessControl;
99     }
100
101
102     public String JavaDoc toString()
103     {
104         return getCategory() + ":" + getName();
105     }
106    
107     public Integer JavaDoc getId()
108     {
109         return this.getInterceptionPointId();
110     }
111
112     /**
113      * @see org.infoglue.cms.entities.kernel.BaseEntityVO#validate()
114      */

115     public ConstraintExceptionBuffer validate()
116     {
117         ConstraintExceptionBuffer ceb = new ConstraintExceptionBuffer();
118         
119         ValidatorFactory.createStringValidator("InterceptionPoint.name", true, 2, 100).validate(name, ceb);
120         ValidatorFactory.createStringValidator("InterceptionPoint.category", true, 2, 30).validate(category, ceb);
121         ValidatorFactory.createStringValidator("InterceptionPoint.description", true, 2, 100).validate(description, ceb);
122         
123         return ceb;
124     }
125     
126
127 }
128         
129
Popular Tags