1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 module com
{ module sun
{ module star
{ module frame
{
23 /** provides a high level API to organize document templates
26 Template information is saved as links to the original content
27 and organized in groups. This data should be persistent and can be
28 updated by calling special method XDocumentTemplates::update().
29 A real implementation of this interface can do that on top of
30 a ucb content provider. Method XDocumentTemplates::getContent()
34 published
interface XDocumentTemplates
: com
::sun
::star
::uno
::XInterface
36 /** provides access to the root of internal used hierarchy
39 This content can be used for accessing the groups directly.
43 the ucb content for template configuration
45 com
::sun
::star
::ucb
::XContent getContent
();
47 /** creates the template with the given name in the given group using the
48 data from the storable
54 specifies the template
60 `TRUE` if operation was successful
64 @see XDocumentTemplates::addTemplate()
66 boolean storeTemplate
(
67 [in] string GroupName
,
68 [in] string TemplateName
,
69 [in] XStorable Storable
);
71 /** creates the template with the given name in the given group using the
78 specifies the template
81 specifies the position of template
84 `TRUE` if operation was successful
88 @see XDocumentTemplates::storeTemplate()
91 [in] string GroupName
,
92 [in] string TemplateName
,
93 [in] string SourceURL
);
95 /** remove a template from specified group
98 specifies the group which include the template
101 specifies the template for delete
104 `TRUE` if operation was successful
108 boolean removeTemplate
(
109 [in] string GroupName
,
110 [in] string TemplateName
);
112 /** rename a template inside specified group
115 specifies the group which include the template
117 @param OldTemplateName
118 specifies the template for renaming
120 @param NewTemplateName
121 specifies the new name for the template
124 `TRUE` if operation was successful
128 boolean renameTemplate
(
129 [in] string GroupName
,
130 [in] string OldTemplateName
,
131 [in] string NewTemplateName
);
133 /** creates a new group
136 the name of the group to be created
139 `TRUE` if operation was successful
143 boolean addGroup
( [in] string GroupName
);
145 /** remove an existing group
148 the name of the group to be removed
151 `TRUE` if operation was successful
155 boolean removeGroup
( [in] string GroupName
);
157 /** rename an existing group
160 the old name of the group
163 the new name of the group
166 `TRUE` if operation was successful
171 [in] string OldGroupName
,
172 [in] string NewGroupName
);
174 /** force an update for internal structures
177 Because the templates are well known by links and not as direct content
178 they can be outdated. An update force actualization of that to find
188 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */