View Javadoc
1   /*
2    * reserved comment block
3    * DO NOT REMOVE OR ALTER!
4    */
5   /*
6    * Copyright 2000-2002,2004 The Apache Software Foundation.
7    *
8    * Licensed under the Apache License, Version 2.0 (the "License");
9    * you may not use this file except in compliance with the License.
10   * You may obtain a copy of the License at
11   *
12   *      http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing, software
15   * distributed under the License is distributed on an "AS IS" BASIS,
16   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17   * See the License for the specific language governing permissions and
18   * limitations under the License.
19   */
20  
21  package com.sun.org.apache.xerces.internal.xni.parser;
22  
23  import com.sun.org.apache.xerces.internal.util.FeatureState;
24  import com.sun.org.apache.xerces.internal.util.PropertyState;
25  
26  /**
27   * The component manager manages a parser configuration and the components
28   * that make up that configuration. The manager notifies each component
29   * before parsing to allow the components to initialize their state; and
30   * also any time that a parser feature or property changes.
31   * <p>
32   * The methods of the component manager allow components to query features
33   * and properties that affect the operation of the component.
34   *
35   * @see XMLComponent
36   *
37   * @author Andy Clark, IBM
38   *
39   * @version $Id: XMLComponentManager.java,v 1.6 2010-11-01 04:40:22 joehw Exp $
40   */
41  public 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