Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.0)

E13403-08

oracle.jdeveloper.db.migration
Class CMConnectionsReader

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by oracle.jdeveloper.db.migration.CMConnectionsReader
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, org.xml.sax.ext.LexicalHandler

public class CMConnectionsReader
extends org.xml.sax.helpers.DefaultHandler
implements org.xml.sax.ext.LexicalHandler

Utility that reads a 10.1.3 legacy connection file (IDEConnections.xml) and obtaining the connection details. This class is used by DBConnectionMigrator for the migration of CM connections for use by the CA architechture


Field Summary
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 Summary
CMConnectionsReader()
           
CMConnectionsReader(java.lang.String fName, boolean isAbsolutePath)
          Constructor
 
Method Summary
 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 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)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FILE

public static final java.lang.String DEFAULT_FILE
See Also:
Constant Field Values

DEFAULT_PROPERTIES_FILE

public static final java.lang.String DEFAULT_PROPERTIES_FILE
See Also:
Constant Field Values

CONNECTION_TAG

public static final java.lang.String CONNECTION_TAG
See Also:
Constant Field Values

PASSWORD

public static final java.lang.String PASSWORD
Property name: connection password.

See Also:
Constant Field Values

ORMI_PASSWD

public static final java.lang.String ORMI_PASSWD
See Also:
Constant Field Values

CONNECTION_NAME

public static final java.lang.String CONNECTION_NAME
Property name: names the connection.

See Also:
Constant Field Values

CONNECTION_TYPE

public static final java.lang.String CONNECTION_TYPE
Property name: connection type.

See Also:
Constant Field Values
Constructor Detail

CMConnectionsReader

public CMConnectionsReader()

CMConnectionsReader

public CMConnectionsReader(java.lang.String fName,
                           boolean isAbsolutePath)
Constructor

Parameters:
fName - of the file to read the connection data from
isAbsolutePath - true if this is an filesystem level absolutepath, false if this is a class relative filename
Method Detail

getMigratedConnections

public final 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. Data can be lost by the migration process, to get the old descriptors directly use read() instead.

Returns:
a map of connection Referenceable objects, migrated from the underlying CM storage, keyed by connection name.

read

public final java.util.List<java.util.Properties> read()
Read all of the connections descriptors from storage.

Returns:
a list of all the Properties objects that represent each connection loaded from file.

startDocument

public void startDocument()
Specified by:
startDocument in interface org.xml.sax.ContentHandler
Overrides:
startDocument in class org.xml.sax.helpers.DefaultHandler

endDocument

public void endDocument()
Specified by:
endDocument in interface org.xml.sax.ContentHandler
Overrides:
endDocument in class org.xml.sax.helpers.DefaultHandler

startElement

public void startElement(java.lang.String uri,
                         java.lang.String name,
                         java.lang.String qName,
                         org.xml.sax.Attributes atts)
Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler

endElement

public void endElement(java.lang.String uri,
                       java.lang.String name,
                       java.lang.String qName)
Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler

characters

public void characters(char[] ch,
                       int start,
                       int length)
Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler

comment

public void comment(char[] ch,
                    int start,
                    int length)
             throws org.xml.sax.SAXException
Specified by:
comment in interface org.xml.sax.ext.LexicalHandler
Throws:
org.xml.sax.SAXException

endCDATA

public void endCDATA()
              throws org.xml.sax.SAXException
Specified by:
endCDATA in interface org.xml.sax.ext.LexicalHandler
Throws:
org.xml.sax.SAXException

endDTD

public void endDTD()
            throws org.xml.sax.SAXException
Specified by:
endDTD in interface org.xml.sax.ext.LexicalHandler
Throws:
org.xml.sax.SAXException

endEntity

public void endEntity(java.lang.String name)
               throws org.xml.sax.SAXException
Specified by:
endEntity in interface org.xml.sax.ext.LexicalHandler
Throws:
org.xml.sax.SAXException

startCDATA

public void startCDATA()
                throws org.xml.sax.SAXException
Specified by:
startCDATA in interface org.xml.sax.ext.LexicalHandler
Throws:
org.xml.sax.SAXException

startDTD

public void startDTD(java.lang.String name,
                     java.lang.String publicId,
                     java.lang.String systemId)
              throws org.xml.sax.SAXException
Specified by:
startDTD in interface org.xml.sax.ext.LexicalHandler
Throws:
org.xml.sax.SAXException

startEntity

public void startEntity(java.lang.String name)
                 throws org.xml.sax.SAXException
Specified by:
startEntity in interface org.xml.sax.ext.LexicalHandler
Throws:
org.xml.sax.SAXException

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.0)

E13403-08

Copyright © 1997, 2013, Oracle. All rights reserved.