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_configuration_backend_XSchema_idl__
28#define __com_sun_star_configuration_backend_XSchema_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_configuration_backend_XSchemaHandler_idl__
35#include <com/sun/star/configuration/backend/XSchemaHandler.idl>
36#endif
37
38#ifndef __com_sun_star_lang_NullPointerException_idl__
39#include <com/sun/star/lang/NullPointerException.idl>
40#endif
41
42#ifndef __com_sun_star_lang_WrappedTargetException_idl__
43#include <com/sun/star/lang/WrappedTargetException.idl>
44#endif
45
46#ifndef __com_sun_star_configuration_backend_MalformedDataException_idl__
47#include <com/sun/star/configuration/backend/MalformedDataException.idl>
48#endif
49
50//=============================================================================
51
52module com { module sun { module star { module configuration { module backend {
53
54//=============================================================================
55
56/**
57  Handles access to the elements of a component schema,
58  i.e its templates and its component definition.
59
60    @since OOo 1.1.2
61*/
62published interface XSchema : ::com::sun::star::uno::XInterface
63{
64	//-------------------------------------------------------------------------
65
66    /**
67      Describes the full schema (templates + component) to a
68      <type>XSchemaHandler</type>.
69
70      @param aHandler
71            schema handler that will receive calls
72            describing the contents of the templates
73            and the component definition
74
75      @throws com::sun::star::lang::NullPointerException
76              if a <NULL/> handler is passed.
77      @throws com::sun::star::lang::WrappedTargetException
78              if an error occurs in the access to or processing of the data or
79			  if a subsequent call to any of the <type>XSchema</type>methods is made.
80			  The elements of a component schema are only parsed once,a repeat call
81			  leads to exception.
82      @throws com::sun::star::configuration::backend::MalformedDataException
83              if the data read from the layer is rejected as invalid by the
84              <type>XSchemaHandler</type>.
85	*/
86    void readSchema([in] XSchemaHandler aHandler)
87        raises (com::sun::star::lang::NullPointerException,
88                com::sun::star::lang::WrappedTargetException,
89                MalformedDataException) ;
90
91	//-------------------------------------------------------------------------
92
93    /**
94      Describes only the component definition to a <type>XSchemaHandler</type>.
95
96      @param aHandler
97            schema handler that will receive calls
98            describing the contents of the component
99            definition
100
101      @throws com::sun::star::lang::NullPointerException
102              if a <NULL/> handler is passed.
103      @throws com::sun::star::lang::WrappedTargetException
104              if an error occurs in the access to or processing of the data or
105			  if a subsequent call to any of the <type>XSchema</type>methods is made.
106			  The elements of a component schema are only parsed once,a repeat call
107			  leads to exception.
108      @throws com::sun::star::configuration::backend::MalformedDataException
109              if the data read from the layer is rejected as invalid by the
110              <type>XSchemaHandler</type>.
111	*/
112    void readComponent([in] XSchemaHandler aHandler)
113        raises (com::sun::star::lang::NullPointerException,
114                com::sun::star::lang::WrappedTargetException,
115                MalformedDataException) ;
116
117	//-------------------------------------------------------------------------
118
119    /**
120      Describes the component templates to a <type>XSchemaHandler</type>.
121
122      @param aHandler
123            schema handler that will receive calls
124            describing the contents of the templates
125
126      @throws com::sun::star::lang::NullPointerException
127              if a <NULL/> handler is passed.
128      @throws com::sun::star::lang::WrappedTargetException
129              if an error occurs in the access to or processing of the data or
130			  if a subsequent call to any of the <type>XSchema</type>methods is made.
131			  The elements of a component schema are only parsed once,a repeat call
132			  leads to exception.
133      @throws com::sun::star::configuration::backend::MalformedDataException
134              if the data read from the layer is rejected as invalid by the
135              <type>XSchemaHandler</type>.
136	*/
137    void readTemplates([in] XSchemaHandler aHandler)
138        raises (com::sun::star::lang::NullPointerException,
139                com::sun::star::lang::WrappedTargetException,
140                MalformedDataException) ;
141
142	//-------------------------------------------------------------------------
143} ;
144
145//=============================================================================
146
147} ; } ; } ; } ; } ;
148#endif
149