KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opencms > defaults > I_CmsExtendedContentDefinition


1 /*
2 * File : $Source: /usr/local/cvs/opencms/src-modules/com/opencms/defaults/I_CmsExtendedContentDefinition.java,v $
3 * Date : $Date: 2005/06/27 23:22:23 $
4 * Version: $Revision: 1.2 $
5 *
6 * This library is part of OpenCms -
7 * the Open Source Content Mananagement System
8 *
9 * Copyright (C) 2001 The OpenCms Group
10 *
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation; either
14 * version 2.1 of the License, or (at your option) any later version.
15 *
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
20 *
21 * For further information about OpenCms, please see the
22 * OpenCms Website: http://www.opencms.org
23 *
24 * You should have received a copy of the GNU Lesser General Public
25 * License along with this library; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 */

28 package com.opencms.defaults;
29
30 import org.opencms.file.CmsObject;
31 import org.opencms.util.CmsUUID;
32
33 import java.util.Vector JavaDoc;
34
35 /**
36  * Content Definitions that uses the projectmanagement,
37  * that means the cd can be published and the history
38  * can be enabled, should implement this interface
39  *
40  * @deprecated Will not be supported past the OpenCms 6 release.
41  */

42 public interface I_CmsExtendedContentDefinition {
43     
44     /**
45      * The permission to read a resource
46      */

47     int C_PERMISSION_READ = 1;
48
49     /**
50      * The permission to write a resource
51      */

52     int C_PERMISSION_WRITE = 2;
53
54     /**
55      * The permission to view a resource
56      */

57     int C_PERMISSION_VIEW = 4;
58
59     /**
60      * Returns the unique id of the content definition
61      *
62      * @return int The unique id of the cd
63      */

64     CmsUUID getId();
65
66     /**
67      * Returns the projectId of the content definition.
68      * If the cd belongs to the current project the value
69      * is the id of the current project otherwise its
70      * the id of the online project
71      *
72      * @return int The project id
73      */

74     int getProjectId();
75
76     /**
77      * Returns the state of the content definition:
78      * unchanged, new, changed or deleted
79      *
80      * @return int The state of the cd
81      */

82     int getState();
83
84     /**
85      * Returns the projectId of the content definition
86      * that is stored in the cd table after the cd
87      * was locked
88      *
89      * @return int The id of the project
90      */

91     int getLockedInProject();
92
93     /**
94      * Returns the date of the last modification of the content definition
95      *
96      * @return long The date of the last modification
97      */

98     long getDateLastModified();
99
100     /**
101      * Returns the date of the creation of the content definition
102      *
103      * @return long The date of the creation
104      */

105     long getDateCreated();
106
107     /**
108      * Returns the id of the user who has modified the content definition
109      *
110      * @return int The id of the user who has modified the cd
111      */

112     CmsUUID getLastModifiedBy();
113
114     /**
115      * Returns the name of the user who has modified the content definition
116      *
117      * @return String The name of the user who has modified the cd
118      */

119     String JavaDoc getLastModifiedByName();
120
121     /**
122      * Returns the id of the version in the history of the content definition
123      *
124      * @return int The id of the version
125      */

126     int getVersionId();
127
128     /**
129      * Returns the title of the content definition
130      *
131      * @return String The title of the cd
132      */

133     String JavaDoc getTitle();
134
135     /**
136      * Returns the ownerId of the content definition
137      *
138      * @return int The ownerId of the cd
139      */

140     CmsUUID getOwner();
141
142     /**
143      * Returns the groupId of the content definition
144      *
145      * @return int The groupId of the cd
146      */

147     CmsUUID getGroupId();
148
149     /**
150      * Returns the access flags of the content definition
151      *
152      * @return int The access flags of the cd
153      */

154     int getAccessFlags();
155
156     /**
157      * Publishes the content definition directly
158      *
159      * @param cms The CmsObject
160      * @throws Exception if something goes wrong
161      */

162     void publishResource(CmsObject cms) throws Exception JavaDoc;
163
164     /**
165      * Undelete method
166      * for undelete instance of content definition
167      *
168      * @param cms The CmsObject
169      * @throws Exception if something goes wrong
170      */

171     void undelete(CmsObject cms) throws Exception JavaDoc;
172
173
174     /**
175      * Restore method
176      * for restore instance of content definition from the history
177      *
178      * @param cms The CmsObject
179      * @param versionId The id of the version to restore
180      * @throws Exception if something goes wrong
181      */

182     void restore(CmsObject cms, int versionId) throws Exception JavaDoc;
183
184     /**
185      * Change owner method
186      * for changing permissions of content definition
187      *
188      * @param cms The CmsObject
189      * @param ownerId The id of the new owner
190      * @throws Exception if something goes wrong
191      */

192     void chown(CmsObject cms, CmsUUID ownerId) throws Exception JavaDoc;
193
194     /**
195      * Change group method
196      * for changing permissions of content definition
197      *
198      * @param cms The CmsObject
199      * @param groupId The id of the new group
200      * @throws Exception if something goes wrong
201      */

202     void chgrp(CmsObject cms, CmsUUID groupId) throws Exception JavaDoc;
203
204     /**
205      * Change access flags method
206      * for changing permissions of content definition
207      *
208      * @param cms The CmsObject
209      * @param accessflags The new access flags
210      * @throws Exception if something goes wrong
211      */

212     void chmod(CmsObject cms, int accessflags) throws Exception JavaDoc;
213
214     /**
215      * Copy method
216      * for copying content definition
217      *
218      * @param cms The CmsObject
219      * @return int The id of the new content definition
220      * @throws Exception if something goes wrong
221      */

222     CmsUUID copy(CmsObject cms) throws Exception JavaDoc;
223
224     /**
225      * History method
226      * returns the vector of the versions of content definition in the history
227      *
228      * @param cms The CmsObject
229      * @return Vector The versions of the cd in the history
230      * @throws Exception if something goes wrong
231      */

232     Vector JavaDoc getHistory(CmsObject cms) throws Exception JavaDoc;
233
234     /**
235      * History method
236      * returns the cd of the version with the given versionId
237      *
238      * @param cms The CmsObject
239      * @param versionId The version id
240      * @return Object The object with the version of the cd
241      * @throws Exception if something goes wrong
242      */

243     Object JavaDoc getVersionFromHistory(CmsObject cms, int versionId) throws Exception JavaDoc;
244 }
Popular Tags