public class CMConnectionsReader
extends org.xml.sax.helpers.DefaultHandler
implements org.xml.sax.ext.LexicalHandler
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONNECTION_NAME
Property name: names the connection.
|
static java.lang.String |
CONNECTION_TAG |
static java.lang.String |
CONNECTION_TYPE
Property name: connection type.
|
static java.lang.String |
DEFAULT_FILE |
static java.lang.String |
DEFAULT_PROPERTIES_FILE |
static java.lang.String |
ORMI_PASSWD |
static java.lang.String |
PASSWORD
Property name: connection password.
|
Constructor and Description |
---|
CMConnectionsReader() |
CMConnectionsReader(java.lang.String fName,
boolean isAbsolutePath)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length) |
void |
comment(char[] ch,
int start,
int length) |
void |
endCDATA() |
void |
endDocument() |
void |
endDTD() |
void |
endElement(java.lang.String uri,
java.lang.String name,
java.lang.String qName) |
void |
endEntity(java.lang.String name) |
java.util.Map<java.lang.String,javax.naming.Referenceable> |
getMigratedConnections()
Migrates all the connections returned by
read() , migrates them to
the new Referenceable (CA) format and returns them in a map keyed by name. |
java.util.List<java.util.Properties> |
read()
Read all of the database connections descriptors from storage.
|
java.util.List<java.util.Properties> |
read(boolean dbOnly)
Read all of the connections descriptors from storage.
|
void |
startCDATA() |
void |
startDocument() |
void |
startDTD(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId) |
void |
startElement(java.lang.String uri,
java.lang.String name,
java.lang.String qName,
org.xml.sax.Attributes atts) |
void |
startEntity(java.lang.String name) |
public static final java.lang.String DEFAULT_FILE
public static final java.lang.String DEFAULT_PROPERTIES_FILE
public static final java.lang.String CONNECTION_TAG
public static final java.lang.String PASSWORD
public static final java.lang.String ORMI_PASSWD
public static final java.lang.String CONNECTION_NAME
public static final java.lang.String CONNECTION_TYPE
public CMConnectionsReader()
public CMConnectionsReader(java.lang.String fName, boolean isAbsolutePath)
fName
- of the file to read the connection data fromisAbsolutePath
- true if this is an filesystem level absolutepath,
false if this is a class relative filenamepublic final java.util.Map<java.lang.String,javax.naming.Referenceable> getMigratedConnections()
read()
, migrates them to
the new Referenceable (CA) format and returns them in a map keyed by name.
Data can be lost by the migration process, to get the old descriptors
directly use read()
instead.public final java.util.List<java.util.Properties> read()
public final java.util.List<java.util.Properties> read(boolean dbOnly)
dbOnly
- if true on database connections will be listedpublic void startDocument()
startDocument
in interface org.xml.sax.ContentHandler
startDocument
in class org.xml.sax.helpers.DefaultHandler
public void endDocument()
endDocument
in interface org.xml.sax.ContentHandler
endDocument
in class org.xml.sax.helpers.DefaultHandler
public void startElement(java.lang.String uri, java.lang.String name, java.lang.String qName, org.xml.sax.Attributes atts)
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
public void endElement(java.lang.String uri, java.lang.String name, java.lang.String qName)
endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
public void characters(char[] ch, int start, int length)
characters
in interface org.xml.sax.ContentHandler
characters
in class org.xml.sax.helpers.DefaultHandler
public void comment(char[] ch, int start, int length) throws org.xml.sax.SAXException
comment
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
public void endCDATA() throws org.xml.sax.SAXException
endCDATA
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
public void endDTD() throws org.xml.sax.SAXException
endDTD
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
public void endEntity(java.lang.String name) throws org.xml.sax.SAXException
endEntity
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
public void startCDATA() throws org.xml.sax.SAXException
startCDATA
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
public void startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException
startDTD
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
public void startEntity(java.lang.String name) throws org.xml.sax.SAXException
startEntity
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException