Update ooo320-m1
[ooovba.git] / offapi / com / sun / star / frame / XDocumentTemplates.idl
blobfb1800aa5d58765dc7f5e9dcd4e220284d8ecb50
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XDocumentTemplates.idl,v $
10 * $Revision: 1.8 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_frame_XDocumentTemplates_idl__
31 #define __com_sun_star_frame_XDocumentTemplates_idl__
33 #ifndef __com_sun_star_frame_XStorable_idl__
34 #include <com/sun/star/frame/XStorable.idl>
35 #endif
37 #ifndef __com_sun_star_ucb_XContent_idl__
38 #include <com/sun/star/ucb/XContent.idl>
39 #endif
41 //=============================================================================
43 module com { module sun { module star { module frame {
45 //=============================================================================
46 /** provides a high level api to organize document templates
48 <p>
49 Template informations are saved as links to the original content
50 and organized in groups. This data should be persistent and can be
51 updated by calling special method <member>XDocumentTemplates::update()</member>.
52 A real implementation of this interface can do that on top of
53 an ucb content provider. Method <member>XDocumentTemplates::getContent()</member>
54 force that.
55 </p>
57 published interface XDocumentTemplates: com::sun::star::uno::XInterface
59 //-------------------------------------------------------------------------
60 /** privides access to the root of internal used hierarchy
62 <p>
63 This content can be used for accessing the groups directly.
64 </p>
66 @return
67 the ucb content for template configuration
69 com::sun::star::ucb::XContent getContent();
71 //-------------------------------------------------------------------------
72 /** creates the template with the given name in the given group using the
73 data from the storable
75 @param GroupName
76 specifies the group
78 @param TemplateName
79 specifies the template
81 @param Storable
82 specifies the target
84 @return
85 <TRUE/> if operation was sucessfully
86 <br>
87 <FALSE/> otherwise
89 @see XDocumentTemplates::addTemplate()
91 boolean storeTemplate(
92 [in] string GroupName,
93 [in] string TemplateName,
94 [in] XStorable Storable);
96 //-------------------------------------------------------------------------
97 /** creates the template with the given name in the given group using the
98 given URL
100 @param GroupName
101 specifies the group
103 @param TemplateName
104 specifies the template
106 @param SourceURL
107 specifies the position of template
109 @return
110 <TRUE/> if operation was sucessfully
111 <br>
112 <FALSE/> otherwise
114 @see XDocumentTemplates::storeTemplate()
116 boolean addTemplate(
117 [in] string GroupName,
118 [in] string TemplateName,
119 [in] string SourceURL);
121 //-------------------------------------------------------------------------
122 /** remove a template from specified group
124 @param GroupName
125 specifies the group which include the template
127 @param TemplateName
128 specifies the template for delete
130 @return
131 <TRUE/> if operation was sucessfully
132 <br>
133 <FALSE/> otherwise
135 boolean removeTemplate(
136 [in] string GroupName,
137 [in] string TemplateName);
139 //-------------------------------------------------------------------------
140 /** rename a template inside specified group
142 @param GroupName
143 specifies the group which include the template
145 @param TemplateName
146 specifies the template for renaming
148 @return
149 <TRUE/> if operation was sucessfully
150 <br>
151 <FALSE/> otherwise
153 boolean renameTemplate(
154 [in] string GroupName,
155 [in] string OldTemplateName,
156 [in] string NewTemplateName);
158 //-------------------------------------------------------------------------
159 /** creates a new group
161 @param GroupName
162 the name of the group to be created
164 @return
165 <TRUE/> if operation was sucessfully
166 <br>
167 <FALSE/> otherwise
169 boolean addGroup( [in] string GroupName );
171 //-------------------------------------------------------------------------
172 /** remove an existing group
174 @param GroupName
175 the name of the group to be removed
177 @return
178 <TRUE/> if operation was sucessfully
179 <br>
180 <FALSE/> otherwise
182 boolean removeGroup( [in] string GroupName );
184 //-------------------------------------------------------------------------
185 /** rename an existing group
187 @param OldGroupName
188 the old name of the group
190 @param NewGroupName
191 the new name of the group
193 @return
194 <TRUE/> if operation was sucessfully
195 <br>
196 <FALSE/> otherwise
198 boolean renameGroup(
199 [in] string OldGroupName,
200 [in] string NewGroupName);
202 //-------------------------------------------------------------------------
203 /** force an update for internal structures
206 Because the templates are well known by links and not as direct content
207 they can be outdated. An update force actualization of that to find
208 wrong links.
209 </p>
211 [oneway] void update();
214 //=============================================================================
216 }; }; }; };
218 #endif