1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 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. 14 * 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). 20 * 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. 25 * 26 ************************************************************************/ 27#ifndef __com_sun_star_xforms_XModel_idl__ 28#define __com_sun_star_xforms_XModel_idl__ 29 30#ifndef __com_sun_star_uno_XInterface_idl__ 31#include <com/sun/star/uno/XInterface.idl> 32#endif 33 34#ifndef __com_sun_star_beans_XPropertySet_idl__ 35#include <com/sun/star/beans/XPropertySet.idl> 36#endif 37 38#ifndef __com_sun_star_container_XIndexAccess_idl__ 39#include <com/sun/star/container/XSet.idl> 40#endif 41 42#ifndef __com_sun_star_xforms_XDataTypeRepository_idl__ 43#include <com/sun/star/xforms/XDataTypeRepository.idl> 44#endif 45 46#ifndef __com_sun_star_xml_dom_XDocument_idl__ 47#include <com/sun/star/xml/dom/XDocument.idl> 48#endif 49 50#ifndef __com_sun_star_util_VetoException_idl__ 51#include <com/sun/star/util/VetoException.idl> 52#endif 53 54#ifndef __com_sun_star_lang_WrappedTargetException_idl__ 55#include <com/sun/star/lang/WrappedTargetException.idl> 56#endif 57 58#ifndef __com_sun_star_task_XInteractionHandler_idl__ 59#include <com/sun/star/task/XInteractionHandler.idl> 60#endif 61 62//============================================================================= 63 64module com { module sun { module star { module xforms { 65 66interface XSubmission; 67 68//============================================================================= 69 70/** represent an XForms model 71 */ 72interface XModel 73{ 74 /** get the XForms model ID */ 75 string getID(); 76 77 /** set the XForms model ID */ 78 void setID( [in] string id ); 79 80 81 /** initialize the model */ 82 void initialize(); 83 84 /** rebuild the model */ 85 void rebuild(); 86 87 /** re-evaluate all calculate attributes */ 88 void recalculate(); 89 90 /** re-evaluate all validity attributes */ 91 void revalidate(); 92 93 /** refresh the model */ 94 void refresh(); 95 96 97 /** submit form through given submission id 98 99 <p>This is a convenience method. Calling it is equivalent to calling 100 <code><member>getSubmission</member>( <arg>id</arg> ).submit()</code>.</p> 101 102 @param id 103 the ID of the submission to execute 104 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. 108 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. 113 */ 114 void submit( [in] string id ) 115 raises ( com::sun::star::util::VetoException, com::sun::star::lang::WrappedTargetException ); 116 117 /** submit form through given submission id 118 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> 121 122 @param id 123 the ID of the submission to execute 124 125 @param aHandler 126 This handler allows additional user interaction, which may be necessary before 127 the submission can be performed. 128 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. 132 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. 137 */ 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 ); 140 141 /** provides management access to the XSD data types associated with the model 142 */ 143 XDataTypeRepository 144 getDataTypeRepository( ); 145 146 147 // 148 // instances 149 // 150 151 /** gets container containing all instances; 152 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> 155 */ 156 com::sun::star::container::XSet getInstances(); 157 158 /** retrieves the instance with the given id 159 */ 160 com::sun::star::xml::dom::XDocument getInstanceDocument( [in] string id ); 161 162 /** get the default instance for this model 163 */ 164 com::sun::star::xml::dom::XDocument getDefaultInstance(); 165 166 167 // 168 // bindings 169 // 170 171 /** create a binding element for this model 172 173 <p>The returned binding still needs to be inserted into the bindings container.</p> 174 175 @see getBindings 176 */ 177 com::sun::star::beans::XPropertySet createBinding(); 178 179 /** clone an arbitrary binding element for this model; still needs 180 181 <p>The returned binding still needs to be inserted into the bindings container.</p> 182 183 @see getBindings 184 */ 185 com::sun::star::beans::XPropertySet cloneBinding( [in] com::sun::star::beans::XPropertySet binding ); 186 187 /** get a binding with a certain ID 188 189 <p>This is a convenience method: the same result can also be obtained through 190 <member>getBindings</member></p> 191 */ 192 com::sun::star::beans::XPropertySet getBinding( [in] string id ); 193 194 /** get a container containing all bindings; also supports XNameAccess 195 */ 196 com::sun::star::container::XSet getBindings(); 197 198 199 // 200 // submissions 201 // 202 203 /** create a submission element for this model 204 205 <p>The returned submission element still needs to be inserted into the submission container.</p> 206 207 @see getSubmissions 208 */ 209 XSubmission createSubmission(); 210 211 /** clone an arbitrary submission element for this model 212 213 <p>The returned submission element still needs to be inserted into the submission container.</p> 214 215 @see getSubmissions 216 */ 217 XSubmission cloneSubmission( [in] com::sun::star::beans::XPropertySet submission ); 218 219 /** get a submission with a certain ID. 220 221 <p>This is a convenience method: the same result can also be obtained through 222 <member>getSubmissions</member>.</p> 223 */ 224 XSubmission getSubmission( [in] string id ); 225 226 /** get container containing all submissions; also supports XNameAccess 227 */ 228 com::sun::star::container::XSet getSubmissions(); 229}; 230 231//============================================================================= 232 233}; }; }; }; 234 235/*============================================================================= 236 237=============================================================================*/ 238#endif 239