1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_configuration_backend_XSchema_idl__
24#define __com_sun_star_configuration_backend_XSchema_idl__
25
26#ifndef __com_sun_star_uno_XInterface_idl__
27#include <com/sun/star/uno/XInterface.idl>
28#endif
29
30#ifndef __com_sun_star_configuration_backend_XSchemaHandler_idl__
31#include <com/sun/star/configuration/backend/XSchemaHandler.idl>
32#endif
33
34#ifndef __com_sun_star_lang_NullPointerException_idl__
35#include <com/sun/star/lang/NullPointerException.idl>
36#endif
37
38#ifndef __com_sun_star_lang_WrappedTargetException_idl__
39#include <com/sun/star/lang/WrappedTargetException.idl>
40#endif
41
42#ifndef __com_sun_star_configuration_backend_MalformedDataException_idl__
43#include <com/sun/star/configuration/backend/MalformedDataException.idl>
44#endif
45
46//=============================================================================
47
48module com { module sun { module star { module configuration { module backend {
49
50//=============================================================================
51
52/**
53  Handles access to the elements of a component schema,
54  i.e its templates and its component definition.
55
56    @since OOo 1.1.2
57*/
58published interface XSchema : ::com::sun::star::uno::XInterface
59{
60	//-------------------------------------------------------------------------
61
62    /**
63      Describes the full schema (templates + component) to a
64      <type>XSchemaHandler</type>.
65
66      @param aHandler
67            schema handler that will receive calls
68            describing the contents of the templates
69            and the component definition
70
71      @throws com::sun::star::lang::NullPointerException
72              if a <NULL/> handler is passed.
73      @throws com::sun::star::lang::WrappedTargetException
74              if an error occurs in the access to or processing of the data or
75			  if a subsequent call to any of the <type>XSchema</type>methods is made.
76			  The elements of a component schema are only parsed once,a repeat call
77			  leads to exception.
78      @throws com::sun::star::configuration::backend::MalformedDataException
79              if the data read from the layer is rejected as invalid by the
80              <type>XSchemaHandler</type>.
81	*/
82    void readSchema([in] XSchemaHandler aHandler)
83        raises (com::sun::star::lang::NullPointerException,
84                com::sun::star::lang::WrappedTargetException,
85                MalformedDataException) ;
86
87	//-------------------------------------------------------------------------
88
89    /**
90      Describes only the component definition to a <type>XSchemaHandler</type>.
91
92      @param aHandler
93            schema handler that will receive calls
94            describing the contents of the component
95            definition
96
97      @throws com::sun::star::lang::NullPointerException
98              if a <NULL/> handler is passed.
99      @throws com::sun::star::lang::WrappedTargetException
100              if an error occurs in the access to or processing of the data or
101			  if a subsequent call to any of the <type>XSchema</type>methods is made.
102			  The elements of a component schema are only parsed once,a repeat call
103			  leads to exception.
104      @throws com::sun::star::configuration::backend::MalformedDataException
105              if the data read from the layer is rejected as invalid by the
106              <type>XSchemaHandler</type>.
107	*/
108    void readComponent([in] XSchemaHandler aHandler)
109        raises (com::sun::star::lang::NullPointerException,
110                com::sun::star::lang::WrappedTargetException,
111                MalformedDataException) ;
112
113	//-------------------------------------------------------------------------
114
115    /**
116      Describes the component templates to a <type>XSchemaHandler</type>.
117
118      @param aHandler
119            schema handler that will receive calls
120            describing the contents of the templates
121
122      @throws com::sun::star::lang::NullPointerException
123              if a <NULL/> handler is passed.
124      @throws com::sun::star::lang::WrappedTargetException
125              if an error occurs in the access to or processing of the data or
126			  if a subsequent call to any of the <type>XSchema</type>methods is made.
127			  The elements of a component schema are only parsed once,a repeat call
128			  leads to exception.
129      @throws com::sun::star::configuration::backend::MalformedDataException
130              if the data read from the layer is rejected as invalid by the
131              <type>XSchemaHandler</type>.
132	*/
133    void readTemplates([in] XSchemaHandler aHandler)
134        raises (com::sun::star::lang::NullPointerException,
135                com::sun::star::lang::WrappedTargetException,
136                MalformedDataException) ;
137
138	//-------------------------------------------------------------------------
139} ;
140
141//=============================================================================
142
143} ; } ; } ; } ; } ;
144#endif
145