1*cdf0e10cSrcweir/************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir#ifndef __com_sun_star_xforms_XModel_idl__ 28*cdf0e10cSrcweir#define __com_sun_star_xforms_XModel_idl__ 29*cdf0e10cSrcweir 30*cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__ 31*cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl> 32*cdf0e10cSrcweir#endif 33*cdf0e10cSrcweir 34*cdf0e10cSrcweir#ifndef __com_sun_star_beans_XPropertySet_idl__ 35*cdf0e10cSrcweir#include <com/sun/star/beans/XPropertySet.idl> 36*cdf0e10cSrcweir#endif 37*cdf0e10cSrcweir 38*cdf0e10cSrcweir#ifndef __com_sun_star_container_XIndexAccess_idl__ 39*cdf0e10cSrcweir#include <com/sun/star/container/XSet.idl> 40*cdf0e10cSrcweir#endif 41*cdf0e10cSrcweir 42*cdf0e10cSrcweir#ifndef __com_sun_star_xforms_XDataTypeRepository_idl__ 43*cdf0e10cSrcweir#include <com/sun/star/xforms/XDataTypeRepository.idl> 44*cdf0e10cSrcweir#endif 45*cdf0e10cSrcweir 46*cdf0e10cSrcweir#ifndef __com_sun_star_xml_dom_XDocument_idl__ 47*cdf0e10cSrcweir#include <com/sun/star/xml/dom/XDocument.idl> 48*cdf0e10cSrcweir#endif 49*cdf0e10cSrcweir 50*cdf0e10cSrcweir#ifndef __com_sun_star_util_VetoException_idl__ 51*cdf0e10cSrcweir#include <com/sun/star/util/VetoException.idl> 52*cdf0e10cSrcweir#endif 53*cdf0e10cSrcweir 54*cdf0e10cSrcweir#ifndef __com_sun_star_lang_WrappedTargetException_idl__ 55*cdf0e10cSrcweir#include <com/sun/star/lang/WrappedTargetException.idl> 56*cdf0e10cSrcweir#endif 57*cdf0e10cSrcweir 58*cdf0e10cSrcweir#ifndef __com_sun_star_task_XInteractionHandler_idl__ 59*cdf0e10cSrcweir#include <com/sun/star/task/XInteractionHandler.idl> 60*cdf0e10cSrcweir#endif 61*cdf0e10cSrcweir 62*cdf0e10cSrcweir//============================================================================= 63*cdf0e10cSrcweir 64*cdf0e10cSrcweirmodule com { module sun { module star { module xforms { 65*cdf0e10cSrcweir 66*cdf0e10cSrcweirinterface XSubmission; 67*cdf0e10cSrcweir 68*cdf0e10cSrcweir//============================================================================= 69*cdf0e10cSrcweir 70*cdf0e10cSrcweir/** represent an XForms model 71*cdf0e10cSrcweir */ 72*cdf0e10cSrcweirinterface XModel 73*cdf0e10cSrcweir{ 74*cdf0e10cSrcweir /** get the XForms model ID */ 75*cdf0e10cSrcweir string getID(); 76*cdf0e10cSrcweir 77*cdf0e10cSrcweir /** set the XForms model ID */ 78*cdf0e10cSrcweir void setID( [in] string id ); 79*cdf0e10cSrcweir 80*cdf0e10cSrcweir 81*cdf0e10cSrcweir /** initialize the model */ 82*cdf0e10cSrcweir void initialize(); 83*cdf0e10cSrcweir 84*cdf0e10cSrcweir /** rebuild the model */ 85*cdf0e10cSrcweir void rebuild(); 86*cdf0e10cSrcweir 87*cdf0e10cSrcweir /** re-evaluate all calculate attributes */ 88*cdf0e10cSrcweir void recalculate(); 89*cdf0e10cSrcweir 90*cdf0e10cSrcweir /** re-evaluate all validity attributes */ 91*cdf0e10cSrcweir void revalidate(); 92*cdf0e10cSrcweir 93*cdf0e10cSrcweir /** refresh the model */ 94*cdf0e10cSrcweir void refresh(); 95*cdf0e10cSrcweir 96*cdf0e10cSrcweir 97*cdf0e10cSrcweir /** submit form through given submission id 98*cdf0e10cSrcweir 99*cdf0e10cSrcweir <p>This is a convenience method. Calling it is equivalent to calling 100*cdf0e10cSrcweir <code><member>getSubmission</member>( <arg>id</arg> ).submit()</code>.</p> 101*cdf0e10cSrcweir 102*cdf0e10cSrcweir @param id 103*cdf0e10cSrcweir the ID of the submission to execute 104*cdf0e10cSrcweir 105*cdf0e10cSrcweir @throws com::sun::star::util::VetoException 106*cdf0e10cSrcweir when the current model state does not allow a submission. Usually, this indicates that 107*cdf0e10cSrcweir consistency criteria for the model data is not fulfilled. 108*cdf0e10cSrcweir 109*cdf0e10cSrcweir @throws com::sun::star::lang::WrappedTargetException 110*cdf0e10cSrcweir when another error occured during the submission. The 111*cdf0e10cSrcweir <member scope="com::sun::star::lang">WrappedTargetException::TargetException</member> describes 112*cdf0e10cSrcweir this error then. 113*cdf0e10cSrcweir */ 114*cdf0e10cSrcweir void submit( [in] string id ) 115*cdf0e10cSrcweir raises ( com::sun::star::util::VetoException, com::sun::star::lang::WrappedTargetException ); 116*cdf0e10cSrcweir 117*cdf0e10cSrcweir /** submit form through given submission id 118*cdf0e10cSrcweir 119*cdf0e10cSrcweir <p>This is a convenience method. Calling it is equivalent to calling 120*cdf0e10cSrcweir <code><member>getSubmission</member>( <arg>id</arg>, <arg>handler</arg> ).submit()</code>.</p> 121*cdf0e10cSrcweir 122*cdf0e10cSrcweir @param id 123*cdf0e10cSrcweir the ID of the submission to execute 124*cdf0e10cSrcweir 125*cdf0e10cSrcweir @param aHandler 126*cdf0e10cSrcweir This handler allows additional user interaction, which may be necessary before 127*cdf0e10cSrcweir the submission can be performed. 128*cdf0e10cSrcweir 129*cdf0e10cSrcweir @throws com::sun::star::util::VetoException 130*cdf0e10cSrcweir when the current model state does not allow a submission. Usually, this indicates that 131*cdf0e10cSrcweir consistency criteria for the model data is not fulfilled. 132*cdf0e10cSrcweir 133*cdf0e10cSrcweir @throws com::sun::star::lang::WrappedTargetException 134*cdf0e10cSrcweir when another error occured during the submission. The 135*cdf0e10cSrcweir <member scope="com::sun::star::lang">WrappedTargetException::TargetException</member> describes 136*cdf0e10cSrcweir this error then. 137*cdf0e10cSrcweir */ 138*cdf0e10cSrcweir void submitWithInteraction( [in] string id, [in] com::sun::star::task::XInteractionHandler aHandler ) 139*cdf0e10cSrcweir raises ( com::sun::star::util::VetoException, com::sun::star::lang::WrappedTargetException ); 140*cdf0e10cSrcweir 141*cdf0e10cSrcweir /** provides management access to the XSD data types associated with the model 142*cdf0e10cSrcweir */ 143*cdf0e10cSrcweir XDataTypeRepository 144*cdf0e10cSrcweir getDataTypeRepository( ); 145*cdf0e10cSrcweir 146*cdf0e10cSrcweir 147*cdf0e10cSrcweir // 148*cdf0e10cSrcweir // instances 149*cdf0e10cSrcweir // 150*cdf0e10cSrcweir 151*cdf0e10cSrcweir /** gets container containing all instances; 152*cdf0e10cSrcweir 153*cdf0e10cSrcweir <p>The elements of the set are arrays of <type scope="com::sun::star::beans">PropertyValue</type>s, 154*cdf0e10cSrcweir containing the ID, the URL, and the instance itself.</p> 155*cdf0e10cSrcweir */ 156*cdf0e10cSrcweir com::sun::star::container::XSet getInstances(); 157*cdf0e10cSrcweir 158*cdf0e10cSrcweir /** retrieves the instance with the given id 159*cdf0e10cSrcweir */ 160*cdf0e10cSrcweir com::sun::star::xml::dom::XDocument getInstanceDocument( [in] string id ); 161*cdf0e10cSrcweir 162*cdf0e10cSrcweir /** get the default instance for this model 163*cdf0e10cSrcweir */ 164*cdf0e10cSrcweir com::sun::star::xml::dom::XDocument getDefaultInstance(); 165*cdf0e10cSrcweir 166*cdf0e10cSrcweir 167*cdf0e10cSrcweir // 168*cdf0e10cSrcweir // bindings 169*cdf0e10cSrcweir // 170*cdf0e10cSrcweir 171*cdf0e10cSrcweir /** create a binding element for this model 172*cdf0e10cSrcweir 173*cdf0e10cSrcweir <p>The returned binding still needs to be inserted into the bindings container.</p> 174*cdf0e10cSrcweir 175*cdf0e10cSrcweir @see getBindings 176*cdf0e10cSrcweir */ 177*cdf0e10cSrcweir com::sun::star::beans::XPropertySet createBinding(); 178*cdf0e10cSrcweir 179*cdf0e10cSrcweir /** clone an arbitrary binding element for this model; still needs 180*cdf0e10cSrcweir 181*cdf0e10cSrcweir <p>The returned binding still needs to be inserted into the bindings container.</p> 182*cdf0e10cSrcweir 183*cdf0e10cSrcweir @see getBindings 184*cdf0e10cSrcweir */ 185*cdf0e10cSrcweir com::sun::star::beans::XPropertySet cloneBinding( [in] com::sun::star::beans::XPropertySet binding ); 186*cdf0e10cSrcweir 187*cdf0e10cSrcweir /** get a binding with a certain ID 188*cdf0e10cSrcweir 189*cdf0e10cSrcweir <p>This is a convenience method: the same result can also be obtained through 190*cdf0e10cSrcweir <member>getBindings</member></p> 191*cdf0e10cSrcweir */ 192*cdf0e10cSrcweir com::sun::star::beans::XPropertySet getBinding( [in] string id ); 193*cdf0e10cSrcweir 194*cdf0e10cSrcweir /** get a container containing all bindings; also supports XNameAccess 195*cdf0e10cSrcweir */ 196*cdf0e10cSrcweir com::sun::star::container::XSet getBindings(); 197*cdf0e10cSrcweir 198*cdf0e10cSrcweir 199*cdf0e10cSrcweir // 200*cdf0e10cSrcweir // submissions 201*cdf0e10cSrcweir // 202*cdf0e10cSrcweir 203*cdf0e10cSrcweir /** create a submission element for this model 204*cdf0e10cSrcweir 205*cdf0e10cSrcweir <p>The returned submission element still needs to be inserted into the submission container.</p> 206*cdf0e10cSrcweir 207*cdf0e10cSrcweir @see getSubmissions 208*cdf0e10cSrcweir */ 209*cdf0e10cSrcweir XSubmission createSubmission(); 210*cdf0e10cSrcweir 211*cdf0e10cSrcweir /** clone an arbitrary submission element for this model 212*cdf0e10cSrcweir 213*cdf0e10cSrcweir <p>The returned submission element still needs to be inserted into the submission container.</p> 214*cdf0e10cSrcweir 215*cdf0e10cSrcweir @see getSubmissions 216*cdf0e10cSrcweir */ 217*cdf0e10cSrcweir XSubmission cloneSubmission( [in] com::sun::star::beans::XPropertySet submission ); 218*cdf0e10cSrcweir 219*cdf0e10cSrcweir /** get a submission with a certain ID. 220*cdf0e10cSrcweir 221*cdf0e10cSrcweir <p>This is a convenience method: the same result can also be obtained through 222*cdf0e10cSrcweir <member>getSubmissions</member>.</p> 223*cdf0e10cSrcweir */ 224*cdf0e10cSrcweir XSubmission getSubmission( [in] string id ); 225*cdf0e10cSrcweir 226*cdf0e10cSrcweir /** get container containing all submissions; also supports XNameAccess 227*cdf0e10cSrcweir */ 228*cdf0e10cSrcweir com::sun::star::container::XSet getSubmissions(); 229*cdf0e10cSrcweir}; 230*cdf0e10cSrcweir 231*cdf0e10cSrcweir//============================================================================= 232*cdf0e10cSrcweir 233*cdf0e10cSrcweir}; }; }; }; 234*cdf0e10cSrcweir 235*cdf0e10cSrcweir/*============================================================================= 236*cdf0e10cSrcweir 237*cdf0e10cSrcweir=============================================================================*/ 238*cdf0e10cSrcweir#endif 239