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 .
19 #ifndef __com_sun_star_xforms_XModel_idl__
20 #define __com_sun_star_xforms_XModel_idl__
22 #include
<com
/sun
/star
/uno
/XInterface.idl
>
24 #include
<com
/sun
/star
/beans
/XPropertySet.idl
>
25 #include
<com
/sun
/star
/container
/XSet.idl
>
26 #include
<com
/sun
/star
/xforms
/XDataTypeRepository.idl
>
27 #include
<com
/sun
/star
/xml
/dom
/XDocument.idl
>
28 #include
<com
/sun
/star
/util
/VetoException.idl
>
29 #include
<com
/sun
/star
/lang
/WrappedTargetException.idl
>
30 #include
<com
/sun
/star
/task
/XInteractionHandler.idl
>
33 module com
{ module sun
{ module star
{ module xforms
{
35 interface XSubmission
;
38 /** represent an XForms model
42 /** get the XForms model ID */
45 /** set the XForms model ID */
46 void setID
( [in] string id );
49 /** initialize the model */
52 /** rebuild the model */
55 /** re-evaluate all calculate attributes */
58 /** re-evaluate all validity attributes */
61 /** refresh the model */
65 /** submit form through given submission id
67 <p>This is a convenience method. Calling it is equivalent to calling
68 <code>getSubmission()( id ).submit()</code>.</p>
71 the ID of the submission to execute
73 @throws com::sun::star::util::VetoException
74 when the current model state does not allow a submission. Usually, this indicates that
75 consistency criteria for the model data is not fulfilled.
77 @throws com::sun::star::lang::WrappedTargetException
78 when another error occurred during the submission. The
79 com::sun::star::lang::WrappedTargetException::TargetException describes
82 void submit
( [in] string id )
83 raises
( com
::sun
::star
::util
::VetoException
, com
::sun
::star
::lang
::WrappedTargetException
);
85 /** submit form through given submission id
87 <p>This is a convenience method. Calling it is equivalent to calling
88 <code>getSubmission()( id, handler ).submit()</code>.</p>
91 the ID of the submission to execute
94 This handler allows additional user interaction, which may be necessary before
95 the submission can be performed.
97 @throws com::sun::star::util::VetoException
98 when the current model state does not allow a submission. Usually, this indicates that
99 consistency criteria for the model data is not fulfilled.
101 @throws com::sun::star::lang::WrappedTargetException
102 when another error occurred during the submission. The
103 com::sun::star::lang::WrappedTargetException::TargetException describes
106 void submitWithInteraction
( [in] string id, [in] com
::sun
::star
::task
::XInteractionHandler aHandler
)
107 raises
( com
::sun
::star
::util
::VetoException
, com
::sun
::star
::lang
::WrappedTargetException
);
109 /** provides management access to the XSD data types associated with the model
112 getDataTypeRepository
( );
117 /** gets container containing all instances;
119 <p>The elements of the set are arrays of com::sun::star::beans::PropertyValues,
120 containing the ID, the URL, and the instance itself.</p>
122 com
::sun
::star
::container
::XSet getInstances
();
124 /** retrieves the instance with the given id
126 com
::sun
::star
::xml
::dom
::XDocument getInstanceDocument
( [in] string id );
128 /** get the default instance for this model
130 com
::sun
::star
::xml
::dom
::XDocument getDefaultInstance
();
135 /** create a binding element for this model
137 <p>The returned binding still needs to be inserted into the bindings container.</p>
141 com
::sun
::star
::beans
::XPropertySet createBinding
();
143 /** clone an arbitrary binding element for this model; still needs
145 <p>The returned binding still needs to be inserted into the bindings container.</p>
149 com
::sun
::star
::beans
::XPropertySet cloneBinding
( [in] com
::sun
::star
::beans
::XPropertySet binding
);
151 /** get a binding with a certain ID
153 <p>This is a convenience method: the same result can also be obtained through
156 com
::sun
::star
::beans
::XPropertySet getBinding
( [in] string id );
158 /** get a container containing all bindings; also supports XNameAccess
160 com
::sun
::star
::container
::XSet getBindings
();
165 /** create a submission element for this model
167 <p>The returned submission element still needs to be inserted into the submission container.</p>
171 XSubmission createSubmission
();
173 /** clone an arbitrary submission element for this model
175 <p>The returned submission element still needs to be inserted into the submission container.</p>
179 XSubmission cloneSubmission
( [in] com
::sun
::star
::beans
::XPropertySet submission
);
181 /** get a submission with a certain ID.
183 <p>This is a convenience method: the same result can also be obtained through
184 getSubmissions().</p>
186 XSubmission getSubmission
( [in] string id );
188 /** get container containing all submissions; also supports XNameAccess
190 com
::sun
::star
::container
::XSet getSubmissions
();
198 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */