1/*
2 * reserved comment block
3 * DO NOT REMOVE OR ALTER!
4 */
5/*
6 * Licensed to the Apache Software Foundation (ASF) under one or more
7 * contributor license agreements.  See the NOTICE file distributed with
8 * this work for additional information regarding copyright ownership.
9 * The ASF licenses this file to You under the Apache License, Version 2.0
10 * (the "License"); you may not use this file except in compliance with
11 * the License.  You may obtain a copy of the License at
12 *
13 *      http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 */
21
22package com.sun.org.apache.xerces.internal.xni.parser;
23
24import com.sun.org.apache.xerces.internal.util.FeatureState;
25import com.sun.org.apache.xerces.internal.util.PropertyState;
26
27/**
28 * The component manager manages a parser configuration and the components
29 * that make up that configuration. The manager notifies each component
30 * before parsing to allow the components to initialize their state; and
31 * also any time that a parser feature or property changes.
32 * <p>
33 * The methods of the component manager allow components to query features
34 * and properties that affect the operation of the component.
35 *
36 * @see XMLComponent
37 *
38 * @author Andy Clark, IBM
39 *
40 */
41public interface XMLComponentManager {
42
43    //
44    // XMLComponentManager methods
45    //
46
47    /**
48     * Returns the state of a feature.
49     *
50     * @param featureId The feature identifier.
51     *
52     * @throws XMLConfigurationException Thrown on configuration error.
53     */
54    public boolean getFeature(String featureId)
55        throws XMLConfigurationException;
56
57    /**
58     * Returns the state of a feature.
59     * Does not throw exceptions.
60     *
61     * @param featureId The feature identifier.
62     * @param defaultValue Default value if future is not available.
63     */
64    public boolean getFeature(String featureId, boolean defaultValue);
65
66    /**
67     * Returns the value of a property.
68     *
69     * @param propertyId The property identifier.
70     *
71    * @throws XMLConfigurationException Thrown on configuration error.
72     */
73    public Object getProperty(String propertyId)
74        throws XMLConfigurationException;
75
76    /**
77     * Returns the value of a property.
78     * Does not throw exceptions.
79     *
80     * @param propertyId The property identifier.
81     * @param defaultObject Return value if property is not available.
82     *
83     */
84    public Object getProperty(String propertyId, Object defaultObject);
85
86    public FeatureState getFeatureState(String featureId);
87
88    public PropertyState getPropertyState(String propertyId);
89
90} // interface XMLComponentManager
91