1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XDocumentTemplates.idl,v $
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
>
37 #ifndef __com_sun_star_ucb_XContent_idl__
38 #include
<com
/sun
/star
/ucb
/XContent.idl
>
41 //=============================================================================
43 module com
{ module sun
{ module star
{ module frame
{
45 //=============================================================================
46 /** provides a high level api to organize document templates
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>
57 published
interface XDocumentTemplates
: com
::sun
::star
::uno
::XInterface
59 //-------------------------------------------------------------------------
60 /** privides access to the root of internal used hierarchy
63 This content can be used for accessing the groups directly.
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
79 specifies the template
85 <TRUE/> if operation was sucessfully
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
104 specifies the template
107 specifies the position of template
110 <TRUE/> if operation was sucessfully
114 @see XDocumentTemplates::storeTemplate()
117 [in] string GroupName
,
118 [in] string TemplateName
,
119 [in] string SourceURL
);
121 //-------------------------------------------------------------------------
122 /** remove a template from specified group
125 specifies the group which include the template
128 specifies the template for delete
131 <TRUE/> if operation was sucessfully
135 boolean removeTemplate
(
136 [in] string GroupName
,
137 [in] string TemplateName
);
139 //-------------------------------------------------------------------------
140 /** rename a template inside specified group
143 specifies the group which include the template
146 specifies the template for renaming
149 <TRUE/> if operation was sucessfully
153 boolean renameTemplate
(
154 [in] string GroupName
,
155 [in] string OldTemplateName
,
156 [in] string NewTemplateName
);
158 //-------------------------------------------------------------------------
159 /** creates a new group
162 the name of the group to be created
165 <TRUE/> if operation was sucessfully
169 boolean addGroup
( [in] string GroupName
);
171 //-------------------------------------------------------------------------
172 /** remove an existing group
175 the name of the group to be removed
178 <TRUE/> if operation was sucessfully
182 boolean removeGroup
( [in] string GroupName
);
184 //-------------------------------------------------------------------------
185 /** rename an existing group
188 the old name of the group
191 the new name of the group
194 <TRUE/> if operation was sucessfully
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
211 [oneway
] void update
();
214 //=============================================================================