KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > infoglue > cms > entities > content > impl > simple > ContentVersionImpl


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.content.impl.simple;
25
26 import java.util.ArrayList JavaDoc;
27
28 import org.infoglue.cms.entities.content.ContentVersion;
29 import org.infoglue.cms.entities.content.ContentVersionVO;
30 import org.infoglue.cms.entities.kernel.BaseEntityVO;
31
32 public class ContentVersionImpl implements ContentVersion
33 {
34     private ContentVersionVO valueObject = new ContentVersionVO();
35      
36      
37     /**
38      * @see org.infoglue.cms.entities.kernel.BaseEntity#getVO()
39      */

40     public BaseEntityVO getVO()
41     {
42         return (BaseEntityVO) getValueObject();
43     }
44
45     /**
46      * @see org.infoglue.cms.entities.kernel.BaseEntity#setVO(BaseEntityVO)
47      */

48     public void setVO(BaseEntityVO valueObject)
49     {
50         setValueObject((ContentVersionVO) valueObject);
51     }
52  
53     /**
54      * @see org.infoglue.cms.entities.kernel.BaseEntity#getId()
55      */

56     public Integer JavaDoc getId()
57     {
58         return getContentVersionId();
59     }
60     
61     public Object JavaDoc getIdAsObject()
62     {
63         return getId();
64     }
65
66     public ContentVersionVO getValueObject()
67     {
68         return this.valueObject;
69     }
70
71         
72     public void setValueObject(ContentVersionVO valueObject)
73     {
74         this.valueObject = valueObject;
75     }
76
77     private org.infoglue.cms.entities.content.impl.simple.ContentImpl owningContent;
78     private org.infoglue.cms.entities.management.impl.simple.LanguageImpl language;
79     private java.util.Collection JavaDoc publications = new ArrayList JavaDoc();
80     private java.util.Collection JavaDoc digitalAssets = new ArrayList JavaDoc();;
81     private java.util.Collection JavaDoc contentCategories = new ArrayList JavaDoc();;
82     
83     public java.lang.Integer JavaDoc getContentVersionId()
84     {
85         return this.valueObject.getContentVersionId();
86     }
87             
88     public void setContentVersionId(java.lang.Integer JavaDoc contentVersionId)
89     {
90         this.valueObject.setContentVersionId(contentVersionId);
91     }
92       
93     public java.lang.Integer JavaDoc getStateId()
94     {
95         return this.valueObject.getStateId();
96     }
97             
98     public void setStateId(java.lang.Integer JavaDoc stateId)
99     {
100         this.valueObject.setStateId(stateId);
101     }
102             
103     public java.util.Date JavaDoc getModifiedDateTime()
104     {
105         return this.valueObject.getModifiedDateTime();
106     }
107             
108     public void setModifiedDateTime(java.util.Date JavaDoc modifiedDateTime)
109     {
110         this.valueObject.setModifiedDateTime(modifiedDateTime);
111     }
112       
113     public java.lang.String JavaDoc getVersionComment()
114     {
115         return this.valueObject.getVersionComment();
116     }
117             
118     public void setVersionComment(java.lang.String JavaDoc versionComment)
119     {
120         this.valueObject.setVersionComment(versionComment);
121     }
122       
123     public java.lang.Boolean JavaDoc getIsCheckedOut()
124     {
125         return this.valueObject.getIsCheckedOut();
126     }
127             
128     public void setIsCheckedOut(java.lang.Boolean JavaDoc isCheckedOut)
129     {
130         this.valueObject.setIsCheckedOut(isCheckedOut);
131     }
132       
133     public java.lang.Boolean JavaDoc getIsActive()
134     {
135         return this.valueObject.getIsActive();
136     }
137     
138     public void setIsActive(java.lang.Boolean JavaDoc isActive)
139     {
140         this.valueObject.setIsActive(isActive);
141     }
142 /*
143     public java.lang.Boolean getIsPublishedVersion()
144     {
145         return this.valueObject.getIsPublishedVersion();
146     }
147     
148     public void setIsPublishedVersion(java.lang.Boolean isPublishedVersion)
149     {
150         this.valueObject.setIsPublishedVersion(isPublishedVersion);
151     }
152 */

153     public org.infoglue.cms.entities.content.impl.simple.ContentImpl getOwningContent()
154     {
155         return this.owningContent;
156     }
157             
158     public void setOwningContent (org.infoglue.cms.entities.content.impl.simple.ContentImpl owningContent)
159     {
160         this.owningContent = owningContent;
161        
162         if(owningContent != null)
163         {
164             this.valueObject.setContentId(owningContent.getContentId());
165             this.valueObject.setContentName(owningContent.getName());
166             if(owningContent.getContentTypeDefinition() != null)
167                 this.valueObject.setContentTypeDefinitionId(owningContent.getContentTypeDefinition().getId());
168         }
169     }
170     
171     public Integer JavaDoc getContentId()
172     {
173         return this.valueObject.getContentId();
174     }
175             
176     public void setContentId(Integer JavaDoc contentId)
177     {
178         this.valueObject.setContentId(contentId);
179     }
180       
181     public org.infoglue.cms.entities.management.impl.simple.LanguageImpl getLanguage()
182     {
183         return this.language;
184     }
185             
186     public void setLanguage (org.infoglue.cms.entities.management.impl.simple.LanguageImpl language)
187     {
188         this.language = language;
189         this.valueObject.setLanguageId(language.getLanguageId());
190         this.valueObject.setLanguageName(language.getName());
191     }
192       
193     public String JavaDoc getVersionModifier()
194     {
195         return this.valueObject.getVersionModifier();
196     }
197             
198     public void setVersionModifier(String JavaDoc versionModifier)
199     {
200         this.valueObject.setVersionModifier(versionModifier);
201     }
202     
203     public java.util.Collection JavaDoc getDigitalAssets()
204     {
205         return this.digitalAssets;
206     }
207     
208     public void setDigitalAssets(java.util.Collection JavaDoc digitalAssets)
209     {
210         this.digitalAssets = digitalAssets;
211     }
212     
213     public java.util.Collection JavaDoc getContentCategories()
214     {
215         return this.contentCategories;
216     }
217     
218     public void setContentCategories(java.util.Collection JavaDoc contentCategories)
219     {
220         this.contentCategories = contentCategories;
221     }
222
223     
224     public java.lang.String JavaDoc getVersionValue()
225     {
226         return this.valueObject.getVersionValue();
227     }
228             
229     public void setVersionValue(java.lang.String JavaDoc versionValue)
230     {
231         this.valueObject.setVersionValue(versionValue);
232     }
233
234     public java.lang.String JavaDoc getEscapedVersionValue()
235     {
236         String JavaDoc versionValue = this.valueObject.getVersionValue();
237         return versionValue.replaceAll("]]>", "cdataEnd");
238     }
239     
240     public void setEscapedVersionValue(java.lang.String JavaDoc escapedVersionValue)
241     {
242         String JavaDoc versionValue = escapedVersionValue.replaceAll("cdataEnd", "]]>");
243         this.valueObject.setVersionValue(versionValue);
244     }
245
246 }
247
Popular Tags