1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef __com_sun_star_xforms_XModel_idl__
29 #define __com_sun_star_xforms_XModel_idl__
31 #include
<com
/sun
/star
/uno
/XInterface.idl
>
33 #include
<com
/sun
/star
/beans
/XPropertySet.idl
>
34 #include
<com
/sun
/star
/container
/XSet.idl
>
35 #include
<com
/sun
/star
/xforms
/XDataTypeRepository.idl
>
36 #include
<com
/sun
/star
/xml
/dom
/XDocument.idl
>
37 #include
<com
/sun
/star
/util
/VetoException.idl
>
38 #include
<com
/sun
/star
/lang
/WrappedTargetException.idl
>
39 #include
<com
/sun
/star
/task
/XInteractionHandler.idl
>
41 //=============================================================================
43 module com
{ module sun
{ module star
{ module xforms
{
45 interface XSubmission
;
47 //=============================================================================
49 /** represent an XForms model
53 /** get the XForms model ID */
56 /** set the XForms model ID */
57 void setID
( [in] string id );
60 /** initialize the model */
63 /** rebuild the model */
66 /** re-evaluate all calculate attributes */
69 /** re-evaluate all validity attributes */
72 /** refresh the model */
76 /** submit form through given submission id
78 <p>This is a convenience method. Calling it is equivalent to calling
79 <code><member>getSubmission</member>( <arg>id</arg> ).submit()</code>.</p>
82 the ID of the submission to execute
84 @throws com::sun::star::util::VetoException
85 when the current model state does not allow a submission. Usually, this indicates that
86 consistency criteria for the model data is not fulfilled.
88 @throws com::sun::star::lang::WrappedTargetException
89 when another error occurred during the submission. The
90 <member scope="com::sun::star::lang">WrappedTargetException::TargetException</member> describes
93 void submit
( [in] string id )
94 raises
( com
::sun
::star
::util
::VetoException
, com
::sun
::star
::lang
::WrappedTargetException
);
96 /** submit form through given submission id
98 <p>This is a convenience method. Calling it is equivalent to calling
99 <code><member>getSubmission</member>( <arg>id</arg>, <arg>handler</arg> ).submit()</code>.</p>
102 the ID of the submission to execute
105 This handler allows additional user interaction, which may be necessary before
106 the submission can be performed.
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 occurred during the submission. The
114 <member scope="com::sun::star::lang">WrappedTargetException::TargetException</member> describes
117 void submitWithInteraction
( [in] string id, [in] com
::sun
::star
::task
::XInteractionHandler aHandler
)
118 raises
( com
::sun
::star
::util
::VetoException
, com
::sun
::star
::lang
::WrappedTargetException
);
120 /** provides management access to the XSD data types associated with the model
123 getDataTypeRepository
( );
130 /** gets container containing all instances;
132 <p>The elements of the set are arrays of <type scope="com::sun::star::beans">PropertyValue</type>s,
133 containing the ID, the URL, and the instance itself.</p>
135 com
::sun
::star
::container
::XSet getInstances
();
137 /** retrieves the instance with the given id
139 com
::sun
::star
::xml
::dom
::XDocument getInstanceDocument
( [in] string id );
141 /** get the default instance for this model
143 com
::sun
::star
::xml
::dom
::XDocument getDefaultInstance
();
150 /** create a binding element for this model
152 <p>The returned binding still needs to be inserted into the bindings container.</p>
156 com
::sun
::star
::beans
::XPropertySet createBinding
();
158 /** clone an arbitrary binding element for this model; still needs
160 <p>The returned binding still needs to be inserted into the bindings container.</p>
164 com
::sun
::star
::beans
::XPropertySet cloneBinding
( [in] com
::sun
::star
::beans
::XPropertySet binding
);
166 /** get a binding with a certain ID
168 <p>This is a convenience method: the same result can also be obtained through
169 <member>getBindings</member></p>
171 com
::sun
::star
::beans
::XPropertySet getBinding
( [in] string id );
173 /** get a container containing all bindings; also supports XNameAccess
175 com
::sun
::star
::container
::XSet getBindings
();
182 /** create a submission element for this model
184 <p>The returned submission element still needs to be inserted into the submission container.</p>
188 XSubmission createSubmission
();
190 /** clone an arbitrary submission element for this model
192 <p>The returned submission element still needs to be inserted into the submission container.</p>
196 XSubmission cloneSubmission
( [in] com
::sun
::star
::beans
::XPropertySet submission
);
198 /** get a submission with a certain ID.
200 <p>This is a convenience method: the same result can also be obtained through
201 <member>getSubmissions</member>.</p>
203 XSubmission getSubmission
( [in] string id );
205 /** get container containing all submissions; also supports XNameAccess
207 com
::sun
::star
::container
::XSet getSubmissions
();
210 //=============================================================================
214 /*=============================================================================
216 =============================================================================*/
219 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */