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
>
34 #ifndef __com_sun_star_ucb_XContent_idl__
35 #include
<com
/sun
/star
/ucb
/XContent.idl
>
38 //=============================================================================
40 module com
{ module sun
{ module star
{ module frame
{
42 //=============================================================================
43 /** provides a high level api to organize document templates
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>
54 published
interface XDocumentTemplates
: com
::sun
::star
::uno
::XInterface
56 //-------------------------------------------------------------------------
57 /** privides access to the root of internal used hierarchy
60 This content can be used for accessing the groups directly.
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
76 specifies the template
82 <TRUE/> if operation was sucessfully
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
101 specifies the template
104 specifies the position of template
107 <TRUE/> if operation was sucessfully
111 @see XDocumentTemplates::storeTemplate()
114 [in] string GroupName
,
115 [in] string TemplateName
,
116 [in] string SourceURL
);
118 //-------------------------------------------------------------------------
119 /** remove a template from specified group
122 specifies the group which include the template
125 specifies the template for delete
128 <TRUE/> if operation was sucessfully
132 boolean removeTemplate
(
133 [in] string GroupName
,
134 [in] string TemplateName
);
136 //-------------------------------------------------------------------------
137 /** rename a template inside specified group
140 specifies the group which include the template
143 specifies the template for renaming
146 <TRUE/> if operation was sucessfully
150 boolean renameTemplate
(
151 [in] string GroupName
,
152 [in] string OldTemplateName
,
153 [in] string NewTemplateName
);
155 //-------------------------------------------------------------------------
156 /** creates a new group
159 the name of the group to be created
162 <TRUE/> if operation was sucessfully
166 boolean addGroup
( [in] string GroupName
);
168 //-------------------------------------------------------------------------
169 /** remove an existing group
172 the name of the group to be removed
175 <TRUE/> if operation was sucessfully
179 boolean removeGroup
( [in] string GroupName
);
181 //-------------------------------------------------------------------------
182 /** rename an existing group
185 the old name of the group
188 the new name of the group
191 <TRUE/> if operation was sucessfully
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
208 [oneway
] void update
();
211 //=============================================================================