merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / xforms / XModel.idl
blobea2e71bdd39a92a9e1d4803b0b4d5ef8d947d9a6
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_xforms_XModel_idl__
28 #define __com_sun_star_xforms_XModel_idl__
30 #ifndef __com_sun_star_uno_XInterface_idl__
31 #include <com/sun/star/uno/XInterface.idl>
32 #endif
34 #ifndef __com_sun_star_beans_XPropertySet_idl__
35 #include <com/sun/star/beans/XPropertySet.idl>
36 #endif
38 #ifndef __com_sun_star_container_XIndexAccess_idl__
39 #include <com/sun/star/container/XSet.idl>
40 #endif
42 #ifndef __com_sun_star_xforms_XDataTypeRepository_idl__
43 #include <com/sun/star/xforms/XDataTypeRepository.idl>
44 #endif
46 #ifndef __com_sun_star_xml_dom_XDocument_idl__
47 #include <com/sun/star/xml/dom/XDocument.idl>
48 #endif
50 #ifndef __com_sun_star_util_VetoException_idl__
51 #include <com/sun/star/util/VetoException.idl>
52 #endif
54 #ifndef __com_sun_star_lang_WrappedTargetException_idl__
55 #include <com/sun/star/lang/WrappedTargetException.idl>
56 #endif
58 #ifndef __com_sun_star_task_XInteractionHandler_idl__
59 #include <com/sun/star/task/XInteractionHandler.idl>
60 #endif
62 //=============================================================================
64 module com { module sun { module star { module xforms {
66 interface XSubmission;
68 //=============================================================================
70 /** represent an XForms model
72 interface XModel
74 /** get the XForms model ID */
75 string getID();
77 /** set the XForms model ID */
78 void setID( [in] string id );
81 /** initialize the model */
82 void initialize();
84 /** rebuild the model */
85 void rebuild();
87 /** re-evaluate all calculate attributes */
88 void recalculate();
90 /** re-evaluate all validity attributes */
91 void revalidate();
93 /** refresh the model */
94 void refresh();
97 /** submit form through given submission id
99 <p>This is a convenience method. Calling it is equivalent to calling
100 <code><member>getSubmission</member>( <arg>id</arg> ).submit()</code>.</p>
102 @param id
103 the ID of the submission to execute
105 @throws com::sun::star::util::VetoException
106 when the current model state does not allow a submission. Usually, this indicates that
107 consistency criteria for the model data is not fulfilled.
109 @throws com::sun::star::lang::WrappedTargetException
110 when another error occured during the submission. The
111 <member scope="com::sun::star::lang">WrappedTargetException::TargetException</member> describes
112 this error then.
114 void submit( [in] string id )
115 raises ( com::sun::star::util::VetoException, com::sun::star::lang::WrappedTargetException );
117 /** submit form through given submission id
119 <p>This is a convenience method. Calling it is equivalent to calling
120 <code><member>getSubmission</member>( <arg>id</arg>, <arg>handler</arg> ).submit()</code>.</p>
122 @param id
123 the ID of the submission to execute
125 @param aHandler
126 This handler allows additional user interaction, which may be necessary before
127 the submission can be performed.
129 @throws com::sun::star::util::VetoException
130 when the current model state does not allow a submission. Usually, this indicates that
131 consistency criteria for the model data is not fulfilled.
133 @throws com::sun::star::lang::WrappedTargetException
134 when another error occured during the submission. The
135 <member scope="com::sun::star::lang">WrappedTargetException::TargetException</member> describes
136 this error then.
138 void submitWithInteraction( [in] string id, [in] com::sun::star::task::XInteractionHandler aHandler )
139 raises ( com::sun::star::util::VetoException, com::sun::star::lang::WrappedTargetException );
141 /** provides management access to the XSD data types associated with the model
143 XDataTypeRepository
144 getDataTypeRepository( );
148 // instances
151 /** gets container containing all instances;
153 <p>The elements of the set are arrays of <type scope="com::sun::star::beans">PropertyValue</type>s,
154 containing the ID, the URL, and the instance itself.</p>
156 com::sun::star::container::XSet getInstances();
158 /** retrieves the instance with the given id
160 com::sun::star::xml::dom::XDocument getInstanceDocument( [in] string id );
162 /** get the default instance for this model
164 com::sun::star::xml::dom::XDocument getDefaultInstance();
168 // bindings
171 /** create a binding element for this model
173 <p>The returned binding still needs to be inserted into the bindings container.</p>
175 @see getBindings
177 com::sun::star::beans::XPropertySet createBinding();
179 /** clone an arbitrary binding element for this model; still needs
181 <p>The returned binding still needs to be inserted into the bindings container.</p>
183 @see getBindings
185 com::sun::star::beans::XPropertySet cloneBinding( [in] com::sun::star::beans::XPropertySet binding );
187 /** get a binding with a certain ID
189 <p>This is a convenience method: the same result can also be obtained through
190 <member>getBindings</member></p>
192 com::sun::star::beans::XPropertySet getBinding( [in] string id );
194 /** get a container containing all bindings; also supports XNameAccess
196 com::sun::star::container::XSet getBindings();
200 // submissions
203 /** create a submission element for this model
205 <p>The returned submission element still needs to be inserted into the submission container.</p>
207 @see getSubmissions
209 XSubmission createSubmission();
211 /** clone an arbitrary submission element for this model
213 <p>The returned submission element still needs to be inserted into the submission container.</p>
215 @see getSubmissions
217 XSubmission cloneSubmission( [in] com::sun::star::beans::XPropertySet submission );
219 /** get a submission with a certain ID.
221 <p>This is a convenience method: the same result can also be obtained through
222 <member>getSubmissions</member>.</p>
224 XSubmission getSubmission( [in] string id );
226 /** get container containing all submissions; also supports XNameAccess
228 com::sun::star::container::XSet getSubmissions();
231 //=============================================================================
233 }; }; }; };
235 /*=============================================================================
237 =============================================================================*/
238 #endif