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