KickJava   Java API By Example, From Geeks To Geeks.

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


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.entities.management.impl.simple.SiteNodeTypeDefinitionImpl;
28 import org.infoglue.cms.exception.ConstraintException;
29 import org.infoglue.cms.util.ConstraintExceptionBuffer;
30 import org.infoglue.cms.util.validators.ValidatorFactory;
31
32 public class SiteNodeTypeDefinitionVO implements BaseEntityVO
33 {
34
35     private java.lang.Integer JavaDoc siteNodeTypeDefinitionId;
36     private java.lang.String JavaDoc invokerClassName;
37     private java.lang.String JavaDoc name;
38     private java.lang.String JavaDoc description;
39     
40     public String JavaDoc toString()
41     {
42         return getName();
43     }
44
45     /**
46      * @see org.infoglue.cms.entities.kernel.BaseEntityVO#getId()
47      */

48     public Integer JavaDoc getId() {
49         return getSiteNodeTypeDefinitionId();
50     }
51
52     public java.lang.Integer JavaDoc getSiteNodeTypeDefinitionId()
53     {
54         return this.siteNodeTypeDefinitionId;
55     }
56                 
57     public void setSiteNodeTypeDefinitionId(java.lang.Integer JavaDoc siteNodeTypeDefinitionId)
58     {
59         this.siteNodeTypeDefinitionId = siteNodeTypeDefinitionId;
60     }
61         
62     public java.lang.String JavaDoc getName()
63     {
64         return this.name;
65     }
66                 
67     public void setName(java.lang.String JavaDoc name) throws ConstraintException
68     {
69         ConstraintExceptionBuffer ceb = new ConstraintExceptionBuffer();
70         
71         ValidatorFactory.createStringValidator("SiteNodeTypeDefinition.name", true, 6, 30).validate(name, ceb);
72
73         ceb.throwIfNotEmpty();
74         this.name = name;
75
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) throws ConstraintException
84     {
85         ConstraintExceptionBuffer ceb = new ConstraintExceptionBuffer();
86         ValidatorFactory.createStringValidator("SiteNodeTypeDefinition.description", true, 6, 255).validate(description, ceb);
87  
88         ceb.throwIfNotEmpty();
89         this.description = description;
90
91     }
92     
93     public java.lang.String JavaDoc getInvokerClassName()
94     {
95         return this.invokerClassName;
96     }
97                 
98     public void setInvokerClassName(java.lang.String JavaDoc invokerClassName) throws ConstraintException
99     {
100         ConstraintExceptionBuffer ceb = new ConstraintExceptionBuffer();
101         ValidatorFactory.createStringValidator("SiteNodeTypeDefinition.invokerClassName", true, 6, 100).validate(invokerClassName, ceb);
102  
103         ceb.throwIfNotEmpty();
104         this.invokerClassName = invokerClassName;
105
106     }
107     /**
108      * @see org.infoglue.cms.entities.kernel.BaseEntityVO#validate()
109      */

110     public ConstraintExceptionBuffer validate()
111     {
112         ConstraintExceptionBuffer ceb = new ConstraintExceptionBuffer();
113         if (name != null) ValidatorFactory.createStringValidator("SiteNodeTypeDefinition.name", true, 6, 30, true, SiteNodeTypeDefinitionImpl.class, this.getId(), null).validate(name, ceb);
114
115         return ceb;
116     }
117
118 }
119         
120
Popular Tags