KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > service > cmr > view > Exporter


1 /*
2  * Copyright (C) 2005 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.service.cmr.view;
18
19 import java.io.InputStream JavaDoc;
20 import java.util.Collection JavaDoc;
21
22 import org.alfresco.service.cmr.repository.ContentData;
23 import org.alfresco.service.cmr.repository.NodeRef;
24 import org.alfresco.service.cmr.security.AccessPermission;
25 import org.alfresco.service.namespace.QName;
26
27
28 /**
29  * Contract for an exporter. An exporter is responsible for actually exporting
30  * the content of the Repository to a destination point e.g. file system.
31  *
32  * @author David Caruana
33  */

34 public interface Exporter
35 {
36     /**
37      * Start of Export
38      */

39     public void start(ExporterContext context);
40
41     /**
42      * Start export of namespace
43      *
44      * @param prefix namespace prefix
45      * @param uri namespace uri
46      */

47     public void startNamespace(String JavaDoc prefix, String JavaDoc uri);
48     
49     /**
50      * End export of namespace
51      *
52      * @param prefix namespace prefix
53      */

54     public void endNamespace(String JavaDoc prefix);
55     
56     /**
57      * Start export of node
58      *
59      * @param nodeRef the node reference
60      */

61     public void startNode(NodeRef nodeRef);
62     
63     /**
64      * End export of node
65      *
66      * @param nodeRef the node reference
67      */

68     public void endNode(NodeRef nodeRef);
69     
70     /**
71      * Start export of node reference
72      *
73      * @param nodeRef the node reference
74      */

75     public void startReference(NodeRef nodeRef, QName childName);
76     
77     /**
78      * End export of node reference
79      *
80      * @param nodeRef the node reference
81      */

82     public void endReference(NodeRef nodeRef);
83     
84     /**
85      * Start export of aspects
86      *
87      * @param nodeRef
88      */

89     public void startAspects(NodeRef nodeRef);
90     
91     /**
92      * Start export of aspect
93      *
94      * @param nodeRef the node reference
95      * @param aspect the aspect
96      */

97     public void startAspect(NodeRef nodeRef, QName aspect);
98     
99     /**
100      * End export of aspect
101      *
102      * @param nodeRef the node reference
103      * @param aspect the aspect
104      */

105     public void endAspect(NodeRef nodeRef, QName aspect);
106     
107     /**
108      * End export of aspects
109      *
110      * @param nodeRef
111      */

112     public void endAspects(NodeRef nodeRef);
113
114     /**
115      * Start export of ACL
116      *
117      * @param nodeRef for node reference
118      */

119     public void startACL(NodeRef nodeRef);
120
121     /**
122      * Export permission
123      *
124      * @param nodeRef for node reference
125      * @param permission the permission
126      */

127     public void permission(NodeRef nodeRef, AccessPermission permission);
128     
129     /**
130      * End export of ACL
131      *
132      * @param nodeRef for node reference
133      */

134     public void endACL(NodeRef nodeRef);
135     
136     /**
137      * Start export of properties
138      *
139      * @param nodeRef the node reference
140      */

141     public void startProperties(NodeRef nodeRef);
142     
143     /**
144      * Start export of property
145      *
146      * @param nodeRef the node reference
147      * @param property the property name
148      */

149     public void startProperty(NodeRef nodeRef, QName property);
150     
151     /**
152      * End export of property
153      *
154      * @param nodeRef the node reference
155      * @param property the property name
156      */

157     public void endProperty(NodeRef nodeRef, QName property);
158     
159     /**
160      * End export of properties
161      *
162      * @param nodeRef the node reference
163      */

164     public void endProperties(NodeRef nodeRef);
165     
166     /**
167      * Export single valued property
168      *
169      * @param nodeRef the node reference
170      * @param property the property name
171      * @param value the value
172      */

173     public void value(NodeRef nodeRef, QName property, Object JavaDoc value);
174
175     /**
176      * Export multi valued property
177      *
178      * @param nodeRef the node reference
179      * @param property the property name
180      * @param value the value
181      */

182     public void value(NodeRef nodeRef, QName property, Collection JavaDoc values);
183     
184     /**
185      * Export content stream
186      *
187      * @param nodeRef the node reference
188      * @param property the property name
189      * @param content the content stream
190      * @param contentData content descriptor
191      */

192     public void content(NodeRef nodeRef, QName property, InputStream JavaDoc content, ContentData contentData);
193     
194     /**
195      * Start export of associations
196      *
197      * @param nodeRef
198      */

199     public void startAssocs(NodeRef nodeRef);
200     
201     /**
202      * Start export of association
203      *
204      * @param nodeRef the node reference
205      * @param assoc the association name
206      */

207     public void startAssoc(NodeRef nodeRef, QName assoc);
208     
209     /**
210      * End export of association
211      *
212      * @param nodeRef the node reference
213      * @param assoc the association name
214      */

215     public void endAssoc(NodeRef nodeRef, QName assoc);
216
217     /**
218      * End export of associations
219      *
220      * @param nodeRef
221      */

222     public void endAssocs(NodeRef nodeRef);
223     
224     /**
225      * Export warning
226      *
227      * @param warning the warning message
228      */

229     public void warning(String JavaDoc warning);
230     
231     /**
232      * End export
233      */

234     public void end();
235
236 }
237
Popular Tags