merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / frame / XDocumentTemplates.idl
blobbc41386ea1fd2e298ac090a02ee998fd5ce869ff
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef __com_sun_star_frame_XDocumentTemplates_idl__
28 #define __com_sun_star_frame_XDocumentTemplates_idl__
30 #ifndef __com_sun_star_frame_XStorable_idl__
31 #include <com/sun/star/frame/XStorable.idl>
32 #endif
34 #ifndef __com_sun_star_ucb_XContent_idl__
35 #include <com/sun/star/ucb/XContent.idl>
36 #endif
38 //=============================================================================
40 module com { module sun { module star { module frame {
42 //=============================================================================
43 /** provides a high level api to organize document templates
45 <p>
46 Template informations are saved as links to the original content
47 and organized in groups. This data should be persistent and can be
48 updated by calling special method <member>XDocumentTemplates::update()</member>.
49 A real implementation of this interface can do that on top of
50 an ucb content provider. Method <member>XDocumentTemplates::getContent()</member>
51 force that.
52 </p>
54 published interface XDocumentTemplates: com::sun::star::uno::XInterface
56 //-------------------------------------------------------------------------
57 /** privides access to the root of internal used hierarchy
59 <p>
60 This content can be used for accessing the groups directly.
61 </p>
63 @return
64 the ucb content for template configuration
66 com::sun::star::ucb::XContent getContent();
68 //-------------------------------------------------------------------------
69 /** creates the template with the given name in the given group using the
70 data from the storable
72 @param GroupName
73 specifies the group
75 @param TemplateName
76 specifies the template
78 @param Storable
79 specifies the target
81 @return
82 <TRUE/> if operation was sucessfully
83 <br>
84 <FALSE/> otherwise
86 @see XDocumentTemplates::addTemplate()
88 boolean storeTemplate(
89 [in] string GroupName,
90 [in] string TemplateName,
91 [in] XStorable Storable);
93 //-------------------------------------------------------------------------
94 /** creates the template with the given name in the given group using the
95 given URL
97 @param GroupName
98 specifies the group
100 @param TemplateName
101 specifies the template
103 @param SourceURL
104 specifies the position of template
106 @return
107 <TRUE/> if operation was sucessfully
108 <br>
109 <FALSE/> otherwise
111 @see XDocumentTemplates::storeTemplate()
113 boolean addTemplate(
114 [in] string GroupName,
115 [in] string TemplateName,
116 [in] string SourceURL);
118 //-------------------------------------------------------------------------
119 /** remove a template from specified group
121 @param GroupName
122 specifies the group which include the template
124 @param TemplateName
125 specifies the template for delete
127 @return
128 <TRUE/> if operation was sucessfully
129 <br>
130 <FALSE/> otherwise
132 boolean removeTemplate(
133 [in] string GroupName,
134 [in] string TemplateName);
136 //-------------------------------------------------------------------------
137 /** rename a template inside specified group
139 @param GroupName
140 specifies the group which include the template
142 @param TemplateName
143 specifies the template for renaming
145 @return
146 <TRUE/> if operation was sucessfully
147 <br>
148 <FALSE/> otherwise
150 boolean renameTemplate(
151 [in] string GroupName,
152 [in] string OldTemplateName,
153 [in] string NewTemplateName);
155 //-------------------------------------------------------------------------
156 /** creates a new group
158 @param GroupName
159 the name of the group to be created
161 @return
162 <TRUE/> if operation was sucessfully
163 <br>
164 <FALSE/> otherwise
166 boolean addGroup( [in] string GroupName );
168 //-------------------------------------------------------------------------
169 /** remove an existing group
171 @param GroupName
172 the name of the group to be removed
174 @return
175 <TRUE/> if operation was sucessfully
176 <br>
177 <FALSE/> otherwise
179 boolean removeGroup( [in] string GroupName );
181 //-------------------------------------------------------------------------
182 /** rename an existing group
184 @param OldGroupName
185 the old name of the group
187 @param NewGroupName
188 the new name of the group
190 @return
191 <TRUE/> if operation was sucessfully
192 <br>
193 <FALSE/> otherwise
195 boolean renameGroup(
196 [in] string OldGroupName,
197 [in] string NewGroupName);
199 //-------------------------------------------------------------------------
200 /** force an update for internal structures
203 Because the templates are well known by links and not as direct content
204 they can be outdated. An update force actualization of that to find
205 wrong links.
206 </p>
208 [oneway] void update();
211 //=============================================================================
213 }; }; }; };
215 #endif