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
>
34 #ifndef __com_sun_star_beans_XPropertySet_idl__
35 #include
<com
/sun
/star
/beans
/XPropertySet.idl
>
38 #ifndef __com_sun_star_container_XIndexAccess_idl__
39 #include
<com
/sun
/star
/container
/XSet.idl
>
42 #ifndef __com_sun_star_xforms_XDataTypeRepository_idl__
43 #include
<com
/sun
/star
/xforms
/XDataTypeRepository.idl
>
46 #ifndef __com_sun_star_xml_dom_XDocument_idl__
47 #include
<com
/sun
/star
/xml
/dom
/XDocument.idl
>
50 #ifndef __com_sun_star_util_VetoException_idl__
51 #include
<com
/sun
/star
/util
/VetoException.idl
>
54 #ifndef __com_sun_star_lang_WrappedTargetException_idl__
55 #include
<com
/sun
/star
/lang
/WrappedTargetException.idl
>
58 #ifndef __com_sun_star_task_XInteractionHandler_idl__
59 #include
<com
/sun
/star
/task
/XInteractionHandler.idl
>
62 //=============================================================================
64 module com
{ module sun
{ module star
{ module xforms
{
66 interface XSubmission
;
68 //=============================================================================
70 /** represent an XForms model
74 /** get the XForms model ID */
77 /** set the XForms model ID */
78 void setID
( [in] string id );
81 /** initialize the model */
84 /** rebuild the model */
87 /** re-evaluate all calculate attributes */
90 /** re-evaluate all validity attributes */
93 /** refresh the model */
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>
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
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>
123 the ID of the submission to execute
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
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
144 getDataTypeRepository
( );
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
();
171 /** create a binding element for this model
173 <p>The returned binding still needs to be inserted into the bindings container.</p>
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>
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
();
203 /** create a submission element for this model
205 <p>The returned submission element still needs to be inserted into the submission container.</p>
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>
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 //=============================================================================
235 /*=============================================================================
237 =============================================================================*/