KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > infoglue > cms > entities > structure > impl > simple > SiteNodeImpl


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.structure.impl.simple;
25
26 import java.util.ArrayList JavaDoc;
27 import java.util.Collection JavaDoc;
28
29 import org.infoglue.cms.entities.kernel.BaseEntityVO;
30 import org.infoglue.cms.entities.management.impl.simple.RepositoryImpl;
31 import org.infoglue.cms.entities.management.impl.simple.SiteNodeTypeDefinitionImpl;
32 import org.infoglue.cms.entities.structure.SiteNode;
33 import org.infoglue.cms.entities.structure.SiteNodeVO;
34
35 public class SiteNodeImpl implements SiteNode
36 {
37     private SiteNodeVO valueObject = new SiteNodeVO();
38     private SiteNodeImpl parentSiteNode;
39     private Collection JavaDoc childSiteNodes = new ArrayList JavaDoc();
40     private Collection JavaDoc siteNodeVersions = new ArrayList JavaDoc();
41     private RepositoryImpl repository;
42     private SiteNodeTypeDefinitionImpl siteNodeTypeDefinition;
43
44     /**
45      * @see org.infoglue.cms.entities.kernel.BaseEntity#getVO()
46      */

47     public BaseEntityVO getVO()
48     {
49         return (BaseEntityVO) getValueObject();
50     }
51
52     /**
53      * @see org.infoglue.cms.entities.kernel.BaseEntity#setVO(BaseEntityVO)
54      */

55     public void setVO(BaseEntityVO valueObject)
56     {
57         setValueObject((SiteNodeVO) valueObject);
58     }
59  
60     /**
61      * @see org.infoglue.cms.entities.kernel.BaseEntity#getId()
62      */

63     public Integer JavaDoc getId()
64     {
65         return getSiteNodeId();
66     }
67     
68     public Object JavaDoc getIdAsObject()
69     {
70         return getId();
71     }
72
73     public SiteNodeVO getValueObject()
74     {
75         return this.valueObject;
76     }
77
78     public void setValueObject(SiteNodeVO valueObject)
79     {
80         this.valueObject = valueObject;
81     }
82     
83     public java.lang.Integer JavaDoc getSiteNodeId()
84     {
85         return this.valueObject.getSiteNodeId();
86     }
87             
88     public void setSiteNodeId(java.lang.Integer JavaDoc siteNodeId)
89     {
90         this.valueObject.setSiteNodeId(siteNodeId);
91     }
92       
93     public java.lang.String JavaDoc getName()
94     {
95         return this.valueObject.getName();
96     }
97             
98     public void setName(java.lang.String JavaDoc name)
99     {
100         this.valueObject.setName(name);
101     }
102     
103     public java.lang.Boolean JavaDoc getIsBranch()
104     {
105         return this.valueObject.getIsBranch();
106     }
107     
108     public void setIsBranch(java.lang.Boolean JavaDoc isBranch)
109     {
110         this.valueObject.setIsBranch(isBranch);
111     }
112       
113     public java.util.Date JavaDoc getPublishDateTime()
114     {
115         return this.valueObject.getPublishDateTime();
116     }
117             
118     public void setPublishDateTime(java.util.Date JavaDoc publishDateTime)
119     {
120         this.valueObject.setPublishDateTime(publishDateTime);
121     }
122       
123     public java.util.Date JavaDoc getExpireDateTime()
124     {
125         return this.valueObject.getExpireDateTime();
126     }
127             
128     public void setExpireDateTime(java.util.Date JavaDoc expireDateTime)
129     {
130         this.valueObject.setExpireDateTime(expireDateTime);
131     }
132       
133     public Integer JavaDoc getMetaInfoContentId()
134     {
135         return this.valueObject.getMetaInfoContentId();
136     }
137     
138     public void setMetaInfoContentId(Integer JavaDoc metaInfoContentId)
139     {
140         this.valueObject.setMetaInfoContentId(metaInfoContentId);
141     }
142
143     public org.infoglue.cms.entities.structure.impl.simple.SiteNodeImpl getParentSiteNode()
144     {
145         return this.parentSiteNode;
146     }
147             
148     public void setParentSiteNode (org.infoglue.cms.entities.structure.impl.simple.SiteNodeImpl parentSiteNode)
149     {
150         this.parentSiteNode = parentSiteNode;
151
152         if(parentSiteNode != null)
153             this.valueObject.setParentSiteNodeId(parentSiteNode.getId());
154     }
155       
156     public java.util.Collection JavaDoc getChildSiteNodes()
157     {
158         return this.childSiteNodes;
159     }
160             
161     public void setChildSiteNodes (java.util.Collection JavaDoc childSiteNodes)
162     {
163         this.childSiteNodes = childSiteNodes;
164         this.setChildCount(new Integer JavaDoc(childSiteNodes.size()) );
165     }
166       
167     public java.util.Collection JavaDoc getSiteNodeVersions()
168     {
169         return this.siteNodeVersions;
170     }
171             
172     public void setSiteNodeVersions (java.util.Collection JavaDoc siteNodeVersions)
173     {
174         this.siteNodeVersions = siteNodeVersions;
175     }
176       
177     public String JavaDoc getCreator()
178     {
179         return this.valueObject.getCreatorName();
180     }
181             
182     public void setCreator(String JavaDoc creator)
183     {
184         this.valueObject.setCreatorName(creator);
185     }
186       
187     public org.infoglue.cms.entities.management.impl.simple.RepositoryImpl getRepository()
188     {
189         return this.repository;
190     }
191             
192     public void setRepository (org.infoglue.cms.entities.management.impl.simple.RepositoryImpl repository)
193     {
194         this.repository = repository;
195         this.valueObject.setRepositoryId(repository.getRepositoryId());
196     }
197       
198     public org.infoglue.cms.entities.management.impl.simple.SiteNodeTypeDefinitionImpl getSiteNodeTypeDefinition()
199     {
200         return this.siteNodeTypeDefinition;
201     }
202             
203     public void setSiteNodeTypeDefinition (org.infoglue.cms.entities.management.impl.simple.SiteNodeTypeDefinitionImpl siteNodeTypeDefinition)
204     {
205         this.siteNodeTypeDefinition = siteNodeTypeDefinition;
206         if(siteNodeTypeDefinition != null)
207             this.valueObject.setSiteNodeTypeDefinitionId(siteNodeTypeDefinition.getSiteNodeTypeDefinitionId());
208     }
209
210     /**
211      * Returns the childCount.
212      * @return Integer
213      */

214     public Integer JavaDoc getChildCount()
215     {
216         return this.valueObject.getChildCount();
217     }
218
219     /**
220      * Sets the childCount.
221      * @param childCount The childCount to set
222      */

223     public void setChildCount(Integer JavaDoc childCount)
224     {
225         this.valueObject.setChildCount(childCount);
226     }
227
228     
229 }
230
Popular Tags