1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XModel.idl,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_xforms_XModel_idl__
31 #define __com_sun_star_xforms_XModel_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include
<com
/sun
/star
/uno
/XInterface.idl
>
37 #ifndef __com_sun_star_beans_XPropertySet_idl__
38 #include
<com
/sun
/star
/beans
/XPropertySet.idl
>
41 #ifndef __com_sun_star_container_XIndexAccess_idl__
42 #include
<com
/sun
/star
/container
/XSet.idl
>
45 #ifndef __com_sun_star_xforms_XDataTypeRepository_idl__
46 #include
<com
/sun
/star
/xforms
/XDataTypeRepository.idl
>
49 #ifndef __com_sun_star_xml_dom_XDocument_idl__
50 #include
<com
/sun
/star
/xml
/dom
/XDocument.idl
>
53 #ifndef __com_sun_star_util_VetoException_idl__
54 #include
<com
/sun
/star
/util
/VetoException.idl
>
57 #ifndef __com_sun_star_lang_WrappedTargetException_idl__
58 #include
<com
/sun
/star
/lang
/WrappedTargetException.idl
>
61 #ifndef __com_sun_star_task_XInteractionHandler_idl__
62 #include
<com
/sun
/star
/task
/XInteractionHandler.idl
>
65 //=============================================================================
67 module com
{ module sun
{ module star
{ module xforms
{
69 interface XSubmission
;
71 //=============================================================================
73 /** represent an XForms model
77 /** get the XForms model ID */
80 /** set the XForms model ID */
81 void setID
( [in] string id );
84 /** initialize the model */
87 /** rebuild the model */
90 /** re-evaluate all calculate attributes */
93 /** re-evaluate all validity attributes */
96 /** refresh the model */
100 /** submit form through given submission id
102 <p>This is a convenience method. Calling it is equivalent to calling
103 <code><member>getSubmission</member>( <arg>id</arg> ).submit()</code>.</p>
106 the ID of the submission to execute
108 @throws com::sun::star::util::VetoException
109 when the current model state does not allow a submission. Usually, this indicates that
110 consistency criteria for the model data is not fulfilled.
112 @throws com::sun::star::lang::WrappedTargetException
113 when another error occured during the submission. The
114 <member scope="com::sun::star::lang">WrappedTargetException::TargetException</member> describes
117 void submit
( [in] string id )
118 raises
( com
::sun
::star
::util
::VetoException
, com
::sun
::star
::lang
::WrappedTargetException
);
120 /** submit form through given submission id
122 <p>This is a convenience method. Calling it is equivalent to calling
123 <code><member>getSubmission</member>( <arg>id</arg>, <arg>handler</arg> ).submit()</code>.</p>
126 the ID of the submission to execute
129 This handler allows additional user interaction, which may be necessary before
130 the submission can be performed.
132 @throws com::sun::star::util::VetoException
133 when the current model state does not allow a submission. Usually, this indicates that
134 consistency criteria for the model data is not fulfilled.
136 @throws com::sun::star::lang::WrappedTargetException
137 when another error occured during the submission. The
138 <member scope="com::sun::star::lang">WrappedTargetException::TargetException</member> describes
141 void submitWithInteraction
( [in] string id, [in] com
::sun
::star
::task
::XInteractionHandler aHandler
)
142 raises
( com
::sun
::star
::util
::VetoException
, com
::sun
::star
::lang
::WrappedTargetException
);
144 /** provides management access to the XSD data types associated with the model
147 getDataTypeRepository
( );
154 /** gets container containing all instances;
156 <p>The elements of the set are arrays of <type scope="com::sun::star::beans">PropertyValue</type>s,
157 containing the ID, the URL, and the instance itself.</p>
159 com
::sun
::star
::container
::XSet getInstances
();
161 /** retrieves the instance with the given id
163 com
::sun
::star
::xml
::dom
::XDocument getInstanceDocument
( [in] string id );
165 /** get the default instance for this model
167 com
::sun
::star
::xml
::dom
::XDocument getDefaultInstance
();
174 /** create a binding element for this model
176 <p>The returned binding still needs to be inserted into the bindings container.</p>
180 com
::sun
::star
::beans
::XPropertySet createBinding
();
182 /** clone an arbitrary binding element for this model; still needs
184 <p>The returned binding still needs to be inserted into the bindings container.</p>
188 com
::sun
::star
::beans
::XPropertySet cloneBinding
( [in] com
::sun
::star
::beans
::XPropertySet binding
);
190 /** get a binding with a certain ID
192 <p>This is a convenience method: the same result can also be obtained through
193 <member>getBindings</member></p>
195 com
::sun
::star
::beans
::XPropertySet getBinding
( [in] string id );
197 /** get a container containing all bindings; also supports XNameAccess
199 com
::sun
::star
::container
::XSet getBindings
();
206 /** create a submission element for this model
208 <p>The returned submission element still needs to be inserted into the submission container.</p>
212 XSubmission createSubmission
();
214 /** clone an arbitrary submission element for this model
216 <p>The returned submission element still needs to be inserted into the submission container.</p>
220 XSubmission cloneSubmission
( [in] com
::sun
::star
::beans
::XPropertySet submission
);
222 /** get a submission with a certain ID.
224 <p>This is a convenience method: the same result can also be obtained through
225 <member>getSubmissions</member>.</p>
227 XSubmission getSubmission
( [in] string id );
229 /** get container containing all submissions; also supports XNameAccess
231 com
::sun
::star
::container
::XSet getSubmissions
();
234 //=============================================================================
238 /*=============================================================================
240 =============================================================================*/