APIdia Launch Partner
Top Description Inners Fields Constructors Methods
jdk.xml.internal

public Class JdkXmlConfig

extends Object
Class Inheritance
Imports
javax.xml.catalog.Catalog, .CatalogFeatures, .CatalogManager, java.io.File, .IOException, .InputStream, java.net.URI, java.nio.file.Paths, java.util.Properties

Global configuration for JAXP components. A single instance of this class holds the properties from the JAXP Configuration File, the JDK built-in Catalog, a base XMLSecurityManager and XMLSecurityPropertyManager.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final JdkXmlFeatures
private final XMLSecurityManager
private final XMLSecurityPropertyManager
private static volatile JdkXmlConfig
private final Properties
public static final String
private static final String

Constructor Summary

AccessConstructor and Description
private
JdkXmlConfig(boolean
a flag indicating whether the call is from StAX
stax
)

Constructs an instance of this class.

Method Summary

Modifier and TypeMethod and Description
public static JdkXmlConfig

Returns:

the singleton instance of this class
getInstance
(boolean
a flag indicating whether the call is from StAX
stax
)

Returns the singleton instance of this class.

public Properties
public Catalog

Returns:

the JDK built-in Catalog
getJdkCatalog
()

Returns the JDK built-in Catalog.

public JdkXmlFeatures

Returns:

a copy of the base XMLSecurityPropertyManager.
getXMLFeatures
(boolean
the flag indicating whether the copy should be updated
update
)

Returns a copy of the base XMLSecurityPropertyManager.

public XMLSecurityManager

Returns:

a copy of the base XMLSecurityManager.
getXMLSecurityManager
(boolean
the flag indicating whether the copy should be updated
update
)

Returns a copy of the base XMLSecurityManager.

public XMLSecurityPropertyManager

Returns:

a copy of the base XMLSecurityPropertyManager.
getXMLSecurityPropertyManager
(boolean
the flag indicating whether the copy should be updated
update
)

Returns a copy of the base XMLSecurityPropertyManager.

private void

Returns:

the value of the specified property, null if the property is not found
loadConfig
(boolean
a flag indicating whether to read stax.properties
stax
)

Loads the JAXP Configuration file.

private boolean

Returns:

true if success, false otherwise
loadProperties
(String
the specified file
file
)

Loads the properties from the specified file into the cache.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

baseFeaturesback to summary
private final JdkXmlFeatures baseFeatures
baseManagerback to summary
private final XMLSecurityManager baseManager
basePropertyMgrback to summary
private final XMLSecurityPropertyManager basePropertyMgr
INSTANCEback to summary
private static volatile JdkXmlConfig INSTANCE
jaxpConfigback to summary
private final Properties jaxpConfig
JDKCATALOG_FILEback to summary
public static final String JDKCATALOG_FILE
JDKCATALOG_URLback to summary
private static final String JDKCATALOG_URL

Constructor Detail

JdkXmlConfigback to summary
private JdkXmlConfig(boolean stax)

Constructs an instance of this class.

Parameters
stax:boolean

a flag indicating whether the call is from StAX

Method Detail

getInstanceback to summary
public static JdkXmlConfig getInstance(boolean stax)

Returns the singleton instance of this class.

Parameters
stax:boolean

a flag indicating whether the call is from StAX

Returns:JdkXmlConfig

the singleton instance of this class

getJaxpConfigback to summary
public Properties getJaxpConfig()
getJdkCatalogback to summary
public Catalog getJdkCatalog()

Returns the JDK built-in Catalog.

Returns:Catalog

the JDK built-in Catalog

getXMLFeaturesback to summary
public JdkXmlFeatures getXMLFeatures(boolean update)

Returns a copy of the base XMLSecurityPropertyManager.

Parameters
update:boolean

the flag indicating whether the copy should be updated

Returns:JdkXmlFeatures

a copy of the base XMLSecurityPropertyManager.

getXMLSecurityManagerback to summary
public XMLSecurityManager getXMLSecurityManager(boolean update)

Returns a copy of the base XMLSecurityManager.

Parameters
update:boolean

the flag indicating whether the copy should be updated

Returns:XMLSecurityManager

a copy of the base XMLSecurityManager.

getXMLSecurityPropertyManagerback to summary
public XMLSecurityPropertyManager getXMLSecurityPropertyManager(boolean update)

Returns a copy of the base XMLSecurityPropertyManager.

Parameters
update:boolean

the flag indicating whether the copy should be updated

Returns:XMLSecurityPropertyManager

a copy of the base XMLSecurityPropertyManager.

loadConfigback to summary
private void loadConfig(boolean stax)

Loads the JAXP Configuration file. The method reads the JDK default configuration that is typically located at $java.home/conf/jaxp.properties. On top of the default, if the System Property "java.xml.config.file" exists, the configuration file it points to will also be read. Any settings in it will then override those in the default.

Parameters
stax:boolean

a flag indicating whether to read stax.properties

Returns:void

the value of the specified property, null if the property is not found

loadPropertiesback to summary
private boolean loadProperties(String file)

Loads the properties from the specified file into the cache.

Parameters
file:String

the specified file

Returns:boolean

true if success, false otherwise

jdk.xml.internal back to summary

private Class JdkXmlConfig.CatalogHolder

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final Catalog

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

JDKCATALOGback to summary
private static final Catalog JDKCATALOG

Constructor Detail

CatalogHolderback to summary
private CatalogHolder()